优惠券选择页确认按钮层级调整

This commit is contained in:
2023-06-08 15:55:15 +08:00
parent 4fff04b095
commit bf89c360ff
5 changed files with 39 additions and 21 deletions

View File

@@ -162,9 +162,10 @@ export default {
}; };
}, },
onLoad: function () { onLoad: function () {
this.machineId = "861741042996303"; // 写死
this.getDataList(); // this.machineId = "861741042996303";
return; // this.getDataList();
// return;
plus.device.getInfo({ plus.device.getInfo({
success: (e) => { success: (e) => {

View File

@@ -130,9 +130,10 @@ export default {
onLoad() { onLoad() {
uni.showLoading(); uni.showLoading();
this.machineId = "861741042996303"; // 写死
this.getShopInfoApi(); // this.machineId = "861299032410223";
return; // this.getShopInfoApi();
// return;
plus.device.getInfo({ plus.device.getInfo({
success: (e) => { success: (e) => {
@@ -193,20 +194,21 @@ export default {
}); });
}, },
scanCodeHandle() { scanCodeHandle() {
uni.setStorageSync("customer_info", ["56356", "zh-CN"]); // 写死
this.$i18n.locale = "en"; // uni.setStorageSync("customer_info", ["39207", "zh-CN"]);
this.gotoWhere( // this.$i18n.locale = "en";
`/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,
uni.setStorageSync("heXiaoData", { // userNum: this.form_data.num_dine,
totalMoney: +this.form_data.money.value, // dTicket: 0, // 优惠券抵扣
userNum: this.form_data.num_dine, // dIntegral: 0, // 积分抵扣
dTicket: 0, // 优惠券抵扣 // dMoney: 0, // 抵扣后金额
dIntegral: 0, // 积分抵扣 // coupon: [], // 选中的优惠券
dMoney: 0, // 抵扣后金额 // });
coupon: [], // 选中的优惠券 // this.gotoWhere(
}); // `/pages/verification/stepOne?money=${this.form_data.money.value}&num_dine=${this.form_data.num_dine}`
return; // );
// return;
// 允许从相机和相册扫码 // 允许从相机和相册扫码
if (parseInt(this.form_data.money.value) < 0) return; if (parseInt(this.form_data.money.value) < 0) return;
if (parseInt(this.form_data.num_dine) < 0) return; if (parseInt(this.form_data.num_dine) < 0) return;

View File

@@ -39,7 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn-btm"> <view style="z-index: 999" class="btn-btm">
<view @tap="btnOk" :class="['button', { 'btn-act': !buttonBr }]" <view @tap="btnOk" :class="['button', { 'btn-act': !buttonBr }]"
>確認/{{ $t("确认") }}</view >確認/{{ $t("确认") }}</view
> >

View File

@@ -313,6 +313,12 @@ export default {
uni.redirectTo({ uni.redirectTo({
url, url,
}); });
} else {
uni.showToast({
title: res.data.msg,
duration: 1500,
icon: "none",
});
} }
}, },
// 通用方法 // 通用方法

View File

@@ -26,3 +26,12 @@ export function getWriteOffInfo(data) {
data, data,
}); });
} }
// 提交核销
export const verification = (params) => {
return myRequest({
method: "post",
url: `/write-off/machine-submit`,
data: params,
});
};