detail.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. <template>
  2. <view class="content">
  3. <block v-if="isLoading">
  4. <view class="skeleton-line max animate" style="height: 400rpx;"></view>
  5. <view class="skeleton">
  6. <view class="skeleton-line animate mt15"></view>
  7. <view class="skeleton-line min animate mt15"></view>
  8. <view class="skeleton-line min animate mt15"></view>
  9. </view>
  10. <view class="skeleton-line max animate mt15" style="height: 200upx;"></view>
  11. <view class="skeleton-line max animate mt15" style="height: 200upx;"></view>
  12. </block>
  13. <view class="goods-content" v-else>
  14. <scroll-view class="goods-body" scroll-y scroll-with-animation>
  15. <view class="home-banner" v-if="bannerData.length>0">
  16. <swiper class="swiper" circular :indicator-dots="indicatorDots" :style="{ height: swiperHeight + 'px' }" :current="currIndex" @change="changeSwiper" :autoplay="false" :interval="2000" :duration="200">
  17. <swiper-item class="swiper-item" v-for="(item,idex) in bannerData" :key="idex">
  18. <image :src="item.url" :id="'wrap' + idex" mode="widthFix"></image>
  19. </swiper-item>
  20. </swiper>
  21. </view>
  22. <view class="goods-top" v-if="goodsData">
  23. <view class="price">
  24. <view class="price-sale">{{ goodsData.price?$dialog.formatMoney(goodsData.price):'0.00'}}</view>
  25. <view class="sale">{{$dialog.disFormat(goodsData.price,goodsData.line_price)}}折</view>
  26. <view class="line-price">{{ goodsData.line_price ? $dialog.formatMoney(goodsData.line_price) : '0.00'}}</view>
  27. <view class="desc-num">已售{{goodsData.sale_stock}}</view>
  28. </view>
  29. <view class="goods-info">
  30. <view class="title" v-if="goodsData.is_new == 1">{{goodsData.price}}元代{{goodsData.line_price}}元商场权益券{{goodsData.product_name}}</view>
  31. <view class="title" v-else>{{goodsData.product_name}}</view>
  32. <view class="goods-rule" @click="openRule(1)">
  33. 购买须知<view class="right">
  34. <span class="mix-item" v-if="goodsData.use_date_type==1">
  35. 自购买之日起{{ goodsData.day_duration }}天有效
  36. </span>
  37. <span class="mix-item" v-else>
  38. 有效期:{{ $dialog.dateFormat(goodsData.use_time_start,'yyyy-MM-dd') }}至{{ $dialog.dateFormat(goodsData.use_time_end,'yyyy-MM-dd') }}
  39. </span>
  40. <image src="/static/image/right-black.png"></image></view>
  41. </view>
  42. <view class="goods-safe">
  43. <view class="safe-item"><image src="/static/image/check.png"></image>过期退</view>
  44. <view class="safe-item"><image src="/static/image/check.png"></image>随时退</view>
  45. </view>
  46. </view>
  47. <view class="goods-store" v-if="goodsData.poi">
  48. <view class="title">适用门店</view>
  49. <view class="store-info">
  50. <view class="store-left">
  51. <view class="name">{{goodsData.poi?goodsData.poi.poi_name:'-'}}</view>
  52. <view class="address">{{goodsData.poi?goodsData.poi.poi_address:'-'}}</view>
  53. </view>
  54. <view class="store-right">
  55. <view class="right-item" @click="toMap">
  56. <image src="/static/image/amap.png"></image>
  57. <view class="desc">导航</view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="goods-store" v-if="specs.length > 0 && goodsData.product_type !== 11">
  63. <view class="title">团购套餐</view>
  64. <div class="group-body" v-for="(item,indx) in specs" :key="indx">
  65. <div class="body-title">
  66. {{item.name}}
  67. <span v-if="item.num == 0">全部可选</span>
  68. <span v-else>{{item.list.length}}选{{item.num}}</span>
  69. </div>
  70. <div class="body-item">
  71. <div class="body-item-li" v-for="(its,idx) in item.list" :key="idx">
  72. {{its.name}}
  73. <div class="item-right">
  74. <span class="desc">({{its.number}}份)</span>
  75. <span>¥ {{ its.price }}</span>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </view>
  81. <view class="buy-rule">
  82. <view class="title">购买须知</view>
  83. <view class="rule-list">
  84. <view class="rule-item">
  85. <view class="icon"><image src="/static/image/rule-date.png"></image></view>
  86. <view class="item-top">
  87. <view class="name">可用日期</view>
  88. <view class="desc">
  89. <span class="mix-item" v-if="goodsData.use_date_type==1">
  90. 自购买之日起{{ goodsData.day_duration }}天有效
  91. </span>
  92. <span class="mix-item" v-else>
  93. 有效期:{{ $dialog.dateFormat(goodsData.use_time_start,'yyyy-MM-dd') }}至{{ $dialog.dateFormat(goodsData.use_time_end,'yyyy-MM-dd') }}
  94. </span>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="rule-item">
  99. <view class="icon"><image src="/static/image/rule-time.png"></image></view>
  100. <view class="item-top">
  101. <view class="name">可用时间</view>
  102. <view class="desc" v-if="goodsData.can_no_use_date==1">商家营业时间可用</view>
  103. </view>
  104. </view>
  105. <view class="rule-item">
  106. <view class="icon"><image src="/static/image/rule-rule.png"></image></view>
  107. <view class="item-top">
  108. <view class="name">预约规则</view>
  109. <view class="desc" v-if="goodsData.booking_type==1">无需预约,高峰期可能需要排队</view>
  110. <view class="desc" v-if="goodsData.booking_type==2">
  111. 需要提前<span>{{ goodsData.booking_date }}</span>{{ goodsData.booking_unit==1?'天':'小时' }}预约
  112. </view>
  113. </view>
  114. </view>
  115. <view class="rule-item">
  116. <view class="icon"><image src="/static/image/rule-refund.png"></image></view>
  117. <view class="item-top">
  118. <view class="name">退款政策<view class="tips">随时退/过期退</view></view>
  119. <view class="desc">随时退款:未核销的商品支持随时申请退款;过期自动退:商品若在有效时间内未核销使用,到期之后系统将自动发起退款</view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="other-content">
  125. <view class="title">更多详情</view>
  126. <view class="rule-content">
  127. <template v-if="goodsData.content">
  128. <view class="content-data" v-html="goodsData.content"></view>
  129. </template>
  130. <template v-if="otherImg.length > 0">
  131. <view class="rule-img" v-for="(item,indx) in otherImg" :key="indx">
  132. <image :src="item" mode="widthFix"></image>
  133. </view>
  134. </template>
  135. </view>
  136. </view>
  137. </view>
  138. <view class="line-height"></view>
  139. </scroll-view>
  140. <view class="footer">
  141. <view class="footer-op">
  142. <view class="footer-left">
  143. <view class="item" @click="toNav('home')"><image src="/static/image/goods/home.png"></image>首页</view>
  144. <view class="item" @click="kfPop"><image src="/static/image/goods/service.png"></image>客服</view>
  145. <view class="item" @click="toNav('order')"><image src="/static/image/goods/order.png"></image>订单</view>
  146. </view>
  147. <view class="footer-right" @click="buyOrder(1)" v-if="isLogin">立即购买 {{ goodsData?$dialog.formatMoney(goodsData.price):'0.00'}}</view>
  148. <button class="footer-right" @click="toLogin" v-else>登录下单 {{ goodsData?$dialog.formatMoney(goodsData.price):''}}</button>
  149. </view>
  150. <view class="footer-safe"></view>
  151. </view>
  152. </view>
  153. <uni-popup ref="rulepopup" type="bottom" border-radius="10px 10px 0 0" background-color="#f1f1f1" :mask-click="false">
  154. <view class="rule-popup">
  155. <view class="title">
  156. 购买须知
  157. <view class="close" @click="openRule(2)"><image src="/static/image/close.png"></image></view>
  158. </view>
  159. <view class="buy-rule" v-if="goodsData">
  160. <view class="rule-list">
  161. <view class="rule-item">
  162. <view class="icon"><image src="/static/image/rule-date.png"></image></view>
  163. <view class="item-top">
  164. <view class="name">可用日期</view>
  165. <view class="desc">
  166. <span class="mix-item" v-if="goodsData.use_date_type==1">
  167. 自购买之日起{{ goodsData.day_duration }}天有效
  168. </span>
  169. <span class="mix-item" v-else>
  170. 有效期:{{ $dialog.dateFormat(goodsData.use_time_start,'yyyy-MM-dd') }}至{{ $dialog.dateFormat(goodsData.use_time_end,'yyyy-MM-dd') }}
  171. </span>
  172. </view>
  173. </view>
  174. </view>
  175. <view class="rule-item">
  176. <view class="icon"><image src="/static/image/rule-time.png"></image></view>
  177. <view class="item-top">
  178. <view class="name">可用时间</view>
  179. <view class="desc" v-if="goodsData.can_no_use_date==1">商家营业时间可用</view>
  180. </view>
  181. </view>
  182. <view class="rule-item">
  183. <view class="icon"><image src="/static/image/rule-rule.png"></image></view>
  184. <view class="item-top">
  185. <view class="name">预约规则</view>
  186. <view class="desc" v-if="goodsData.booking_type==1">无需预约,高峰期可能需要排队</view>
  187. <view class="desc" v-if="goodsData.booking_type==2">
  188. 需要提前<span>{{ goodsData.booking_date }}</span>{{ goodsData.booking_unit==1?'天':'小时' }}预约
  189. </view>
  190. </view>
  191. </view>
  192. <view class="rule-item">
  193. <view class="icon"><image src="/static/image/rule-refund.png"></image></view>
  194. <view class="item-top">
  195. <view class="name">退款政策<view class="tips">随时退/过期退</view></view>
  196. <view class="desc">随时退款:未核销的商品支持随时申请退款;过期自动退:商品若在有效时间内未核销使用,到期之后系统将自动发起退款</view>
  197. </view>
  198. </view>
  199. </view>
  200. </view>
  201. </view>
  202. </uni-popup>
  203. <uni-popup ref="buypopup" type="bottom" border-radius="10px 10px 0 0" background-color="#ffffff" :mask-click="false">
  204. <view class="service-popup popup-flex popup-height" v-if="goodsData">
  205. <view class="tags-top">
  206. <view class="tags">
  207. <view class="safe-item"><image src="/static/image/check.png"></image>过期退</view>
  208. <view class="safe-item"><image src="/static/image/check.png"></image>随时退</view>
  209. </view>
  210. <view class="close" @click="buyOrder(2)"><image src="/static/image/close.png"></image></view>
  211. </view>
  212. <view class="buy-godos-top">
  213. <view class="goods-top-info">
  214. <view class="imgs"><image :src="buyGoods.img" mode="widthFix"></image></view>
  215. <view class="price-body">
  216. <view class="title">{{goodsData.product_name}}</view>
  217. <view class="price">
  218. <view class="price-sale">{{ buyGoods.price?$dialog.formatMoney(buyGoods.price):'0.00'}}</view>
  219. <view class="sale">{{$dialog.disFormat(buyGoods.price,buyGoods.line_price)}}折</view>
  220. <view class="line-price">{{ buyGoods.line_price ? $dialog.formatMoney(buyGoods.line_price) : '0.00'}}</view>
  221. </view>
  222. <view class="name">已选:{{ buyGoods.name }}</view>
  223. </view>
  224. </view>
  225. </view>
  226. <view class="buy-godos-mib">
  227. <view class="mib-title">规格</view>
  228. <view class="mib-body" v-if="goodsData.mult_sku==2">
  229. <view :class="indx==skuIndex?'mib-body-item active':'mib-body-item'" v-for="(item,indx) in skuSpecs" :key="indx" @click="checkSku(item,indx)">{{item.name}}</view>
  230. </view>
  231. <view class="mib-body" v-else>
  232. <view class="mib-body-item active">默认</view>
  233. </view>
  234. </view>
  235. <view class="buy-godos-footer">
  236. <!-- <view class="btn-item-c">
  237. <button class="cancel-btn" @click="buyOrder(2)">再看看</button>
  238. </view> -->
  239. <view class="btn-item fex1">
  240. <pay-button-sdk
  241. class="pay-button"
  242. :mode="2"
  243. :goods-type="1"
  244. :goods-id="goodsData.goods_id"
  245. bind:getgoodsinfo="getGoodsInfo"
  246. bind:placeorder="userLogin"
  247. bind:error="onErrors"
  248. bind:pay="onPay"
  249. ></pay-button-sdk>
  250. </view>
  251. </view>
  252. </view>
  253. </uni-popup>
  254. <halfLogin ref="loginCom" @success="loginSuccess"></halfLogin>
  255. <kfService ref="kfService"></kfService>
  256. </view>
  257. </template>
  258. <script>
  259. var app;
  260. export default {
  261. data() {
  262. return {
  263. options:null,
  264. isLogin:null,
  265. isLoading:false,
  266. goodsData:null,
  267. bannerData:[],
  268. buyGoods:null,
  269. currIndex:0,
  270. swiperHeight:240,
  271. userState:0,
  272. isBuy:1,
  273. specs:[],
  274. skuSpecs:[],
  275. otherImg:[],
  276. }
  277. },
  278. onLoad(options) {
  279. app = this;
  280. const data = uni.getLaunchOptionsSync();
  281. options.scene = data.scene
  282. app.options = options
  283. app.isLogin = uni.getStorageSync("user_token");
  284. app.getDetail()
  285. },
  286. created() {
  287. this.$scope.getGoodsInfo = this.getGoodsInfo;
  288. this.$scope.userLogin = this.userLogin;
  289. this.$scope.onErrors = this.onErrors;
  290. this.$scope.onPay = this.onPay;
  291. },
  292. methods: {
  293. openRule(type){
  294. if (type == 1) {
  295. app.$refs.rulepopup.open()
  296. } else {
  297. app.$refs.rulepopup.close()
  298. }
  299. },
  300. getGoodsInfo(){
  301. return new Promise(resolve => {
  302. resolve({
  303. minLimits: 1,
  304. maxLimits: 1,
  305. // maxLimits: app.goodsData.limit_rule_type==1?99:app.goodsData.limit_rule,
  306. dateRule: '周一至周日可用',
  307. relationType: 1,
  308. goodsLabels:[
  309. {type: 'EXPIRED_RETURNS'}, // 过期退
  310. {type: 'REFUND_ANYTIME'}, // 随时退
  311. ],
  312. validation: {
  313. phoneNumber: {
  314. required: false // 手机号是否必填
  315. }
  316. },
  317. extra:app.buyGoods,
  318. // 在 bind:getgoodsinfo 返回的 promise 的 resolve 函数中新增 marketingVersion 字段
  319. marketingVersion: 2,
  320. });
  321. })
  322. },
  323. userLogin(){
  324. return new Promise((resolve, reject) => {
  325. tt.login({
  326. success(){
  327. console.log("next")
  328. resolve()
  329. },
  330. fail: () => reject()
  331. });
  332. });
  333. },
  334. onErrors(){},
  335. onPay(event){
  336. const { status, outOrderNo, result } = event.detail;
  337. console.log(status, outOrderNo, result)
  338. const { code } = result;
  339. app.buyOrder(2)
  340. if (code === 0) { // 支付成功
  341. app.$dialog.showSuccess("支付成功","none",function(){
  342. uni.redirectTo({
  343. url:"usr://pages/order/detail?order="+outOrderNo
  344. })
  345. })
  346. } else {
  347. app.$dialog.showSuccess("支付失败","none",function(){
  348. uni.redirectTo({
  349. url:"usr://pages/order/detail?order="+outOrderNo
  350. })
  351. })
  352. // 继续支付失败(超时、取消、关闭)
  353. }
  354. },
  355. async buyOrder(type){
  356. if (!app.isLogin) {
  357. return ;
  358. }
  359. if (type == 1) {
  360. uni.showLoading({
  361. title:"请求中..."
  362. })
  363. var resp = await this.$api.goods.check.get({"poi":app.goodsData.poi_id});
  364. uni.hideLoading();
  365. if (resp.code == 0) {
  366. return app.$dialog.showSuccess(resp.msg);
  367. }
  368. if (resp.data.buy == 0) {
  369. return app.$dialog.showSuccess(resp.data.msg);
  370. }
  371. app.$refs.buypopup.open()
  372. } else {
  373. app.$refs.buypopup.close()
  374. }
  375. return ;
  376. },
  377. toMap(){
  378. var poi = app.goodsData.poi;
  379. uni.openLocation({
  380. latitude:poi.latitude,
  381. longitude:poi.longitude,
  382. name:poi.poi_name,
  383. address:poi.poi_address,
  384. success() {
  385. console.log("open success")
  386. },
  387. fail(err) {
  388. app.$dialog.showSuccess("打开导航失败")
  389. console.log(err)
  390. }
  391. })
  392. },
  393. async getDetail(){
  394. app.isLoading = true;
  395. var res = await app.$api.goods.detail.get(app.options);
  396. app.isLoading = false;
  397. if (res.code && res.code == 0) {
  398. return app.$dialog.showSuccess(res.msg);
  399. }
  400. if (!app.storeData) {
  401. app.storeData = res.data.poi;
  402. uni.setStorageSync("contact",res.data.poi);
  403. }
  404. uni.setStorageSync("poiId",res.data.poi.poi_id);
  405. app.goodsData = res.data;
  406. app.bannerData = res.data.image_list
  407. app.specs = res.data.specs;
  408. app.skuSpecs = res.data.skuSpecs;
  409. app.otherImg = res.data.otherImg;
  410. if (res.data.skuSpecs.length > 0) {
  411. var skuSpecs = app.skuSpecs[0]
  412. var buyGoods = {
  413. img:skuSpecs.image,
  414. price:skuSpecs.price,
  415. line_price:skuSpecs.line_price,
  416. name:skuSpecs.name,
  417. number:1,
  418. product_id:skuSpecs.product_id,
  419. sku_id:skuSpecs.sku_id,
  420. goods_id:skuSpecs.goods_id,
  421. scene:app.options.scene
  422. }
  423. } else {
  424. var buyGoods = {
  425. img:res.data.image_list[0].url,
  426. price:res.data.price,
  427. line_price:res.data.line_price,
  428. name:"默认",
  429. number:1,
  430. product_id:res.data.product_id,
  431. sku_id:res.data.product_id,
  432. goods_id:res.data.goods_id,
  433. scene:app.options.scene
  434. }
  435. }
  436. app.buyGoods = buyGoods
  437. setTimeout(function(){
  438. app.setSwiperHeight(); // 动态设置 swiper 的高度
  439. },800)
  440. },
  441. /* 切换 swiper 滑块 */
  442. changeSwiper(e) {
  443. app.currIndex = e.detail.current;
  444. app.$nextTick(() => {
  445. app.setSwiperHeight(); // 动态设置 swiper 的高度
  446. });
  447. },
  448. /* 动态设置 swiper 的高度 */
  449. setSwiperHeight() {
  450. const element = "#wrap" + app.currIndex;
  451. const query = uni.createSelectorQuery().in(this);
  452. query.select(element).boundingClientRect();
  453. query.exec(res => {
  454. if (res && res[0]) this.swiperHeight = res[0].height==0?res[0].width:res[0].height;
  455. });
  456. },
  457. toLogin(){
  458. this.$refs.loginCom.open();
  459. },
  460. async kfPop(){
  461. if (!app.isLogin) {
  462. this.$refs.loginCom.open();
  463. return ;
  464. }
  465. uni.showLoading({
  466. title:"请求中..."
  467. })
  468. var resp = await this.$api.goods.check.get();
  469. uni.hideLoading();
  470. if (resp.code == 0) {
  471. return app.$dialog.showSuccess(resp.msg);
  472. }
  473. if (resp.data.user == 0) {
  474. this.$refs.loginCom.open(2);
  475. return ;
  476. }
  477. this.$refs.kfService.open(app.storeData);
  478. },
  479. loginSuccess(token){
  480. if (token) {
  481. app.isLogin = token;
  482. }
  483. },
  484. toNav(type) {
  485. var url = "";
  486. switch (type) {
  487. case "order":
  488. url = "/pages/order/order"
  489. break;
  490. case "home":
  491. default:
  492. url = "/pages/index/index"
  493. break;
  494. }
  495. uni.switchTab({
  496. url:url
  497. })
  498. }
  499. }
  500. }
  501. </script>
  502. <style lang="scss" scoped>
  503. .tags-top {
  504. display: flex;
  505. align-items: center;
  506. justify-content: space-between;
  507. position: relative;
  508. padding: 20rpx;
  509. .tags{
  510. display: flex;
  511. align-items: center;
  512. justify-content: center;
  513. gap: 20rpx;
  514. flex: 1;
  515. .safe-item{
  516. display: flex;align-items: center;
  517. image{width: 30upx;height: 30upx;margin-right: 10upx;}
  518. }
  519. }
  520. .close{
  521. margin-left: auto;margin-right: 0;display: flex;align-items: center;justify-content: center;
  522. image{width: 40upx;height: 40upx;}
  523. }
  524. }
  525. .buy-godos-top{
  526. display: flex;padding: 30rpx 15rpx 15rpx;align-items: start;
  527. .close{
  528. margin-left: auto;margin-right: 0;display: flex;align-items: center;justify-content: center;
  529. image{width: 40upx;height: 40upx;}
  530. }
  531. .imgs{
  532. height: 200upx;overflow: hidden;
  533. image{width: 200upx;border-radius: 10upx;}
  534. }
  535. .goods-top-info{
  536. display: flex;align-items: center;gap: 20rpx;
  537. .price-body {
  538. flex: 1;
  539. .title{
  540. font-size: 32rpx;color: #000;font-weight: bold;
  541. }
  542. }
  543. .price{
  544. display: flex;align-items: self-end;flex: 1;gap:20rpx;
  545. .line-price{color: #999999;font-size: 24rpx;text-decoration-line: line-through;}
  546. .price-sale{color: #FF4747;font-size: 32rpx;font-weight: bold;}
  547. .sale{background-color: #FDEBE5;border: 4rpx;font-size: 22rpx;color: #FF4747;padding: 10rpx;display: inline-block;}
  548. }
  549. .desc-num{color: #999;font-size: 24upx;margin-left: auto;margin-right: 0;}
  550. .name{font-size: 22rpx;margin-top: 15upx;color: #666;}
  551. }
  552. }
  553. .buy-godos-footer{
  554. padding: 20upx;display: flex;align-items: center;justify-content: space-between;gap: 20upx;
  555. .btn-item {
  556. &.fex1{flex: 1;}
  557. .pay-button{
  558. width: 100% !important;
  559. background-color: $main-color;
  560. }
  561. }
  562. .cancel-btn{
  563. font-size: 32upx;
  564. border-radius: 10upx;
  565. color: #333;
  566. background-color: #fff;
  567. border: 2upx solid #ddd;
  568. height: 48px;
  569. line-height: 48px;
  570. }
  571. .cancel-btn::after{border: 0;}
  572. }
  573. .buy-godos-mib{
  574. padding: 20upx;flex: 1;
  575. .mib-number{margin-top: 20upx;display: flex;align-items: center;justify-content: space-between;font-size: 28upx;color: #666;}
  576. .mib-title{font-size: 28upx;color: #666;}
  577. .mib-body{
  578. margin-top: 15upx;display: flex;align-items: center;flex-wrap: wrap;gap: 20upx;
  579. .mib-body-item{
  580. font-size: 24upx;color: #666;padding: 10upx;background-color: #f8f8f8;border-radius: 5upx;
  581. &.active{background-color: #007aff;color: #fff;}
  582. }
  583. }
  584. }
  585. .rule-popup {
  586. .buy-rule {
  587. padding: 20rpx;
  588. }
  589. .title{
  590. line-height: 80upx;font-size: 32rpx;color: #333;font-weight: bold;display: flex;align-items: center;
  591. border-bottom: 2upx solid #f8f8f8;
  592. padding: 0 20rpx;
  593. justify-content: space-between;
  594. image{width: 40upx;height: 40upx;}
  595. }
  596. }
  597. .buy-rule{
  598. background-color: #fff;
  599. width: 95%;
  600. margin:20rpx auto;
  601. padding: 0 20rpx 20rpx;
  602. border-radius: 20rpx;
  603. .title{
  604. line-height: 80upx;font-size: 32rpx;color: #333;font-weight: bold;display: flex;align-items: center;
  605. border-bottom: 2upx solid #f8f8f8;
  606. }
  607. .rule-item{
  608. display: flex;margin-top: 40upx;align-items: start;gap:20rpx;
  609. image{width: 50upx;height: 50upx;}
  610. .name{
  611. font-size: 28rpx;color: #333;font-weight: bold;margin-bottom: 10upx;display: flex;align-items: center;
  612. .tips{color: #333;border: 2upx solid #ddd;border-radius: 5upx;font-size: 22rpx;font-weight: normal;margin-left: 40upx;background-color: #fff;padding: 5upx 10upx;}
  613. }
  614. }
  615. }
  616. .content {
  617. background-color: #f8f8f8;
  618. height: 100vh;
  619. .skeleton{
  620. width: 95%;
  621. margin: 0 auto;
  622. }
  623. .line-height{
  624. height: 40rpx;
  625. width: 100%;
  626. }
  627. .goods-top{
  628. border-radius: 20rpx 20rpx 0 0;
  629. .other-content{
  630. background-color: #fff;
  631. width: 95%;
  632. margin:20rpx auto;
  633. padding: 0 20rpx 20rpx;
  634. border-radius: 20rpx;
  635. .title{
  636. line-height: 80upx;font-size: 32rpx;color: #333;font-weight: bold;display: flex;align-items: center;
  637. border-bottom: 2upx solid #f8f8f8;
  638. margin-bottom: 20rpx;
  639. }
  640. }
  641. .goods-store{
  642. background-color: #fff;
  643. width: 95%;
  644. margin:20rpx auto;
  645. padding: 0 20rpx 20rpx;
  646. border-radius: 20rpx;
  647. .title{
  648. line-height: 80upx;
  649. font-size: 32rpx;
  650. color: #333;
  651. font-weight: bold;
  652. display: flex;
  653. align-items: center;
  654. border-bottom: 2upx solid #f8f8f8;
  655. }
  656. .store-info{
  657. display: flex;align-items: center;padding: 20upx 0;
  658. .store-right{
  659. margin-left: auto;margin-right: 0;font-size: 24rpx;color: #999;
  660. image{width: 50upx;height: 50upx;margin-bottom: 10upx;}
  661. }
  662. .store-left {
  663. .name{font-size: 30rpx;color: #333;font-weight: bold;line-height: 80upx;}
  664. .address{font-size: 24rpx;color: #999;}
  665. }
  666. }
  667. }
  668. .goods-info{
  669. background-color: #fff;
  670. width: 95%;
  671. margin:0 auto;
  672. padding: 20rpx;
  673. border-radius: 20rpx;
  674. .title{
  675. font-size: 32rpx;color: #000;font-weight: bold;
  676. }
  677. .goods-rule{
  678. margin: 20upx 0;display: flex;align-items: center;font-size: 24rpx;color: #999;height: 80upx;line-height: 80upx;
  679. .right{
  680. display: flex;align-items: center;flex: 1;color: #000;margin-left: 40upx;
  681. image{width: 30upx;height: 30upx;margin-left: auto;margin-right: 0;}
  682. }
  683. }
  684. .goods-safe{
  685. display: flex;align-items: center;font-size: 24rpx;color: #999;gap: 40upx;
  686. .safe-item{
  687. display: flex;align-items: center;
  688. image{width: 30upx;height: 30upx;margin-right: 10upx;}
  689. }
  690. }
  691. }
  692. .price{
  693. display: flex;
  694. align-items: self-end;
  695. padding: 20rpx 30rpx;
  696. gap: 20rpx;
  697. .price-sale{
  698. font-size: 38rpx;
  699. font-weight: 800;
  700. color: $main-color;
  701. }
  702. .sale{
  703. background-color: #FDEBE5;
  704. border: 4rpx;font-size: 22rpx;
  705. color: #FF4747;
  706. padding: 10rpx;
  707. display: inline-block;
  708. }
  709. .line-price{
  710. color: #999999;
  711. font-size: 24rpx;
  712. text-decoration-line: line-through;
  713. }
  714. .desc-num{
  715. color: #999;font-size: 24upx;margin-left: auto;margin-right: 0;
  716. }
  717. }
  718. }
  719. .goods-content{
  720. position: fixed;
  721. z-index: 1;
  722. top: 0;
  723. left: 0;
  724. bottom: 0;
  725. right: 0;
  726. background-color: #ededed;
  727. display: flex;
  728. flex-direction: column;
  729. }
  730. .goods-body{
  731. height: 0;
  732. flex: 1;
  733. .home-banner {
  734. .swiper{
  735. height: 380upx;
  736. transition: height 0.5s ease;
  737. image{width: 100%;height: auto;}
  738. }
  739. }
  740. }
  741. .footer{
  742. background-color: #fff;padding: 20upx 20upx 0 20upx;border-top: 2upx solid #f8f8f8;
  743. .footer-op{
  744. display: flex;align-items: center;
  745. .footer-left{
  746. display: flex;align-items: center;gap: 40upx;justify-content: center;
  747. .item{flex-direction: column;display: flex;font-size: 24rpx;color: #333;align-items: center;}
  748. image{width: 40upx;height: 40upx;}
  749. }
  750. .footer-right{
  751. background-color: $main-color;
  752. color: #fff;
  753. font-size: 28rpx;
  754. flex: 1;
  755. margin-left: 40upx;
  756. height: 80upx;
  757. border-radius: 10upx;
  758. line-height: 80upx;
  759. text-align: center;
  760. }
  761. }
  762. .footer-safe {
  763. height: env(safe-area-inset-bottom);width: 100%;
  764. }
  765. }
  766. }
  767. .group-body{padding: 20upx;}
  768. .group-body .body-title{display: flex;align-items: center;line-height: 48upx;font-size: 28upx;color: #333;font-weight: bold;gap: 20upx;justify-content: space-between;}
  769. .group-body .body-title span{font-size: 24upx;font-weight: normal;color: #666;}
  770. .group-body .body-item-li{display: flex;align-items: center;justify-content: space-between;line-height: 48upx;font-size: 24upx;color: #333;font-weight: bold;}
  771. .group-body .body-item-li .item-right{display: flex;align-items: center;gap: 20upx;width: 40%;justify-content: end;}
  772. .group-body .body-item-li .item-right .desc{color: #999;font-weight: normal;}
  773. </style>