detail.vue 23 KB

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