支付返回问题修复
This commit is contained in:
@@ -130,10 +130,14 @@ import * as areaApi from "@/http/api/area.js";
|
|||||||
import yskUtils from "ysk-utils";
|
import yskUtils from "ysk-utils";
|
||||||
import go from "@/commons/utils/go.js";
|
import go from "@/commons/utils/go.js";
|
||||||
|
|
||||||
import { reactive, ref, provide, computed } from "vue";
|
import { reactive, ref, provide, computed,inject } from "vue";
|
||||||
|
const websocketUtil=inject("websocketUtil")
|
||||||
|
|
||||||
const cartStore = useCartStore();
|
const cartStore = useCartStore();
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
|
websocketUtil.onMessage((data) => {
|
||||||
|
cartStore.onMessage(data);
|
||||||
|
});
|
||||||
const modalData = reactive({
|
const modalData = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
key: "",
|
key: "",
|
||||||
@@ -233,7 +237,7 @@ function toPay() {
|
|||||||
isNowPay: true,
|
isNowPay: true,
|
||||||
dinnerType: cartStore.currentDinnerType,
|
dinnerType: cartStore.currentDinnerType,
|
||||||
personCount: cartStore.personCount,
|
personCount: cartStore.personCount,
|
||||||
},'redirect');
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const areaList = ref([]);
|
const areaList = ref([]);
|
||||||
|
|||||||
@@ -1228,7 +1228,9 @@ async function pay(par) {
|
|||||||
}
|
}
|
||||||
if (error.code == 701) {
|
if (error.code == 701) {
|
||||||
uni.removeStorageSync("table_code");
|
uni.removeStorageSync("table_code");
|
||||||
uni.navigateBack();
|
uni.navigateBack({
|
||||||
|
delta: 2,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
payStatus = "";
|
payStatus = "";
|
||||||
return false;
|
return false;
|
||||||
@@ -1254,7 +1256,7 @@ function paySuccess() {
|
|||||||
uni.$emit("get:table");
|
uni.$emit("get:table");
|
||||||
uni.$emit("update:orderDetail");
|
uni.$emit("update:orderDetail");
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1,
|
delta: 2,
|
||||||
});
|
});
|
||||||
websocketUtil.send(
|
websocketUtil.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|||||||
Reference in New Issue
Block a user