金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

836 lines
23 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="商品详情" titleColor="#fff" :spreadOut="false" :showIcon="true" bgColor="transparent"></lf-nav>
  4. <skeleton :loading="skeletonLoading" :row="12" :showAvatar="false" :showTitle="true">
  5. <block>
  6. <!-- 商品图片轮播 -->
  7. <swiper :current="current" :indicator-dots="2 > 1 ? false : true" :circular="true" class="swiper-box" indicator-active-color="#1998FE">
  8. <swiper-item v-for="(item, index) in pictures" :key="index">
  9. <image mode="aspectFill" :src="item" style="width: 100%; height: 100%;" @click="lookImg(index)"></image>
  10. <view class="seckill-box" v-if="type == 'seckill'">
  11. <view>距离结束还剩余</view>
  12. <view>
  13. <countdown-timer :time="time" :autoStart="true">
  14. <template v-slot="{hour, minute, second}">
  15. <view class="lf-flex">
  16. <view>{{ hour >= 10 ? hour : "0" + hour }}</view>
  17. <view></view>
  18. <view>{{ minute >= 10 ? minute : "0" + minute }}</view>
  19. <view></view>
  20. <view>{{ second >= 10 ? second : "0" + second }}</view>
  21. <view></view>
  22. </view>
  23. </template>
  24. </countdown-timer>
  25. </view>
  26. </view>
  27. </swiper-item>
  28. </swiper>
  29. <!-- 商品主要信息 -->
  30. <view class="head-info">
  31. <view class="lf-row-between">
  32. <view v-if="type == 'point'">
  33. <text class="lf-font-48 lf-color-primary lf-font-bold">8493</text>
  34. <text class="lf-font-28 lf-color-777 lf-m-l-10">个兑换</text>
  35. </view>
  36. <lf-price :iftext="false" :price="goods_detail.min_price || 0" v-else></lf-price>
  37. <text class="lf-iconfont icon-fenxiang lf-font-40" @click="shareGraphic()"></text>
  38. </view>
  39. <view class="lf-row-between lf-font-24 lf-m-t-20 lf-p-b-20">
  40. <view class="lf-font-bold lf-font-32 lf-color-222">{{ goods_detail.name }}</view>
  41. </view>
  42. <view class="lf-row-between lf-font-24 lf-p-b-30">
  43. <view class="lf-font-28 lf-color-777" v-if="type == 'self'">门店自提</view>
  44. <view class="lf-font-28 lf-color-777 lf-row-between" v-else>可自提/可邮寄</view>
  45. <view v-if="type == 'seckill'">已有38人购买</view>
  46. </view>
  47. </view>
  48. <block v-if="type == 'self'">
  49. <self-line></self-line>
  50. <view class="bg-white" >
  51. <view class="cu-bar padding-lr">
  52. <view class="lf-flex">
  53. <text class="lf-color-777 lf-font-28">优惠</text>
  54. <view v-if="orderDetails.coupon == ''">
  55. <text class="lf-color-price lf-font-28 lf-m-l-10" v-for="(item,index) of orderDetails.coupon">{{item.tag}}</text>
  56. </view>
  57. <view v-else>
  58. <text class="lf-color-222 lf-font-26 lf-m-l-30">化妆品教师节满1200减200</text>
  59. </view>
  60. </view>
  61. <view>
  62. <text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
  63. </view>
  64. </view>
  65. </view>
  66. <self-line></self-line>
  67. <view class="bg-white">
  68. <view class="cu-bar padding-lr">
  69. <view class="lf-flex">
  70. <text class="lf-color-777 lf-font-28">服务</text>
  71. <view style="width: 600rpx;flex-wrap: wrap;display: flex;margin-top: 32rpx;">
  72. <view class="lf-m-l-30" v-for="i of 5">
  73. <text class="lf-iconfont icon-xuanzhong lf-font-30" style="color: #15716E;"></text>
  74. <text class="lf-m-l-10 lf-font-26 lf-color-black">正品保障</text>
  75. </view>
  76. </view>
  77. </view>
  78. <view>
  79. <text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
  80. </view>
  81. </view>
  82. </view>
  83. </block>
  84. <block v-else>
  85. <self-line></self-line>
  86. <!-- <view class="bg-white">
  87. <view class="cu-bar padding-lr">
  88. <view class="lf-flex">
  89. <view class="lf-color-777 lf-font-28">送至</view>
  90. <view class="lf-color-222 lf-font-26 lf-m-l-30" style="width: 550rpx;">广西壮族自治区-南宁市-青秀区-民族大道180号</view>
  91. </view>
  92. <view>
  93. <text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
  94. </view>
  95. </view>
  96. </view> -->
  97. <view class="bg-white">
  98. <view class="cu-bar padding-lr" @click="showFreight">
  99. <view class="lf-flex">
  100. <view class="lf-color-777 lf-font-28">运费</view>
  101. <view class="lf-color-222 lf-font-26 lf-m-l-30 lf-line-1" style="width: 550rpx;">
  102. <text>1KM以内包含1KM重量在5KG以内按6元计费每超出1KG加收2元</text>
  103. </view>
  104. </view>
  105. <view>
  106. <text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
  107. </view>
  108. </view>
  109. </view>
  110. </block>
  111. <view class="bg-white">
  112. <view class="cu-bar padding-lr" @click="shoot(2)">
  113. <view class="lf-flex">
  114. <text class="lf-color-777 lf-font-28">已选</text>
  115. <text class="lf-color-222 lf-font-26 lf-m-l-30">已选500ml x1</text>
  116. </view>
  117. <view>
  118. <text class="lf-font-24 lf-color-777 lf-iconfont icon-xiangyou"></text>
  119. </view>
  120. </view>
  121. </view>
  122. <self-line></self-line>
  123. <view>
  124. <view class="user-top">
  125. <view class="lf-row-between lf-w-100">
  126. <view class="lf-flex" @click="$url('/pages/shop/shopdetail')">
  127. <view class="tag-father">
  128. <image src="https://hainan.lanzulive.com/storage/images/v2-deb89623e0ee2a2dad34bcded6dfd1ed_1440w.png" mode="aspectFill" class="head-img"></image>
  129. </view>
  130. <view class="lf-flex-column lf-m-l-20">
  131. <text class="lf-font-28 lf-color-black lf-font-bold">颐莲官方店</text>
  132. <view class="lf-font-24 lf-color-777">
  133. <text class="lf-iconfont icon-dizhi lf-font-24 lf-color-primary"></text>
  134. <text class="lf-m-l-10">L2</text>
  135. </view>
  136. </view>
  137. </view>
  138. <view>
  139. <button class="head-btn" @click="$url('/pages/user/my/chatonline')">
  140. <!-- <u-icon name="chat" class="lf-m-r-10"></u-icon> -->
  141. <text class="lf-iconfont icon-kefuhdpi lf-font-24"></text>
  142. <text class="lf-m-l-10">客服</text>
  143. </button>
  144. </view>
  145. </view>
  146. </view>
  147. <scroll-view class="scroll-view" :scroll-x="true">
  148. <view class="scroll-content">
  149. <view class="goods-item" v-for="(item, index) in 5" :key="index" @click="$url('/pages/shop/goodsdetail?type='+ this.type)">
  150. <image class="goods-img"></image>
  151. <view class="goods-info">
  152. <view class="lf-line-1">猪大肠卖咯 5毛钱一斤咯</view>
  153. <view>0.5</view>
  154. </view>
  155. </view>
  156. <view class="goods-item" @click="$url('/pages/shop/shopdetail')">
  157. <view class="more-box">
  158. <text>查看更多</text>
  159. <text class="lf-iconfont icon--2 lf-text-vertical"></text>
  160. </view>
  161. </view>
  162. </view>
  163. </scroll-view>
  164. </view>
  165. <!-- 商品详情 -->
  166. <view class="goods-detail">
  167. <view class="lf-font-32 lf-font-bold lf-m-b-20">商品详情</view>
  168. <rich-text :nodes="goods_detail.content"></rich-text>
  169. <!-- <image class="goods-img" :src="item" v-for="(item, index) in goods_detail.content" :key="index" v-if="goods_detail.content_type == 'img'"></image> -->
  170. </view>
  171. <!-- 修饰专用 -->
  172. <view class="extra"></view>
  173. <!-- 吸底操作按钮 -->
  174. <view class="lf-row-between fixed-bottom">
  175. <view class="lf-flex lf-p-t-10 lf-p-b-10">
  176. <view class="lf-flex-column lf-row-center icon-item" open-type="contact">
  177. <text class="lf-iconfont icon-pinglun- icon-img"></text>
  178. <view class="lf-m-t-1">客服</view>
  179. </view>
  180. <view class="lf-flex-column lf-row-center icon-item" @click="switchCollect">
  181. <text class="lf-iconfont icon-shoucang2 icon-img" v-if="is_collect"></text>
  182. <text class="lf-iconfont icon-shoucang11 icon-img" v-else></text>
  183. <view class="lf-m-t-1">{{ is_collect ? '已收藏' : '收藏' }}</view>
  184. </view>
  185. <button class="lf-flex-column lf-row-center icon-item">
  186. <text class="lf-iconfont icon-gouwulan icon-img"></text>
  187. <view class="lf-m-t-1">购物车</view>
  188. </button>
  189. </view>
  190. <view v-if="type == 'seckill'">
  191. <button class="btn" style="width: 349rpx;">立即秒杀</button>
  192. </view>
  193. <view v-else-if="type == 'point'">
  194. <button class="btn" style="width: 349rpx;">立即兑换</button>
  195. </view>
  196. <view class="lf-flex" v-else>
  197. <button class="btn1" @click="shoot(1)">加入购物车</button>
  198. <button class="btn lf-m-l-15" @click="shoot(2)">立即购买</button>
  199. </view>
  200. </view>
  201. <!-- 加入购物车立即购买模态框选规格 -->
  202. <u-popup v-model="show_popup" mode="bottom" :round="true" borderRadius="20">
  203. <view class="popup-content">
  204. <!-- 商品信息及关闭按钮 -->
  205. <view class="popup-head">
  206. <view class="lf-flex">
  207. <image class="goods-img" src="https://picsum.photos/200"></image>
  208. <view class="goods-info">
  209. <view class="price">¥5.8</view>
  210. <view class="goods-name">桃子</view>
  211. </view>
  212. </view>
  213. <view @click="show_popup = false">
  214. <text class="lf-iconfont icon-cuo lf-font-50"></text>
  215. </view>
  216. </view>
  217. <!-- 规格 -->
  218. <view class="spec-title">重量</view>
  219. <view class="lf-flex-wrap">
  220. <view :class="{
  221. 'spec-item': true,
  222. 'spec-active': spec_current == index}"
  223. @click="activeSpec(index)"
  224. v-for="(item, index) in 5"
  225. :key="index">{{ item +'0克' }}
  226. </view>
  227. </view>
  228. <!-- 数量 -->
  229. <view class="lf-row-between lf-m-t-40">
  230. <view class="lf-font-28 lf-color-555">数量</view>
  231. <view class="lf-flex">
  232. <view class="num-btn">
  233. <text class="lf-iconfont icon-jian1 lf-font-30"></text>
  234. </view>
  235. <view>
  236. <input class="input" value="1" />
  237. </view>
  238. <view class="num-btn lf-text-right">
  239. <text class="lf-iconfont icon-jia lf-font-30"></text>
  240. </view>
  241. </view>
  242. </view>
  243. <!-- 操作按钮 -->
  244. <button class="comfirm-btn" @click="confirm">{{ click_type == 1 ? '加入购物车' : '立即购买' }}</button>
  245. </view>
  246. </u-popup>
  247. <!-- 运费说明 -->
  248. <u-popup v-model="show_freight" mode="bottom" :round="true" borderRadius="20">
  249. <view class="popup-content">
  250. <view class="lf-row-between lf-m-b-30">
  251. <view class="lf-color-555 lf-font-32 lf-font-bold">店铺运费说明</view>
  252. <view @click="show_freight = false">
  253. <text class="lf-iconfont icon-cuo lf-font-50"></text>
  254. </view>
  255. </view>
  256. <view class="lf-font-28 lf-color-777">1KM以内包含1KM重量在5KG以内按6元计费每超出1KG加收2元</view>
  257. </view>
  258. </u-popup>
  259. <!-- 回到顶部 -->
  260. <u-back-top :scroll-top="pageScrollTop"></u-back-top>
  261. </block>
  262. </skeleton>
  263. </view>
  264. </template>
  265. <script>
  266. import countdownTimer from '@/components/countdown-timer/countdown-timer';
  267. export default {
  268. components: {
  269. countdownTimer
  270. },
  271. data(){
  272. return {
  273. current: 0, // 轮播下标
  274. goods_id: 0,
  275. goods_detail: {},
  276. is_collect: false, // 1为当前收藏商品了,0为否
  277. skeletonLoading: false,
  278. pictures: [],
  279. show_popup: false, // 是否显示选规格模态框
  280. show_freight: false, // 是否显示运费说明模态框
  281. spec_current: null, // 规格下标
  282. click_type: null, // 当前点击的是加入购物车[1]还是立即购买[2]
  283. type: 'mail', // 页面显示类型,mail普通可邮寄商品,self自提商品,point积分商品,seckill秒杀商品
  284. time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 13:10:00').getTime()
  285. }
  286. },
  287. onLoad(options){
  288. this.goods_id = options.goods_id;
  289. this.type = options.type || 'mail';
  290. console.log('商品',this.goods_id)
  291. // this.getGoodsDetail();
  292. this.getNewdetail();
  293. },
  294. computed: {
  295. isRight() {
  296. return function(val) {
  297. return this.$shared.isRight(val);
  298. }
  299. }
  300. },
  301. methods: {
  302. showFreight(){
  303. this.show_freight = true;
  304. },
  305. shoot(type){
  306. // TODO 判断type做不同的逻辑
  307. this.click_type = type;
  308. this.show_popup = true;
  309. },
  310. activeSpec(index){
  311. if(this.spec_current == index){
  312. this.spec_current = null;
  313. }else{
  314. this.spec_current = index;
  315. }
  316. },
  317. confirm(){
  318. if(this.click_type == 2){
  319. this.$url('/pages/order/confirm/confirm');
  320. }
  321. },
  322. shareGraphic(){
  323. this.getCreateShareImg();
  324. },
  325. //请求h5的图片接口
  326. getCreateShareImg(){
  327. wx.showLoading({
  328. title:"生成中",
  329. mask:true
  330. })
  331. let origin = window.location.origin;
  332. let share_url = origin+'/pages/store/detail/detail';
  333. this.$http.get({
  334. api:'api/distribution/createH5ShareImg',
  335. data:{
  336. goods_id:this.id,
  337. share_url:share_url
  338. }
  339. }).then(res=>{
  340. res = res.data;
  341. if(res.status){
  342. this.qr_code_image = res.data.image;
  343. if(this.qr_code_image){
  344. this.share_gaphic =!this.share_gaphic;
  345. this.is_toggle_share = false;
  346. }
  347. } else{
  348. wx.showModal({
  349. content: res.message || '请求失败,请重试',
  350. showCancel: false
  351. });
  352. }
  353. wx.hideLoading()
  354. }).catch(rej=>{
  355. wx.hideLoading()
  356. wx.showModal({
  357. content: rej.message || '内部错误,请重试',
  358. showCancel: false
  359. });
  360. })
  361. },
  362. getGoodsDetail(){
  363. this.$http(this.API.API_ADVICEDETAILS, {id: this.goods_id}).then(res => {
  364. this.skeletonLoading = false;
  365. this.goods_detail = res.data;
  366. this.is_collect = Boolean(res.data.is_collect) || false;
  367. }).catch(err => {
  368. this.skeletonLoading = false;
  369. setTimeout(() => {
  370. this.$toBack();
  371. }, 1000);
  372. })
  373. },
  374. getNewdetail(){
  375. this.$http.get({
  376. api: '/api/store/detail/4'
  377. }).then(res => {
  378. console.log("===---", res);
  379. this.goods_detail = res.data.data;
  380. this.pictures = [res.data.data.img];
  381. console.log("this.pictures", this.pictures);
  382. }).catch(err => {
  383. console.log("====", err);
  384. })
  385. },
  386. // 切换商品收藏
  387. switchCollect(){
  388. let userInfo = uni.getStorageSync('userinfo') || {};
  389. if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){
  390. this.$url('/pages/login/index?type=userinfo');
  391. return;
  392. }
  393. if(this.is_collect) {
  394. this.$http(this.API.API_DELCOLLECT, {agent_product_id:this.goods_id}).then(res => {
  395. this.$msg('取消收藏成功!')
  396. this.is_collect = false
  397. console.log(res)
  398. })
  399. }else {
  400. this.$http(this.API.API_ADDCOLLECT, {agent_product_id:this.goods_id}).then(res => {
  401. this.$msg('添加收藏成功!')
  402. this.is_collect = true
  403. console.log(res)
  404. })
  405. }
  406. },
  407. // 拨打电话
  408. makePhoneCall(phoneStr){
  409. uni.makePhoneCall({
  410. phoneNumber: String(phoneStr)
  411. })
  412. },
  413. // 打开地图
  414. openMap(){
  415. let { address, lat, lng } = this.goods_detail?.store || {};
  416. uni.openLocation({
  417. longitude: Number(lat),
  418. latitude: Number(lng),
  419. scale: 20,
  420. name: address
  421. });
  422. },
  423. // 跳转到确认下单页面
  424. toAddOrder(){
  425. let goods_id = this.goods_detail.id;
  426. this.$url('/pages/order/confirm_order?goods_id='+ goods_id);
  427. },
  428. // 预览图片
  429. lookImg(index){
  430. this.$u.throttle(() => {
  431. // let goods_banner = this.goods_detail.banners || [];
  432. // let banners = goods_banner.map(item => item.cover);
  433. let banners = this.pictures;
  434. uni.previewImage({
  435. urls: banners,
  436. current: index
  437. })
  438. }, 200);
  439. },
  440. // 富文本处理
  441. formatRichText(richText){
  442. if(richText != null){
  443. let newRichText= richText.replace(/<img[^>]*>/gi, function(match, capture){
  444. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  445. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  446. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  447. return match;
  448. });
  449. newRichText = newRichText.replace(/style="[^"]+"/gi,function(match, capture){
  450. match = match.replace(/width:[^;]+;/gi, 'width:100%;').replace(/width:[^;]+;/gi, 'width:100%;');
  451. return match;
  452. });
  453. newRichText = newRichText.replace(/<br[^>]*\/>/gi, '');
  454. newRichText = newRichText.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;margin:10px 0;"');
  455. return newRichText;
  456. }else{
  457. return null;
  458. }
  459. }
  460. },
  461. onShareAppMessage(){
  462. let goods = this.goods_detail;
  463. let title = goods.name;
  464. let imageUrl = goods.share_cover || goods.cover;
  465. let path = '/pages/route/index?route=goods_detail&id='+ goods.id;
  466. return {
  467. title,
  468. path,
  469. imageUrl
  470. }
  471. }
  472. }
  473. </script>
  474. <style>
  475. page{
  476. background-color: #f5f5f5;
  477. overflow-x: hidden;
  478. }
  479. </style>
  480. <style lang="scss" scoped="scoped">
  481. //商品上去scrollview部分
  482. .scroll-view{
  483. height: 310rpx;
  484. width: 100%;
  485. // margin-top: 20rpx;
  486. padding: 0 30rpx 30rpx 30rpx;
  487. background-color: white;
  488. .scroll-content{
  489. display: flex;
  490. width: 100%;
  491. .goods-item{
  492. margin-right: 15rpx;
  493. width: 180rpx;
  494. }
  495. .goods-img{
  496. width: 180rpx;
  497. height: 180rpx;
  498. background-color: #EEEEEE;
  499. }
  500. .goods-info{
  501. text-align: center;
  502. color: #222222;
  503. &>view:nth-child(1n){
  504. font-size: 24rpx;
  505. }
  506. &>view:nth-child(2n){
  507. font-size: 28rpx;
  508. font-weight: bold;
  509. text-align: left;
  510. color: #F63434;
  511. }
  512. }
  513. .more-box{
  514. width: 180rpx;
  515. height: 180rpx;
  516. background-color: #EEEEEE;
  517. text-align: center;
  518. line-height: 180rpx;
  519. font-size: 24rpx;
  520. }
  521. }
  522. }
  523. //scrollview结束
  524. .tag-father {
  525. position: relative;
  526. }
  527. .head-tag {
  528. color: white;
  529. display: flex;
  530. align-items: center;
  531. justify-content: center;
  532. text-align: center;
  533. font-size: 24rpx;
  534. width: 36rpx;
  535. height: 36rpx;
  536. border-radius: 50%;
  537. background-color: #15716E;
  538. border: 1rpx solid #FFFFFF;
  539. position: absolute;
  540. left: 76rpx;
  541. top: 86rpx;
  542. z-index: 99;
  543. }
  544. .qzone-img {
  545. width: 220rpx;
  546. height: 220rpx;
  547. border-radius: 10rpx;
  548. margin-right: 12rpx;
  549. &:nth-child(3n) {
  550. margin-right: 0;
  551. }
  552. &:nth-child(n + 4) {
  553. margin-top: 12rpx;
  554. }
  555. }
  556. .user-top {
  557. background-color: #F3F8F8;
  558. padding: 30rpx;
  559. display: flex;
  560. align-items: center;
  561. background-color: white;
  562. }
  563. .head-img {
  564. width: 80rpx;
  565. height: 80rpx;
  566. border-radius: 50%;
  567. }
  568. .head-btn {
  569. display: flex;
  570. width: max-content;
  571. height: 45rpx;
  572. background: white;
  573. border: 2rpx solid #15716E;
  574. align-items: center;
  575. font-size: 22rpx;
  576. color: #15716E;
  577. justify-content: space-between;
  578. border-radius: 35rpx;
  579. padding: 10rpx!important;
  580. }
  581. .swiper-box{
  582. width: 750rpx;
  583. height: 750rpx;
  584. background-color: #FFFFFF;
  585. position: relative;
  586. .seckill-box{
  587. position: absolute;
  588. bottom: 0;
  589. left: 0;
  590. display: flex;
  591. justify-content: space-between;
  592. align-items: center;
  593. padding: 0 32rpx;
  594. width: 100%;
  595. height: 77rpx;
  596. background-color: #15716E;
  597. color: #FFFFFF;
  598. font-size: 26rpx;
  599. }
  600. }
  601. .head-info{
  602. width: 750rpx;
  603. height: auto;
  604. box-sizing: border-box;
  605. padding: 0 32rpx;
  606. padding-top: 20rpx;
  607. background-color: #FFFFFF;
  608. // .price>view:nth-of-type(1){
  609. // color: #FF0000;
  610. // margin-right: 22rpx;
  611. // font-weight: bold;
  612. // }
  613. .price>view:nth-of-type(1){
  614. text-decoration: line-through;
  615. color: #777777;
  616. margin-right: 22rpx;
  617. }
  618. .price>view:nth-of-type(2){
  619. width: max-content;
  620. padding: 0 18rpx;
  621. height: 46rpx;
  622. background-color: #1998FE;
  623. border-radius: 10rpx;
  624. display: flex;
  625. justify-content: center;
  626. align-items: center;
  627. color: #FFFFFF;
  628. }
  629. .label-box{
  630. min-height: 130rpx;
  631. width: 100%;
  632. border-top: 1rpx solid #E5E5E5;
  633. display: flex;
  634. flex-wrap: wrap;
  635. padding: 30rpx 0 10rpx 0;
  636. .label-item{
  637. width: max-content;
  638. padding: 20rpx;
  639. height: 70rpx;
  640. border-radius: 10rpx;
  641. border: 2rpx solid #1998FE;
  642. display: flex;
  643. justify-content: center;
  644. align-items: center;
  645. font-size: 28rpx;
  646. color: #1998FE;
  647. margin-right: 20rpx;
  648. margin-bottom: 20rpx;
  649. }
  650. }
  651. }
  652. .address-box{
  653. width: 750rpx;
  654. height: auto;
  655. box-sizing: border-box;
  656. background-color: #FFFFFF;
  657. padding: 32rpx;
  658. margin-top: 20rpx;
  659. .shop-img{
  660. width: 60rpx;
  661. height: 60rpx;
  662. border-radius: 50%;
  663. }
  664. }
  665. .goods-detail{
  666. width: 750rpx;
  667. height: auto;
  668. background-color: #FFFFFF;
  669. padding: 32rpx;
  670. box-sizing: border-box;
  671. margin-top: 20rpx;
  672. .goods-img{
  673. width: 100%;
  674. }
  675. }
  676. .extra{
  677. width: 100%;
  678. height: 110rpx;
  679. padding-bottom: constant(safe-area-inset-bottom);
  680. padding-bottom: env(safe-area-inset-bottom);
  681. box-sizing: content-box;
  682. }
  683. .fixed-bottom{
  684. position: fixed;
  685. bottom: 0;
  686. left: 0;
  687. background-color: #FFFFFF;
  688. width: 100%;
  689. height: auto;
  690. padding: 0 32rpx;
  691. border-top: 1rpx solid #e5e5e5;
  692. padding-bottom: constant(safe-area-inset-bottom);
  693. padding-bottom: env(safe-area-inset-bottom);
  694. .icon-item{
  695. text-align: center;
  696. margin-right: 16rpx;
  697. background-color: transparent;
  698. margin: 0;
  699. line-height: initial;
  700. font-size: 28rpx;
  701. font-weight: inherit;
  702. margin-right: 10rpx;
  703. padding: 0;
  704. width: 88rpx;
  705. position: relative;
  706. &:first-child{
  707. padding-left: 0;
  708. }
  709. .icon-img{
  710. height: 50rpx;
  711. width: 50rpx;
  712. font-size: 40rpx;
  713. line-height: 1;
  714. }
  715. }
  716. .btn1{
  717. margin: 0;
  718. width: max-content;
  719. height: 80rpx;
  720. background-color: rgba(21, 113, 110, 0.1);
  721. color: #15716E;
  722. line-height: 80rpx;
  723. font-size: 32rpx;
  724. padding: 0 20rpx;
  725. border-radius: 42rpx;
  726. font-size: 26rpx;
  727. border: 2rpx solid #15716E;
  728. }
  729. .btn{
  730. margin: 0;
  731. padding: 0 20rpx;
  732. width: max-content;
  733. height: 80rpx;
  734. background-color: #15716E;
  735. color: #FFFFFF;
  736. line-height: 80rpx;
  737. font-size: 26rpx;
  738. border-radius: 42rpx;
  739. }
  740. }
  741. .popup-content{
  742. height: max-content;
  743. width: 750rpx;
  744. background: #FFFFFF;
  745. border-radius: 20rpx 20rpx 0rpx 0rpx !important;
  746. padding: 40rpx 32rpx;
  747. .popup-head{
  748. display: flex;
  749. justify-content: space-between;
  750. .goods-img{
  751. width: 150rpx;
  752. height: 150rpx;
  753. border-radius: 2rpx;
  754. margin-right: 20rpx;
  755. }
  756. .goods-info{
  757. width: 400rpx;
  758. height: 150rpx;
  759. display: flex;
  760. flex-direction: column;
  761. justify-content: space-around;
  762. .price{
  763. font-size: 48rpx;
  764. font-weight: bold;
  765. color: #F63434;
  766. line-height: 1;
  767. }
  768. .goods-name{
  769. font-size: 32rpx;
  770. color: #222222;
  771. line-height: 1.4;
  772. }
  773. }
  774. }
  775. .spec-title{
  776. font-size: 28rpx;
  777. color: #555555;
  778. margin-top: 40rpx;
  779. margin-bottom: 20rpx;
  780. }
  781. .spec-item{
  782. width: 142rpx;
  783. height: 64rpx;
  784. border-radius: 33rpx;
  785. border: 2rpx solid #555555;
  786. font-size: 28rpx;
  787. color: #555555;
  788. display: flex;
  789. justify-content: center;
  790. align-items: center;
  791. margin-right: 20rpx;
  792. &:nth-child(4n){
  793. margin-right: 0rpx;
  794. }
  795. &:nth-child(n+5){
  796. margin-top: 20rpx;
  797. }
  798. }
  799. .spec-active{
  800. border: none;
  801. background-color: #15716E;
  802. color: #FFFFFF;
  803. }
  804. .input{
  805. width: 40rpx;
  806. height: 45rpx;
  807. border-radius: 2rpx;
  808. background-color: #F3F8F7;
  809. text-align: center;
  810. }
  811. .num-btn{
  812. width: 36rpx;
  813. }
  814. .comfirm-btn{
  815. width: 550rpx;
  816. height: 100rpx;
  817. background: #15716E;
  818. border-radius: 50rpx;
  819. color: #FFFFFF;
  820. line-height: 100rpx;
  821. margin-top: 62rpx;
  822. }
  823. }
  824. </style>