detail.vue 20 KB

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