productDetail.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357
  1. <template>
  2. <view class="pages">
  3. <!-- head -->
  4. <view class="scrollPage-header">
  5. <view :style="{height:statusBarHeight+'px'}"></view>
  6. <view class="header-title">
  7. <view class="header-left" @click="goBack">
  8. <uni-icons type="arrowleft" size="20"></uni-icons>
  9. <text>{{isShare?'首页':'返回'}}</text>
  10. </view>
  11. <view class="header-right"></view>
  12. </view>
  13. </view>
  14. <!-- 内容 -->
  15. <view class="scrollPage-content">
  16. <view class="product-info" v-if="detail">
  17. <view :style="{height:statusBarHeight+'px'}"></view>
  18. <u-swiper mode="number" :border-radius="0" img-mode="aspectFit" :interval="3000" :height="450" :list="imgList" @click="viewImg"></u-swiper>
  19. <view class="product-info-text">
  20. <view class="product-info-text-title">
  21. {{detail.productName}}
  22. <!-- <view class="copyText" @click="copy(detail.productName)">复制</view> -->
  23. <uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
  24. </view>
  25. <view class="product-info-text-attr">
  26. <view class="product-info-price flex align_center" v-if="!hasLogin">
  27. ¥***
  28. </view>
  29. <view class="flex align_center" v-else>
  30. <view class="product-info-price">
  31. ¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
  32. </view>
  33. <view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_VALID'">
  34. 返<text>{{detail.resultValue}}</text>元
  35. </view>
  36. <view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_PROD'">
  37. 买{{detail.conditionValue}}赠{{detail.resultValue}}
  38. </view>
  39. <view class="flex align_center tejia-tag" v-if="detail.promoType=='PROMO_PROD'">
  40. 特价<text>¥{{detail.orginPrice}}</text>
  41. </view>
  42. <view class="flex align_center rebate-tag" v-if="detail.shopProductSubsidy&&!detail.shopPromoProduct">
  43. 可抵扣<text>¥{{detail.shopProductSubsidy.subsidyAmount}}</text>
  44. </view>
  45. </view>
  46. <view class="product-info-nums">
  47. <view class="share">
  48. <button open-type="share"><u-icon :size='24' name="zhuanfa"></u-icon> 分享</button>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <u-divider bg-color="">商品详情</u-divider>
  55. <view class="product-info-guige" v-if="detail&&detail.product">
  56. <view class="row">品牌:<text>{{detail.product.productBrandName||'--'}}</text></view>
  57. <view class="row">原厂编码:<text>{{detail.product.origCode||'--'}} </text> <view class="copyText" v-if="detail.product.origCode" @click="copy(detail.product.origCode)">复制</view></view>
  58. <view class="row">产品编码:<text>{{detail.product.code||'--'}}</text> <view class="copyText" v-if="detail.product.code" @click="copy(detail.product.code)">复制</view></view>
  59. <view class="row">条形码:<text>{{detail.product.qrCode||'--'}}</text> <view class="copyText" v-if="detail.product.qrCode" @click="copy(detail.product.qrCode)">复制</view></view>
  60. <view class="row">商品尺寸:<text>{{detail.product.size||'--'}}</text></view>
  61. <view class="row-ban">计量单位:<text>{{detail.product.unit||'--'}}</text></view>
  62. <view class="row-ban">重量:<text>{{detail.product.weight||'--'}}</text></view>
  63. <view class="row-ban">包装数:<text>{{ (detail.product.packQty) || '--' }}{{ detail.product.packQty ? detail.product.unit : '' }}/{{ detail.product.packQtyUnit||'--' }}</text></view>
  64. </view>
  65. <view class="flex align_center row-info">
  66. <view class="flex"><u-icon :size='24' name="checkbox-mark"></u-icon> <view class="txt">由汽配商发货</view></view>
  67. <view class="flex"><u-icon :size='24' name="checkbox-mark"></u-icon> <view class="txt">退换货及售后请联系汽配商</view></view>
  68. </view>
  69. <view class="product-info-content">
  70. <rich-text v-if="detail && detail.product && detail.product.description" :nodes="detail.product.description"></rich-text>
  71. <view v-else style="font-size: 12px;color: #999;text-align: center;">暂无产品介绍</view>
  72. </view>
  73. </view>
  74. <!-- 底部栏 -->
  75. <view class="scrollPage-footer">
  76. <view class="scrollPage-footer-box">
  77. <view class="footer-left">
  78. <view v-if="isShare" class="footer-left-item" @click="goBack">
  79. <u-icon :size='50' color="#666" name="home"></u-icon>
  80. <text class="footer-left-item-text">首页</text>
  81. </view>
  82. <view class="footer-left-item" @click="toCart">
  83. <u-icon :size='50' color="#666" name="shopping-cart"></u-icon>
  84. <text class="footer-left-item-text">购物车</text>
  85. <text class="badge" v-if="totalNum">{{totalNum>99?'99+':totalNum}}</text>
  86. </view>
  87. </view>
  88. <view class="footer-right">
  89. <view class="footer-right-item" @click="toAddCart">
  90. <text>加入购物车</text>
  91. </view>
  92. <view class="footer-right-item" @click="toBuy">
  93. <text>立即购买</text>
  94. </view>
  95. </view>
  96. </view>
  97. <view :style="{height:safeAreaBottom+'px'}"></view>
  98. </view>
  99. <!-- 购物车动画 -->
  100. <uni-cart-animation ref="cartAnimation" @animationfinish="loading = false"></uni-cart-animation>
  101. <!-- 立即购买和付款 -->
  102. <page-container
  103. :show="showPopu"
  104. :round="true"
  105. :z-index="100"
  106. position="bottom"
  107. customStyle="border-radius:15px 15px 0 0;"
  108. @beforeleave="beforeClosePopu"
  109. @afterleave="closePopu">
  110. <!-- 确认订单 -->
  111. <view class="popu-content" v-if="detail&&!showPay">
  112. <view class="popu-close" @click="cancelBuy">
  113. <uni-icons size="26" type="closeempty"></uni-icons>
  114. </view>
  115. <view class="pupu-box">
  116. <view class="popu-content-img">
  117. <image style="width: 80px; height: 80px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
  118. </view>
  119. <view class="popu-content-info">
  120. <view class="popu-content-info-title">
  121. <text class="ellipsis-two">{{detail.productName}}</text>
  122. </view>
  123. <view class="popu-content-info-code">
  124. <text class="ellipsis-two">{{detail.product.code}}</text>
  125. </view>
  126. <view class="popu-content-box">
  127. <view class="popu-content-price" v-if="hasLogin">
  128. ¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
  129. </view>
  130. <view class="popu-content-price" v-else>¥***</view>
  131. <view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_VALID'">
  132. 返<text>{{detail.resultValue}}</text>元
  133. </view>
  134. <view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_PROD'">
  135. 买{{detail.conditionValue}}赠{{detail.resultValue}}
  136. </view>
  137. <view class="flex align_center tejia-tag" v-if="hasLogin&&detail.promoType=='PROMO_PROD'">
  138. 特价<text>¥{{detail.orginPrice}}</text>
  139. </view>
  140. <view class="flex align_center rebate-tag"
  141. v-if="hasLogin&&detail.shopProductSubsidy&&detail.shopProductSubsidy.subsidyAmount<detail.price&&!detail.shopPromoProduct">
  142. 可抵扣<text>¥{{detail.shopProductSubsidy.subsidyAmount}}</text>
  143. </view>
  144. </view>
  145. <view style="margin-top: 10px;" class="popu-content-num flex align_center justify_end">
  146. <text>数量</text>
  147. <view class="flex align_center qty-box">
  148. <view class="qty-btn" @click="changeQty(qty-1)" :class="(qty <= 1)?'qty-disabled':''">-</view>
  149. <view class="qty-num" @click="$refs.showPopu.open()" :style="{width:Number(qty).toString().length*8+10+'px'}">
  150. {{qty}}
  151. </view>
  152. <view class="qty-btn" @click="changeQty(qty+1)" :class="(qty >= 999)?'qty-disabled':''">+</view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="pupu-box gift-box" v-if="giftNum">
  158. <view class="popu-content-img">
  159. <image style="width: 58px; height: 58px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
  160. </view>
  161. <view class="popu-content-info">
  162. <view class="popu-content-info-title flex align_center">
  163. <view class="flex align_center rebate-tag">
  164. 赠品
  165. </view>
  166. <view class="ellipsis-two">{{detail.productName}}</view>
  167. </view>
  168. <view class="popu-content-box">
  169. <view class="popu-content-num flex align_center">
  170. <text>X</text> {{giftNum}}
  171. </view>
  172. </view>
  173. </view>
  174. </view>
  175. <view class="pupu-box-item">
  176. <view class="flex align_center justify_between" v-if="shelfInfo">
  177. <text>配送商:{{shelfInfo.dealerName}}</text>
  178. <view @click="callPhone()"><uni-icons size="18" type="phone" color="dodgerblue"></uni-icons><text style="font-size:12px;">拨打</text></view>
  179. </view>
  180. <view v-if="!isAddCart">
  181. <view class="totalBar-box" v-if="hasBalancePay">
  182. <view class="flex align_center justify_between">
  183. <view>总金额</view>
  184. <view><text class="pf">¥</text>{{totalAmount}}</view>
  185. </view>
  186. <view class="flex align_center justify_between" v-if="detail.shopProductSubsidy.subsidyAmount">
  187. <view v-if="storeAccount">抵扣(余额:<text class="pf">¥</text>{{storeAccount.giveBalance}})</view>
  188. <view class="flex align_center" v-if="!disKdk" @click="hasKdk=!hasKdk">
  189. <uni-icons size="18" :type="hasKdk?'checkbox-filled':'checkbox'" color="#2196f3"></uni-icons>
  190. <text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
  191. </view>
  192. <view class="flex align_center" v-else>
  193. <uni-icons size="18" type="checkbox" color="#999"></uni-icons>
  194. <text class="pf">¥</text>{{detail.shopProductSubsidy.subsidyAmount}}
  195. </view>
  196. </view>
  197. <view class="flex align_center justify_end" v-if="detail.shopProductSubsidy">
  198. <view>合计:</view>
  199. <view style="font-weight: bold;"><text class="pf">¥</text>{{payAmount}}</view>
  200. </view>
  201. </view>
  202. <payOptions v-model="payType" :hasBalancePay="showBalanceAuth" :hasPay="hasPay" @change="payTypeChange" :balance="storeAccount?storeAccount.rechargeBalance:0"></payOptions>
  203. </view>
  204. </view>
  205. <view class="popu-content-btn">
  206. <view class="popu-content-btn-item cartbtn" v-if="isAddCart" @click="submitCart($event)">加入购物车</view>
  207. <view class="popu-content-btn-item okbtn" v-if="!isAddCart" @click="toBuy">
  208. {{hasPay?'立即支付':'确定采购'}}
  209. <text class="payAmount">¥{{payAmount}}</text>
  210. </view>
  211. </view>
  212. </view>
  213. <!-- 确认付款 -->
  214. <view class="popu-content" v-if="payInfo&&showPay&&payData">
  215. <view class="popu-close" @click="cancelPay">
  216. <uni-icons size="26" type="closeempty"></uni-icons>
  217. </view>
  218. <view class="pupu-box-pay-item">
  219. <view class="popu-content-amount flex align_center justify_center">
  220. <view>¥{{payInfo.totalAmount}}</view>
  221. </view>
  222. <view class="flex align_center justify_between" v-if="payInfo.totalSpecialGiveAmount>0">
  223. <text>总优惠</text>
  224. <view class="popu-content-price">¥{{payInfo.totalSpecialGiveAmount}}</view>
  225. </view>
  226. <view class="flex align_center justify_between" v-if="payInfo.totalTicketGiveAmount>0">
  227. <text>代金券</text>
  228. <view class="popu-content-price">¥{{payInfo.totalTicketGiveAmount}}</view>
  229. </view>
  230. <view style="height: 10px;"></view>
  231. <view class="popu-content-title flex align_center justify_between">
  232. <text>付款方式</text>
  233. <view></view>
  234. </view>
  235. <view class="popu-content-pay flex align_center justify_between">
  236. <view class="flex align_center">
  237. <uni-icons size="20" type="weixin" color="#4CAF50"></uni-icons>
  238. <text style="margin-left: 5px;">微信支付</text>
  239. </view>
  240. <view><uni-icons size="22" type="checkbox-filled" color="#2196f3"></uni-icons></view>
  241. </view>
  242. </view>
  243. <view class="popu-content-btn">
  244. <view class="popu-content-btn-item okbtn" @click="confirmPay">确定付款</view>
  245. </view>
  246. </view>
  247. </page-container>
  248. <!-- 修改数量弹框 -->
  249. <uni-popup ref="showPopu" type="center" style="z-index: 1500;" :maskClick="false">
  250. <view class="popu-nums-content">
  251. <view class="popu-close" @click="$refs.showPopu.close()">
  252. <uni-icons size="26" type="closeempty"></uni-icons>
  253. </view>
  254. <view class="popu-content-title flex align_center justify_center"><text>修改商品数量</text></view>
  255. <view class="popu-content-num flex align_center justify_center">
  256. <uni-number-box v-model="qty" :size="28" :input-width="280" :input-height="70" :min="1" :max="999"></uni-number-box>
  257. </view>
  258. <view class="popu-content-btn">
  259. <view class="popu-content-btn-item okbtn" @click="$refs.showPopu.close()">确定</view>
  260. </view>
  261. </view>
  262. </uni-popup>
  263. </view>
  264. </template>
  265. <script>
  266. import {
  267. mapState,
  268. mapMutations,
  269. } from 'vuex'
  270. import { addCart, getCartCount } from '@/api/cart.js'
  271. import { getShopDetail } from '@/api/shop.js'
  272. import { purchaseSave, purchaseCheck, purchasePay } from '@/api/purchase.js'
  273. import { toAuthStore, toLogin } from "@/utils/index.js"
  274. import payOptions from '../components/payOptions.vue'
  275. export default {
  276. components: {
  277. payOptions
  278. },
  279. data() {
  280. return {
  281. loading: false,
  282. showPopu: false, // 弹框
  283. statusBarHeight: 0, // 状态栏高度
  284. safeAreaBottom: 0, // 底部安全区域高度
  285. imgList: [],
  286. shopProductSn: null,
  287. detail: null,
  288. qty: 1,// 数量
  289. isShare: false ,// 是否从分享打开的
  290. busPos:{
  291. x: 10,
  292. y:uni.getSystemInfoSync().windowHeight - 30
  293. },
  294. submitOk: false, // 是否成功
  295. cacelOk: false, // 是否取消
  296. refashOk: false, // 是否刷新页面
  297. showPay: false, // 是否显示付款信息
  298. isAddCart: false, // 是否加入购物车
  299. payData: null, // 支付参数
  300. payType: 0, // 支付方式,0抵扣、1微信,2线下
  301. hasKdk: false,
  302. }
  303. },
  304. onLoad(option) {
  305. this.isShare = !!option.share
  306. // 计算安全区域
  307. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  308. this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
  309. this.shopProductSn = option.sn
  310. // 获取产品详情
  311. this.getDetail()
  312. },
  313. // 分享
  314. onShareAppMessage(e){
  315. return {
  316. title: this.detail ? this.detail.productName : '商品名称',
  317. path: '/pagesB/shopiing/productDetail?sn='+this.shopProductSn+'&share=1',
  318. imageUrl:this.detail ? this.detail.productMsg : '',
  319. type: '1'
  320. }
  321. },
  322. computed: {
  323. ...mapState(['hasLogin']),
  324. // 登录用户信息
  325. userInfo(){
  326. return this.$store.state.vuex_userInfo
  327. },
  328. // 货架经销商信息
  329. shelfInfo(){
  330. return this.$store.state.vuex_storeShelf
  331. },
  332. //是否开启线上支付,支付方式不是线下支付
  333. hasPay(){
  334. const shelfInfo = this.shelfInfo
  335. return shelfInfo&&shelfInfo.payOnlineFlag&&shelfInfo.payOnlineFlag=='1'&&this.payType!=2
  336. },
  337. // 最小支付金额
  338. minPayAmount(){
  339. const shelfInfo = this.shelfInfo
  340. return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
  341. },
  342. // 抵扣余额支付是否可用
  343. showBalanceAuth(){
  344. return this.$store.state.vuex_showBalanceAuth
  345. },
  346. // 抵扣余额支付是否可用,有【余额支付权限】且该产品有抵扣金额
  347. hasBalancePay(){
  348. return this.$store.state.vuex_showBalanceAuth&&this.storeAccount.giveBalance&&this.detail&&!this.detail.shopPromoProduct
  349. },
  350. storeAccount(){
  351. return this.$store.state.vuex_storeAccount
  352. },
  353. // 禁用抵扣金额
  354. disKdk(){
  355. const kdk = this.detail&&this.detail.shopProductSubsidy&&this.storeAccount&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<=this.storeAccount.giveBalance
  356. return this.payType=='2' || !kdk
  357. },
  358. // 经销商电话
  359. dealerPhone(){
  360. const shelfInfo = this.shelfInfo
  361. return shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
  362. },
  363. totalNum(){
  364. return this.hasLogin&&this.userInfo.sysUserFlag == '1' ? this.$store.state.vuex_cartTotal : 0
  365. },
  366. // 总金额
  367. totalAmount(){
  368. return Number(this.hasLogin&&this.detail&&this.detail.price * this.qty).toFixed(2)
  369. },
  370. // 支付合计,结算金额
  371. payAmount(){
  372. return Number(this.totalAmount-(this.hasKdk&&this.detail&&this.detail.shopProductSubsidy?this.detail.shopProductSubsidy.subsidyAmount:0)).toFixed(2)
  373. },
  374. // 赠品数量
  375. giftNum(){
  376. return this.detail && this.detail.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(this.qty / this.detail.conditionValue)*this.detail.resultValue : 0
  377. },
  378. // 付款信息
  379. payInfo(){
  380. return this.$store.state.vuex_tempOrderData
  381. }
  382. },
  383. methods: {
  384. // 返回
  385. goBack(){
  386. if(this.isShare){
  387. uni.reLaunch({
  388. url: '/pages/index/index'
  389. })
  390. }else{
  391. uni.navigateBack()
  392. }
  393. },
  394. // 复制
  395. copy(text){
  396. uni.setClipboardData({
  397. data: text,
  398. success: function () {
  399. uni.showToast({
  400. title: '复制成功'
  401. })
  402. }
  403. })
  404. },
  405. viewImg(index){
  406. uni.previewImage({
  407. urls: this.imgList
  408. })
  409. },
  410. // 联系经销商
  411. callPhone() {
  412. if(this.dealerPhone!=''){
  413. uni.makePhoneCall({
  414. phoneNumber: this.dealerPhone
  415. })
  416. }
  417. },
  418. // 产品详情
  419. getDetail(){
  420. uni.showLoading({
  421. title: '加载中'
  422. })
  423. const storeShelf = this.$store.state.vuex_storeShelf
  424. const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&storeShelf ? storeShelf.dealerSn : ''
  425. // 获取产品详情
  426. getShopDetail({
  427. shopProductSn: this.shopProductSn,
  428. dealerSn: dealerSn
  429. }).then(res => {
  430. if(res.status == 200){
  431. this.detail = res.data
  432. if(res.data){
  433. // 产品图片列表
  434. if(res.data.productPicList){
  435. res.data.productPicList.forEach(item => {
  436. this.imgList.push(item.imageUrl||'/static/def_imgs.png')
  437. })
  438. }else{
  439. this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
  440. }
  441. // 产品促销活动
  442. const a = res.data.shopPromoProduct
  443. let bprice = res.data.price
  444. if(a){
  445. res.data.promoType = a.promoType
  446. res.data.resultValue = a.resultValue
  447. res.data.conditionValue = a.conditionValue
  448. res.data.discountType = a.discountType
  449. res.data.promoProductSn = a.promoProductSn
  450. res.data.promoSn = a.promoSn
  451. res.data.orginPrice = res.data.price
  452. // 特价
  453. if(res.data.promoType=='PROMO_PROD'){
  454. bprice =res.data.conditionValue
  455. }
  456. }
  457. res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
  458. res.data.price = bprice
  459. // 可抵扣金额小于抵扣金额且大于0
  460. const kdk = res.data.shopProductSubsidy&&res.data.shopProductSubsidy.subsidyAmount>0&&res.data.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
  461. this.hasKdk = kdk
  462. }
  463. }
  464. uni.hideLoading()
  465. })
  466. },
  467. // 修改数量
  468. changeQty(value) {
  469. const max = 999
  470. const v = value > max ? max : (value==''||value==0?1:value)
  471. this.qty = v
  472. },
  473. // 加入购物车
  474. toAddCart(){
  475. // 未登录
  476. if(this.hasLogin){
  477. // 游客未认证
  478. if(this.userInfo.sysUserFlag == '0'){
  479. toAuthStore()
  480. }else{
  481. // 打开确认数量弹框
  482. this.isAddCart = true
  483. this.showPopu = true
  484. }
  485. }else{
  486. toLogin()
  487. }
  488. },
  489. // 确定加入购物车
  490. submitCart(event){
  491. if(this.loading){
  492. return
  493. }
  494. this.loading = true
  495. this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
  496. // 加入购物车
  497. addCart({
  498. qty: this.qty,
  499. price: this.detail.price,
  500. productSn: this.detail.productSn
  501. }).then(res => {
  502. if(res.status == 200){
  503. uni.$emit('refashCart')
  504. this.showPopu = false
  505. }
  506. })
  507. },
  508. // 打开购物车页面
  509. toCart(){
  510. if(this.hasLogin){
  511. // 游客未认证
  512. if(this.userInfo.sysUserFlag == '0'){
  513. toAuthStore()
  514. }else{
  515. uni.navigateTo({
  516. url: '/pagesB/cart/index'
  517. })
  518. }
  519. }else{
  520. toLogin()
  521. }
  522. },
  523. // 立即购买
  524. toBuy(){
  525. if(this.hasLogin){
  526. // 游客未认证
  527. if(this.userInfo.sysUserFlag == '0'){
  528. toAuthStore()
  529. }else{
  530. if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
  531. uni.showModal({
  532. content: '此商品已'+(this.detail.status==0?'下架':'售罄'),
  533. showCancel:false,
  534. confirmText:'知道了'
  535. })
  536. }else{
  537. // 打开数量选择弹框
  538. if(!this.showPopu){
  539. this.showPopu = true
  540. this.payType = this.showBalanceAuth ? '0' : (this.hasPay ? '1' : '2')
  541. if(this.hasBalancePay){
  542. this.payType = this.storeAccount.rechargeBalance<this.payAmount ? (this.hasPay? '1' : '2'):'0'
  543. }
  544. this.hasKdk = this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
  545. }else{
  546. // 充值余额支付
  547. if(this.payType == 0){
  548. if(this.storeAccount.rechargeBalance<this.payAmount){
  549. setTimeout(()=>{
  550. this.payType = this.hasPay ? '1' : '2'
  551. },100)
  552. uni.showModal({
  553. content: '充值余额不足!',
  554. confirmText:'去充值',
  555. success: (res) => {
  556. if (res.confirm) {
  557. uni.navigateTo({
  558. url: '/pagesB/accountBalance/accountBalance'
  559. })
  560. }
  561. }
  562. })
  563. return;
  564. }
  565. }
  566. // 微信支付
  567. if(this.payType == 1){
  568. if(this.hasPay && this.minPayAmount>this.payAmount){
  569. uni.showModal({
  570. content: '支付金额不能小于'+this.minPayAmount+'元!',
  571. showCancel:false,
  572. confirmText:'知道了'
  573. })
  574. return;
  575. }
  576. }
  577. // 去结算生产订单
  578. this.creatOrder()
  579. }
  580. }
  581. }
  582. }else{
  583. toLogin()
  584. }
  585. },
  586. // 取消立即购买
  587. cancelBuy(){
  588. this.resetPage()
  589. },
  590. // 去结算
  591. creatOrder(){
  592. uni.showLoading({
  593. title: '提交中...',
  594. mask: true
  595. })
  596. const _this = this
  597. purchaseCheck({detailList: [{
  598. productSn:this.detail.productSn,
  599. productCode:this.detail.productCode,
  600. qty: this.qty,
  601. price:this.detail.price,
  602. promoSn: this.detail.promoSn
  603. }]}).then(res => {
  604. uni.hideLoading()
  605. if(res.status == 200){
  606. const successList = res.data.successList ? res.data.successList.map(item => {
  607. return {
  608. productSn:item.productSn,
  609. productCode: item.productCode,
  610. qty: item.qty,
  611. price:item.price,
  612. promoSn: item.promoSn,
  613. }
  614. }) : []
  615. const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
  616. const selloutList = res.data.selloutList ? res.data.selloutList.map(item => item.productCode) : []
  617. // 有已下架或已售罄产品提示
  618. if(removeList.length || selloutList.length){
  619. uni.showModal({
  620. title: '提示',
  621. content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
  622. showCancel: successList.length,
  623. confirmText: successList.length?'确定':'知道了',
  624. success(ret) {
  625. if(ret.confirm && successList.length){
  626. _this.submitForm(successList)
  627. }
  628. }
  629. })
  630. }else{
  631. const promoChangeFlag = res.data.promoChangeFlag
  632. // 活动变更
  633. if(promoChangeFlag){
  634. uni.showModal({
  635. title: '提示',
  636. content: '促销活动已变更,请刷新?',
  637. confirmText:'确定刷新',
  638. success(ret) {
  639. if(ret.confirm){
  640. _this.showPopu = false
  641. _this.refashOk = true
  642. }
  643. }
  644. })
  645. return
  646. }
  647. // 直接提交
  648. _this.submitForm(successList)
  649. }
  650. }else{
  651. uni.showToast({
  652. title: res.message,
  653. icon: 'none'
  654. })
  655. }
  656. })
  657. },
  658. // 创建订单
  659. submitForm(detailList){
  660. uni.showLoading({
  661. title: '提交中...',
  662. mask: true
  663. })
  664. purchaseSave({
  665. detailList: detailList,
  666. payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
  667. }).then(res => {
  668. if(res.status == 200){
  669. res.data.detailList = []
  670. this.$store.state.vuex_tempOrderData = res.data
  671. // 这里判断是否开通支付,如果开通打开确认付款弹框
  672. if(this.hasPay){
  673. // 计算待付款剩余倒计时
  674. if(this.payType==1){
  675. res.data.timestamp = (new Date(res.data.createDate.replace(/-/g,'/')).getTime() + 1800000 - new Date().getTime())/1000
  676. }
  677. purchasePay({
  678. bizSn:res.data.purchaseSn,
  679. bizNo:res.data.purchaseNo,
  680. bizType:'SETTLE_BILL',
  681. payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid'),
  682. settleType: this.payType == 0 ? 'RECHARGE_BALANCE' : 'PAY_WECHAT_ONLINE'
  683. }).then(ret=>{
  684. if(ret.status == 200){
  685. // 微信支付
  686. if(this.payType == 1){
  687. if(ret.data){
  688. this.showPay = true
  689. this.payData = ret.data?ret.data.payRequestRest:null
  690. }else{
  691. uni.showToast({
  692. title: '支付失败',
  693. icon: 'none'
  694. })
  695. }
  696. }else{
  697. // 余额支付
  698. this.showPay = true
  699. this.showPopu = false
  700. this.submitOk = true
  701. }
  702. }else{
  703. uni.showToast({
  704. title: ret.message,
  705. icon: 'none'
  706. })
  707. }
  708. uni.hideLoading()
  709. })
  710. }else{
  711. // 未开通支付,创建成功,跳转到订单详情页
  712. this.showPopu = false
  713. this.submitOk = true
  714. uni.hideLoading()
  715. }
  716. }else{
  717. uni.hideLoading()
  718. uni.showToast({
  719. title: res.message,
  720. icon: 'none'
  721. })
  722. }
  723. })
  724. },
  725. // 关闭之前
  726. beforeClosePopu(){
  727. console.log(this.showPay,this.submitOk,this.cacelOk)
  728. // 正在支付
  729. if(this.showPay&&!this.submitOk&&!this.cacelOk){
  730. this.showPay = false
  731. this.cancelPay()
  732. }
  733. },
  734. // 关闭确定订单弹窗后
  735. closePopu(){
  736. this.showPopu = false
  737. // 刷新页面
  738. if(this.refashOk){
  739. this.qty = 1
  740. this.getDetail()
  741. }else{
  742. // 开通了支付
  743. if(this.hasPay){
  744. // 付款
  745. if(this.showPay){
  746. // 确定取消付款或付款失败
  747. if(this.cacelOk){
  748. this.cacelOk = false
  749. }
  750. // 确定付款成功
  751. if(this.submitOk){
  752. this.submitOk = false
  753. }
  754. // 去订单详情页
  755. this.toOrderDetial()
  756. }else{
  757. // 取消立即购买
  758. this.resetPage()
  759. }
  760. }else{
  761. // 未开通支付
  762. // 去订单详情页
  763. if(this.submitOk){
  764. this.submitOk = false
  765. this.toOrderDetial()
  766. }else{
  767. // 取消采购
  768. this.resetPage()
  769. }
  770. }
  771. }
  772. },
  773. payTypeChange(v){
  774. this.hasKdk=v!=2
  775. // 充值余额支付,判断是否不足
  776. if(v==0){
  777. if(this.payAmount>this.storeAccount.rechargeBalance){
  778. setTimeout(()=>{
  779. this.payType = this.hasPay ? '1' : '2'
  780. },100)
  781. uni.showToast({
  782. title: '充值余额不足',
  783. icon: 'none'
  784. })
  785. }
  786. }else{
  787. this.payType = v
  788. }
  789. },
  790. // 确认付款
  791. confirmPay(){
  792. const _this = this
  793. // 确认付款
  794. const data = _this.payData
  795. console.log(data)
  796. if(data){
  797. uni.requestPayment({
  798. provider: 'wxpay',
  799. timeStamp: data.timeStamp,
  800. nonceStr: data.nonceStr,
  801. package: data.package,
  802. signType: data.signType,
  803. paySign: data.paySign,
  804. success: (res) =>{
  805. _this.payComplete(1,true)
  806. },
  807. fail: (err)=> {
  808. console.log('fail:',err);
  809. _this.payComplete(err.errMsg.indexOf("cancel")>=0 ? 2 : 0,false)
  810. }
  811. });
  812. }else{
  813. _this.payComplete(0,false)
  814. }
  815. },
  816. payComplete(type,data){
  817. uni.showToast({
  818. mask: true,
  819. title: type==1 ? '支付成功' : (type==2?'支付取消':'支付失败'),
  820. icon: 'none'
  821. })
  822. this.showPopu = false
  823. this.submitOk = true
  824. },
  825. // 确认取消付款弹框
  826. cancelPay(){
  827. const _this = this
  828. uni.showModal({
  829. title: '确定取消支付吗?',
  830. content: '您的订单在30分钟内未支付将被取消,请尽快完成支付。',
  831. confirmText: '继续支付',
  832. cancelText: '取消支付',
  833. success(ret) {
  834. // 确定取消,跳转到订单详情页
  835. if(ret.cancel){
  836. // 支付弹框打开中
  837. if(_this.showPopu){
  838. console.log(0)
  839. _this.showPopu = false
  840. _this.cacelOk = true
  841. }else{
  842. console.log(1)
  843. // 未打开直接跳转
  844. _this.toOrderDetial()
  845. }
  846. }
  847. if(ret.confirm){
  848. console.log(2)
  849. // 继续支付
  850. _this.showPopu = true
  851. _this.showPay = true
  852. _this.cacelOk = false
  853. }
  854. }
  855. })
  856. },
  857. // 重置页面
  858. resetPage(){
  859. this.qty = 1
  860. this.isAddCart = false
  861. this.showPopu = false
  862. this.showPay = false
  863. this.cacelOk = false
  864. this.submitOk = false
  865. setTimeout(()=>{
  866. uni.hideLoading()
  867. },300)
  868. },
  869. // 订单详情页
  870. toOrderDetial(){
  871. this.resetPage()
  872. // 跳转到订单详情页面
  873. uni.navigateTo({
  874. url: "/pagesB/procureOrder/orderDetail?purchaseSn="+this.$store.state.vuex_tempOrderData.purchaseSn
  875. })
  876. }
  877. }
  878. }
  879. </script>
  880. <style lang="less">
  881. .pages {
  882. height: 100vh;
  883. display: flex;
  884. flex-direction: column;
  885. .scrollPage-header{
  886. z-index: 1;
  887. width: 100%;
  888. position:fixed;
  889. left: 0;
  890. top: 0;
  891. .header-title{
  892. display: flex;
  893. align-items: center;
  894. justify-content: space-between;
  895. padding: 0 10px;
  896. height: 44px;
  897. .header-left{
  898. display: flex;
  899. align-items: center;
  900. text{
  901. font-size: 14px;
  902. color: #333333;
  903. }
  904. background-color: rgba(255,255,255,0.6);
  905. box-shadow: 0px 1px 0px 0px #E6E6E6;
  906. border-radius: 50px;
  907. padding: 3px 6px 3px;
  908. }
  909. .header-right{
  910. width: 50px;
  911. }
  912. }
  913. }
  914. .copyText{
  915. background-color: #efefef;
  916. border-radius: 100rpx;
  917. padding: 0 20rpx;
  918. color: #03A9F4;
  919. font-size: 20rpx;
  920. display: inline-block;
  921. margin-left: 20rpx;
  922. height: 44rpx;
  923. line-height: 44rpx;
  924. }
  925. .scrollPage-content{
  926. flex: 1;
  927. overflow-y: auto;
  928. .product-info{
  929. background:#fff;
  930. margin-bottom: 10px;
  931. .product-info-text{
  932. padding: 10px;
  933. .product-info-text-title{
  934. font-weight: bold;
  935. color: #333333;
  936. line-height: 22px;
  937. margin-bottom: 5px;
  938. }
  939. .product-info-text-attr{
  940. display: flex;
  941. align-items: center;
  942. justify-content: space-between;
  943. .product-info-price{
  944. color: red;
  945. display: flex;
  946. align-items: baseline;
  947. font-size: 12px;
  948. text{
  949. font-size: 38rpx;
  950. }
  951. }
  952. .product-info-nums{
  953. font-size: 12px;
  954. color: #999999;
  955. >view{
  956. display: flex;
  957. align-items: center;
  958. }
  959. .share{
  960. button{
  961. width: auto;
  962. padding: 0;
  963. border: 0;
  964. background: none;
  965. line-height: normal;
  966. margin: 0;
  967. display: inline;
  968. font-size: 12px;
  969. color: #999;
  970. &::after{
  971. border:none;
  972. }
  973. ::v-deep .u-icon{
  974. margin-right: 3px;
  975. }
  976. }
  977. }
  978. }
  979. }
  980. }
  981. }
  982. .product-info-guige{
  983. display: flex;
  984. flex-wrap: wrap;
  985. justify-content: space-between;
  986. background:#fff;
  987. margin: 10px 0 0;
  988. padding: 10px;
  989. line-height: 28px;
  990. .row{
  991. width: 100%;
  992. }
  993. .row-ban{
  994. width: 50%;
  995. }
  996. >view{
  997. color: #999;
  998. text{
  999. color: #333333;
  1000. }
  1001. }
  1002. }
  1003. .row-info{
  1004. width: 100%;
  1005. background: #fff;
  1006. font-size: 24rpx;
  1007. text-align: center;
  1008. margin: 20rpx 0;
  1009. padding: 15rpx;
  1010. .txt{
  1011. margin-left: 10rpx;
  1012. color: #666;
  1013. font-weight: bold;
  1014. }
  1015. > view{
  1016. padding: 0 10px;
  1017. }
  1018. }
  1019. .product-info-content{
  1020. background:#fff;
  1021. margin-bottom: 10px;
  1022. padding: 10px;
  1023. line-height: 28px;
  1024. }
  1025. }
  1026. .rebate-tag{
  1027. background: #ffe7df;
  1028. color: #E91E63;
  1029. padding: 2px 5px;
  1030. font-size: 10px;
  1031. border-radius: 3px;
  1032. margin-left: 6px;
  1033. }
  1034. .tejia-tag{
  1035. color: #E91E63;
  1036. margin-left: 6px;
  1037. font-size: 12px;
  1038. text{
  1039. font-size: 12px;
  1040. color: #999;
  1041. margin-left: 5px;
  1042. text-decoration: line-through;
  1043. }
  1044. }
  1045. .scrollPage-footer{
  1046. background-color: #FFFFFF;
  1047. width: 100%;
  1048. position: fixed;
  1049. left: 0;
  1050. bottom: 0;
  1051. .scrollPage-footer-box{
  1052. display: flex;
  1053. align-items: center;
  1054. justify-content: space-between;
  1055. height: 45px;
  1056. }
  1057. .footer-left{
  1058. display: flex;
  1059. align-items: center;
  1060. justify-content: space-between;
  1061. width: 35%;
  1062. .footer-left-item{
  1063. display: flex;
  1064. flex-direction: column;
  1065. align-items: center;
  1066. justify-content: center;
  1067. padding: 0 15px;
  1068. position: relative;
  1069. .footer-left-item-text{
  1070. font-size: 12px;
  1071. color: #666666;
  1072. }
  1073. .badge{
  1074. background: #f44336;
  1075. color: #fff;
  1076. position: absolute;
  1077. right: 5px;
  1078. top: -8px;
  1079. font-size: 12px;
  1080. display: flex;
  1081. align-items: center;
  1082. justify-content: center;
  1083. border-radius: 50rpx;
  1084. padding: 0 10rpx;
  1085. }
  1086. }
  1087. }
  1088. .footer-right{
  1089. width: 60%;
  1090. height: 80%;
  1091. display: flex;
  1092. align-items: center;
  1093. border-radius: 50px;
  1094. overflow: hidden;
  1095. margin: 0 5px;
  1096. .footer-right-item{
  1097. height: 100%;
  1098. display: flex;
  1099. flex-direction: column;
  1100. align-items: center;
  1101. justify-content: center;
  1102. width: 50%;
  1103. font-size: 14px;
  1104. color: #FFFFFF;
  1105. }
  1106. .footer-right-item:first-child{
  1107. background-color: #FF9900;
  1108. }
  1109. .footer-right-item:last-child{
  1110. background-color: #FF0000;
  1111. }
  1112. }
  1113. }
  1114. .popu-nums-content{
  1115. background-color: #FFFFFF;
  1116. border-radius: 10px;
  1117. width: 300px;
  1118. display: flex;
  1119. flex-direction: column;
  1120. align-items: center;
  1121. padding: 10px 15px;
  1122. .popu-close{
  1123. padding: 10px;
  1124. position: absolute;
  1125. right: 0;
  1126. top: 0;
  1127. z-index: 1000;
  1128. }
  1129. .popu-content-title{
  1130. padding: 10px;
  1131. font-size: 16px;
  1132. }
  1133. .popu-content-num{
  1134. font-size: 24rpx;
  1135. color: #999999;
  1136. padding: 10px 0;
  1137. > text{
  1138. margin-right: 10px;
  1139. font-size: 10px;
  1140. }
  1141. }
  1142. .popu-content-btn{
  1143. width: 100%;
  1144. display: flex;
  1145. align-items: center;
  1146. justify-content: space-around;
  1147. margin: 20px 0 10px;
  1148. .popu-content-btn-item{
  1149. width: 40%;
  1150. height: 32px;
  1151. font-size: 14px;
  1152. display: flex;
  1153. align-items: center;
  1154. justify-content: center;
  1155. border-radius: 100px;
  1156. }
  1157. .cancelBtn{
  1158. background-color: #f8f8f8;
  1159. color: #666;
  1160. }
  1161. .okbtn{
  1162. background-color: #f70000;
  1163. color: #FFFFFF;
  1164. }
  1165. }
  1166. }
  1167. .popu-content{
  1168. display: flex;
  1169. flex-direction: column;
  1170. align-items: center;
  1171. padding: 10px 15px;
  1172. .popu-close{
  1173. padding: 10px;
  1174. position: absolute;
  1175. right: 0;
  1176. top: 0;
  1177. z-index: 1000;
  1178. }
  1179. .qty-box{
  1180. display: flex;
  1181. .qty-btn{
  1182. display: flex;
  1183. align-items: center;
  1184. justify-content: center;
  1185. width: 22px;
  1186. height: 20px;
  1187. border-radius: 50px;
  1188. font-size: 18px;
  1189. color: #066cff;
  1190. &.qty-disabled{
  1191. color: #999;
  1192. }
  1193. }
  1194. .qty-num{
  1195. width: 24px;
  1196. height: 20px;
  1197. line-height: 20px;
  1198. text-align: center;
  1199. background-color: #efefef;
  1200. margin: 0 3px;
  1201. border-radius: 3px;
  1202. font-size: 12px;
  1203. input{
  1204. width: 100%;
  1205. height: 100%;
  1206. text-align: center;
  1207. color: #333;
  1208. }
  1209. }
  1210. }
  1211. .pupu-box{
  1212. display: flex;
  1213. justify-content: space-between;
  1214. margin-top: 35px;
  1215. width: 100%;
  1216. }
  1217. .popu-content-img{
  1218. border-radius: 6px;
  1219. border: 1px solid #eee;
  1220. overflow: hidden;
  1221. width: 80px;
  1222. height: 80px;
  1223. }
  1224. .popu-content-info{
  1225. padding: 0 0 0 10px;
  1226. flex-grow: 1;
  1227. overflow: hidden;
  1228. width: 50%;
  1229. .popu-content-info-title{
  1230. font-size: 14px;
  1231. }
  1232. .popu-content-info-code{
  1233. font-size: 12px;
  1234. color: #00aaff;
  1235. margin-top: 5px;
  1236. }
  1237. }
  1238. .gift-box{
  1239. padding-left: 8%;
  1240. margin-top: 10px;
  1241. border-top: 1px solid #eee;
  1242. padding-top: 10px;
  1243. .popu-content-img{
  1244. width: 58px;
  1245. height: 58px;
  1246. }
  1247. .popu-content-info-title{
  1248. font-size: 12px;
  1249. color: #666;
  1250. }
  1251. .popu-content-box{
  1252. margin-top: 0;
  1253. }
  1254. .popu-content-num{
  1255. padding:5px 15px;
  1256. >text{
  1257. font-size: 10px;
  1258. }
  1259. }
  1260. .rebate-tag{
  1261. margin: 0 5px 0 0;
  1262. background: #ff0000;
  1263. color: #fff;
  1264. flex-grow: 1;
  1265. display: flex;
  1266. justify-content: center;
  1267. }
  1268. .ellipsis-two{
  1269. width: 80%;
  1270. flex-grow: 1;
  1271. }
  1272. }
  1273. .popu-content-box{
  1274. display: flex;
  1275. align-items: baseline;
  1276. margin-top: 5px;
  1277. .popu-content-price{
  1278. color: red;
  1279. display: flex;
  1280. align-items: baseline;
  1281. font-size: 12px;
  1282. text{
  1283. font-size: 38rpx;
  1284. }
  1285. }
  1286. }
  1287. .pupu-box-item,.pupu-box-pay-item{
  1288. width: 100%;
  1289. padding-top: 20px;
  1290. > view{
  1291. padding: 5px 0;
  1292. }
  1293. .totalBar-box{
  1294. margin-bottom: 20rpx;
  1295. > view{
  1296. padding: 5px 0;
  1297. }
  1298. .pf{
  1299. font-size: 20rpx;
  1300. }
  1301. }
  1302. }
  1303. .pupu-box-pay-item{
  1304. > view{
  1305. padding: 6px 0;
  1306. }
  1307. .popu-content-amount{
  1308. font-size: 28px;
  1309. color: red;
  1310. }
  1311. .popu-content-title{
  1312. font-weight: bold;
  1313. }
  1314. }
  1315. .popu-content-num{
  1316. > text{
  1317. margin-right: 10px;
  1318. }
  1319. }
  1320. .popu-content-btn{
  1321. width: 100%;
  1322. display: flex;
  1323. align-items: center;
  1324. justify-content: space-around;
  1325. margin: 30px 0 20px;
  1326. .popu-content-btn-item{
  1327. width: 30%;
  1328. height: 34px;
  1329. font-size: 14px;
  1330. display: flex;
  1331. align-items: center;
  1332. justify-content: center;
  1333. border-radius: 100px;
  1334. }
  1335. .cancelBtn{
  1336. background-color: #f8f8f8;
  1337. color: #666;
  1338. }
  1339. .okbtn{
  1340. background-color: #f70000;
  1341. color: #FFFFFF;
  1342. width: 65%;
  1343. .payAmount{
  1344. margin-left: 5px;
  1345. }
  1346. }
  1347. .cartbtn{
  1348. background-color: #ffa60c;
  1349. color: #FFFFFF;
  1350. width: 65%;
  1351. }
  1352. }
  1353. }
  1354. }
  1355. </style>