acdr-ui/dist/dev/mp-weixin/modules/mall/pay/result.js.map

1 line
12 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"result.js","sources":["../../../../../../src/modules/mall/pay/result.vue","../../../../../../uniPage:/bW9kdWxlc1xtYWxsXHBheVxyZXN1bHQudnVl"],"sourcesContent":["<!-- 支付结果页面 -->\r\n<template>\r\n <s-layout title=\"支付结果\" :bgStyle=\"{ color: '#FFF' }\">\r\n <view class=\"pay-result-box ss-flex-col ss-row-center ss-col-center\">\r\n <!-- 信息展示 -->\r\n <view class=\"pay-waiting ss-m-b-30\" v-if=\"payResult === 'waiting'\" />\r\n <image\r\n class=\"pay-img ss-m-b-30\"\r\n v-if=\"payResult === 'success'\"\r\n :src=\"sheep.$url.static('/static/img/shop/order/order_pay_success.gif')\"\r\n />\r\n <image\r\n class=\"pay-img ss-m-b-30\"\r\n v-if=\"['failed', 'closed'].includes(payResult)\"\r\n :src=\"sheep.$url.static('/static/img/shop/order/order_paty_fail.gif')\"\r\n />\r\n <view class=\"tip-text ss-m-b-30\" v-if=\"payResult === 'success'\">支付成功</view>\r\n <view class=\"tip-text ss-m-b-30\" v-if=\"payResult === 'failed'\">支付失败</view>\r\n <view class=\"tip-text ss-m-b-30\" v-if=\"payResult === 'closed'\">该订单已关闭</view>\r\n <view class=\"tip-text ss-m-b-30\" v-if=\"payResult === 'waiting'\">检测支付结果...</view>\r\n <view class=\"pay-total-num ss-flex\" v-if=\"payResult === 'success'\">\r\n <view>¥{{ fen2yuan(state.orderInfo.price) }}</view>\r\n </view>\r\n\r\n <!-- 操作区 -->\r\n <view class=\"btn-box ss-flex ss-row-center ss-m-t-50\">\r\n <button class=\"back-btn ss-reset-button\" @tap=\"sheep.$router.go('/modules/mall/index/index')\">\r\n 返回首页\r\n </button>\r\n <button\r\n class=\"check-btn ss-reset-button\"\r\n v-if=\"payResult === 'failed'\"\r\n @tap=\"\r\n sheep.$router.redirect('/modules/mall/pay/index', {\r\n id: state.id,\r\n orderType: state.orderType,\r\n })\r\n \"\r\n >\r\n 重新支付\r\n </button>\r\n <button class=\"check-btn ss-reset-button\" v-if=\"payResult === 'success'\" @tap=\"onOrder\">\r\n 查看订单\r\n </button>\r\n <!-- TODO 芋艿:拼团接入 -->\r\n <button\r\n class=\"check-btn ss-reset-button\"\r\n v-if=\"payResult === 'success' && state.tradeOrder.type === 3\"\r\n @tap=\"sheep.$router.redirect('/modules/mall/activity/groupon/order')\"\r\n >\r\n 我的拼团\r\n </button>\r\n </view>\r\n\r\n <!-- #ifdef MP -->\r\n <view\r\n class=\"subscribe-box ss-flex ss-m-t-44\"\r\n v-if=\"showSubscribeBtn && state.orderType === 'goods'\"\r\n >\r\n <image class=\"subscribe-img\" :src=\"sheep.$url.static('/static/img/shop/order/cargo.png')\" />\r\n <view class=\"subscribe-title ss-m-r-48 ss-m-l-16\">获取实时发货信息与订单状态</view>\r\n <view class=\"subscribe-start\" @tap=\"subscribeMessage\">立即订阅</view>\r\n </view>\r\n <!-- #endif -->\r\n </view>\r\n </s-layout>\r\n</template>\r\n\r\n<script setup>\r\nimport { onLoad, onHide, onShow } from '@dcloudio/uni-app'\r\nimport { reactive, computed, ref } from 'vue'\r\nimport { isEmpty } from 'lodash-es'\r\nimport sheep from '@/sheep'\r\nimport PayOrderApi from '@/sheep/api/pay/order'\r\nimport { fen2yuan } from '@/sheep/hooks/useGoods'\r\nimport OrderApi from '@/sheep/api/trade/order'\r\nimport { WxaSubscribeTemplate } from '@/sheep/util/const'\r\n\r\nconst state = reactive({\r\n id: 0, // 支付单号\r\n orderType: 'goods', // 订单类型\r\n result: 'unpaid', // 支付状态\r\n orderInfo: {}, // 支付订单信息\r\n tradeOrder: {}, // 商品订单信息,只有在 orderType 为 goods 才会请求。目的:【我的拼团】按钮的展示\r\n counter: 0, // 获取结果次数\r\n})\r\n\r\n// 支付结果 result => payResult\r\nconst payResult = computed(() => {\r\n if (state.result === 'unpaid') {\r\n return 'waiting'\r\n }\