carDetail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905
  1. <template>
  2. <view class="product-con">
  3. <view class="product-con">
  4. <!-- #ifndef APP-PLUS -->
  5. <view class="navbar" :style="{ height: navH + 'rpx', opacity: opacity }">
  6. <view class="navbarH" :style="'height:' + navH + 'rpx;'">
  7. <view class="navbarCon acea-row row-center-wrapper"
  8. :style="{ paddingRight: (navbarRight-20) + 'px' }">
  9. <view class="header acea-row row-center-wrapper">
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. <!-- #endif -->
  15. <!-- #ifndef APP-PLUS -->
  16. <view id="home" class="home acea-row row-center-wrapper" :class="[opacity>0.5?'on':'']"
  17. :style="{ top: homeTop +'rpx'}">
  18. <view class="iconfont icon-fanhui2" @tap="returns"></view>
  19. <!-- #ifdef MP -->
  20. <view class="line"></view>
  21. <view class="iconfont icon-gengduo5" @click="moreNav"></view>
  22. <!-- #endif -->
  23. </view>
  24. <!-- #endif -->
  25. <view>
  26. <scroll-view scroll-y="true" scroll-with-animation="true" :style="'height:' + height + 'px;'">
  27. <view id="past0">
  28. <!-- #ifdef APP-PLUS || MP -->
  29. <view class="" :style="'width:100%;' + 'height:'+sysHeight"></view>
  30. <!-- #endif -->
  31. <productConSwiper ref="proSwiper" :imgUrls="storeInfo.images" :videoline="storeInfo.video_link">
  32. </productConSwiper>
  33. <view class="wrapper">
  34. <view class="introduce" v-text="`${storeInfo.title}`"></view>
  35. <view class="share acea-row row-between row-bottom">
  36. <view class="money font-color">
  37. {{$t(`¥`)}}
  38. <text class="num" v-text="storeInfo.price || 0"></text>/月
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="product-intro" id="past3">
  44. <view class="title">{{$t(`产品介绍`)}}</view>
  45. <view class="conter">
  46. <!-- #ifndef APP-PLUS -->
  47. <parser :html="description" ref="article" :tag-style="tagStyle"></parser>
  48. <!-- #endif -->
  49. <!-- #ifdef APP-PLUS -->
  50. <view class="description" v-html="description"></view>
  51. <!-- #endif -->
  52. </view>
  53. </view>
  54. </scroll-view>
  55. </view>
  56. <view class="footer acea-row row-between-wrapper" :class="{'eject':storeInfo.id}">
  57. <navigator hover-class="none" class="item" open-type="switchTab" url="/pages/index/index">
  58. <view class="iconfont icon-shouye6"></view>
  59. <view class="p_center">{{$t(`首页`)}}</view>
  60. </navigator>
  61. <view class="bnt">
  62. <form @submit="goBuy" class="buy bnts ">
  63. <button class="buy bnts virbnt" form-type="submit">
  64. {{$t(`立即购买`)}}
  65. </button>
  66. </form>
  67. </view>
  68. </view>
  69. </view>
  70. <payment :payMode="cartArr" :pay_close="pay_close" :isCall="true" :totalPrice="storeInfo.price"
  71. @changePayType="(type)=>{payType=type}" @onChangeFun="onChangeFun"></payment>
  72. </view>
  73. </template>
  74. <script>
  75. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  76. import {
  77. getCarDetail,
  78. postCarCreate
  79. } from "@/api/rent.js";
  80. import {
  81. getUserInfo,
  82. } from "@/api/user.js";
  83. import {
  84. mapGetters
  85. } from "vuex";
  86. import productConSwiper from "@/components/productConSwiper";
  87. let app = getApp();
  88. import parser from "@/components/jyf-parser/jyf-parser";
  89. import {
  90. toLogin
  91. } from "@/libs/login.js";
  92. import payment from '@/components/payment';
  93. export default {
  94. components: {
  95. productConSwiper,
  96. parser,
  97. payment
  98. },
  99. data() {
  100. let that = this;
  101. return {
  102. sysHeight: sysHeight,
  103. id: 0, //商品id
  104. storeInfo: {}, //商品详情
  105. cart_num: 1, //购买数量
  106. description: "",
  107. navH: "",
  108. opacity: 0,
  109. height: 0,
  110. tagStyle: {
  111. img: "width:100%;display:block;",
  112. table: "width:100%",
  113. video: "width:100%;height:100%;",
  114. },
  115. navbarRight: 0,
  116. homeTop: 20,
  117. // 当前支付方式
  118. payType:'weixin',
  119. cartArr: [{
  120. "name": this.$t(`微信支付`),
  121. "icon": "icon-weixin2",
  122. value: 'weixin',
  123. title: this.$t(`使用微信快捷支付`),
  124. payStatus: 1,
  125. },
  126. {
  127. "name": this.$t(`支付宝支付`),
  128. "icon": "icon-zhifubao",
  129. value: 'alipay',
  130. title: this.$t(`使用支付宝支付`),
  131. payStatus: 1,
  132. },
  133. {
  134. "name": this.$t(`余额支付`),
  135. "icon": "icon-yuezhifu",
  136. value: 'yue',
  137. title: this.$t(`可用余额`),
  138. payStatus: 1,
  139. number:'0'
  140. },
  141. ],
  142. // 显示隐藏支付弹窗
  143. pay_close: false,
  144. // 用户信息
  145. userdata:{},
  146. username:'',//购买用户名称
  147. from:'',//订单来源
  148. };
  149. },
  150. watch:{
  151. storeInfo: {
  152. handler: function() {
  153. this.$nextTick(() => {});
  154. },
  155. immediate: true,
  156. },
  157. },
  158. computed: mapGetters(["isLogin"]),
  159. onLoad(options) {
  160. let that = this;
  161. // #ifdef MP
  162. that.navH = app.globalData.navHeight;
  163. that.from = 'routine'
  164. // #endif
  165. // #ifdef H5
  166. that.navH = 96;
  167. that.from = that.$wechat.isWeixin() ? 'weixin' : 'weixinh5'
  168. // #endif
  169. // #ifdef APP-PLUS
  170. that.navH = 30;
  171. that.from = 'app'
  172. // #endif
  173. that.id = options.id;
  174. uni.getSystemInfo({
  175. success: function(res) {
  176. that.height = res.windowHeight;
  177. //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
  178. // #ifndef APP-PLUS || H5 || MP-ALIPAY
  179. that.navbarRight =
  180. res.windowWidth - uni.getMenuButtonBoundingClientRect().left;
  181. // #endif
  182. },
  183. });
  184. //扫码携带参数处理
  185. // #ifdef MP
  186. if (options.scene) {
  187. let value = that.$util.getUrlParams(decodeURIComponent(options.scene));
  188. if (value.id) options.id = value.id;
  189. //记录推广人uid
  190. if (value.pid) app.globalData.spid = value.pid;
  191. }
  192. // #endif
  193. that.getGoodsDetails();
  194. },
  195. onReady: function() {
  196. this.$nextTick(function() {
  197. // #ifdef MP
  198. const menuButton = uni.getMenuButtonBoundingClientRect();
  199. const query = uni.createSelectorQuery().in(this);
  200. query
  201. .select("#home")
  202. .boundingClientRect((data) => {
  203. this.homeTop = menuButton.top * 2 + menuButton.height - data.height || 0;
  204. })
  205. .exec();
  206. // #endif
  207. });
  208. },
  209. methods: {
  210. // 支付弹窗触发事件
  211. onChangeFun: function(e) {
  212. let opt = e;
  213. let action = opt.action || null;
  214. let value = opt.value != undefined ? opt.value : null;
  215. action && this[action] && this[action](value);
  216. },
  217. // 弹窗支付点击事件
  218. payCheck(e){
  219. const that = this;
  220. that.payType = e;
  221. postCarCreate({
  222. 'company_id': that.storeInfo.company_id,
  223. 'agent_id': that.storeInfo.agent_id,
  224. 'store_id': that.storeInfo.store_id,
  225. 'cooperate_id': that.storeInfo.cooperate_id,
  226. 'rent_id': that.storeInfo.id,
  227. 'car_lease': that.storeInfo.car_lease,
  228. 'several_months': that.storeInfo.several_months,
  229. 'pay_type': that.payType,
  230. 'pay_price':that.storeInfo.price,
  231. 'real_name': that.username,
  232. 'user_phone': that.userdata.record_phone,
  233. from:that.from
  234. }).then((res) => {
  235. let status = res.data.status,
  236. orderId = res.data.result.order_id,
  237. jsConfig = res.data.result.jsConfig,
  238. goPages = '/pages/rent/paySuccess?order_id=' + orderId + '&msg=' + res.msg +
  239. '&type=3' + '&totalPrice=' + that.storeInfo.price,
  240. friendPay = '/pages/users/payment_on_behalf/index?order_id=' + orderId + '&spread=' +
  241. that.$store.state.app.uid
  242. switch (status) {
  243. case 'ORDER_EXIST':
  244. case 'EXTEND_ORDER':
  245. uni.hideLoading();
  246. return that.$util.Tips({
  247. title: res.msg
  248. }, {
  249. tab: 5,
  250. url: goPages
  251. });
  252. case 'ALLINPAY_PAY':
  253. uni.hideLoading();
  254. // #ifdef MP
  255. this.initIn = true
  256. wx.openEmbeddedMiniProgram({
  257. appId: 'wxef277996acc166c3',
  258. extraData: {
  259. cusid: jsConfig.cusid,
  260. appid: jsConfig.appid,
  261. version: jsConfig.version,
  262. trxamt: jsConfig.trxamt,
  263. reqsn: jsConfig.reqsn,
  264. notify_url: jsConfig.notify_url,
  265. body: jsConfig.body,
  266. remark: jsConfig.remark,
  267. validtime: jsConfig.validtime,
  268. randomstr: jsConfig.randomstr,
  269. paytype: jsConfig.paytype,
  270. sign: jsConfig.sign,
  271. signtype: jsConfig.signtype
  272. }
  273. })
  274. this.jumpData = {
  275. orderId: res.data.result.orderId,
  276. msg: res.msg,
  277. }
  278. // #endif
  279. // #ifdef APP-PLUS
  280. plus.runtime.openURL(jsConfig.payinfo);
  281. setTimeout(e => {
  282. uni.reLaunch({
  283. url: goPages
  284. })
  285. }, 1000)
  286. // #endif
  287. // #ifdef H5
  288. this.formpost(res.data.result.pay_url, jsConfig)
  289. // #endif
  290. break;
  291. case 'PAY_ERROR':
  292. uni.hideLoading();
  293. return that.$util.Tips({
  294. title: res.msg
  295. }, {
  296. tab: 5,
  297. url: goPages
  298. });
  299. break;
  300. case 'SUCCESS':
  301. uni.hideLoading();
  302. if ((that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
  303. .discountId) && that.payType != 'friend')
  304. return that.$util.Tips({
  305. title: res.msg,
  306. icon: 'success'
  307. }, {
  308. tab: 4,
  309. url: goPages
  310. });
  311. return that.$util.Tips({
  312. title: res.msg,
  313. icon: 'success'
  314. }, {
  315. tab: 4,
  316. url: that.payType == 'friend' ? friendPay : goPages
  317. });
  318. break;
  319. case 'WECHAT_PAY':
  320. that.toPay = true;
  321. // #ifdef MP
  322. /* that.toPay = true; */
  323. let mp_pay_name = ''
  324. if (uni.requestOrderPayment) {
  325. mp_pay_name = 'requestOrderPayment'
  326. } else {
  327. mp_pay_name = 'requestPayment'
  328. }
  329. uni[mp_pay_name]({
  330. timeStamp: jsConfig.timestamp,
  331. nonceStr: jsConfig.nonceStr,
  332. package: jsConfig.package,
  333. signType: jsConfig.signType,
  334. paySign: jsConfig.paySign,
  335. success: function(res) {
  336. uni.hideLoading();
  337. if (that.BargainId || that.combinationId || that.pinkId || that
  338. .seckillId || that.discountId)
  339. return that.$util.Tips({
  340. title: that.$t(`支付成功`),
  341. icon: 'success'
  342. }, {
  343. tab: 4,
  344. url: goPages
  345. });
  346. return that.$util.Tips({
  347. title: that.$t(`支付成功`),
  348. icon: 'success'
  349. }, {
  350. tab: 5,
  351. url: goPages
  352. });
  353. },
  354. fail: function(e) {
  355. uni.hideLoading();
  356. return that.$util.Tips({
  357. title: that.$t(`取消支付`)
  358. }, {
  359. tab: 5,
  360. url: goPages + '&status=2'
  361. });
  362. },
  363. complete: function(e) {
  364. uni.hideLoading();
  365. //关闭当前页面跳转至订单状态
  366. if (res.errMsg == 'requestPayment:cancel' || e.errMsg ==
  367. 'requestOrderPayment:cancel') return that.$util
  368. .Tips({
  369. title: that.$t(`取消支付`)
  370. }, {
  371. tab: 5,
  372. url: goPages + '&status=2'
  373. });
  374. },
  375. })
  376. // #endif
  377. // #ifdef H5
  378. this.$wechat.pay(res.data.result.jsConfig).then(res => {
  379. return that.$util.Tips({
  380. title: that.$t(`支付成功`),
  381. icon: 'success'
  382. }, {
  383. tab: 5,
  384. url: goPages
  385. });
  386. }).catch(res => {
  387. if (!this.$wechat.isWeixin()) {
  388. uni.redirectTo({
  389. url: goPages + '&msg=' + that.$t(`支付失败`) + '&status=2'
  390. // '&msg=支付失败&status=2'
  391. })
  392. }
  393. if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
  394. title: that.$t(`取消支付`)
  395. }, {
  396. tab: 5,
  397. url: goPages + '&status=2'
  398. });
  399. })
  400. // #endif
  401. // #ifdef APP-PLUS
  402. uni.requestPayment({
  403. provider: 'wxpay',
  404. orderInfo: jsConfig,
  405. success: (e) => {
  406. let url = goPages;
  407. uni.showToast({
  408. title: that.$t(`支付成功`)
  409. })
  410. setTimeout(res => {
  411. uni.redirectTo({
  412. url: url
  413. })
  414. }, 2000)
  415. },
  416. fail: (e) => {
  417. let url = '/pages/goods/order_pay_status/index?order_id=' +
  418. orderId +
  419. '&msg=' + that.$t(`支付失败`);
  420. uni.showModal({
  421. content: that.$t(`支付失败`),
  422. showCancel: false,
  423. success: function(res) {
  424. if (res.confirm) {
  425. uni.redirectTo({
  426. url: url
  427. })
  428. } else if (res.cancel) {}
  429. }
  430. })
  431. },
  432. complete: () => {
  433. uni.hideLoading();
  434. },
  435. });
  436. // #endif
  437. break;
  438. case 'PAY_DEFICIENCY':
  439. uni.hideLoading();
  440. //余额不足
  441. return that.$util.Tips({
  442. title: res.msg
  443. }, {
  444. tab: 5,
  445. url: goPages + '&status=1'
  446. });
  447. break;
  448. case "WECHAT_H5_PAY":
  449. uni.hideLoading();
  450. that.$util.Tips({
  451. title: that.$t(`订单创建成功`)
  452. }, {
  453. tab: 4,
  454. url: goPages + '&status=0'
  455. });
  456. setTimeout(() => {
  457. location.href = res.data.result.jsConfig.mweb_url;
  458. }, 2000);
  459. break;
  460. case 'ALIPAY_PAY':
  461. //#ifdef H5
  462. if (this.from === 'weixin') {
  463. uni.redirectTo({
  464. url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
  465. });
  466. } else {
  467. uni.hideLoading();
  468. that.formContent = res.data.result.jsConfig;
  469. that.$nextTick(() => {
  470. document.getElementById('alipaysubmit').submit();
  471. })
  472. }
  473. //#endif
  474. // #ifdef MP
  475. uni.navigateTo({
  476. url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
  477. });
  478. // #endif
  479. // #ifdef APP-PLUS
  480. uni.requestPayment({
  481. provider: 'alipay',
  482. orderInfo: jsConfig,
  483. success: (e) => {
  484. uni.showToast({
  485. title: that.$t(`支付成功`)
  486. })
  487. let url = '/pages/goods/order_pay_status/index?order_id=' +
  488. orderId +
  489. '&msg=' + that.$t(`支付成功`);
  490. setTimeout(res => {
  491. uni.redirectTo({
  492. url: url
  493. })
  494. }, 2000)
  495. },
  496. fail: (e) => {
  497. let url = '/pages/goods/order_pay_status/index?order_id=' +
  498. orderId +
  499. '&msg=' + that.$t(`支付失败`);
  500. uni.showModal({
  501. content: that.$t(`支付失败`),
  502. showCancel: false,
  503. success: function(res) {
  504. if (res.confirm) {
  505. uni.redirectTo({
  506. url: url
  507. })
  508. } else if (res.cancel) {}
  509. }
  510. })
  511. },
  512. complete: () => {
  513. uni.hideLoading();
  514. },
  515. });
  516. // #endif
  517. break;
  518. }
  519. }).catch((res) => {
  520. console.log(res);
  521. })
  522. },
  523. // 支付弹窗关闭事件
  524. payClose: function() {
  525. this.pay_close = false;
  526. },
  527. // 购买
  528. goBuy() {
  529. if (this.isLogin === false) {
  530. toLogin();
  531. } else {
  532. if(!this.userdata.record_phone){
  533. uni.showModal({
  534. title: '提示',
  535. content: '您未绑定手机号请先绑定手机号',
  536. cancelText: '取消',
  537. confirmText: '立即绑定',
  538. success: res => {
  539. if(res.confirm){
  540. uni.navigateTo({
  541. url:'/pages/users/user_phone/index'
  542. })
  543. }
  544. },
  545. });
  546. }else{
  547. uni.showModal({
  548. title: '请输入购买人姓名',
  549. editable: true,
  550. cancelText: '取消',
  551. confirmText: '确定',
  552. success: res => {
  553. if(res.confirm){
  554. if(!res.content){
  555. uni.showToast({
  556. title: '请输入姓名',
  557. icon:"error"
  558. });
  559. }else{
  560. this.username = res.content;
  561. this.pay_close = true;
  562. }
  563. }
  564. },
  565. });
  566. }
  567. }
  568. },
  569. // 后退
  570. returns() {
  571. // #ifdef H5
  572. return history.back();
  573. // #endif
  574. // #ifndef H5
  575. return uni.navigateBack({
  576. delta: 1,
  577. })
  578. // #endif
  579. },
  580. /*
  581. * 获取用户信息
  582. */
  583. getUserInfo: function() {
  584. let that = this;
  585. getUserInfo().then((res) => {
  586. that.$set(that, "userdata", res.data);
  587. that.cartArr[2].number = res.data.now_money
  588. });
  589. },
  590. /**
  591. * 获取产品详情
  592. *
  593. */
  594. getGoodsDetails: function() {
  595. let that = this;
  596. uni.showLoading({
  597. title: '加载中',
  598. mask: true
  599. })
  600. getCarDetail({
  601. id: that.id
  602. })
  603. .then((res) => {
  604. uni.hideLoading();
  605. let storeInfo = res.data.info;
  606. let goodArray = new Array();
  607. that.$set(that, "storeInfo", storeInfo);
  608. that.$set(that, "description", storeInfo.description);
  609. if (this.description) {
  610. this.description = this.description.replace(
  611. /<img/gi,
  612. '<img style="max-width:100%;height:auto;float:left;display:block" '
  613. );
  614. this.description = this.description.replace(
  615. /<video/gi,
  616. '<video style="width:100%;height:300px;display:block" '
  617. );
  618. }
  619. if (that.isLogin) {
  620. that.getUserInfo();
  621. }
  622. })
  623. .catch((err) => {
  624. uni.hideLoading();
  625. //状态异常返回上级页面
  626. return that.$util.Tips({
  627. title: err.toString(),
  628. }, {
  629. tab: 3,
  630. url: 1,
  631. });
  632. });
  633. },
  634. },
  635. };
  636. </script>
  637. <style scoped lang="scss">
  638. button {
  639. padding: 0;
  640. margin: 0;
  641. line-height: normal;
  642. background-color: #fff;
  643. }
  644. button::after {
  645. border: 0;
  646. }
  647. action-sheet-item {
  648. padding: 0;
  649. height: 240rpx;
  650. align-items: center;
  651. display: flex;
  652. }
  653. .action-sheet {
  654. font-size: 17px;
  655. line-height: 1.8;
  656. width: 50%;
  657. position: absolute;
  658. top: 0;
  659. right: 0;
  660. padding: 25rpx 0;
  661. }
  662. .navbar .header {
  663. height: 96rpx;
  664. font-size: 30rpx;
  665. color: #050505;
  666. background-color: #fff;
  667. /* #ifdef APP-PLUS */
  668. width: 100%;
  669. /* #endif */
  670. }
  671. .home {
  672. /* #ifdef H5 */
  673. top: 20rpx !important;
  674. /* #endif */
  675. }
  676. .navbar .header .item {
  677. position: relative;
  678. margin: 0 25rpx;
  679. }
  680. .navbar .header .item.on:before {
  681. position: absolute;
  682. width: 60rpx;
  683. height: 5rpx;
  684. background-repeat: no-repeat;
  685. content: '';
  686. // background-image: linear-gradient(to right, #ff3366 0%, #ff6533 100%);
  687. background-color: var(--view-theme);
  688. bottom: -10rpx;
  689. left: 50%;
  690. margin-left: -28rpx;
  691. }
  692. .navbar {
  693. position: fixed;
  694. background-color: #fff;
  695. top: 0;
  696. left: 0;
  697. z-index: 99;
  698. width: 100%;
  699. }
  700. .navbar .navbarH {
  701. position: relative;
  702. }
  703. .navbar .navbarH .navbarCon {
  704. position: absolute;
  705. bottom: 0;
  706. height: 100rpx;
  707. width: 100%;
  708. /* #ifndef APP-PLUS || H5 || MP-ALIPAY */
  709. // justify-content: flex-end;
  710. padding-left: 48px;
  711. /* #endif */
  712. }
  713. .home {
  714. color: #333;
  715. position: fixed;
  716. /* #ifdef MP */
  717. width: 126rpx;
  718. left: 15rpx;
  719. /* #endif */
  720. /* #ifndef MP */
  721. width: 56rpx;
  722. left: 33rpx;
  723. /* #endif */
  724. height: 56rpx;
  725. z-index: 99;
  726. background: rgba(255, 255, 255, 0.3);
  727. border: 1px solid rgba(0, 0, 0, 0.1);
  728. border-radius: 40rpx;
  729. font-size: 33rpx;
  730. &.right {
  731. right: 33rpx;
  732. left: unset
  733. }
  734. &.on {
  735. background: unset;
  736. color: #333;
  737. }
  738. &.homeIndex {
  739. /* #ifdef MP */
  740. width: 98rpx;
  741. /* #endif */
  742. /* #ifndef MP */
  743. border-color: rgba(255, 255, 255, 0);
  744. /* #endif */
  745. }
  746. }
  747. .home .iconfont {
  748. width: 58rpx;
  749. text-align: center;
  750. }
  751. .home .line {
  752. width: 1rpx;
  753. height: 34rpx;
  754. background: #B3B3B3;
  755. }
  756. .product-con .conter {
  757. display: block;
  758. }
  759. .product-con .conter img {
  760. display: block;
  761. }
  762. .product-con {
  763. .wrapper {
  764. padding-top: 1rpx;
  765. }
  766. }
  767. .product-con .wrapper .share .money image {
  768. width: 66rpx;
  769. height: 26rpx;
  770. }
  771. .introduce {
  772. min-height: 44rpx;
  773. }
  774. .limit_good {
  775. font-size: 16rpx;
  776. margin: 10rpx 30rpx;
  777. color: red;
  778. }
  779. .flex {
  780. display: flex;
  781. justify-content: space-between;
  782. width: 100%;
  783. }
  784. .introduce {
  785. min-height: 44rpx;
  786. }
  787. .product-con .footer {
  788. padding: 0 20rpx 0 30rpx;
  789. position: fixed;
  790. bottom: 0;
  791. width: 100%;
  792. box-sizing: border-box;
  793. background-color: rgba(255, 255, 255, 0.85);
  794. backdrop-filter: blur(10px);
  795. z-index: 277;
  796. border-top: 1rpx solid #f0f0f0;
  797. height: 100rpx;
  798. height: calc(100rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  799. height: calc(100rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  800. transform: translate3d(0, 100%, 0);
  801. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  802. }
  803. .product-con {
  804. .footer {
  805. .item {
  806. font-size: 18rpx;
  807. color: #666;
  808. .iconfont {
  809. text-align: center;
  810. font-size: 40rpx;
  811. &.icon-shoucang1 {
  812. color: var(--view-theme);
  813. }
  814. &.icon-gouwuche1 {
  815. font-size: 40rpx;
  816. position: relative;
  817. .num {
  818. color: #fff;
  819. position: absolute;
  820. font-size: 18rpx;
  821. padding: 2rpx 10rpx 3rpx;
  822. border-radius: 200rpx;
  823. top: -10rpx;
  824. right: -10rpx;
  825. }
  826. }
  827. }
  828. }
  829. .bnt {
  830. margin-left: 30rpx;
  831. width: 444rpx;
  832. height: 76rpx;
  833. flex-grow: 1;
  834. .bnts {
  835. text-align: center;
  836. line-height: 76rpx;
  837. color: #fff;
  838. font-size: 28rpx;
  839. width: 100%;
  840. }
  841. .buy {
  842. border-radius: 50rpx;
  843. background-color: var(--view-theme);
  844. background-image: linear-gradient(to right, #fa6514 0%, #e93323 100%);
  845. }
  846. .virbnt {
  847. height: 76rpx !important;
  848. border-radius: 50rpx !important;
  849. overflow: hidden;
  850. }
  851. }
  852. }
  853. }
  854. </style>