diff --git a/pages/detailedList/index.vue b/pages/detailedList/index.vue index ff151a7..7f0f675 100644 --- a/pages/detailedList/index.vue +++ b/pages/detailedList/index.vue @@ -162,9 +162,10 @@ export default { }; }, onLoad: function () { - this.machineId = "861741042996303"; - this.getDataList(); - return; + // 写死 + // this.machineId = "861741042996303"; + // this.getDataList(); + // return; plus.device.getInfo({ success: (e) => { diff --git a/pages/index/index.vue b/pages/index/index.vue index db17c2e..b04eac6 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -130,9 +130,10 @@ export default { onLoad() { uni.showLoading(); - this.machineId = "861741042996303"; - this.getShopInfoApi(); - return; + // 写死 + // this.machineId = "861299032410223"; + // this.getShopInfoApi(); + // return; plus.device.getInfo({ success: (e) => { @@ -193,20 +194,21 @@ export default { }); }, scanCodeHandle() { - uni.setStorageSync("customer_info", ["56356", "zh-CN"]); - this.$i18n.locale = "en"; - this.gotoWhere( - `/pages/verification/stepOne?money=${this.form_data.money.value}&num_dine=${this.form_data.num_dine}` - ); - uni.setStorageSync("heXiaoData", { - totalMoney: +this.form_data.money.value, - userNum: this.form_data.num_dine, - dTicket: 0, // 优惠券抵扣 - dIntegral: 0, // 积分抵扣 - dMoney: 0, // 抵扣后金额 - coupon: [], // 选中的优惠券 - }); - return; + // 写死 + // uni.setStorageSync("customer_info", ["39207", "zh-CN"]); + // this.$i18n.locale = "en"; + // uni.setStorageSync("heXiaoData", { + // totalMoney: +this.form_data.money.value, + // userNum: this.form_data.num_dine, + // dTicket: 0, // 优惠券抵扣 + // dIntegral: 0, // 积分抵扣 + // dMoney: 0, // 抵扣后金额 + // coupon: [], // 选中的优惠券 + // }); + // this.gotoWhere( + // `/pages/verification/stepOne?money=${this.form_data.money.value}&num_dine=${this.form_data.num_dine}` + // ); + // return; // 允许从相机和相册扫码 if (parseInt(this.form_data.money.value) < 0) return; if (parseInt(this.form_data.num_dine) < 0) return; diff --git a/pages/verification/selectCoupon.vue b/pages/verification/selectCoupon.vue index 84c23fe..2c480e2 100644 --- a/pages/verification/selectCoupon.vue +++ b/pages/verification/selectCoupon.vue @@ -39,7 +39,7 @@ - + 確認/{{ $t("确认") }} diff --git a/pages/verification/stepOne.vue b/pages/verification/stepOne.vue index da271e5..f0ce5e2 100644 --- a/pages/verification/stepOne.vue +++ b/pages/verification/stepOne.vue @@ -313,6 +313,12 @@ export default { uni.redirectTo({ url, }); + } else { + uni.showToast({ + title: res.data.msg, + duration: 1500, + icon: "none", + }); } }, // 通用方法 diff --git a/request/ticketReq.js b/request/ticketReq.js index d2e588e..198be8b 100644 --- a/request/ticketReq.js +++ b/request/ticketReq.js @@ -26,3 +26,12 @@ export function getWriteOffInfo(data) { data, }); } + +// 提交核销 +export const verification = (params) => { + return myRequest({ + method: "post", + url: `/write-off/machine-submit`, + data: params, + }); +};