pay.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  1. <template>
  2. <view class="pay">
  3. <!-- <view class="shop-info" v-if="!isVisual">
  4. <view class="shop-name">
  5. {{info.shopName}}
  6. </view>
  7. <view class="address">
  8. {{info.address}}
  9. </view>
  10. </view> -->
  11. <view class="pay-info">
  12. <view class="goods-info">
  13. <image class="goods-img" :src="info.goodsImg" mode=""></image>
  14. <view class="info">
  15. <view class="goods-name">
  16. {{info.goodsName}}
  17. </view>
  18. <view class="num">
  19. {{info.goodsDescribe}}
  20. </view>
  21. <view class="price">
  22. ¥{{info.realPrice}}
  23. </view>
  24. </view>
  25. </view>
  26. <view class="coupon">
  27. <view class="label">
  28. 优惠券
  29. </view>
  30. <view class="choose-coupon none" @click="choose">
  31. 暂无可用
  32. <image class="icon" src="@/static/jiantou-icon.png" mode=""></image>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="input-box" v-if="isVisual">
  37. <view class="label">
  38. 充值账号
  39. </view>
  40. <view class="value">
  41. {{form.account}}
  42. </view>
  43. </view>
  44. <view class="btn-box">
  45. <view class="total-price">
  46. <view class="label">
  47. 合计:
  48. </view>
  49. <view class="price">
  50. ¥ {{info.realPrice}}
  51. </view>
  52. </view>
  53. <button class="btn" type="default" :loading="loading" @click="creat">提交订单</button>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. import {
  59. calculate
  60. } from '@/api/order.js';
  61. import {
  62. creat
  63. } from '@/api/goods.js'
  64. import {
  65. creatPayOrder,
  66. queryPayOrder,
  67. payDetails
  68. } from '@/api/payment.js'
  69. import guid from '@/utils/guid.js'
  70. export default {
  71. data() {
  72. return {
  73. isVisual:false,//是否是虚拟商品
  74. loading: false,
  75. info: {},
  76. form:{
  77. account:''
  78. },
  79. query: {
  80. "msgType": "wx.unifiedOrder",
  81. "orderDesc": "测试",
  82. "orderNo": "",
  83. "subOpenId": "",
  84. "userId": ""
  85. },
  86. // 支付信息
  87. payData: {
  88. }
  89. }
  90. },
  91. computed: {
  92. },
  93. methods: {
  94. choose() {
  95. let that = this
  96. uni.navigateTo({
  97. url: '/pay/coupon?couponId=' + this.info.couponId,
  98. success: function(res) {
  99. // 通过eventChannel向被打开页面传送数据
  100. res.eventChannel.emit('pay', that.info)
  101. }
  102. })
  103. },
  104. //创建订单
  105. creat() {
  106. if (this.loading) return
  107. this.loading = true
  108. uni.showLoading({
  109. title: '支付中'
  110. })
  111. let that = this
  112. if (!this.payData.timeStamp) {
  113. // 处理扩展字段 暂时只有研学商品和视频会员 视频会员是字符串的JSON 研学是字符串
  114. let extend
  115. try{
  116. if(JSON.parse(this.info.extend)){
  117. extend = this.info.extend
  118. }
  119. }catch(e){
  120. extend = this.info.reservationTime || ''
  121. }
  122. creat({
  123. discountId: (this.info.couponId || this.info.couponId == -1) ? [this.info.couponId
  124. ] : [],
  125. extend,
  126. channel:'ZhongShu',
  127. goodsList: this.info.goodsId ? [this.info.goodsId] : [],
  128. idempotent: guid(),
  129. shopId: this.info.shopId
  130. }).then(res => {
  131. this.loading = false
  132. if (res.state == 'Success') {
  133. if (!this.info.realPrice) { //价格为0
  134. uni.hideLoading()
  135. uni.reLaunch({
  136. url: '/my/order/index'
  137. })
  138. } else {
  139. this.query.orderNo = res.content.orderNo
  140. this.query.subOpenId = JSON.parse(uni.getStorageSync('userInfo')).openId
  141. this.query.orderDesc = this.info.goodsName
  142. creatPayOrder(this.query).then(data => {
  143. that.payData = JSON.parse(data.content.miniPayRequest)
  144. if (data.content.miniPayRequest == null) return uni.hideLoading()
  145. uni.requestPayment({
  146. "provider": "wxpay",
  147. "orderInfo": that.payData,
  148. "appid": that.payData
  149. .appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  150. "paySign": that.payData.paySign,
  151. "nonceStr": that.payData.nonceStr, // 随机字符串
  152. "package": that.payData.package, // 固定值
  153. // "prepayid": that.payData.package, // 统一下单订单号
  154. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  155. "signType": that.payData.signType, //签名算法
  156. success(msg) {
  157. console.log('msg', msg, res);
  158. queryPayOrder(that.query.orderNo).then(res1 => {
  159. if (res1.state == 'Success') {
  160. uni.hideLoading()
  161. uni.reLaunch({
  162. url: '/my/order/index'
  163. })
  164. }
  165. })
  166. },
  167. fail(e) {
  168. console.log('err', e);
  169. that.loading = false
  170. uni.hideLoading()
  171. uni.showToast({
  172. title: '取消支付',
  173. icon: 'fail'
  174. })
  175. // 取消支付后
  176. uni.reLaunch({
  177. url:'/my/order/detail?id='+that.query.orderNo
  178. })
  179. // // 取消支付后,获取支付信息以备再次支付
  180. // payDetails(that.query.orderNo).then(r => {
  181. // if (r.state == 'Success') {
  182. // that.payData = JSON.parse(r.content.miniPayRequest)
  183. // }
  184. // })
  185. }
  186. })
  187. })
  188. }
  189. }
  190. })
  191. } else { // 取消支付后再次支付
  192. uni.requestPayment({
  193. "provider": "wxpay",
  194. "orderInfo": that.payData,
  195. "appid": that.payData.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  196. "paySign": that.payData.paySign,
  197. "nonceStr": that.payData.nonceStr, // 随机字符串
  198. "package": that.payData.package, // 固定值
  199. // "prepayid": that.payData.package, // 统一下单订单号
  200. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  201. "signType": that.payData.signType, //签名算法
  202. success(msg) {
  203. console.log('msg', msg);
  204. queryPayOrder(that.query.orderNo).then(res1 => {
  205. if (res1.state == 'Success') {
  206. uni.hideLoading()
  207. uni.reLaunch({
  208. url: '/my/order/index'
  209. })
  210. }
  211. })
  212. },
  213. fail(e) {
  214. that.loading = false
  215. uni.hideLoading()
  216. uni.showToast({
  217. title: '取消支付',
  218. icon: 'fail'
  219. })
  220. // 取消支付后,获取支付信息以备再次支付
  221. payDetails(that.query.orderNo).then(r => {
  222. if (r.state == 'Success') {
  223. that.payData = JSON.parse(r.content.miniPayRequest)
  224. }
  225. })
  226. console.log('err', e);
  227. }
  228. })
  229. }
  230. }
  231. },
  232. onReady() {
  233. },
  234. onLoad() {
  235. let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  236. this.query.userId = userInfo.userId
  237. let that = this
  238. const eventChannel = this.getOpenerEventChannel();
  239. eventChannel.on('pay', function(data) {
  240. that.info = data
  241. try{
  242. let extend = JSON.parse(that.info.extend)
  243. if(extend.account){
  244. that.isVisual = true
  245. that.form.account = extend.account
  246. }
  247. }catch(e){
  248. //TODO handle the exception
  249. }
  250. console.log('data', data);
  251. })
  252. }
  253. }
  254. </script>
  255. <style lang="scss">
  256. .pay {
  257. background: #F9F9F9;
  258. min-height: 100vh;
  259. padding-top: 20rpx;
  260. .shop-info {
  261. margin: 0 30rpx 20rpx;
  262. width: 690rpx;
  263. padding: 24rpx;
  264. box-sizing: border-box;
  265. background: #FFFFFF;
  266. border-radius: 16rpx 16rpx 16rpx 16rpx;
  267. .shop-name {
  268. color: #181818;
  269. font-size: 32rpx;
  270. }
  271. .address {
  272. color: #999999;
  273. font-size: 24rpx;
  274. margin-top: 12rpx;
  275. }
  276. }
  277. .pay-info {
  278. margin: 0 30rpx;
  279. background: #FFFFFF;
  280. border-radius: 16rpx 16rpx 16rpx 16rpx;
  281. padding: 28rpx 24rpx;
  282. .goods-info {
  283. display: flex;
  284. margin-bottom: 30rpx;
  285. .goods-img {
  286. width: 164rpx;
  287. height: 164rpx;
  288. border-radius: 16rpx;
  289. }
  290. .info {
  291. margin-left: 28rpx;
  292. flex: 1;
  293. .goods-name {
  294. font-weight: bold;
  295. color: #181818;
  296. font-size: 32rpx;
  297. width: 100%;
  298. word-break: break-all;
  299. text-overflow: ellipsis;
  300. overflow: hidden;
  301. display: -webkit-box;
  302. -webkit-box-orient: vertical;
  303. -webkit-line-clamp: 2;
  304. /* 这里是超出几行省略 */
  305. }
  306. .num {
  307. color: #999999;
  308. font-size: 24rpx;
  309. margin-top: 16rpx;
  310. }
  311. .price {
  312. font-weight: bold;
  313. color: #181818;
  314. font-size: 32rpx;
  315. margin-top: 26rpx;
  316. }
  317. }
  318. }
  319. .coupon {
  320. display: flex;
  321. align-items: center;
  322. justify-content: space-between;
  323. border-bottom: 2rpx dashed #f3f3f3;
  324. padding: 28rpx 0;
  325. .label {
  326. color: #222222;
  327. font-size: 28rpx;
  328. }
  329. .choose-coupon.none{
  330. color: #AAAAAA;
  331. }
  332. .choose-coupon {
  333. color: #FF4848;
  334. font-size: 28rpx;
  335. display: flex;
  336. align-items: center;
  337. .icon {
  338. width: 28rpx;
  339. height: 28rpx;
  340. display: block;
  341. margin-left: 10rpx;
  342. }
  343. }
  344. }
  345. .explain {
  346. display: flex;
  347. align-items: center;
  348. justify-content: space-between;
  349. padding-top: 28rpx;
  350. .label {
  351. color: #AAAAAA;
  352. font-size: 28rpx;
  353. }
  354. .right {
  355. display: flex;
  356. align-items: center;
  357. font-size: 24rpx;
  358. .red {
  359. font-weight: 500;
  360. color: #FF4848;
  361. margin: 0 10rpx;
  362. }
  363. .fs28 {
  364. font-size: 28rpx !important;
  365. }
  366. }
  367. }
  368. }
  369. .input-box{
  370. margin: 20rpx 30rpx;
  371. padding: 28rpx 24rpx;
  372. background: #FFFFFF;
  373. border-radius: 16rpx 16rpx 16rpx 16rpx;
  374. display: flex;
  375. align-items: center;
  376. justify-content: space-between;
  377. .label {
  378. color: #222;
  379. font-size: 28rpx;
  380. }
  381. .value {
  382. font-size: 28rpx;
  383. color: #AAAAAA;
  384. }
  385. }
  386. .btn-box {
  387. position: fixed;
  388. bottom: 0%;
  389. left: 0%;
  390. width: 100%;
  391. height: 98rpx;
  392. display: flex;
  393. align-items: center;
  394. justify-content: space-between;
  395. box-sizing: border-box;
  396. padding: 0 30rpx;
  397. border-top: 1rpx solid #EEEEEE;
  398. .total-price {
  399. display: flex;
  400. align-items: center;
  401. .label {
  402. color: #181818;
  403. font-size: 28rpx;
  404. }
  405. .price {
  406. font-size: 36rpx;
  407. font-weight: 800;
  408. color: #FF4848;
  409. margin-left: 10rpx;
  410. }
  411. }
  412. .btn {
  413. width: 280rpx;
  414. height: 80rpx;
  415. line-height: 80rpx;
  416. text-align: center;
  417. background: $uni-color-primary;
  418. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
  419. border-radius: 46rpx 46rpx 46rpx 46rpx;
  420. font-weight: 800;
  421. color: #FFFFFF;
  422. font-size: 28rpx;
  423. margin: 0;
  424. }
  425. }
  426. }
  427. </style>
  428. <!-- <template>
  429. <view class="pay">
  430. <view class="pay-info">
  431. <view class="goods-info">
  432. <image class="goods-img" :src="info.goodsImg" mode=""></image>
  433. <view class="info">
  434. <view class="goods-name">
  435. {{info.goodsName}}
  436. </view>
  437. <view class="num">
  438. {{info.goodsDescribe}}
  439. </view>
  440. <view class="price">
  441. ¥{{info.price}}
  442. </view>
  443. </view>
  444. </view>
  445. </view>
  446. <view class="input-box">
  447. <view class="label">
  448. 充值账号
  449. </view>
  450. <view class="value">
  451. {{createQuery.rechargeAccount}}
  452. </view>
  453. </view>
  454. <view class="btn-box">
  455. <view class="total-price">
  456. <view class="label">
  457. 合计:
  458. </view>
  459. <view class="price">
  460. ¥ {{info.price}}
  461. </view>
  462. </view>
  463. <button class="btn" type="default" :loading="loading" @click="creat">提交订单</button>
  464. </view>
  465. </view>
  466. </template>
  467. <script>
  468. import {
  469. calculate
  470. } from '@/api/order.js';
  471. import {
  472. creatVirtualOrder
  473. } from '@/api/goods.js'
  474. import {
  475. creatPayOrder,
  476. queryPayOrder,
  477. payDetails
  478. } from '@/api/payment.js'
  479. import guid from '@/utils/guid.js'
  480. export default {
  481. data() {
  482. return {
  483. isVisual:false,//是否是虚拟商品
  484. loading: false,
  485. info: {},
  486. createQuery:{
  487. "accountType": 0,
  488. "extendParameter": "",
  489. "number": 1,
  490. "outTradeNo": "",
  491. "productId": 0,
  492. "rechargeAccount": ""
  493. },
  494. query: {
  495. "msgType": "wx.unifiedOrder",
  496. "orderDesc": "测试",
  497. "orderNo": "",
  498. "subOpenId": "",
  499. "userId": ""
  500. },
  501. // 支付信息
  502. payData: {
  503. }
  504. }
  505. },
  506. computed: {
  507. },
  508. methods: {
  509. choose() {
  510. let that = this
  511. uni.navigateTo({
  512. url: '/pay/coupon?couponId=' + this.info.couponId,
  513. success: function(res) {
  514. // 通过eventChannel向被打开页面传送数据
  515. res.eventChannel.emit('pay', that.info)
  516. }
  517. })
  518. },
  519. //创建订单
  520. creat() {
  521. if (this.loading) return
  522. this.loading = true
  523. uni.showLoading({
  524. title: '支付中'
  525. })
  526. let that = this
  527. if (!this.payData.timeStamp) {
  528. creatVirtualOrder(this.createQuery).then(res => {
  529. this.loading = false
  530. if (res.state == 'Success') {
  531. // if (!this.info.realPrice) { //价格为0
  532. // uni.hideLoading()
  533. // uni.reLaunch({
  534. // url: '/my/order/index'
  535. // })
  536. // } else {
  537. this.query.orderNo = res.content.orderNo
  538. this.query.subOpenId = JSON.parse(uni.getStorageSync('userInfo')).openId
  539. this.query.orderDesc = this.info.goodsName
  540. creatPayOrder(this.query).then(data => {
  541. that.payData = JSON.parse(data.content.miniPayRequest)
  542. if (data.content.miniPayRequest == null) return uni.hideLoading()
  543. uni.requestPayment({
  544. "provider": "wxpay",
  545. "orderInfo": that.payData,
  546. "appid": that.payData
  547. .appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  548. "paySign": that.payData.paySign,
  549. "nonceStr": that.payData.nonceStr, // 随机字符串
  550. "package": that.payData.package, // 固定值
  551. // "prepayid": that.payData.package, // 统一下单订单号
  552. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  553. "signType": that.payData.signType, //签名算法
  554. success(msg) {
  555. console.log('msg', msg, res);
  556. queryPayOrder(that.query.orderNo).then(res1 => {
  557. if (res1.state == 'Success') {
  558. uni.hideLoading()
  559. uni.reLaunch({
  560. url: '/my/order/index'
  561. })
  562. }
  563. })
  564. },
  565. fail(e) {
  566. console.log('err', e);
  567. that.loading = false
  568. uni.hideLoading()
  569. uni.showToast({
  570. title: '取消支付',
  571. icon: 'fail'
  572. })
  573. // 取消支付后
  574. uni.reLaunch({
  575. url:'/my/order/detail?id='+that.query.orderNo
  576. })
  577. // // 取消支付后,获取支付信息以备再次支付
  578. // payDetails(that.query.orderNo).then(r => {
  579. // if (r.state == 'Success') {
  580. // that.payData = JSON.parse(r.content.miniPayRequest)
  581. // }
  582. // })
  583. }
  584. })
  585. })
  586. // }
  587. }
  588. })
  589. } else { // 取消支付后再次支付
  590. uni.requestPayment({
  591. "provider": "wxpay",
  592. "orderInfo": that.payData,
  593. "appid": that.payData.appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  594. "paySign": that.payData.paySign,
  595. "nonceStr": that.payData.nonceStr, // 随机字符串
  596. "package": that.payData.package, // 固定值
  597. // "prepayid": that.payData.package, // 统一下单订单号
  598. "timeStamp": that.payData.timeStamp, // 时间戳(单位:秒)
  599. "signType": that.payData.signType, //签名算法
  600. success(msg) {
  601. console.log('msg', msg);
  602. queryPayOrder(that.query.orderNo).then(res1 => {
  603. if (res1.state == 'Success') {
  604. uni.hideLoading()
  605. uni.reLaunch({
  606. url: '/my/order/index'
  607. })
  608. }
  609. })
  610. },
  611. fail(e) {
  612. that.loading = false
  613. uni.hideLoading()
  614. uni.showToast({
  615. title: '取消支付',
  616. icon: 'fail'
  617. })
  618. // 取消支付后,获取支付信息以备再次支付
  619. payDetails(that.query.orderNo).then(r => {
  620. if (r.state == 'Success') {
  621. that.payData = JSON.parse(r.content.miniPayRequest)
  622. }
  623. })
  624. console.log('err', e);
  625. }
  626. })
  627. }
  628. }
  629. },
  630. onReady() {
  631. },
  632. onLoad() {
  633. let userInfo = JSON.parse(uni.getStorageSync('userInfo'))
  634. this.query.userId = userInfo.userId
  635. let that = this
  636. const eventChannel = this.getOpenerEventChannel();
  637. eventChannel.on('pay', function(data) {
  638. that.createQuery.rechargeAccount = data.rechargeAccount
  639. that.createQuery.accountType = data.accountType
  640. that.createQuery.productId = data.productId
  641. that.info.goodsName = data.goodsName
  642. that.info.price = data.price
  643. console.log('data', data);
  644. })
  645. }
  646. }
  647. </script>
  648. <style lang="scss">
  649. .pay {
  650. background: #F9F9F9;
  651. min-height: 100vh;
  652. padding-top: 20rpx;
  653. .shop-info {
  654. margin: 0 30rpx 20rpx;
  655. width: 690rpx;
  656. padding: 24rpx;
  657. box-sizing: border-box;
  658. background: #FFFFFF;
  659. border-radius: 16rpx 16rpx 16rpx 16rpx;
  660. .shop-name {
  661. color: #181818;
  662. font-size: 32rpx;
  663. }
  664. .address {
  665. color: #999999;
  666. font-size: 24rpx;
  667. margin-top: 12rpx;
  668. }
  669. }
  670. .pay-info {
  671. margin: 0 30rpx;
  672. background: #FFFFFF;
  673. border-radius: 16rpx 16rpx 16rpx 16rpx;
  674. padding: 28rpx 24rpx;
  675. .goods-info {
  676. display: flex;
  677. margin-bottom: 30rpx;
  678. .goods-img {
  679. width: 164rpx;
  680. height: 164rpx;
  681. border-radius: 16rpx;
  682. }
  683. .info {
  684. margin-left: 28rpx;
  685. flex: 1;
  686. .goods-name {
  687. font-weight: bold;
  688. color: #181818;
  689. font-size: 32rpx;
  690. width: 100%;
  691. word-break: break-all;
  692. text-overflow: ellipsis;
  693. overflow: hidden;
  694. display: -webkit-box;
  695. -webkit-box-orient: vertical;
  696. -webkit-line-clamp: 2;
  697. /* 这里是超出几行省略 */
  698. }
  699. .num {
  700. color: #999999;
  701. font-size: 24rpx;
  702. margin-top: 16rpx;
  703. }
  704. .price {
  705. font-weight: bold;
  706. color: #181818;
  707. font-size: 32rpx;
  708. margin-top: 26rpx;
  709. }
  710. }
  711. }
  712. .coupon {
  713. display: flex;
  714. align-items: center;
  715. justify-content: space-between;
  716. border-bottom: 2rpx dashed #f3f3f3;
  717. padding: 28rpx 0;
  718. .label {
  719. color: #222222;
  720. font-size: 28rpx;
  721. }
  722. .choose-coupon.none{
  723. color: #AAAAAA;
  724. }
  725. .choose-coupon {
  726. color: #FF4848;
  727. font-size: 28rpx;
  728. display: flex;
  729. align-items: center;
  730. .icon {
  731. width: 28rpx;
  732. height: 28rpx;
  733. display: block;
  734. margin-left: 10rpx;
  735. }
  736. }
  737. }
  738. .explain {
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. padding-top: 28rpx;
  743. .label {
  744. color: #AAAAAA;
  745. font-size: 28rpx;
  746. }
  747. .right {
  748. display: flex;
  749. align-items: center;
  750. font-size: 24rpx;
  751. .red {
  752. font-weight: 500;
  753. color: #FF4848;
  754. margin: 0 10rpx;
  755. }
  756. .fs28 {
  757. font-size: 28rpx !important;
  758. }
  759. }
  760. }
  761. }
  762. .input-box{
  763. margin: 20rpx 30rpx;
  764. padding: 28rpx 24rpx;
  765. background: #FFFFFF;
  766. border-radius: 16rpx 16rpx 16rpx 16rpx;
  767. display: flex;
  768. align-items: center;
  769. justify-content: space-between;
  770. .label {
  771. color: #222;
  772. font-size: 28rpx;
  773. }
  774. .value {
  775. font-size: 28rpx;
  776. color: #AAAAAA;
  777. }
  778. }
  779. .btn-box {
  780. position: fixed;
  781. bottom: 0%;
  782. left: 0%;
  783. width: 100%;
  784. height: 98rpx;
  785. display: flex;
  786. align-items: center;
  787. justify-content: space-between;
  788. box-sizing: border-box;
  789. padding: 0 30rpx;
  790. border-top: 1rpx solid #EEEEEE;
  791. .total-price {
  792. display: flex;
  793. align-items: center;
  794. .label {
  795. color: #181818;
  796. font-size: 28rpx;
  797. }
  798. .price {
  799. font-size: 36rpx;
  800. font-weight: 800;
  801. color: #FF4848;
  802. margin-left: 10rpx;
  803. }
  804. }
  805. .btn {
  806. width: 280rpx;
  807. height: 80rpx;
  808. line-height: 80rpx;
  809. text-align: center;
  810. background: $uni-color-primary;
  811. box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
  812. border-radius: 46rpx 46rpx 46rpx 46rpx;
  813. font-weight: 800;
  814. color: #FFFFFF;
  815. font-size: 28rpx;
  816. margin: 0;
  817. }
  818. }
  819. }
  820. </style> -->