Submit.vue 35 KB

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