productDetail.vue 38 KB

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