choosePayment.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. <template>
  2. <view>
  3. <u-modal
  4. v-model="payWayPop"
  5. :title-style="{ color: '#1E1E1E', fontSize: '34rpx' }"
  6. title="选择支付方式"
  7. width="600rpx"
  8. :show-confirm-button="false"
  9. :show-cancel-button="false"
  10. :mask-close-able="true"
  11. @input="modalClose"
  12. >
  13. <view class="pay-content">
  14. <view class="pay-list">
  15. <radio-group @change="payRadioChange">
  16. <view class="pay-list-item">
  17. <view class="pay-list-item-image">
  18. <image class="image" src="/static/img/wechat-icon-new.png" mode="aspectFit" />
  19. <view>微信支付</view>
  20. </view>
  21. <view class="radioBox">
  22. <radio color="#2DCF8C" value="weixin" :checked="'weixin' === radioCurrent" />
  23. </view>
  24. </view>
  25. <template v-if="alipayEnv">
  26. <view class="pay-list-item">
  27. <view class="pay-list-item-image">
  28. <image class="image" src="/static/img/alipay-icon-new.png" mode="aspectFit" />
  29. <view>支付宝支付<text>随机立减最高10元</text></view>
  30. </view>
  31. <view class="radioBox">
  32. <radio color="#2DCF8C" value="juhe" :checked="'juhe' === radioCurrent" />
  33. </view>
  34. </view>
  35. </template>
  36. <view class="pay-list-item">
  37. <view class="pay-list-item-image">
  38. <image class="image" src="/static/img/gy-icon-new.png" mode="aspectFit" />
  39. <view>贵州银行</view>
  40. </view>
  41. <view class="radioBox">
  42. <radio color="#2DCF8C" value="gzyh" :checked="'gzyh' === radioCurrent" />
  43. </view>
  44. </view>
  45. <template v-if="!alipayEnv">
  46. <view class="pay-list-item">
  47. <view class="pay-list-item-image">
  48. <image class="image" src="/static/img/juhe-icon-new.png" mode="aspectFit" />
  49. <view>聚合支付</view>
  50. </view>
  51. <view class="radioBox">
  52. <radio color="#2DCF8C" value="juhe" :checked="'juhe' === radioCurrent" />
  53. </view>
  54. </view>
  55. </template>
  56. </radio-group>
  57. </view>
  58. <view class="pay-coupon" v-if="radioCurrent === 'weixin' && isShowCoupon">
  59. <u-cell-group :border="false">
  60. <u-cell-item
  61. icon=""
  62. title="优惠券"
  63. :value="couponPopup.currentCoupon.couponName || (couponPopup.couponList.length ? '暂未选择优惠券' : '无可用优惠券')"
  64. :border-bottom="false"
  65. @click="chooseCoupon"
  66. ></u-cell-item>
  67. </u-cell-group>
  68. </view>
  69. <view class="pay-money">
  70. <text class="discount-money" v-if="couponPopup.currentCoupon.couponContent && radioCurrent === 'weixin'"
  71. >¥ {{ getDifference(orderMoney, couponPopup.currentCoupon.couponContent).toFixed(2) }}</text
  72. >
  73. <text class="original-money" :class="couponPopup.currentCoupon.couponContent && radioCurrent === 'weixin' && 'original-discount-money'"
  74. >¥ {{ orderMoney }}</text
  75. >
  76. </view>
  77. <view class="pay-btn">
  78. <u-button type="primary" shape="circle" :disabled="!radioCurrent" @click="immediatePayment">立即支付</u-button>
  79. </view>
  80. </view>
  81. </u-modal>
  82. <!-- 选择优惠券弹框 -->
  83. <u-popup v-model="couponPopup.show" mode="top" length="100%">
  84. <view class="coupon-popup">
  85. <u-navbar
  86. back-text=""
  87. title="我的优惠券"
  88. :background="couponPopup.background"
  89. title-color="#fff"
  90. back-icon-color="#fff"
  91. :custom-back="customBack"
  92. />
  93. <view class="coupon-popup-list">
  94. <template v-if="couponPopup.couponList.length">
  95. <radio-group @change="couponRadioChange">
  96. <view class="coupon-popup-list-item" v-for="(item, index) in couponPopup.couponList" :key="index">
  97. <view class="coupon-popup-list-item-top">
  98. <view class="coupon-popup-list-item-top-left">
  99. <view class="cplitl-left">
  100. <view>
  101. <text>¥</text>
  102. <text>{{ item.couponContent }}</text>
  103. </view>
  104. <view class="cplitl-left-bottom">{{ Number(item.threshold) > 0 ? `停车时长满${item.threshold}分钟` : '无门槛' }}</view>
  105. </view>
  106. <view class="cplitl-right">
  107. <view>{{ item.couponName }}</view>
  108. <view>有限期:剩余{{ calcValidity(item.startTime, item.endTime) }}</view>
  109. </view>
  110. </view>
  111. <view class="coupon-popup-list-item-top-right">
  112. <radio color="#FF6D6D" :value="item.id" :checked="item.id === couponPopup.radioCurrent" @click="couponItemClick(item)" />
  113. </view>
  114. </view>
  115. <view class="coupon-popup-list-item-bottom">
  116. 适用停车点:
  117. <template v-if="item.parkList">
  118. <template v-if="item.parkList.length > 1"> 适用多个停车点 </template>
  119. <template v-else> 仅限{{ item.parkList.map((item) => item.parkName).join('、') }} </template>
  120. <template v-if="item.parkList && item.parkList.length > 1">
  121. <view class="cplib-point">
  122. <u-read-more
  123. text-indent="0"
  124. show-height="0"
  125. :toggle="true"
  126. :shadow-style="{ backgroundImage: 'none' }"
  127. fontSize="20rpx"
  128. close-text="展开所有停车点"
  129. >
  130. <view class="cplib-point-content">{{ item.parkList.map((item) => item.parkName).join('、') }}</view>
  131. </u-read-more>
  132. </view>
  133. </template>
  134. </template>
  135. </view>
  136. </view>
  137. </radio-group>
  138. </template>
  139. <template v-else>
  140. <u-empty text="没有适合的优惠券" mode="coupon" margin-top="300"></u-empty>
  141. </template>
  142. </view>
  143. <view class="coupon-popup-btn">
  144. <u-button type="primary" shape="circle" @click="confimCoupon">确 定</u-button>
  145. </view>
  146. </view>
  147. </u-popup>
  148. <u-toast ref="uToast" />
  149. </view>
  150. </template>
  151. <script>
  152. import { getEnvIsWx, getEnvIsAlipay } from '@/utils/judgEnvironment.js';
  153. import $wxPay from '@/utils/wxPay.js';
  154. export default {
  155. props: {
  156. // 订单数组
  157. curOrderList: {
  158. type: Array,
  159. default: null
  160. },
  161. // 设备编号
  162. deviceNo: {
  163. type: String,
  164. default: null
  165. },
  166. // 地磁支付需要字段
  167. payeeId: {
  168. type: String,
  169. default: undefined
  170. },
  171. // 地磁支付需要字段
  172. payeeName: {
  173. type: String,
  174. default: undefined
  175. },
  176. // 扫码支付需要字段
  177. sanPay: {
  178. type: Boolean,
  179. default: false
  180. },
  181. // 追缴类型
  182. pursueType: {
  183. type: String,
  184. default: undefined
  185. },
  186. // 车牌号
  187. vehicleNo: {
  188. type: String,
  189. default: undefined
  190. },
  191. // 跳转页面
  192. jumpUrl: {
  193. type: String,
  194. default: null
  195. },
  196. // 出口扫码 接口不一样
  197. exportFlag: {
  198. type: Boolean,
  199. default: false
  200. },
  201. // 区分包月支付
  202. isMonthPay: {
  203. type: Boolean,
  204. default: false
  205. },
  206. // 包月id
  207. monthId: {
  208. type: String,
  209. default: null
  210. },
  211. // 室内扫码
  212. isIndoor: {
  213. type: Boolean,
  214. default: false
  215. }
  216. },
  217. data() {
  218. return {
  219. // 支付弹框显示
  220. payWayPop: false,
  221. // 是否微信环境
  222. wxEnv: true,
  223. // 支付宝环境
  224. alipayEnv: true,
  225. // 支付方式选择
  226. radioCurrent: '',
  227. // 订单金额
  228. orderMoney: '',
  229. // 显示优惠券选项
  230. isShowCoupon: false,
  231. // 是否取消优惠券标识
  232. isCancelCoupon: false,
  233. // 选择优惠券弹框
  234. couponPopup: {
  235. // 弹框标识
  236. show: false,
  237. // 优惠券列表
  238. couponList: [],
  239. // 优惠券选中项value
  240. radioCurrent: '',
  241. // navbar背景
  242. background: {
  243. backgroundColor: '#008CFF'
  244. },
  245. // 优惠券选中项
  246. currentCoupon: {}
  247. }
  248. };
  249. },
  250. methods: {
  251. /**
  252. * 打开弹框触发
  253. * @date 2023-02-17
  254. * @param {any} details
  255. * @param {any} numType single 单笔订单 multiple 多比订单 用于区分多笔订单不能使用优惠券
  256. * @param {any} orderType road 路段订单 parking 停车场订单 用于区分路段订单不使用优惠券
  257. * @returns {any}
  258. */
  259. openPopup(details, numType = 'single', orderType = 'road') {
  260. this.wxEnv = getEnvIsWx();
  261. this.alipayEnv = getEnvIsAlipay();
  262. this.payWayPop = true;
  263. this.orderMoney = details.payAmount.toFixed(2);
  264. if (numType === 'single' && orderType === 'parking' && !this.isMonthPay) {
  265. this.isShowCoupon = true;
  266. this.isCancelCoupon = true;
  267. this.getCouponList(details.id);
  268. }
  269. },
  270. /**
  271. * 获取优惠券列表
  272. * @date 2023-02-17
  273. * @param {any} orderId
  274. * @returns {any}
  275. */
  276. getCouponList(orderId) {
  277. this.$u.api.getCouponByOrderIdApi({ orderId }).then((res) => {
  278. this.couponPopup.couponList = res?.data ?? [];
  279. });
  280. },
  281. /**
  282. * 选中支付类型
  283. * @date 2023-02-17
  284. * @param {any} {detail}
  285. * @returns {any}
  286. */
  287. payRadioChange({ detail }) {
  288. this.radioCurrent = detail.value;
  289. },
  290. /**
  291. * 选中优惠券
  292. * @date 2023-02-17
  293. * @returns {any}
  294. */
  295. chooseCoupon() {
  296. this.couponPopup.show = true;
  297. },
  298. /**
  299. * 贵阳银行支付
  300. * @param {Array} orderList 需要支付的订单号组成的数组
  301. * @param {String} deviceNo 设备编号(只有车位锁部分有)
  302. * */
  303. async gyBankPay() {
  304. const { curOrderList, deviceNo, jumpUrl, payeeName, payeeId, pursueType, sanPay } = this;
  305. const params = {
  306. orderList: curOrderList,
  307. deviceNo,
  308. jumpUrl,
  309. payeeId,
  310. payeeName,
  311. pursueType,
  312. vehicleNo,
  313. sanPay
  314. };
  315. const apiCall = this.exportFlag ? this.$u.api.quickPayExportApi : this.$u.api.payGzbank;
  316. try {
  317. const res = await apiCall({ ...params });
  318. if (res.data.needPay) {
  319. location.href = res?.data?.url;
  320. } else {
  321. this.showToast('无需支付', 'info');
  322. setTimeout(() => {
  323. location.reload();
  324. }, 1000);
  325. }
  326. } catch (err) {
  327. // this.showToast(err.msg, 'error');
  328. }
  329. },
  330. /**
  331. * @description: 贵阳银行包月支付
  332. * @return {*}
  333. */
  334. async gyBankMonthPay() {
  335. try {
  336. const params = {
  337. monthId: this.monthId,
  338. jumpUrl: this.jumpUrl
  339. };
  340. const { code, data } = await this.$u.api.monthPay({ ...params });
  341. if (code === 200) {
  342. location.href = data?.url;
  343. }
  344. } catch (error) {
  345. this.showToast(error?.msg ?? '无法调起支付', 'error');
  346. }
  347. },
  348. /**
  349. * 聚合支付
  350. * */
  351. juhePay() {
  352. this.getWXPayByJava(this.curOrderList, this.deviceNo);
  353. },
  354. /**
  355. * @description: 聚合包月支付
  356. * @return {*}
  357. */
  358. async juheMonthPay() {
  359. try {
  360. const { monthId, jumpUrl } = this;
  361. const { code, data } = await this.$u.api.monthlyWxPay({ monthId, jumpUrl });
  362. if (code === 200) {
  363. localStorage.setItem('jumpUrl', this.jumpUrl);
  364. location.href = data?.qrCodeUrl;
  365. }
  366. } catch (error) {
  367. this.showToast(error?.msg ?? '拉起支付失败!', 'error');
  368. }
  369. },
  370. /**
  371. * 微信支付
  372. */
  373. async wechatPay() {
  374. const { curOrderList, vuex_wxinfo, deviceNo, payeeId, payeeName, vehicleNo, sanPay, couponPopup } = this;
  375. const params = {
  376. orderList: curOrderList,
  377. openid: vuex_wxinfo?.openId,
  378. deviceNo,
  379. payeeId,
  380. payeeName,
  381. vehicleNo,
  382. sanPay,
  383. couponMemberId: couponPopup?.radioCurrent
  384. };
  385. const apiCall = this.exportFlag ? this.$u.api.parkingWechatPayApi : this.$u.api.wechatPayApi;
  386. try {
  387. const { code, data } = await apiCall({ ...params });
  388. if (code === 200) {
  389. if (data.needPay) {
  390. $wxPay.weixinPay(data.wx).then((r) => {
  391. const messageMap = {
  392. 0: '成功',
  393. 1: '已取消支付',
  394. 2: '支付失败,请检查!'
  395. };
  396. switch (Number(r.code)) {
  397. case 0: // 成功
  398. //#ifdef H5
  399. location.reload();
  400. //#endif
  401. break;
  402. case 1: // 取消
  403. if (this.isCancelCoupon) {
  404. this.cancelCoupon(messageMap[r.code]);
  405. } else {
  406. this.showToast(messageMap[r.code], 'info');
  407. location.reload();
  408. }
  409. break;
  410. case 2: // 支付失败
  411. this.showToast(messageMap[r.code], 'error');
  412. break;
  413. }
  414. });
  415. } else {
  416. this.showToast('无需支付', 'info');
  417. setTimeout(() => {
  418. uni.hideLoading();
  419. location.reload();
  420. }, 1000);
  421. }
  422. }
  423. } catch (error) {}
  424. },
  425. /**
  426. * @description: 取消优惠券
  427. * @param {*} msg
  428. * @return {*}
  429. */
  430. async cancelCoupon(msg) {
  431. try {
  432. const { code } = await this.$u.api.updateCouponStatusApi({ orderList: this.curOrderList });
  433. if (code === 200) {
  434. this.showToast(msg, 'info');
  435. location.reload();
  436. }
  437. } catch (error) {}
  438. },
  439. /**
  440. * @description: 微信包月支付
  441. * @return {*}
  442. */
  443. async wechatMonthPay() {
  444. const { code, data } = await this.$u.api.wechatMonthlyPayapi({ monthId: this.monthId, openid: this.vuex_wxinfo.openId });
  445. if (code === 200) {
  446. $wxPay.weixinPay(data?.wx).then((res) => {
  447. this.handleMonthlyPay.call(this, res);
  448. });
  449. }
  450. },
  451. /**
  452. * @description: 微信包月支付响应处理
  453. * @param {*} response
  454. * @return {*}
  455. */
  456. handleMonthlyPay(response) {
  457. const messageMap = {
  458. 0: { title: '成功', jumpUrl: this.jumpUrl },
  459. 1: { title: '已取消支付' },
  460. 2: { title: '支付失败,请检查!', type: 'error' }
  461. };
  462. const message = messageMap[Number(response.code)];
  463. this.showToast(message.title, message.type || 'info');
  464. if (message.jumpUrl) {
  465. location.href = message.jumpUrl;
  466. }
  467. },
  468. /**
  469. * 直接通过后台获取贵阳银行微信支付地址
  470. * @param {Array} list 需要支付的订单组合数组
  471. * @param {Number} deviceNo 设备编号(在停车锁部分需要)
  472. * */
  473. async getWXPayByJava(orderList, deviceNo) {
  474. const params = {
  475. orderList,
  476. openid: this.vuex_wxinfo.openId,
  477. jumpUrl: this.jumpUrl,
  478. deviceNo: deviceNo || null,
  479. payeeId: this.payeeId,
  480. payeeName: this.payeeName,
  481. pursueType: this.pursueType,
  482. vehicleNo: this.vehicleNo,
  483. sanPay: this.sanPay
  484. };
  485. const apiCall = this.exportFlag ? this.$u.api.polyPayExportApi : this.$u.api.ordinaryWxPay;
  486. try {
  487. const { code, data } = await apiCall({ ...params });
  488. if (code === 200) {
  489. if (data.needPay) {
  490. localStorage.setItem('jumpUrl', this.jumpUrl);
  491. location.href = data.qrCodeUrl;
  492. } else {
  493. this.showToast('无需支付', 'info');
  494. setTimeout(() => {
  495. uni.hideLoading();
  496. location.href = this.jumpUrl;
  497. }, 1000);
  498. }
  499. }
  500. } catch (error) {
  501. // this.showToast(`无法调起${this.alipayEnv ? '支付宝' : this.wxEnv ? '微信' : '聚合'}支付!`, 'error');
  502. }
  503. },
  504. /**
  505. * 支付弹框支付触发
  506. * @date 2023-02-17
  507. * @returns {any}
  508. */
  509. modalClose() {
  510. Object.assign(this, {
  511. payWayPop: false,
  512. wxEnv: true,
  513. alipayEnv: true,
  514. radioCurrent: '',
  515. orderMoney: '',
  516. isShowCoupon: false,
  517. isCancelCoupon: false,
  518. couponPopup: {
  519. show: false,
  520. couponList: [],
  521. radioCurrent: '',
  522. background: {
  523. backgroundColor: '#008CFF'
  524. },
  525. currentCoupon: {}
  526. }
  527. });
  528. this.$emit('closePaymentMethod');
  529. },
  530. /**
  531. * 关闭优惠券弹框
  532. * @date 2023-02-17
  533. * @returns {any}
  534. */
  535. customBack() {
  536. this.couponPopup.show = false;
  537. },
  538. /**
  539. * 优惠券单选触发
  540. * @date 2023-02-17
  541. * @param {any} val
  542. * @returns {any}
  543. */
  544. couponRadioChange(val) {
  545. // this.couponPopup.radioCurrent = val.detail.value;
  546. // this.couponPopup.currentCoupon = this.couponPopup.couponList.find((item) => item.id === this.couponPopup.radioCurrent);
  547. },
  548. couponItemClick(item) {
  549. this.couponPopup.radioCurrent = item.id === this.couponPopup.radioCurrent ? '' : item.id;
  550. },
  551. /**
  552. * 优惠券确认
  553. * @date 2023-02-17
  554. * @returns {any}
  555. */
  556. confimCoupon() {
  557. this.couponPopup.currentCoupon = this.couponPopup.radioCurrent
  558. ? this.couponPopup.couponList.find((item) => item.id === this.couponPopup.radioCurrent)
  559. : {};
  560. this.couponPopup.show = false;
  561. },
  562. /**
  563. * 立即支付
  564. * @date 2023-02-17
  565. * @returns {any}
  566. */
  567. immediatePayment() {
  568. if (this.isIndoor) {
  569. const relationObj = {
  570. weixin: 'wechat',
  571. gzyh: 'quick',
  572. juhe: 'poly'
  573. };
  574. this.indoorPayment(relationObj[this.radioCurrent]);
  575. } else {
  576. switch (this.radioCurrent) {
  577. case 'weixin': // 微信支付
  578. this.isMonthPay ? this.wechatMonthPay() : this.wechatPay();
  579. break;
  580. case 'gzyh': // 贵州银行支付或快捷支付
  581. this.isMonthPay ? this.gyBankMonthPay() : this.gyBankPay();
  582. break;
  583. case 'juhe': // 聚合支付
  584. this.isMonthPay ? this.juheMonthPay() : this.juhePay();
  585. break;
  586. }
  587. }
  588. },
  589. /**
  590. * @description: 室内支付
  591. * @param {*} payMode
  592. * @return {*}
  593. */
  594. async indoorPayment(payMode) {
  595. const { curOrderList, couponPopup, vuex_wxinfo, jumpUrl } = this;
  596. const params = {
  597. orderList: curOrderList,
  598. payMode,
  599. couponMemberId: couponPopup?.radioCurrent,
  600. openid: vuex_wxinfo?.openId,
  601. sanPay: true,
  602. jumpUrl
  603. };
  604. const { code, data } = await this.$u.api.indoorPaymentApi({ ...params });
  605. if (code === 200) {
  606. if (data?.needPay) {
  607. switch (payMode) {
  608. case 'wechat': // 微信支付
  609. $wxPay.weixinPay(data?.wechat?.wx).then((r) => {
  610. const messageMap = {
  611. 0: '成功',
  612. 1: '已取消支付',
  613. 2: '支付失败,请检查!'
  614. };
  615. switch (Number(r.code)) {
  616. case 0: // 成功
  617. //#ifdef H5
  618. location.reload();
  619. //#endif
  620. break;
  621. case 1: // 取消
  622. if (this.isCancelCoupon) {
  623. this.cancelCoupon(messageMap[r.code]);
  624. } else {
  625. this.showToast(messageMap[r.code], 'info');
  626. location.reload();
  627. }
  628. break;
  629. case 2: // 支付失败
  630. this.showToast(messageMap[r.code], 'error');
  631. break;
  632. }
  633. });
  634. break;
  635. case 'quick': // 快捷支付
  636. location.href = data?.quick?.url;
  637. break;
  638. case 'poly':
  639. localStorage.setItem('jumpUrl', this.jumpUrl);
  640. location.href = data?.poly?.qrCodeUrl;
  641. break;
  642. }
  643. } else {
  644. this.showToast('无需支付', 'info');
  645. setTimeout(() => {
  646. location.href = this.jumpUrl;
  647. }, 1000);
  648. }
  649. }
  650. },
  651. /**
  652. * 计算剩余时间
  653. * @date 2022-02-17
  654. * @param {any} datetime
  655. * @returns {any}
  656. */
  657. calcValidity(startTime, endTime) {
  658. let endTimeStr = new Date(endTime).valueOf(),
  659. nowTimeStr = new Date(startTime).valueOf() < Date.now() ? Date.now() : new Date(startTime).valueOf(),
  660. remainTimeStr = endTimeStr - nowTimeStr,
  661. day = Math.floor(remainTimeStr / (1000 * 3600 * 24)),
  662. dayOver = remainTimeStr % (1000 * 3600 * 24),
  663. hours = Math.floor(dayOver / (3600 * 1000)),
  664. hourOver = dayOver % (3600 * 1000),
  665. minutes = Math.floor(hourOver / (60 * 1000));
  666. return `${day}天${hours}小时${minutes}分`;
  667. },
  668. getDifference(a, b) {
  669. return a > b ? a - b : 0;
  670. },
  671. /**
  672. * @description: 显示报错信息
  673. * @param {*} title
  674. * @param {*} type
  675. * @return {*}
  676. */
  677. showToast(title, type = 'error') {
  678. this.$refs.uToast.show({ title, type });
  679. }
  680. }
  681. };
  682. </script>
  683. <style lang="scss" scoped>
  684. @import './choosePayment.scss';
  685. </style>