金诚优选前端代码
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.

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