diff --git a/src/api/account/shopMerchant.ts b/src/api/account/shopMerchant.ts index 561e836..b2739c0 100644 --- a/src/api/account/shopMerchant.ts +++ b/src/api/account/shopMerchant.ts @@ -1,10 +1,11 @@ import request from "@/utils/request"; -import { Account_BaseUrl } from "@/api/config"; +import { Account_BaseUrl, Order_BaseUrl } from "@/api/config"; const baseURL = Account_BaseUrl + "/admin/shopMerchant"; +const orderURL = Order_BaseUrl + "/admin/shopMerchant"; const API = { get(shopId: string | number) { return request({ - url: `${baseURL}`, + url: `${orderURL}`, method: "get", params: { shopId: shopId @@ -14,7 +15,7 @@ const API = { edit(shopId: string | number, data: shopMerchantType) { delete data.id return request({ - url: `${baseURL}`, + url: `${orderURL}`, method: "put", data: { ...data, shopId }, }); diff --git a/src/api/common/index.ts b/src/api/common/index.ts new file mode 100644 index 0000000..eeac0be --- /dev/null +++ b/src/api/common/index.ts @@ -0,0 +1,166 @@ +import request from "@/utils/request"; + +/** + * 获取所有地域 + * @param params + * @returns + */ +export const getRegion = () => { + return request({ + url: `/system/admin/common/region`, + method: "get" + }); +} + +/** + * 获取所有银行 + * @param params + * @returns + */ +export const getBankInfo = (params: Object) => { + return request({ + url: `/system/admin/common/bankInfo`, + method: "get", + params + }); +} + +/** + * 类目信息表 + * @returns + */ +export const getCategory = () => { + return request({ + url: `/system/admin/common/category`, + method: "get" + }); +} + +interface getBankBranchListParams { + bankAliceCode?: string; + cityCode?: string; +} +/** + * 获取所有支行 + * @params + * bankAliceCode 银行别名code bankAliasCode 从 /system/admin/common/bankInfo 获取 + * cityCode 市编码 wxProvinceCode 从 /system/admin/common/region 获取 + * @returns + */ +export const getBankBranchList = (params: getBankBranchListParams) => { + return request({ + url: `/order/admin/data/entryManager/bankBranchList`, + method: "get", + params + }); +} + +/** + * 申请进件 + * @data Object + * @returns + */ +export const entryManagerPost = (data: Object) => { + return request({ + url: `/order/admin/data/entryManager`, + method: "post", + data + }); +} + +/** + * 申请进件 + * @data { + * url string 图片地址 + * type string 可选 + * IdCard 身份证 + * BankCard 银行卡 + * BusinessLicense 营业执照 + * } + * @returns + */ +export const getInfoByImg = (params: Object) => { + return request({ + url: `/order/admin/data/entryManager/getInfoByImg`, + method: "get", + params + }); +} + +/** + * 获取进件信息详情 + * @data { shopId } + * @returns + */ +export const entryManagerDetail = (params: Object) => { + return request({ + url: `/order/admin/data/entryManager`, + method: "get", + params + }); +} + +/** + * 获取进件列表 + * @data { params } + * @returns + */ +export const entryManagerList = (params: Object) => { + return request({ + url: `/order/admin/data/entryManager/list`, + method: "get", + params + }); +} + +/** + * 主动查询进件信息状态 + * @data { params } + * @returns + */ +export const queryEntry = (params: Object) => { + return request({ + url: `/order/admin/data/entryManager/queryEntry`, + method: "get", + params + }); +} + +/** + * 商户支付信息获取 + * @data { params } + * @returns + */ +export const shopMerchantGet = (params: Object) => { + return request({ + url: `/order/admin/shopMerchant`, + method: "get", + params + }); +} + +/** + * 商户支付信息修改 修改聚合支付信息 + * @data { params } + * @returns + */ +export const shopMerchantPut = (data: Object) => { + return request({ + url: `/order/admin/shopMerchant`, + method: "put", + data + }); +} + +/** + * 获取当前店铺的主店进件信息 + * @data { params } + * @returns + */ +export const getMainMerchant = (params: Object) => { + return request({ + url: `/order/admin/shopMerchant/getMainMerchant`, + method: "get", + params + }); +} diff --git a/src/api/coup/group.js b/src/api/coup/group.js index 4fccbd6..e843ced 100644 --- a/src/api/coup/group.js +++ b/src/api/coup/group.js @@ -10,7 +10,7 @@ export function searchstorestatus(type) { return request_php({ method: "post", headers: { - clint_type: type + 'ClintType': type }, url: "/meituan/searchstorestatus" }); @@ -79,7 +79,7 @@ export function getuisdk(data) { return request_php({ method: "post", headers: { - clint_type: 2 + 'ClintType': 2 }, url: "/douyin/getuisdk", data, @@ -214,7 +214,7 @@ export function thirdPartyCoupon_bindUrl(data) { return request_php({ method: "post", headers: { - clint_type: 1 + 'ClintType': 1 }, url: "/meituan/getuisdkurl", data, diff --git a/src/api/order/pay.ts b/src/api/order/pay.ts index 57419ae..9879f16 100644 --- a/src/api/order/pay.ts +++ b/src/api/order/pay.ts @@ -3,7 +3,6 @@ import { Order_BaseUrl } from "@/api/config"; const baseURL = Order_BaseUrl + "/pay"; const Api = { // h5支付 - h5Pay(data: h5PayRequest) { return request({ url: `${baseURL}/h5Pay`, @@ -67,7 +66,6 @@ const Api = { params }); }, - }; export default Api; diff --git a/src/components/AddressSelect/index.vue b/src/components/AddressSelect/index.vue new file mode 100644 index 0000000..448a345 --- /dev/null +++ b/src/components/AddressSelect/index.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/src/components/Upload/SingleImageUpload.vue b/src/components/Upload/SingleImageUpload.vue index c9795a1..74f7035 100644 --- a/src/components/Upload/SingleImageUpload.vue +++ b/src/components/Upload/SingleImageUpload.vue @@ -172,12 +172,12 @@ const onError = (error: any) => { position: relative; overflow: hidden; cursor: pointer; - border: 1px var(--el-border-color) solid; - border-radius: 5px; + // border: 1px var(--el-border-color) solid; + // border-radius: 5px; - &:hover { - border-color: var(--el-color-primary); - } + // &:hover { + // border-color: var(--el-color-primary); + // } &__delete-btn { position: absolute; diff --git a/src/utils/index.ts b/src/utils/index.ts index bce4c8f..d3dbe87 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -299,4 +299,18 @@ export function includesString(target, searchStr, options = {}) { // 4. 执行包含判断 return processedTarget.includes(processedSearch); -} \ No newline at end of file +} + +/** + * 校验手机号码(中国大陆) + * - 支持 11 位手机号,号段 13x-19x + * @param {string} phone + * @returns {boolean} + */ +export function isValidMobile(phone: string): boolean { + if (!phone && phone !== 0) return false; + const s = String(phone).trim(); + // 中国大陆手机号正则:以1开头,第二位3-9,后面9位数字,总共11位 + const mobileRegex = /^1[3-9]\d{9}$/; + return mobileRegex.test(s); +} diff --git a/src/utils/request.ts b/src/utils/request.ts index 651dc5e..33e9e8a 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -91,7 +91,7 @@ service.interceptors.response.use( return; } ElMessage.error(formatErrorMsg(msg || "Error")); - return Promise.reject(new Error(formatErrorMsg(msg || "Error"))); + return Promise.reject(response.data); }, async (error: any) => { diff --git a/src/views/applyments/applyment_in.vue b/src/views/applyments/applyment_in.vue new file mode 100644 index 0000000..7fb03bc --- /dev/null +++ b/src/views/applyments/applyment_in.vue @@ -0,0 +1,915 @@ + + + + + + \ No newline at end of file diff --git a/src/views/applyments/components/selectAddress.vue b/src/views/applyments/components/selectAddress.vue new file mode 100644 index 0000000..310e0f1 --- /dev/null +++ b/src/views/applyments/components/selectAddress.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/views/applyments/components/selectBank.vue b/src/views/applyments/components/selectBank.vue new file mode 100644 index 0000000..983ae09 --- /dev/null +++ b/src/views/applyments/components/selectBank.vue @@ -0,0 +1,145 @@ + + + + + \ No newline at end of file diff --git a/src/views/applyments/components/selectCategory.vue b/src/views/applyments/components/selectCategory.vue new file mode 100644 index 0000000..b2dad83 --- /dev/null +++ b/src/views/applyments/components/selectCategory.vue @@ -0,0 +1,43 @@ + + + \ No newline at end of file diff --git a/src/views/applyments/components/selectShopsDialog.vue b/src/views/applyments/components/selectShopsDialog.vue new file mode 100644 index 0000000..5a8a1ec --- /dev/null +++ b/src/views/applyments/components/selectShopsDialog.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/src/views/applyments/components/singCodeDialog.vue b/src/views/applyments/components/singCodeDialog.vue new file mode 100644 index 0000000..f6421ba --- /dev/null +++ b/src/views/applyments/components/singCodeDialog.vue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/src/views/applyments/index.vue b/src/views/applyments/index.vue new file mode 100644 index 0000000..7480463 --- /dev/null +++ b/src/views/applyments/index.vue @@ -0,0 +1,312 @@ + + + + + + \ No newline at end of file diff --git a/src/views/applyments/select_shop.vue b/src/views/applyments/select_shop.vue new file mode 100644 index 0000000..75f97ad --- /dev/null +++ b/src/views/applyments/select_shop.vue @@ -0,0 +1,71 @@ + + + + + + \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 40357d4..16ec113 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -70,12 +70,11 @@ const env = process.env.NODE_ENV // DEV-START const accountList = reactive([ { username: "admin", type: 'primary', label: 'admin' }, - { username: "19191703856", type: 'warning', label: '喜气洋洋' }, - { username: "19107220837", type: 'danger', label: '快乐时光店铺' }, - { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' }, - { username: "18821670757", type: 'primary', label: '强盛集团' }, - { username: "19107220837", type: 'warning', label: '万维时光' }, - { username: "19112345678", type: 'success', label: '酸橘子·云贵小馆' }, + // { username: "19191703856", type: 'warning', label: '喜气洋洋' }, + // { username: "19107220837", type: 'danger', label: '快乐时光店铺' }, + // { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' }, + { username: "18821670757", type: 'success', label: '高歌的小店' }, + // { username: "19112345678", type: 'danger', label: '酸橘子·云贵小馆' }, ]); // 快捷模拟登录 diff --git a/src/views/marketing_center/distribution_page/components/setting.vue b/src/views/marketing_center/distribution_page/components/setting.vue index c2f1989..07b5af1 100644 --- a/src/views/marketing_center/distribution_page/components/setting.vue +++ b/src/views/marketing_center/distribution_page/components/setting.vue @@ -135,8 +135,8 @@ *分成比例
- +
@@ -204,7 +204,7 @@ const levelConfigListObj = ref({ name: '', // 名称 inviteCount: '', // 有效人数 costAmount: '', // 消费金额 - levelOneCommission: '', // 一级分销比例 + commission: '', // 一级分销比例 levelTwoCommission: '', // 二级分销比例 }) const form = ref({ @@ -281,7 +281,7 @@ const rules = ref({ callback(new Error(tips)) return } - if (item.levelOneCommission === '' || item.levelOneCommission == 0) { + if (item.commission === '' || item.commission == 0) { tips = `请输入${index + 1}级的分成比例` callback(new Error(tips)) return diff --git a/src/views/online-shop/index.vue b/src/views/online-shop/index.vue index dd790dd..5734a3a 100644 --- a/src/views/online-shop/index.vue +++ b/src/views/online-shop/index.vue @@ -233,7 +233,7 @@ import shopExtendApi from "@/api/account/shopExtend"; export default { data() { return { - tableActive: "", + tableActive: "index_bg", tableData: [], selectItem: {}, imageUrl: "", @@ -248,7 +248,10 @@ export default { methods: { // 刷新列表数据 async doSubmit() { - this.selectItem.value = JSON.stringify(this.imgList) + // console.log('this.selectItem.value', this.selectItem.value); + // return + + // this.selectItem.value = JSON.stringify(this.imgList) await shopExtendApi.edit({ ...this.selectItem, autokey: this.selectItem.autoKey, diff --git a/src/views/order/group-purchase.vue b/src/views/order/group-purchase.vue index a2da669..220f2b9 100644 --- a/src/views/order/group-purchase.vue +++ b/src/views/order/group-purchase.vue @@ -7,8 +7,8 @@ - - + + @@ -135,11 +135,11 @@ export default { }, payTypes: [ { - value: "wechatPay", + value: "WECHAT", label: "微信支付" }, { - value: "aliPay", + value: "ALIPAY", label: "支付宝支付" } ], diff --git a/src/views/order/index/components/detail.vue b/src/views/order/index/components/detail.vue index 7ebb59a..f22ec88 100644 --- a/src/views/order/index/components/detail.vue +++ b/src/views/order/index/components/detail.vue @@ -33,7 +33,7 @@
订单类型
- {{ sendTypeFilter(detail.sendType) }} + {{ sendTypeFilter(detail.dineMode) }}
@@ -46,12 +46,12 @@
下单时间
-
{{ timeFilter(detail.createdAt) }}
+
{{ timeFilter(detail.createTime) }}
支付时间
- {{ timeFilter(detail.createdAt) }} + {{ timeFilter(detail.paidTime) }}
diff --git a/src/views/order/index/components/orderEnum.js b/src/views/order/index/components/orderEnum.js index 6724cf7..43e8e95 100644 --- a/src/views/order/index/components/orderEnum.js +++ b/src/views/order/index/components/orderEnum.js @@ -51,15 +51,15 @@ export default { label: "快递", }, { - key: "takeaway", + key: "take-away", label: "外卖", }, { - key: "takeself", + key: "take-out", label: "自提", }, { - key: "table", + key: "dine-in", label: "堂食", }, ], diff --git a/src/views/shop/groupBuying/index.vue b/src/views/shop/groupBuying/index.vue index 32e6a7b..2aa56de 100644 --- a/src/views/shop/groupBuying/index.vue +++ b/src/views/shop/groupBuying/index.vue @@ -245,8 +245,8 @@ const tableData = reactive({ // 支付方式类型 function payTypeFilter(t) { const m = { - wechatPay: '微信支付', - aliPay: '支付宝支付' + WECHAT: '微信支付', + ALIPAY: '支付宝支付' } return m[t] } diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index e8ae3f5..2da4003 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -1,86 +1,181 @@ + \ No newline at end of file diff --git a/src/views/shop/list/components/payStatusCard.vue b/src/views/shop/list/components/payStatusCard.vue new file mode 100644 index 0000000..6c43596 --- /dev/null +++ b/src/views/shop/list/components/payStatusCard.vue @@ -0,0 +1,325 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/list/index.vue b/src/views/shop/list/index.vue index 03c9ba7..53fcbbc 100644 --- a/src/views/shop/list/index.vue +++ b/src/views/shop/list/index.vue @@ -25,7 +25,7 @@ 添加店铺
- + + - + - + diff --git a/src/views/tool/Instead/components/order.vue b/src/views/tool/Instead/components/order.vue index 8aca734..b5851fe 100644 --- a/src/views/tool/Instead/components/order.vue +++ b/src/views/tool/Instead/components/order.vue @@ -220,6 +220,25 @@ + + +
+
+
+ + {{ closeStateTime }}秒后可重新扫码 + 重新扫码 + +
+
+ + {{ closeStateTime }}秒后可关闭 + 关闭 + +
+
+
@@ -243,6 +262,7 @@ import discount from "./discount.vue"; import { ElLoading } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus"; import { BigNumber } from "bignumber.js"; +import { onUnmounted } from 'vue' // 配置BigNumber精度 BigNumber.set({ @@ -439,11 +459,17 @@ async function pointsInit() { // 保险取值 const eq = pointsConfig?.equivalentPoints || 0; - const maxRatio = pointsConfig?.maxDeductionRatio || 0; + const rawMaxRatio = pointsConfig?.maxDeductionRatio || 0; + // 兼容后端返回的百分比或小数两种形式:如果大于1,则视为百分比(如100表示100%),需除以100 + const maxRatio = rawMaxRatio > 1 ? rawMaxRatio / 100 : rawMaxRatio; const minPay = pointsConfig?.minPaymentAmount || 0; // 计算当前订单可抵扣金额上限(元) + // 使用“抵扣前实付金额”作为门槛判断(即把当前已应用的积分抵扣金额加回), + // 避免在已经抵扣导致 finalPay 变小后错误地判定为不可用。 let finalPay = Number(carts.orderCostSummary.finalPayAmount) || 0; + const currentPointDeduction = Number(carts.orderCostSummary.pointDeductionAmount) || 0; + const basePay = finalPay + currentPointDeduction; const res = { usable: true, @@ -455,8 +481,9 @@ async function pointsInit() { unusableReason: "", }; - // 如果订单实付低于最小使用门槛,则不可用 - if (finalPay <= 0 || (minPay > 0 && finalPay < minPay)) { + // 如果订单实付低于最小使用门槛,则不可用(门槛仅作为启用条件) + // 这里使用 basePay(抵扣前实付)进行判断,确保已填写积分后不会回退为不可用 + if (basePay <= 0 || (minPay > 0 && basePay < minPay)) { res.usable = false; res.unusableReason = `订单实付金额低于 ${minPay} 元,无法使用积分抵扣`; } else if (eq <= 0) { @@ -464,23 +491,22 @@ async function pointsInit() { res.unusableReason = `积分换算比例配置错误,无法使用积分抵扣`; } else { // 计算基于比例限制的最大抵扣金额(元) - let maxByRatio = finalPay * maxRatio; - // 保证抵扣后剩余金额 >= minPaymentAmount - if (minPay > 0) { - const allowed = finalPay - minPay; - if (allowed <= 0) { - res.usable = false; - res.unusableReason = `抵扣后实付金额必须大于等于 ${minPay} 元,当前不可使用积分`; - } else { - maxByRatio = Math.min(maxByRatio, allowed); - } - } + // 注意:此处不再减少 minPaymentAmount,minPaymentAmount 仅用作是否可用的门槛; + // 真正的最大抵扣由 maxRatio(抵扣比例)与用户积分数量共同决定。 + // 计算基于比例限制的最大抵扣金额(元),基于抵扣前实付金额 + let maxByRatio = basePay * maxRatio; if (res.usable) { - // 可用积分上限(向下取整为 eq 的倍数) + // 可用积分上限(按等价积分步长对齐到 eq 的倍数) const maxByMoney = Math.floor(maxByRatio * eq); const userPoints = carts.vipUser.pointBalance || 0; - res.maxUsablePoints = Math.min(userPoints, maxByMoney); + let computedMax = Math.min(userPoints, maxByMoney); + // 对齐到等价积分步长,保证输入步长生效 + if (eq > 0) { + computedMax = Math.floor(computedMax / eq) * eq; + } + res.maxUsablePoints = computedMax; + console.debug("pointsInit debug:", { finalPay: finalPay, basePay: basePay, eq, rawMaxRatio, maxRatio, maxByMoney, userPoints, computedMax }); // 最小抵扣积分为配置值或等于换算比 res.minDeductionPoints = pointsConfig?.minDeductionPoints || eq; if (res.maxUsablePoints < res.minDeductionPoints) { @@ -498,8 +524,20 @@ async function pointsInit() { return res; } - // 如果可用则默认填充可用最大值,否则清零 - usePointsNumber.value = res.usable ? res.maxUsablePoints : 0; + // 如果可用则默认填充可用最大值(对齐步长),否则清零 + if (res.usable) { + // 计算默认填充值:基于抵扣前实付的比例上限与等价比计算需要的积分数 + const defaultMaxByMoney = Math.floor(basePay * res.maxDeductionRatio * res.equivalentPoints); + let defaultPts = Math.min(res.maxUsablePoints || 0, defaultMaxByMoney || 0); + if (res.equivalentPoints > 0) { + defaultPts = Math.floor(defaultPts / res.equivalentPoints) * res.equivalentPoints; + } + // 最终确保不超过用户积分 + const userPts = carts.vipUser.pointBalance || 0; + usePointsNumber.value = Math.min(defaultPts, userPts); + } else { + usePointsNumber.value = 0; + } if (!res.usable) score.sel = -1; return res; @@ -532,17 +570,15 @@ function pointsToMoney(val) { // 再次校验不超过允许的最大抵扣金额(基于比例或门槛) let finalPay = Number(carts.orderCostSummary.finalPayAmount) || 0; let maxByRatio = finalPay * cfg.maxDeductionRatio; - if (cfg.minPaymentAmount > 0) { - const allowed = finalPay - cfg.minPaymentAmount; - if (allowed <= 0) { - usePointsNumber.value = 0; - carts.orderCostSummary.pointUsed = 0; - carts.orderCostSummary.pointDeductionAmount = 0; - return; - } - maxByRatio = Math.min(maxByRatio, allowed); + // 对于单笔抵扣:若订单实付低于配置的最小门槛,则不可使用(作为启用条件) + if (cfg.minPaymentAmount > 0 && finalPay < cfg.minPaymentAmount) { + usePointsNumber.value = 0; + carts.orderCostSummary.pointUsed = 0; + carts.orderCostSummary.pointDeductionAmount = 0; + return; } const maxAllowedMoney = new BigNumber(maxByRatio).decimalPlaces(2, BigNumber.ROUND_DOWN).toNumber(); + console.debug("pointsToMoney debug:", { finalPay, cfg, pts, money, maxByRatio, maxAllowedMoney }); if (money > maxAllowedMoney) { // 调整积分到允许的最大金额对应的积分 const allowedPts = Math.floor(maxAllowedMoney * cfg.equivalentPoints); @@ -735,7 +771,12 @@ async function payOrder(payType, isScan, guazhangren) { } carts.clear(); } catch (error) { - console.log(error); + console.log('payOrder===', error); + // 启动状态查询 + if (error.code == 211) { + showCheckPayStauts.value = true + autoCheckOrder() + } clearTimeout(payTimer); loading.close(); } @@ -746,6 +787,102 @@ async function payOrder(payType, isScan, guazhangren) { } } +function clearAutoCheckOrder() { + clearInterval(timer.value) + timer.value = null +} + +// 关闭查询 +function closeScanCode() { + showCheckPayStauts.value = false; + reset() +} + +// 重新扫码 +function resetScanCode() { + reset() + showCheckPayStauts.value = false; + clearInterval(timer.value) + timer.value = null + + clearInterval(closeStateTimer.value) + closeStateTimer.value = null + + setTimeout(() => { + refScanPay.value.open(returnPayParams(), "scanCode") + }, 500) +} + +const closeState = ref(false) +const closeStateTime = ref(5); +const closeStateTimer = ref(null) + +function closeStateTimerFuc() { + closeStateTimer.value = setInterval(() => { + closeStateTime.value-- + if (closeStateTime.value <= 0) { + clearInterval(closeStateTimer.value) + closeStateTimer.value = null + closeState.value = true + } + }, 1000) +} + +// 自动查询订单状态 +const timer = ref(null) +function autoCheckOrder() { + closeStateTimerFuc() + timer.value = setInterval(() => { + // 开始锁单 + // goodsStore.isOrderLock({ + // table_code: table_code.value + // }, 'pay_lock') + checkPayStauts(false) + }, 2000) +} + +function reset() { + checkPayStautsLoading.value = true; + closeState.value = false + closeStateTime.value = 5 +} + +// 查询订单支付状态 +const showCheckPayStauts = ref(false) +const checkPayStautsLoading = ref(true) +async function checkPayStauts(tips = true) { + try { + // 扫码下单 + const res = await payApi.queryOrderStatus({ orderId: props.orderInfo.id }); + if (res == "done") { + // 支付成功,解锁订单 + // await goodsStore.isOrderLock({ + // table_code: table_code.value + // }, 'pay_unlock') + + // userPayWait.value = false + checkPayStautsLoading.value = false; + // scanCode.value = ""; + showCheckPayStauts.value = false; + clearAutoCheckOrder() + paysuccess(); + return; + } + if (res == "unpaid") { + if (tips) { + ElMessage.warning("用户支付中..."); + } + return; + } else { + clearAutoCheckOrder() + ElMessage.warning(res.msg || ''); + return; + } + } catch (error) { + console.log(error); + } +} + function paysuccess() { clearTimeout(payTimer); ElMessage.success("支付成功"); @@ -806,6 +943,10 @@ watch( } ); +onUnmounted(() => { + clearAutoCheckOrder() +}) + onMounted(() => { carts.payParamsInit(); getPaytype(); @@ -858,9 +999,13 @@ defineExpose({ .order-info { font-size: 14px; - .title {} + .title { + display: inline-block; + } - .value {} + .value { + display: inline-block; + } .price { color: #fa5555; @@ -879,4 +1024,30 @@ defineExpose({ color: #666; padding: 8px 10px 8px 20px; } + +.pay_status_content { + flex: 1; + padding: 0 var(--el-font-size-base); + height: 400px; + padding-bottom: 100px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .loading { + width: 200px; + height: 200px; + --el-loading-spinner-size: 100px; + + :deep(.el-loading-text) { + font-size: 20px; + } + } + + .btn { + width: 200px; + padding-top: var(--el-font-size-base); + } +} \ No newline at end of file diff --git a/src/views/tool/Instead/components/scan-pay.vue b/src/views/tool/Instead/components/scan-pay.vue index 47f59c1..3ec29b9 100644 --- a/src/views/tool/Instead/components/scan-pay.vue +++ b/src/views/tool/Instead/components/scan-pay.vue @@ -2,12 +2,8 @@
- + {{ item.text }}
@@ -21,13 +17,8 @@ - +
取消 @@ -46,7 +37,9 @@
{{ form.money }}元
- + + + 等待用户支付
@@ -55,7 +48,8 @@
- - -