productDetail.vue 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358
  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="animationfinish"></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. if(res.data.productPicList){
  434. res.data.productPicList.forEach(item => {
  435. this.imgList.push(item.imageUrl||'/static/def_imgs.png')
  436. })
  437. }else{
  438. this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
  439. }
  440. const a = res.data.shopPromoProduct
  441. let bprice = res.data.price
  442. if(a){
  443. res.data.promoType = a.promoType
  444. res.data.resultValue = a.resultValue
  445. res.data.conditionValue = a.conditionValue
  446. res.data.discountType = a.discountType
  447. res.data.promoProductSn = a.promoProductSn
  448. res.data.promoSn = a.promoSn
  449. res.data.orginPrice = res.data.price
  450. // 特价
  451. if(res.data.promoType=='PROMO_PROD'){
  452. bprice =res.data.conditionValue
  453. }
  454. }
  455. res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
  456. res.data.price = bprice
  457. // 可抵扣金额小于抵扣金额且大于0
  458. const kdk = res.data.shopProductSubsidy&&res.data.shopProductSubsidy.subsidyAmount>0&&res.data.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
  459. this.hasKdk = kdk
  460. }
  461. console.log(this.detail)
  462. }
  463. uni.hideLoading()
  464. })
  465. },
  466. animationfinish(){
  467. this.loading = false
  468. },
  469. changeQty(value) {
  470. const max = 999
  471. const v = value > max ? max : (value==''||value==0?1:value)
  472. this.qty = v
  473. },
  474. // 加入购物车
  475. toAddCart(){
  476. // 未登录
  477. if(this.hasLogin){
  478. // 游客未认证
  479. if(this.userInfo.sysUserFlag == '0'){
  480. toAuthStore()
  481. }else{
  482. // 打开确认数量弹框
  483. this.isAddCart = true
  484. this.showPopu = true
  485. }
  486. }else{
  487. toLogin()
  488. }
  489. },
  490. // 确定加入购物车
  491. submitCart(event){
  492. if(this.loading){
  493. return
  494. }
  495. this.loading = true
  496. this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
  497. // 加入购物车
  498. addCart({
  499. qty: this.qty,
  500. price: this.detail.price,
  501. productSn: this.detail.productSn
  502. }).then(res => {
  503. if(res.status == 200){
  504. uni.$emit('refashCart')
  505. this.showPopu = false
  506. }
  507. })
  508. },
  509. // 打开购物车页面
  510. toCart(){
  511. if(this.hasLogin){
  512. // 游客未认证
  513. if(this.userInfo.sysUserFlag == '0'){
  514. toAuthStore()
  515. }else{
  516. uni.navigateTo({
  517. url: '/pagesB/cart/index'
  518. })
  519. }
  520. }else{
  521. toLogin()
  522. }
  523. },
  524. // 立即购买
  525. toBuy(){
  526. if(this.hasLogin){
  527. // 游客未认证
  528. if(this.userInfo.sysUserFlag == '0'){
  529. toAuthStore()
  530. }else{
  531. if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
  532. uni.showModal({
  533. content: '此商品已'+(this.detail.status==0?'下架':'售罄'),
  534. showCancel:false,
  535. confirmText:'知道了'
  536. })
  537. }else{
  538. // 打开数量选择弹框
  539. if(!this.showPopu){
  540. this.showPopu = true
  541. this.payType = this.showBalanceAuth ? '0' : (this.hasPay ? '1' : '2')
  542. if(this.hasBalancePay){
  543. this.payType = this.storeAccount.rechargeBalance<this.payAmount ? (this.hasPay? '1' : '2'):'0'
  544. }
  545. this.hasKdk = this.detail.shopProductSubsidy&&this.detail.shopProductSubsidy.subsidyAmount>0&&this.detail.shopProductSubsidy.subsidyAmount<this.storeAccount.giveBalance
  546. }else{
  547. // 充值余额支付
  548. if(this.payType == 0){
  549. if(this.storeAccount.rechargeBalance<this.payAmount){
  550. setTimeout(()=>{
  551. this.payType = this.hasPay ? '1' : '2'
  552. },100)
  553. uni.showModal({
  554. content: '充值余额不足!',
  555. confirmText:'去充值',
  556. success: (res) => {
  557. if (res.confirm) {
  558. uni.navigateTo({
  559. url: '/pagesB/accountBalance/accountBalance'
  560. })
  561. }
  562. }
  563. })
  564. return;
  565. }
  566. }
  567. // 微信支付
  568. if(this.payType == 1){
  569. if(this.hasPay && this.minPayAmount>this.payAmount){
  570. uni.showModal({
  571. content: '支付金额不能小于'+this.minPayAmount+'元!',
  572. showCancel:false,
  573. confirmText:'知道了'
  574. })
  575. return;
  576. }
  577. }
  578. // 去结算生产订单
  579. this.creatOrder()
  580. }
  581. }
  582. }
  583. }else{
  584. toLogin()
  585. }
  586. },
  587. // 取消立即购买
  588. cancelBuy(){
  589. this.resetPage()
  590. },
  591. // 去结算
  592. creatOrder(){
  593. uni.showLoading({
  594. title: '提交中...',
  595. mask: true
  596. })
  597. const _this = this
  598. purchaseCheck({detailList: [{
  599. productSn:this.detail.productSn,
  600. productCode:this.detail.productCode,
  601. qty: this.qty,
  602. price:this.detail.price,
  603. promoSn: this.detail.promoSn
  604. }]}).then(res => {
  605. uni.hideLoading()
  606. if(res.status == 200){
  607. const successList = res.data.successList ? res.data.successList.map(item => {
  608. return {
  609. productSn:item.productSn,
  610. productCode: item.productCode,
  611. qty: item.qty,
  612. price:item.price,
  613. promoSn: item.promoSn,
  614. }
  615. }) : []
  616. const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
  617. const selloutList = res.data.selloutList ? res.data.selloutList.map(item => item.productCode) : []
  618. // 有已下架或已售罄产品提示
  619. if(removeList.length || selloutList.length){
  620. uni.showModal({
  621. title: '提示',
  622. content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
  623. showCancel: successList.length,
  624. confirmText: successList.length?'确定':'知道了',
  625. success(ret) {
  626. if(ret.confirm && successList.length){
  627. _this.submitForm(successList)
  628. }
  629. }
  630. })
  631. }else{
  632. const promoChangeFlag = res.data.promoChangeFlag
  633. // 活动变更
  634. if(promoChangeFlag){
  635. uni.showModal({
  636. title: '提示',
  637. content: '促销活动已变更,请刷新?',
  638. confirmText:'确定刷新',
  639. success(ret) {
  640. if(ret.confirm){
  641. _this.showPopu = false
  642. _this.refashOk = true
  643. }
  644. }
  645. })
  646. return
  647. }
  648. // 直接提交
  649. _this.submitForm(successList)
  650. }
  651. }else{
  652. uni.showToast({
  653. title: res.message,
  654. icon: 'none'
  655. })
  656. }
  657. })
  658. },
  659. // 创建订单
  660. submitForm(detailList){
  661. uni.showLoading({
  662. title: '提交中...',
  663. mask: true
  664. })
  665. purchaseSave({
  666. detailList: detailList,
  667. payOnlineType: this.payType == 0 ? 'RECHARGE_BALANCE' : this.payType == 1 ? 'PAY_WECHAT_ONLINE' : ''
  668. }).then(res => {
  669. if(res.status == 200){
  670. res.data.detailList = []
  671. this.$store.state.vuex_tempOrderData = res.data
  672. // 这里判断是否开通支付,如果开通打开确认付款弹框
  673. if(this.hasPay){
  674. // 计算待付款剩余倒计时
  675. if(this.payType==1){
  676. res.data.timestamp = (new Date(res.data.createDate.replace(/-/g,'/')).getTime() + 1800000 - new Date().getTime())/1000
  677. }
  678. purchasePay({
  679. bizSn:res.data.purchaseSn,
  680. bizNo:res.data.purchaseNo,
  681. bizType:'SETTLE_BILL',
  682. payUserOpenId: this.$store.state.vuex_openid || uni.getStorageSync('openid'),
  683. settleType: this.payType == 0 ? 'RECHARGE_BALANCE' : 'PAY_WECHAT_ONLINE'
  684. }).then(ret=>{
  685. if(ret.status == 200){
  686. // 微信支付
  687. if(this.payType == 1){
  688. if(ret.data){
  689. this.showPay = true
  690. this.payData = ret.data?ret.data.payRequestRest:null
  691. }else{
  692. uni.showToast({
  693. title: '支付失败',
  694. icon: 'none'
  695. })
  696. }
  697. }else{
  698. // 余额支付
  699. this.showPay = true
  700. this.showPopu = false
  701. this.submitOk = true
  702. }
  703. }else{
  704. uni.showToast({
  705. title: ret.message,
  706. icon: 'none'
  707. })
  708. }
  709. uni.hideLoading()
  710. })
  711. }else{
  712. // 未开通支付,创建成功,跳转到订单详情页
  713. this.showPopu = false
  714. this.submitOk = true
  715. uni.hideLoading()
  716. }
  717. }else{
  718. uni.hideLoading()
  719. uni.showToast({
  720. title: res.message,
  721. icon: 'none'
  722. })
  723. }
  724. })
  725. },
  726. // 关闭之前
  727. beforeClosePopu(){
  728. console.log(this.showPay,this.submitOk,this.cacelOk)
  729. // 正在支付
  730. if(this.showPay&&!this.submitOk&&!this.cacelOk){
  731. this.showPay = false
  732. this.cancelPay()
  733. }
  734. },
  735. // 关闭确定订单弹窗后
  736. closePopu(){
  737. this.showPopu = false
  738. // 刷新页面
  739. if(this.refashOk){
  740. this.qty = 1
  741. this.getDetail()
  742. }else{
  743. // 开通了支付
  744. if(this.hasPay){
  745. // 付款
  746. if(this.showPay){
  747. // 确定取消付款或付款失败
  748. if(this.cacelOk){
  749. this.cacelOk = false
  750. }
  751. // 确定付款成功
  752. if(this.submitOk){
  753. this.submitOk = false
  754. }
  755. // 去订单详情页
  756. this.toOrderDetial()
  757. }else{
  758. // 取消立即购买
  759. this.resetPage()
  760. }
  761. }else{
  762. // 未开通支付
  763. // 去订单详情页
  764. if(this.submitOk){
  765. this.submitOk = false
  766. this.toOrderDetial()
  767. }else{
  768. // 取消采购
  769. this.resetPage()
  770. }
  771. }
  772. }
  773. },
  774. payTypeChange(v){
  775. this.hasKdk=v!=2
  776. // 充值余额支付,判断是否不足
  777. if(v==0){
  778. if(this.payAmount>this.storeAccount.rechargeBalance){
  779. setTimeout(()=>{
  780. this.payType = this.hasPay ? '1' : '2'
  781. },100)
  782. uni.showToast({
  783. title: '充值余额不足',
  784. icon: 'none'
  785. })
  786. }
  787. }else{
  788. this.payType = v
  789. }
  790. },
  791. // 确认付款
  792. confirmPay(){
  793. const _this = this
  794. // 确认付款
  795. const data = _this.payData
  796. console.log(data)
  797. if(data){
  798. uni.requestPayment({
  799. provider: 'wxpay',
  800. timeStamp: data.timeStamp,
  801. nonceStr: data.nonceStr,
  802. package: data.package,
  803. signType: data.signType,
  804. paySign: data.paySign,
  805. success: (res) =>{
  806. _this.payComplete(1,true)
  807. },
  808. fail: (err)=> {
  809. console.log('fail:',err);
  810. _this.payComplete(err.errMsg.indexOf("cancel")>=0 ? 2 : 0,false)
  811. }
  812. });
  813. }else{
  814. _this.payComplete(0,false)
  815. }
  816. },
  817. payComplete(type,data){
  818. uni.showToast({
  819. mask: true,
  820. title: type==1 ? '支付成功' : (type==2?'支付取消':'支付失败'),
  821. icon: 'none'
  822. })
  823. this.showPopu = false
  824. this.submitOk = true
  825. },
  826. // 确认取消付款弹框
  827. cancelPay(){
  828. const _this = this
  829. uni.showModal({
  830. title: '确定取消支付吗?',
  831. content: '您的订单在30分钟内未支付将被取消,请尽快完成支付。',
  832. confirmText: '继续支付',
  833. cancelText: '取消支付',
  834. success(ret) {
  835. // 确定取消,跳转到订单详情页
  836. if(ret.cancel){
  837. // 支付弹框打开中
  838. if(_this.showPopu){
  839. console.log(0)
  840. _this.showPopu = false
  841. _this.cacelOk = true
  842. }else{
  843. console.log(1)
  844. // 未打开直接跳转
  845. _this.toOrderDetial()
  846. }
  847. }
  848. if(ret.confirm){
  849. console.log(2)
  850. // 继续支付
  851. _this.showPopu = true
  852. _this.showPay = true
  853. _this.cacelOk = false
  854. }
  855. }
  856. })
  857. },
  858. // 重置页面
  859. resetPage(){
  860. this.qty = 1
  861. this.isAddCart = false
  862. this.showPopu = false
  863. this.showPay = false
  864. this.cacelOk = false
  865. this.submitOk = false
  866. setTimeout(()=>{
  867. uni.hideLoading()
  868. },300)
  869. },
  870. // 订单详情页
  871. toOrderDetial(){
  872. this.resetPage()
  873. // 跳转到订单详情页面
  874. uni.navigateTo({
  875. url: "/pagesB/procureOrder/orderDetail?purchaseSn="+this.$store.state.vuex_tempOrderData.purchaseSn
  876. })
  877. }
  878. }
  879. }
  880. </script>
  881. <style lang="less">
  882. .pages {
  883. height: 100vh;
  884. display: flex;
  885. flex-direction: column;
  886. .scrollPage-header{
  887. z-index: 1;
  888. width: 100%;
  889. position:fixed;
  890. left: 0;
  891. top: 0;
  892. .header-title{
  893. display: flex;
  894. align-items: center;
  895. justify-content: space-between;
  896. padding: 0 10px;
  897. height: 44px;
  898. .header-left{
  899. display: flex;
  900. align-items: center;
  901. text{
  902. font-size: 14px;
  903. color: #333333;
  904. }
  905. background-color: rgba(255,255,255,0.6);
  906. box-shadow: 0px 1px 0px 0px #E6E6E6;
  907. border-radius: 50px;
  908. padding: 3px 6px 3px;
  909. }
  910. .header-right{
  911. width: 50px;
  912. }
  913. }
  914. }
  915. .copyText{
  916. background-color: #efefef;
  917. border-radius: 100rpx;
  918. padding: 0 20rpx;
  919. color: #03A9F4;
  920. font-size: 20rpx;
  921. display: inline-block;
  922. margin-left: 20rpx;
  923. height: 44rpx;
  924. line-height: 44rpx;
  925. }
  926. .scrollPage-content{
  927. flex: 1;
  928. overflow-y: auto;
  929. .product-info{
  930. background:#fff;
  931. margin-bottom: 10px;
  932. .product-info-text{
  933. padding: 10px;
  934. .product-info-text-title{
  935. font-weight: bold;
  936. color: #333333;
  937. line-height: 22px;
  938. margin-bottom: 5px;
  939. }
  940. .product-info-text-attr{
  941. display: flex;
  942. align-items: center;
  943. justify-content: space-between;
  944. .product-info-price{
  945. color: red;
  946. display: flex;
  947. align-items: baseline;
  948. font-size: 12px;
  949. text{
  950. font-size: 38rpx;
  951. }
  952. }
  953. .product-info-nums{
  954. font-size: 12px;
  955. color: #999999;
  956. >view{
  957. display: flex;
  958. align-items: center;
  959. }
  960. .share{
  961. button{
  962. width: auto;
  963. padding: 0;
  964. border: 0;
  965. background: none;
  966. line-height: normal;
  967. margin: 0;
  968. display: inline;
  969. font-size: 12px;
  970. color: #999;
  971. &::after{
  972. border:none;
  973. }
  974. ::v-deep .u-icon{
  975. margin-right: 3px;
  976. }
  977. }
  978. }
  979. }
  980. }
  981. }
  982. }
  983. .product-info-guige{
  984. display: flex;
  985. flex-wrap: wrap;
  986. justify-content: space-between;
  987. background:#fff;
  988. margin: 10px 0 0;
  989. padding: 10px;
  990. line-height: 28px;
  991. .row{
  992. width: 100%;
  993. }
  994. .row-ban{
  995. width: 50%;
  996. }
  997. >view{
  998. color: #999;
  999. text{
  1000. color: #333333;
  1001. }
  1002. }
  1003. }
  1004. .row-info{
  1005. width: 100%;
  1006. background: #fff;
  1007. font-size: 24rpx;
  1008. text-align: center;
  1009. margin: 20rpx 0;
  1010. padding: 15rpx;
  1011. .txt{
  1012. margin-left: 10rpx;
  1013. color: #666;
  1014. font-weight: bold;
  1015. }
  1016. > view{
  1017. padding: 0 10px;
  1018. }
  1019. }
  1020. .product-info-content{
  1021. background:#fff;
  1022. margin-bottom: 10px;
  1023. padding: 10px;
  1024. line-height: 28px;
  1025. }
  1026. }
  1027. .rebate-tag{
  1028. background: #ffe7df;
  1029. color: #E91E63;
  1030. padding: 2px 5px;
  1031. font-size: 10px;
  1032. border-radius: 3px;
  1033. margin-left: 6px;
  1034. }
  1035. .tejia-tag{
  1036. color: #E91E63;
  1037. margin-left: 6px;
  1038. font-size: 12px;
  1039. text{
  1040. font-size: 12px;
  1041. color: #999;
  1042. margin-left: 5px;
  1043. text-decoration: line-through;
  1044. }
  1045. }
  1046. .scrollPage-footer{
  1047. background-color: #FFFFFF;
  1048. width: 100%;
  1049. position: fixed;
  1050. left: 0;
  1051. bottom: 0;
  1052. .scrollPage-footer-box{
  1053. display: flex;
  1054. align-items: center;
  1055. justify-content: space-between;
  1056. height: 45px;
  1057. }
  1058. .footer-left{
  1059. display: flex;
  1060. align-items: center;
  1061. justify-content: space-between;
  1062. width: 35%;
  1063. .footer-left-item{
  1064. display: flex;
  1065. flex-direction: column;
  1066. align-items: center;
  1067. justify-content: center;
  1068. padding: 0 15px;
  1069. position: relative;
  1070. .footer-left-item-text{
  1071. font-size: 12px;
  1072. color: #666666;
  1073. }
  1074. .badge{
  1075. background: #f44336;
  1076. color: #fff;
  1077. position: absolute;
  1078. right: 5px;
  1079. top: -8px;
  1080. font-size: 12px;
  1081. display: flex;
  1082. align-items: center;
  1083. justify-content: center;
  1084. border-radius: 50rpx;
  1085. padding: 0 10rpx;
  1086. }
  1087. }
  1088. }
  1089. .footer-right{
  1090. width: 60%;
  1091. height: 80%;
  1092. display: flex;
  1093. align-items: center;
  1094. border-radius: 50px;
  1095. overflow: hidden;
  1096. margin: 0 5px;
  1097. .footer-right-item{
  1098. height: 100%;
  1099. display: flex;
  1100. flex-direction: column;
  1101. align-items: center;
  1102. justify-content: center;
  1103. width: 50%;
  1104. font-size: 14px;
  1105. color: #FFFFFF;
  1106. }
  1107. .footer-right-item:first-child{
  1108. background-color: #FF9900;
  1109. }
  1110. .footer-right-item:last-child{
  1111. background-color: #FF0000;
  1112. }
  1113. }
  1114. }
  1115. .popu-nums-content{
  1116. background-color: #FFFFFF;
  1117. border-radius: 10px;
  1118. width: 300px;
  1119. display: flex;
  1120. flex-direction: column;
  1121. align-items: center;
  1122. padding: 10px 15px;
  1123. .popu-close{
  1124. padding: 10px;
  1125. position: absolute;
  1126. right: 0;
  1127. top: 0;
  1128. z-index: 1000;
  1129. }
  1130. .popu-content-title{
  1131. padding: 10px;
  1132. font-size: 16px;
  1133. }
  1134. .popu-content-num{
  1135. font-size: 24rpx;
  1136. color: #999999;
  1137. padding: 10px 0;
  1138. > text{
  1139. margin-right: 10px;
  1140. font-size: 10px;
  1141. }
  1142. }
  1143. .popu-content-btn{
  1144. width: 100%;
  1145. display: flex;
  1146. align-items: center;
  1147. justify-content: space-around;
  1148. margin: 20px 0 10px;
  1149. .popu-content-btn-item{
  1150. width: 40%;
  1151. height: 32px;
  1152. font-size: 14px;
  1153. display: flex;
  1154. align-items: center;
  1155. justify-content: center;
  1156. border-radius: 100px;
  1157. }
  1158. .cancelBtn{
  1159. background-color: #f8f8f8;
  1160. color: #666;
  1161. }
  1162. .okbtn{
  1163. background-color: #f70000;
  1164. color: #FFFFFF;
  1165. }
  1166. }
  1167. }
  1168. .popu-content{
  1169. display: flex;
  1170. flex-direction: column;
  1171. align-items: center;
  1172. padding: 10px 15px;
  1173. .popu-close{
  1174. padding: 10px;
  1175. position: absolute;
  1176. right: 0;
  1177. top: 0;
  1178. z-index: 1000;
  1179. }
  1180. .qty-box{
  1181. display: flex;
  1182. .qty-btn{
  1183. display: flex;
  1184. align-items: center;
  1185. justify-content: center;
  1186. width: 22px;
  1187. height: 20px;
  1188. border-radius: 50px;
  1189. font-size: 18px;
  1190. color: #066cff;
  1191. &.qty-disabled{
  1192. color: #999;
  1193. }
  1194. }
  1195. .qty-num{
  1196. width: 24px;
  1197. height: 20px;
  1198. line-height: 20px;
  1199. text-align: center;
  1200. background-color: #efefef;
  1201. margin: 0 3px;
  1202. border-radius: 3px;
  1203. font-size: 12px;
  1204. input{
  1205. width: 100%;
  1206. height: 100%;
  1207. text-align: center;
  1208. color: #333;
  1209. }
  1210. }
  1211. }
  1212. .pupu-box{
  1213. display: flex;
  1214. justify-content: space-between;
  1215. margin-top: 35px;
  1216. width: 100%;
  1217. }
  1218. .popu-content-img{
  1219. border-radius: 6px;
  1220. border: 1px solid #eee;
  1221. overflow: hidden;
  1222. width: 80px;
  1223. height: 80px;
  1224. }
  1225. .popu-content-info{
  1226. padding: 0 0 0 10px;
  1227. flex-grow: 1;
  1228. overflow: hidden;
  1229. width: 50%;
  1230. .popu-content-info-title{
  1231. font-size: 14px;
  1232. }
  1233. .popu-content-info-code{
  1234. font-size: 12px;
  1235. color: #00aaff;
  1236. margin-top: 5px;
  1237. }
  1238. }
  1239. .gift-box{
  1240. padding-left: 8%;
  1241. margin-top: 10px;
  1242. border-top: 1px solid #eee;
  1243. padding-top: 10px;
  1244. .popu-content-img{
  1245. width: 58px;
  1246. height: 58px;
  1247. }
  1248. .popu-content-info-title{
  1249. font-size: 12px;
  1250. color: #666;
  1251. }
  1252. .popu-content-box{
  1253. margin-top: 0;
  1254. }
  1255. .popu-content-num{
  1256. padding:5px 15px;
  1257. >text{
  1258. font-size: 10px;
  1259. }
  1260. }
  1261. .rebate-tag{
  1262. margin: 0 5px 0 0;
  1263. background: #ff0000;
  1264. color: #fff;
  1265. flex-grow: 1;
  1266. display: flex;
  1267. justify-content: center;
  1268. }
  1269. .ellipsis-two{
  1270. width: 80%;
  1271. flex-grow: 1;
  1272. }
  1273. }
  1274. .popu-content-box{
  1275. display: flex;
  1276. align-items: baseline;
  1277. margin-top: 5px;
  1278. .popu-content-price{
  1279. color: red;
  1280. display: flex;
  1281. align-items: baseline;
  1282. font-size: 12px;
  1283. text{
  1284. font-size: 38rpx;
  1285. }
  1286. }
  1287. }
  1288. .pupu-box-item,.pupu-box-pay-item{
  1289. width: 100%;
  1290. padding-top: 20px;
  1291. > view{
  1292. padding: 5px 0;
  1293. }
  1294. .totalBar-box{
  1295. margin-bottom: 20rpx;
  1296. > view{
  1297. padding: 5px 0;
  1298. }
  1299. .pf{
  1300. font-size: 20rpx;
  1301. }
  1302. }
  1303. }
  1304. .pupu-box-pay-item{
  1305. > view{
  1306. padding: 6px 0;
  1307. }
  1308. .popu-content-amount{
  1309. font-size: 28px;
  1310. color: red;
  1311. }
  1312. .popu-content-title{
  1313. font-weight: bold;
  1314. }
  1315. }
  1316. .popu-content-num{
  1317. > text{
  1318. margin-right: 10px;
  1319. }
  1320. }
  1321. .popu-content-btn{
  1322. width: 100%;
  1323. display: flex;
  1324. align-items: center;
  1325. justify-content: space-around;
  1326. margin: 30px 0 20px;
  1327. .popu-content-btn-item{
  1328. width: 30%;
  1329. height: 34px;
  1330. font-size: 14px;
  1331. display: flex;
  1332. align-items: center;
  1333. justify-content: center;
  1334. border-radius: 100px;
  1335. }
  1336. .cancelBtn{
  1337. background-color: #f8f8f8;
  1338. color: #666;
  1339. }
  1340. .okbtn{
  1341. background-color: #f70000;
  1342. color: #FFFFFF;
  1343. width: 65%;
  1344. .payAmount{
  1345. margin-left: 5px;
  1346. }
  1347. }
  1348. .cartbtn{
  1349. background-color: #ffa60c;
  1350. color: #FFFFFF;
  1351. width: 65%;
  1352. }
  1353. }
  1354. }
  1355. }
  1356. </style>