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

833 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.getNewdetail();
  292. },
  293. computed: {
  294. isRight() {
  295. return function(val) {
  296. return this.$shared.isRight(val);
  297. }
  298. }
  299. },
  300. methods: {
  301. // 切换商品收藏
  302. switchCollect(){
  303. let userInfo = this.$cookieStorage.get('user_token') || {};
  304. if(!userInfo){
  305. this.$url('/pages/login/index');
  306. return;
  307. }
  308. this.addCollcet()
  309. },
  310. //收藏
  311. addCollcet() {
  312. console.log('当前的商品id',this.goods_detail.id)
  313. this.$http.post({
  314. api: 'api/collect/create',
  315. data: {
  316. type:'jc_goods',
  317. collect_id: this.goods_detail.id,
  318. },
  319. header: {
  320. Authorization: this.$cookieStorage.get('user_token')
  321. }
  322. }).then(res => {
  323. this.$msg(res.data.data);
  324. this.getNewdetail();
  325. }).catch(err => {
  326. console.log("====", err);
  327. })
  328. },
  329. showFreight(){
  330. this.show_freight = true;
  331. },
  332. shoot(type){
  333. // TODO 判断type做不同的逻辑
  334. this.click_type = type;
  335. this.show_popup = true;
  336. },
  337. activeSpec(index){
  338. if(this.spec_current == index){
  339. this.spec_current = null;
  340. }else{
  341. this.spec_current = index;
  342. }
  343. },
  344. confirm(){
  345. if(this.click_type == 2){
  346. this.$url('/pages/order/confirm/confirm');
  347. }
  348. },
  349. shareGraphic(){
  350. this.getCreateShareImg();
  351. },
  352. //请求h5的图片接口
  353. getCreateShareImg(){
  354. wx.showLoading({
  355. title:"生成中",
  356. mask:true
  357. })
  358. let origin = window.location.origin;
  359. let share_url = origin+'/pages/store/detail/detail';
  360. this.$http.get({
  361. api:'api/distribution/createH5ShareImg',
  362. data:{
  363. goods_id:this.id,
  364. share_url:share_url
  365. }
  366. }).then(res=>{
  367. res = res.data;
  368. if(res.status){
  369. this.qr_code_image = res.data.image;
  370. if(this.qr_code_image){
  371. this.share_gaphic =!this.share_gaphic;
  372. this.is_toggle_share = false;
  373. }
  374. } else{
  375. wx.showModal({
  376. content: res.message || '请求失败,请重试',
  377. showCancel: false
  378. });
  379. }
  380. wx.hideLoading()
  381. }).catch(rej=>{
  382. wx.hideLoading()
  383. wx.showModal({
  384. content: rej.message || '内部错误,请重试',
  385. showCancel: false
  386. });
  387. })
  388. },
  389. getNewdetail(){
  390. this.$http.get({
  391. api: '/api/store/detail/'+this.goods_id,
  392. header: {
  393. Authorization: this.$cookieStorage.get('user_token')
  394. }
  395. }).then(res => {
  396. console.log("===---", res);
  397. this.goods_detail = res.data.data;
  398. this.pictures = [res.data.data.img];
  399. this.is_collect = Boolean(res.data.data.is_collect) || false;
  400. console.log("this.pictures", this.pictures);
  401. }).catch(err => {
  402. console.log("====", err);
  403. })
  404. },
  405. // 拨打电话
  406. makePhoneCall(phoneStr){
  407. uni.makePhoneCall({
  408. phoneNumber: String(phoneStr)
  409. })
  410. },
  411. // 打开地图
  412. openMap(){
  413. let { address, lat, lng } = this.goods_detail?.store || {};
  414. uni.openLocation({
  415. longitude: Number(lat),
  416. latitude: Number(lng),
  417. scale: 20,
  418. name: address
  419. });
  420. },
  421. // 跳转到确认下单页面
  422. toAddOrder(){
  423. let goods_id = this.goods_detail.id;
  424. this.$url('/pages/order/confirm_order?goods_id='+ goods_id);
  425. },
  426. // 预览图片
  427. lookImg(index){
  428. this.$u.throttle(() => {
  429. // let goods_banner = this.goods_detail.banners || [];
  430. // let banners = goods_banner.map(item => item.cover);
  431. let banners = this.pictures;
  432. uni.previewImage({
  433. urls: banners,
  434. current: index
  435. })
  436. }, 200);
  437. },
  438. // 富文本处理
  439. formatRichText(richText){
  440. if(richText != null){
  441. let newRichText= richText.replace(/<img[^>]*>/gi, function(match, capture){
  442. match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
  443. match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
  444. match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
  445. return match;
  446. });
  447. newRichText = newRichText.replace(/style="[^"]+"/gi,function(match, capture){
  448. match = match.replace(/width:[^;]+;/gi, 'width:100%;').replace(/width:[^;]+;/gi, 'width:100%;');
  449. return match;
  450. });
  451. newRichText = newRichText.replace(/<br[^>]*\/>/gi, '');
  452. newRichText = newRichText.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;margin:10px 0;"');
  453. return newRichText;
  454. }else{
  455. return null;
  456. }
  457. }
  458. },
  459. onShareAppMessage(){
  460. let goods = this.goods_detail;
  461. let title = goods.name;
  462. let imageUrl = goods.share_cover || goods.cover;
  463. let path = '/pages/route/index?route=goods_detail&id='+ goods.id;
  464. return {
  465. title,
  466. path,
  467. imageUrl
  468. }
  469. }
  470. }
  471. </script>
  472. <style>
  473. page{
  474. background-color: #f5f5f5;
  475. overflow-x: hidden;
  476. }
  477. </style>
  478. <style lang="scss" scoped="scoped">
  479. //商品上去scrollview部分
  480. .scroll-view{
  481. height: 310rpx;
  482. width: 100%;
  483. // margin-top: 20rpx;
  484. padding: 0 30rpx 30rpx 30rpx;
  485. background-color: white;
  486. .scroll-content{
  487. display: flex;
  488. width: 100%;
  489. .goods-item{
  490. margin-right: 15rpx;
  491. width: 180rpx;
  492. }
  493. .goods-img{
  494. width: 180rpx;
  495. height: 180rpx;
  496. background-color: #EEEEEE;
  497. }
  498. .goods-info{
  499. text-align: center;
  500. color: #222222;
  501. &>view:nth-child(1n){
  502. font-size: 24rpx;
  503. }
  504. &>view:nth-child(2n){
  505. font-size: 28rpx;
  506. font-weight: bold;
  507. text-align: left;
  508. color: #F63434;
  509. }
  510. }
  511. .more-box{
  512. width: 180rpx;
  513. height: 180rpx;
  514. background-color: #EEEEEE;
  515. text-align: center;
  516. line-height: 180rpx;
  517. font-size: 24rpx;
  518. }
  519. }
  520. }
  521. //scrollview结束
  522. .tag-father {
  523. position: relative;
  524. }
  525. .head-tag {
  526. color: white;
  527. display: flex;
  528. align-items: center;
  529. justify-content: center;
  530. text-align: center;
  531. font-size: 24rpx;
  532. width: 36rpx;
  533. height: 36rpx;
  534. border-radius: 50%;
  535. background-color: #15716E;
  536. border: 1rpx solid #FFFFFF;
  537. position: absolute;
  538. left: 76rpx;
  539. top: 86rpx;
  540. z-index: 99;
  541. }
  542. .qzone-img {
  543. width: 220rpx;
  544. height: 220rpx;
  545. border-radius: 10rpx;
  546. margin-right: 12rpx;
  547. &:nth-child(3n) {
  548. margin-right: 0;
  549. }
  550. &:nth-child(n + 4) {
  551. margin-top: 12rpx;
  552. }
  553. }
  554. .user-top {
  555. background-color: #F3F8F8;
  556. padding: 30rpx;
  557. display: flex;
  558. align-items: center;
  559. background-color: white;
  560. }
  561. .head-img {
  562. width: 80rpx;
  563. height: 80rpx;
  564. border-radius: 50%;
  565. }
  566. .head-btn {
  567. display: flex;
  568. width: max-content;
  569. height: 45rpx;
  570. background: white;
  571. border: 2rpx solid #15716E;
  572. align-items: center;
  573. font-size: 22rpx;
  574. color: #15716E;
  575. justify-content: space-between;
  576. border-radius: 35rpx;
  577. padding: 10rpx!important;
  578. }
  579. .swiper-box{
  580. width: 750rpx;
  581. height: 750rpx;
  582. background-color: #FFFFFF;
  583. position: relative;
  584. .seckill-box{
  585. position: absolute;
  586. bottom: 0;
  587. left: 0;
  588. display: flex;
  589. justify-content: space-between;
  590. align-items: center;
  591. padding: 0 32rpx;
  592. width: 100%;
  593. height: 77rpx;
  594. background-color: #15716E;
  595. color: #FFFFFF;
  596. font-size: 26rpx;
  597. }
  598. }
  599. .head-info{
  600. width: 750rpx;
  601. height: auto;
  602. box-sizing: border-box;
  603. padding: 0 32rpx;
  604. padding-top: 20rpx;
  605. background-color: #FFFFFF;
  606. // .price>view:nth-of-type(1){
  607. // color: #FF0000;
  608. // margin-right: 22rpx;
  609. // font-weight: bold;
  610. // }
  611. .price>view:nth-of-type(1){
  612. text-decoration: line-through;
  613. color: #777777;
  614. margin-right: 22rpx;
  615. }
  616. .price>view:nth-of-type(2){
  617. width: max-content;
  618. padding: 0 18rpx;
  619. height: 46rpx;
  620. background-color: #1998FE;
  621. border-radius: 10rpx;
  622. display: flex;
  623. justify-content: center;
  624. align-items: center;
  625. color: #FFFFFF;
  626. }
  627. .label-box{
  628. min-height: 130rpx;
  629. width: 100%;
  630. border-top: 1rpx solid #E5E5E5;
  631. display: flex;
  632. flex-wrap: wrap;
  633. padding: 30rpx 0 10rpx 0;
  634. .label-item{
  635. width: max-content;
  636. padding: 20rpx;
  637. height: 70rpx;
  638. border-radius: 10rpx;
  639. border: 2rpx solid #1998FE;
  640. display: flex;
  641. justify-content: center;
  642. align-items: center;
  643. font-size: 28rpx;
  644. color: #1998FE;
  645. margin-right: 20rpx;
  646. margin-bottom: 20rpx;
  647. }
  648. }
  649. }
  650. .address-box{
  651. width: 750rpx;
  652. height: auto;
  653. box-sizing: border-box;
  654. background-color: #FFFFFF;
  655. padding: 32rpx;
  656. margin-top: 20rpx;
  657. .shop-img{
  658. width: 60rpx;
  659. height: 60rpx;
  660. border-radius: 50%;
  661. }
  662. }
  663. .goods-detail{
  664. width: 750rpx;
  665. height: auto;
  666. background-color: #FFFFFF;
  667. padding: 32rpx;
  668. box-sizing: border-box;
  669. margin-top: 20rpx;
  670. .goods-img{
  671. width: 100%;
  672. }
  673. }
  674. .extra{
  675. width: 100%;
  676. height: 110rpx;
  677. padding-bottom: constant(safe-area-inset-bottom);
  678. padding-bottom: env(safe-area-inset-bottom);
  679. box-sizing: content-box;
  680. }
  681. .fixed-bottom{
  682. position: fixed;
  683. bottom: 0;
  684. left: 0;
  685. background-color: #FFFFFF;
  686. width: 100%;
  687. height: auto;
  688. padding: 0 32rpx;
  689. border-top: 1rpx solid #e5e5e5;
  690. padding-bottom: constant(safe-area-inset-bottom);
  691. padding-bottom: env(safe-area-inset-bottom);
  692. .icon-item{
  693. text-align: center;
  694. margin-right: 16rpx;
  695. background-color: transparent;
  696. margin: 0;
  697. line-height: initial;
  698. font-size: 28rpx;
  699. font-weight: inherit;
  700. margin-right: 10rpx;
  701. padding: 0;
  702. width: 88rpx;
  703. position: relative;
  704. &:first-child{
  705. padding-left: 0;
  706. }
  707. .icon-img{
  708. height: 50rpx;
  709. width: 50rpx;
  710. font-size: 40rpx;
  711. line-height: 1;
  712. }
  713. }
  714. .btn1{
  715. margin: 0;
  716. width: max-content;
  717. height: 80rpx;
  718. background-color: rgba(21, 113, 110, 0.1);
  719. color: #15716E;
  720. line-height: 80rpx;
  721. font-size: 32rpx;
  722. padding: 0 20rpx;
  723. border-radius: 42rpx;
  724. font-size: 26rpx;
  725. border: 2rpx solid #15716E;
  726. }
  727. .btn{
  728. margin: 0;
  729. padding: 0 20rpx;
  730. width: max-content;
  731. height: 80rpx;
  732. background-color: #15716E;
  733. color: #FFFFFF;
  734. line-height: 80rpx;
  735. font-size: 26rpx;
  736. border-radius: 42rpx;
  737. }
  738. }
  739. .popup-content{
  740. height: max-content;
  741. width: 750rpx;
  742. background: #FFFFFF;
  743. border-radius: 20rpx 20rpx 0rpx 0rpx !important;
  744. padding: 40rpx 32rpx;
  745. .popup-head{
  746. display: flex;
  747. justify-content: space-between;
  748. .goods-img{
  749. width: 150rpx;
  750. height: 150rpx;
  751. border-radius: 2rpx;
  752. margin-right: 20rpx;
  753. }
  754. .goods-info{
  755. width: 400rpx;
  756. height: 150rpx;
  757. display: flex;
  758. flex-direction: column;
  759. justify-content: space-around;
  760. .price{
  761. font-size: 48rpx;
  762. font-weight: bold;
  763. color: #F63434;
  764. line-height: 1;
  765. }
  766. .goods-name{
  767. font-size: 32rpx;
  768. color: #222222;
  769. line-height: 1.4;
  770. }
  771. }
  772. }
  773. .spec-title{
  774. font-size: 28rpx;
  775. color: #555555;
  776. margin-top: 40rpx;
  777. margin-bottom: 20rpx;
  778. }
  779. .spec-item{
  780. width: 142rpx;
  781. height: 64rpx;
  782. border-radius: 33rpx;
  783. border: 2rpx solid #555555;
  784. font-size: 28rpx;
  785. color: #555555;
  786. display: flex;
  787. justify-content: center;
  788. align-items: center;
  789. margin-right: 20rpx;
  790. &:nth-child(4n){
  791. margin-right: 0rpx;
  792. }
  793. &:nth-child(n+5){
  794. margin-top: 20rpx;
  795. }
  796. }
  797. .spec-active{
  798. border: none;
  799. background-color: #15716E;
  800. color: #FFFFFF;
  801. }
  802. .input{
  803. width: 40rpx;
  804. height: 45rpx;
  805. border-radius: 2rpx;
  806. background-color: #F3F8F7;
  807. text-align: center;
  808. }
  809. .num-btn{
  810. width: 36rpx;
  811. }
  812. .comfirm-btn{
  813. width: 550rpx;
  814. height: 100rpx;
  815. background: #15716E;
  816. border-radius: 50rpx;
  817. color: #FFFFFF;
  818. line-height: 100rpx;
  819. margin-top: 62rpx;
  820. }
  821. }
  822. </style>