Submit.vue 41 KB

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