pay.vue 20 KB

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