Submit.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992
  1. <template>
  2. <div class="page">
  3. <!-- <TopNavigation/> -->
  4. <div class="confirm_order">
  5. <div class="confirm_order_top">
  6. <img :src="require('@assets/icon_querendingdan.png')" alt="" class="confirm_order_top_img" />
  7. <div class="confirm_order_top_text">确认订单</div>
  8. </div>
  9. <div class="order_information">
  10. <img :src="getImg(changeImgs(info.pic))" alt="" class="order_information_img" />
  11. <div class="order_information_title">
  12. <div class="order_information_title_one">{{ info.name }}</div>
  13. <div class="order_information_title_two">{{ info.category || '收藏品' }}</div>
  14. <div class="order_information_title_number">x1</div>
  15. </div>
  16. </div>
  17. <div class="fee_details">
  18. <div class="fee_details_con">
  19. <div>商品费用</div>
  20. <div class="fee_details_price">¥{{ info.price }}</div>
  21. </div>
  22. <van-divider class="fee_details_divider" />
  23. <div class="fee_details_con">
  24. <div>GAS费用</div>
  25. <div class="fee_details_price">¥{{ gas }}</div>
  26. </div>
  27. </div>
  28. <div class="payment_method">
  29. <div
  30. class="payment_method_con"
  31. @click="payType = item.type"
  32. v-for="(item, index) in payInfos"
  33. :key="index"
  34. >
  35. <div class="payment_method_con_left">
  36. <!-- <img :src="item.icon" alt="" class="payment_method_img" /> -->
  37. <van-image :src="item.icon" width="24px" height="24px" fit="cover" class="payment_method_img" />
  38. <div class="payment_method_title">{{ item.name }}</div>
  39. </div>
  40. <img class="choose-icon" :src="payType === item.type ? icons[1] : icons[0]" alt="" />
  41. </div>
  42. </div>
  43. <div class="bottom van-safe-area-bottom" ref="bottom">
  44. <div class="bottom-content immediate_payment">
  45. <div class="immediate_payment_left">
  46. <div class="immediate_payment_total">总计</div>
  47. <span class="price">
  48. <div class="price_con">¥</div>
  49. {{ money }}
  50. </span>
  51. </div>
  52. <div class="btn">
  53. <div class="immediate_payment_con" @click="submit" :disabled="!!orderId">立即支付</div>
  54. </div>
  55. <a id="pay" :href="hrefUrl"></a>
  56. <!-- <wx-open-launch-weapp id="launch-btn" :username="launchName" :path="launchPath"> </wx-open-launch-weapp> -->
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import product from '../mixins/product';
  64. import coupon from '../mixins/coupon';
  65. import { mapState } from 'vuex';
  66. import resolveUrl from 'resolve-url';
  67. import qs from 'qs';
  68. import encryptUtil from '../utils/encryptUtil';
  69. // import TopNavigation from "../components/TopNavigation.vue"
  70. let inWeixin = /micromessenger/i.test(navigator.userAgent);
  71. let inApp = /#cordova#/i.test(navigator.userAgent);
  72. let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
  73. export default {
  74. name: 'Submit',
  75. mixins: [product, coupon],
  76. components: {
  77. // TopNavigation
  78. },
  79. data() {
  80. return {
  81. info: {},
  82. message: '',
  83. payType: 'H5PAY',
  84. payChannel: null,
  85. // payInfos: [
  86. // {
  87. // icon: require('@assets/svgs/zhifubao.svg'),
  88. // name: '支付宝',
  89. // type: 'ALIPAY'
  90. // },
  91. // {
  92. // icon: require('@assets/svgs/wechat.svg'),
  93. // name: '微信',
  94. // type: 'WEIXIN'
  95. // }
  96. // {
  97. // icon: require("@assets/svgs/png-decp.svg"),
  98. // name: "DCEP",
  99. // },
  100. // ],
  101. payInfos: [
  102. {
  103. icon: require('@assets/icon_yinlian.png'),
  104. name: '银联快捷付',
  105. type: 'H5PAY'
  106. }
  107. ],
  108. icons: [require('@assets/svgs/icon_gouxuan_huise.svg'), require('@assets/icon_gouxuan_pre.png')],
  109. bottom: null,
  110. orderId: 0,
  111. gas: 1,
  112. inWeixin,
  113. inApp,
  114. inIos,
  115. couponList: [],
  116. collectionId: 0,
  117. timer: null,
  118. hrefUrl: '',
  119. enable_wx_lite: false,
  120. enable_wx_pub: false,
  121. launchName: '',
  122. launchPath: '',
  123. createOrderTimer: null,
  124. timerNum: 0,
  125. weixinOptions: {}
  126. };
  127. },
  128. computed: {
  129. money() {
  130. let money = 0;
  131. if (this.info.price && !this.couponInfo) {
  132. money = this.accAdd(this.info.price, money);
  133. }
  134. if (this.gas && (!this.couponInfo || this.couponInfo.needGas)) {
  135. money = this.accAdd(money, this.gas);
  136. }
  137. return money;
  138. },
  139. ...mapState(['couponInfo']),
  140. couponPayment() {
  141. return this.info.couponPayment || false;
  142. }
  143. },
  144. beforeRouteLeave(to, from, next) {
  145. if (this.createOrderTimer) {
  146. clearInterval(this.createOrderTimer);
  147. }
  148. if (to.path !== '/couponList') {
  149. this.$store.commit('setCouponInfo', null);
  150. }
  151. next();
  152. },
  153. mounted() {
  154. Promise.all([
  155. this.$http.get('/sysConfig/get/gas_fee').then(res => {
  156. this.gas = res.value;
  157. if (this.$store.state.review) {
  158. this.gas = 0;
  159. }
  160. return Promise.resolve();
  161. }),
  162. this.$http.get('/sysConfig/get/enable_H5').then(res => {
  163. if (res.value) {
  164. this.payType = 'H5PAY';
  165. this.payInfos = [
  166. {
  167. icon: require('@assets/icon_yinlian.png'),
  168. name: '银联快捷付',
  169. type: 'H5PAY'
  170. }
  171. ]
  172. } else {
  173. this.payType = 'ALIPAY';
  174. this.payInfos = [
  175. {
  176. icon: require('@assets/svgs/zhifubao.svg'),
  177. name: '支付宝',
  178. type: 'ALIPAY'
  179. }
  180. ]
  181. }
  182. }),
  183. inWeixin
  184. ? this.$http.get('/sysConfig/get/enable_wx_pub').then(res => {
  185. this.enable_wx_pub = res.value.split(',').findIndex(i => i === this.$route.query.id) > -1;
  186. return Promise.resolve();
  187. })
  188. : Promise.resolve(),
  189. this.$http.get('/sysConfig/get/enable_wx_lite').then(res => {
  190. this.enable_wx_lite =
  191. res.value.split(',').findIndex(i => i === this.$route.query.id) > -1 &&
  192. !/AliApp/i.test(navigator.userAgent);
  193. return Promise.resolve();
  194. })
  195. ]).then(() => {
  196. // if (!(this.enable_wx_lite || this.enable_wx_pub)) {
  197. // this.payInfos.splice(1, 1);
  198. // this.payType = 'ALIPAY';
  199. // } else if (this.enable_wx_pub) {
  200. // this.payChannel = 'wx_pub';
  201. // } else {
  202. // this.payChannel = 'wx_lite';
  203. // }
  204. });
  205. this.$toast.loading({
  206. message: '加载中...',
  207. forbidClick: true
  208. });
  209. if (this.$route.query.id) {
  210. this.collectionId = Number(this.$route.query.id);
  211. this.$http.get('/collection/get/' + this.$route.query.id).then(res => {
  212. this.info = res;
  213. setTimeout(() => {
  214. this.$toast.clear();
  215. }, 100);
  216. // this.$http('/sysConfig/get/gas_fee')
  217. });
  218. this.getCouponList();
  219. } else {
  220. this.orderId = this.$route.query.orderId;
  221. this.getOrder();
  222. }
  223. this.bottom = this.$refs.bottom;
  224. this.emitter.on('iapEvent', this.iapEvent);
  225. },
  226. beforeUnmount() {
  227. this.emitter.off('iapEvent', this.iapEvent);
  228. if (this.timer) {
  229. clearTimeout(this.timer);
  230. this.timer = null;
  231. }
  232. },
  233. methods: {
  234. getOrder(next = false) {
  235. this.$http.get('/order/get/' + this.orderId).then(res => {
  236. this.info = res;
  237. if (this.timer) {
  238. clearTimeout(this.timer);
  239. }
  240. if (this.timerNum >= 20) {
  241. this.$toast.clear();
  242. this.$dialog
  243. .confirm({
  244. title: '提示',
  245. message: '订单是否已经支付',
  246. confirmButtonText: '已经支付',
  247. cancelButtonText: '未支付'
  248. })
  249. .then(() => {
  250. this.$dialog
  251. .alert({
  252. title: '正在排队中...',
  253. message: '您的铸造订单正在排队,下单的藏品后续会直接出现在藏品室哦~'
  254. })
  255. .then(res => {
  256. this.$router.back();
  257. });
  258. })
  259. .catch(e => {
  260. this.$dialog
  261. .confirm({
  262. title: '提示',
  263. message: '订单未支付是否重新支付?',
  264. confirmButtonText: '重新支付',
  265. cancelButtonText: '取消订单'
  266. })
  267. .then(() => {
  268. this.timerNum = 0;
  269. this.pay(false);
  270. })
  271. .catch(() => {
  272. this.$router.back();
  273. });
  274. });
  275. } else if (res.status === 'PROCESSING' || res.status === 'FINISH' || res.status === 'CANCELLED') {
  276. this.$toast.clear();
  277. this.$dialog
  278. .alert({
  279. title: '提示',
  280. message:
  281. res.status === 'CANCELLED' ? '订单支付失败,点击重新下单' : '订单已支付,点击查看订单详情'
  282. })
  283. .then(() => {
  284. if (res.status === 'CANCELLED') {
  285. this.$router.back();
  286. } else {
  287. this.$router.replace('/orderDetail?id=' + res.id);
  288. }
  289. // on close
  290. });
  291. } else if (next) {
  292. this.timerNum += 1;
  293. this.timer = setTimeout(() => {
  294. this.getOrder(next);
  295. }, 1500);
  296. }
  297. });
  298. },
  299. getCouponList() {
  300. this.$http
  301. .post(
  302. '/userCoupon/all',
  303. {
  304. query: { userId: this.$store.state.userInfo.id, used: false }
  305. },
  306. { body: 'json' }
  307. )
  308. .then(res => {
  309. this.couponList = [...res.content].filter(item => {
  310. return this.checkTime(item) && this.checkUse(item, this.collectionId);
  311. });
  312. });
  313. },
  314. createOrder() {
  315. if (!this.payType) {
  316. this.$toast('请选择支付方式');
  317. return;
  318. }
  319. this.$toast.loading('请不要离开当前页面');
  320. let params = {
  321. collectionId: this.$route.query.id,
  322. qty: 1,
  323. couponId: (this.couponInfo || {}).id || '',
  324. invitor: this.$store.state.invitor || '',
  325. vip: this.$store.state.userInfo.vipPurchase > 0 ? true : false
  326. };
  327. params.sign = encryptUtil.encrypt(qs.stringify({ ...params, ts: new Date().getTime() }));
  328. return this.$http.post('/order/mqCreate', params).then(res => {
  329. return new Promise((resolve, reject) => {
  330. let checkOrder = () => {
  331. this.$http
  332. .get('/order/createResult', { id: res.id })
  333. .then(res => {
  334. if (res) {
  335. clearInterval(this.createOrderTimer);
  336. this.createOrderTimer = null;
  337. if (res.success) {
  338. resolve(res.data);
  339. } else {
  340. reject({ error: res.data });
  341. }
  342. }
  343. })
  344. .catch(e => {
  345. clearInterval(this.createOrderTimer);
  346. this.createOrderTimer = null;
  347. reject(e);
  348. });
  349. };
  350. setTimeout(checkOrder, 500);
  351. this.createOrderTimer = setInterval(checkOrder, 2000);
  352. });
  353. });
  354. },
  355. submit() {
  356. if (!this.payType) {
  357. this.$toast('请选择支付方式');
  358. return;
  359. }
  360. if (this.couponPayment && !this.couponInfo) {
  361. this.$dialog
  362. .alert({
  363. title: '提示',
  364. message: '该藏品为特殊藏品,需要使用优惠券才能兑换'
  365. })
  366. .then(() => {});
  367. return;
  368. }
  369. this.createOrder()
  370. .then(res => {
  371. this.orderId = res.id;
  372. this.pay();
  373. })
  374. .catch(e => {
  375. if (e) {
  376. this.$toast.clear();
  377. this.$dialog
  378. .alert({
  379. title: '提示',
  380. message: this.backReson(e.error)
  381. })
  382. .then(res => {
  383. this.$router.back();
  384. });
  385. }
  386. });
  387. },
  388. pay(saveOrder = true) {
  389. this.paySubmit(saveOrder).then(() => {
  390. if (this.money) {
  391. this.$nextTick(() => {
  392. if (this.$store.state.review) {
  393. window.store.order('358');
  394. this.getOrder(true);
  395. } else if (this.payType === 'ALIPAY') {
  396. if (this.inWeixin) {
  397. document.location.replace(
  398. resolveUrl(this.$baseUrl, '/payOrder/alipay_wx?id=' + this.orderId)
  399. );
  400. } else {
  401. this.$nextTick(() => {
  402. document.getElementById('pay').click();
  403. });
  404. this.$toast.loading({
  405. message: '加载中...',
  406. forbidClick: true
  407. });
  408. this.getOrder(true);
  409. }
  410. } else if (this.payType === 'WEIXIN') {
  411. this.$toast.loading('加载中');
  412. if ('wx_pub' === this.payChannel) {
  413. wx.chooseWXPay({
  414. ...this.weixinOptions,
  415. success(res) {
  416. this.$toast.success('支付成功');
  417. setTimeout(() => {
  418. this.$router.replace('/orders');
  419. }, 1000);
  420. },
  421. fail(e) {
  422. console.log(e);
  423. this.$toast('支付失败,请稍后再试');
  424. }
  425. });
  426. } else {
  427. this.$toast.clear();
  428. this.$nextTick(() => {
  429. document.getElementById('pay').click();
  430. });
  431. this.$toast.loading({
  432. message: '加载中...',
  433. forbidClick: true
  434. });
  435. this.getOrder(true);
  436. }
  437. } else if (this.payType === 'H5PAY') {
  438. // this.$http
  439. // .get(`/payOrder/v2/sandQuick?id=${this.orderId}`)
  440. // .then(res => {
  441. // this.$toast.clear();
  442. // this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
  443. // resolve();
  444. // })
  445. // .catch(e => {
  446. // if (e && e.error) {
  447. // this.$toast.clear();
  448. // this.$dialog
  449. // .alert({
  450. // title: '提示',
  451. // message: this.backReson(e.error)
  452. // })
  453. // .then(res => {
  454. // this.$router.back();
  455. // });
  456. // }
  457. // });
  458. document.location.href = resolveUrl(
  459. this.$baseUrl,
  460. '/payOrder/sandQuick?id=' + this.orderId
  461. );
  462. }
  463. });
  464. } else {
  465. this.$toast.success('支付成功');
  466. setTimeout(() => {
  467. this.$router.replace('/orderDetail?id=' + this.orderId);
  468. }, 1000);
  469. }
  470. });
  471. },
  472. paySubmit(saveOrder = true) {
  473. return new Promise((resolve, reject) => {
  474. if (this.money && saveOrder) {
  475. this.$toast.clear();
  476. this.$router.replace({ query: { ...this.$route.query, orderId: this.orderId } });
  477. this.$nextTick(() => {
  478. if (this.$store.state.review) {
  479. resolve();
  480. } else if (this.payType === 'ALIPAY') {
  481. if (this.inWeixin) {
  482. resolve();
  483. } else {
  484. this.$http
  485. .get(`/payOrder/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${this.orderId}`)
  486. .then(res => {
  487. this.$toast.clear();
  488. this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
  489. resolve();
  490. })
  491. .catch(e => {
  492. if (e && e.error) {
  493. this.$toast.clear();
  494. this.$dialog
  495. .alert({
  496. title: '提示',
  497. message: this.backReson(e.error)
  498. })
  499. .then(res => {
  500. this.$router.back();
  501. });
  502. reject();
  503. }
  504. });
  505. }
  506. } else if (this.payType === 'WEIXIN') {
  507. this.$toast.loading('加载中');
  508. this.$http
  509. .post('/payOrder/weixin', {
  510. id: this.orderId,
  511. channel: this.payChannel,
  512. openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
  513. })
  514. .then(res => {
  515. if ('wx_pub' === this.payChannel) {
  516. this.weixinOptions = res;
  517. resolve();
  518. } else {
  519. this.$toast.clear();
  520. this.hrefUrl = res.scheme_code;
  521. resolve();
  522. }
  523. // console.log({
  524. // ...res,
  525. // package: res.package || res.packageValue
  526. // });
  527. // let _this = this;
  528. // wx.chooseWXPay({
  529. // ...res,
  530. // package: res.package || res.packageValue,
  531. // timestamp: res.timeStamp,
  532. // success(res) {
  533. // _this.$toast.success('支付成功');
  534. // setTimeout(() => {
  535. // _this.$router.replace('/orders');
  536. // }, 1000);
  537. // },
  538. // fail(e) {
  539. // console.log(e);
  540. // _this.$toast('支付失败,请稍后再试');
  541. // }
  542. // });
  543. })
  544. .catch(e => {
  545. this.$toast.clear();
  546. this.$dialog
  547. .alert({
  548. title: '提示',
  549. message: this.backReson(e.error || '支付失败请稍后再试')
  550. })
  551. .then(res => {
  552. this.$router.back();
  553. });
  554. reject();
  555. });
  556. } else if (this.payType === 'H5PAY') {
  557. this.$router.replace({
  558. path: '/submit',
  559. query: {
  560. orderId: this.orderId
  561. }
  562. });
  563. resolve();
  564. }
  565. });
  566. } else {
  567. resolve();
  568. }
  569. });
  570. },
  571. goCoupon() {
  572. if (!this.orderId) {
  573. this.$router.push('/couponList?collectionId=' + this.info.id);
  574. }
  575. },
  576. iapEvent(e) {
  577. console.log(e);
  578. switch (e.event) {
  579. case 'initiated':
  580. this.$toast.loading({
  581. duration: 0,
  582. forbidClick: true,
  583. message: '加载中'
  584. });
  585. break;
  586. case 'finished':
  587. //this.$toast.clear();
  588. this.$http.post('/notify/order/iap', {
  589. receiptData: e.product.transaction.appStoreReceipt,
  590. orderId: this.orderId
  591. });
  592. console.log(e.product.transaction.appStoreReceipt);
  593. break;
  594. case 'cancelled':
  595. this.$toast.clear();
  596. this.orderId = null;
  597. break;
  598. }
  599. }
  600. }
  601. };
  602. </script>
  603. <style lang="less" scoped>
  604. .page {
  605. background-color: @bg3;
  606. }
  607. .submit {
  608. padding: 20px 16px;
  609. background-color: @bg;
  610. }
  611. .pageTitle {
  612. font-size: 14px;
  613. color: @text0;
  614. line-height: 22px;
  615. }
  616. .info {
  617. display: flex;
  618. align-items: center;
  619. justify-content: space-between;
  620. height: 60px;
  621. border-bottom: 1px solid @tabBorder;
  622. .text1 {
  623. font-size: 14px;
  624. color: @text0;
  625. line-height: 24px;
  626. flex-grow: 1;
  627. }
  628. .text2 {
  629. font-size: @font2;
  630. font-weight: bold;
  631. color: @prim;
  632. line-height: 24px;
  633. }
  634. .text3 {
  635. font-size: 14px;
  636. color: @text3;
  637. line-height: 20px;
  638. }
  639. .inter {
  640. width: 24px;
  641. height: 24px;
  642. }
  643. &.not {
  644. .text2 {
  645. font-size: @font2;
  646. color: @text3;
  647. }
  648. }
  649. }
  650. .product {
  651. display: flex;
  652. padding: 12px 0 20px;
  653. border-bottom: 1px solid @tabBorder;
  654. .product-content {
  655. flex-grow: 1;
  656. margin-left: 10px;
  657. display: flex;
  658. flex-direction: column;
  659. .no {
  660. flex-grow: 1;
  661. padding: 4px 0 8px;
  662. font-size: 14px;
  663. color: @text3;
  664. line-height: 24px;
  665. }
  666. .text1 {
  667. font-size: @font2;
  668. font-weight: bold;
  669. color: @text0;
  670. line-height: 24px;
  671. }
  672. .price {
  673. font-size: @font2;
  674. font-weight: bold;
  675. color: @text0;
  676. line-height: 24px;
  677. }
  678. }
  679. }
  680. /deep/.van-field {
  681. padding: 20px 0;
  682. .van-field__label {
  683. font-size: 14px;
  684. color: @text0;
  685. line-height: 24px;
  686. }
  687. .van-field__control {
  688. text-align: right;
  689. color: @text3;
  690. }
  691. }
  692. .pay-item {
  693. display: flex;
  694. align-items: center;
  695. height: 60px;
  696. border-bottom: 1px solid @tabBorder;
  697. span {
  698. font-size: 14px;
  699. font-weight: bold;
  700. color: @text0;
  701. line-height: 24px;
  702. flex-grow: 1;
  703. padding: 0 10px;
  704. }
  705. .choose-icon {
  706. width: 24px;
  707. height: 24px;
  708. }
  709. }
  710. .bottom {
  711. position: fixed;
  712. bottom: 0px;
  713. left: 0;
  714. right: 0;
  715. background-color: @bg;
  716. z-index: 20;
  717. border-top: 1px solid @tabBorder;
  718. .bottom-content {
  719. padding: 6px 16px;
  720. display: flex;
  721. align-items: flex-end;
  722. .btn {
  723. flex-grow: 1;
  724. display: flex;
  725. justify-content: flex-end;
  726. }
  727. .van-button {
  728. flex-grow: 1;
  729. color: @btnText !important;
  730. max-width: 132px;
  731. }
  732. .text {
  733. font-size: 14px;
  734. color: @text3;
  735. line-height: 20px;
  736. word-break: keep-all;
  737. }
  738. .price {
  739. font-size: 34px;
  740. font-family: OSP;
  741. font-weight: normal;
  742. color: @prim;
  743. line-height: 30px;
  744. display: flex;
  745. align-items: center;
  746. // flex-grow: 1;
  747. margin: 0 6px;
  748. .font_family {
  749. font-size: 10px;
  750. }
  751. .price_con {
  752. font-size: 14px;
  753. font-family: PingFangSC-Medium, PingFang SC;
  754. font-weight: 500;
  755. color: #28b6ff;
  756. padding-top: 10px;
  757. box-sizing: border-box;
  758. }
  759. }
  760. }
  761. }
  762. .confirm_order {
  763. width: 100%;
  764. height: 100%;
  765. position: absolute;
  766. background: #0f0f27;
  767. // margin-top: 44px;
  768. padding: 10px 16px;
  769. box-sizing: border-box;
  770. .confirm_order_top {
  771. width: 100%;
  772. height: 44px;
  773. background: #29293f;
  774. border-radius: 8px;
  775. padding: 10px;
  776. box-sizing: border-box;
  777. font-size: 16px;
  778. font-family: PingFangSC-Medium, PingFang SC;
  779. font-weight: 500;
  780. color: #28b6ff;
  781. display: flex;
  782. margin-bottom: 10px;
  783. .confirm_order_top_img {
  784. width: 24px;
  785. height: 24px;
  786. margin-right: 8px;
  787. }
  788. .confirm_order_top_text {
  789. margin-top: 2px;
  790. }
  791. }
  792. .order_information {
  793. width: 100%;
  794. background: #29293f;
  795. border-radius: 8px;
  796. padding: 10px;
  797. box-sizing: border-box;
  798. display: flex;
  799. margin-bottom: 10px;
  800. .order_information_img {
  801. width: 80px;
  802. height: 80px;
  803. margin-right: 12px;
  804. }
  805. .order_information_title_one {
  806. width: 215px;
  807. font-size: 14px;
  808. font-family: PingFangSC-Medium, PingFang SC;
  809. font-weight: 500;
  810. color: #ffffff;
  811. white-space: nowrap;
  812. overflow: hidden;
  813. text-overflow: ellipsis;
  814. margin-bottom: 6px;
  815. }
  816. .order_information_title_two {
  817. width: 56px;
  818. height: 22px;
  819. background: rgba(255, 255, 255, 0.1);
  820. border-radius: 4px;
  821. font-size: 12px;
  822. font-family: PingFangSC-Regular, PingFang SC;
  823. font-weight: 400;
  824. color: #28b6ff;
  825. line-height: 22px;
  826. text-align: center;
  827. margin-bottom: 16px;
  828. }
  829. .order_information_title_number {
  830. font-size: 12px;
  831. font-family: PingFangSC-Regular, PingFang SC;
  832. font-weight: 400;
  833. color: #c8c9cc;
  834. }
  835. }
  836. .fee_details {
  837. width: 100%;
  838. background: #29293f;
  839. border-radius: 8px;
  840. padding: 12px 10px;
  841. box-sizing: border-box;
  842. margin-bottom: 10px;
  843. .fee_details_con {
  844. font-size: 14px;
  845. font-family: PingFangSC-Regular, PingFang SC;
  846. font-weight: 400;
  847. color: #ffffff;
  848. display: flex;
  849. justify-content: space-between;
  850. .fee_details_price {
  851. font-weight: 500;
  852. color: #28b6ff;
  853. }
  854. .order_details {
  855. font-size: 12px;
  856. font-family: PingFangSC-Regular, PingFang SC;
  857. font-weight: 400;
  858. color: #939599;
  859. }
  860. .order_details_con {
  861. font-size: 12px;
  862. font-family: PingFangSC-Regular, PingFang SC;
  863. font-weight: 400;
  864. color: #ffffff;
  865. }
  866. }
  867. }
  868. .fee_details_divider {
  869. margin: 10px 0;
  870. }
  871. .payment_method {
  872. width: 100%;
  873. background: #29293f;
  874. border-radius: 8px;
  875. padding: 12px 10px;
  876. box-sizing: border-box;
  877. .payment_method_con {
  878. display: flex;
  879. justify-content: space-between;
  880. font-size: 14px;
  881. font-family: PingFangSC-Medium, PingFang SC;
  882. font-weight: 500;
  883. color: #ffffff;
  884. border-bottom: 1px solid rgba(94, 99, 110, 0.2);
  885. padding-bottom: 10px;
  886. margin-bottom: 10px;
  887. box-sizing: border-box;
  888. .payment_method_con_left {
  889. display: flex;
  890. .payment_method_title {
  891. margin-top: 2px;
  892. }
  893. }
  894. .payment_method_img {
  895. width: 24px;
  896. height: 24px;
  897. margin-right: 6px;
  898. }
  899. .choose-icon {
  900. width: 24px;
  901. height: 24px;
  902. }
  903. }
  904. .payment_method_con:last-child {
  905. border-bottom: none;
  906. padding-bottom: 0px;
  907. margin-bottom: 0px;
  908. }
  909. }
  910. .fee_details_actual_payment {
  911. color: #ffffff;
  912. }
  913. }
  914. .immediate_payment {
  915. position: fixed;
  916. bottom: 0;
  917. width: 100%;
  918. height: 56px;
  919. background: #15152d;
  920. padding: 8px 16px;
  921. box-sizing: border-box;
  922. display: flex;
  923. justify-content: space-between;
  924. .immediate_payment_left {
  925. display: flex;
  926. }
  927. .immediate_payment_total {
  928. margin-top: 16px;
  929. box-sizing: border-box;
  930. font-size: 14px;
  931. font-family: PingFangSC-Regular, PingFang SC;
  932. font-weight: 400;
  933. color: #939599;
  934. margin-right: 4px;
  935. }
  936. .immediate_payment_price_symbol {
  937. margin-top: 16px;
  938. font-size: 14px;
  939. font-family: PingFangSC-Regular, PingFang SC;
  940. font-weight: 500;
  941. color: #28b6ff;
  942. }
  943. .immediate_payment_price {
  944. margin-top: 10px;
  945. font-size: 26px;
  946. font-family: PingFangSC-Medium, PingFang SC;
  947. font-weight: 500;
  948. color: #28b6ff;
  949. }
  950. .immediate_payment_con {
  951. width: 160px;
  952. height: 40px;
  953. background: #28b6ff;
  954. border-radius: 8px;
  955. font-size: 16px;
  956. font-family: PingFangSC-Medium, PingFang SC;
  957. font-weight: 500;
  958. color: #ffffff;
  959. line-height: 40px;
  960. text-align: center;
  961. }
  962. }
  963. /deep/ .van-divider::before {
  964. height: 1px;
  965. background: #5f646f;
  966. opacity: 0.2;
  967. }
  968. </style>