选课跳转处理

This commit is contained in:
ywyonui 2025-07-02 23:25:47 +08:00
parent c245940f0f
commit 9f26117137
4 changed files with 45 additions and 14 deletions

View File

@ -94,10 +94,14 @@ const switchXs = (xs: any) => {
} }
// bar // bar
if (props.isBar && getUser.xsList.length > 1 if (props.isBar
//&& (getCurXs === null || !getCurXs.id) //&& (getCurXs === null || !getCurXs.id)
) { ) {
if (getUser.xsList.length > 1 ) {
showPicker(); showPicker();
} else {
switchXs(getUser.xsList[0]);
}
} }
</script> </script>

View File

@ -89,11 +89,25 @@ const submit = async () => {
const res = await jzXkQkjApi(params); const res = await jzXkQkjApi(params);
uni.hideLoading(); uni.hideLoading();
if (res.resultCode === 1) { if (res.resultCode === 1) {
// selectedXkkcIds.value = [];
uni.setStorageSync("selectedXkkcIds", []);
res.result.backUrl = "/pages/base/course-selection/club-selection";
setData(res.result); setData(res.result);
uni.reLaunch({ xsFlag.value = true;
setTimeout(() => {
xsFlag.value = false;
}, 1000);
if (curXk.value.sfjf === 1) {
//
uni.navigateTo({
url: "/pages/base/course-selection/payment", url: "/pages/base/course-selection/payment",
}); });
} else {
//
uni.navigateTo({
url: "/pages/base/course-selection/payment-success",
});
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

View File

@ -91,11 +91,24 @@ const submit = async () => {
const res = await jzXkQkjApi(params); const res = await jzXkQkjApi(params);
uni.hideLoading(); uni.hideLoading();
if (res.resultCode === 1) { if (res.resultCode === 1) {
// selectedXkkcIds.value = [];
uni.setStorageSync("selectedXkkcIds", []);
res.result.backUrl = "/pages/base/course-selection/index";
setData(res.result); setData(res.result);
uni.reLaunch({ setTimeout(() => {
xsFlag.value = false;
}, 1000);
if (curXk.value.sfjf === 1) {
//
uni.navigateTo({
url: "/pages/base/course-selection/payment", url: "/pages/base/course-selection/payment",
}); });
} else {
//
uni.navigateTo({
url: "/pages/base/course-selection/payment-success",
});
}
} else { } else {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

View File

@ -89,7 +89,9 @@ const totalJe = computed(() => {
// //
const goBack = () => { const goBack = () => {
uni.navigateBack(); uni.reLaunch({
url: getData.backUrl
});
}; };
// //
@ -107,9 +109,7 @@ const cancelRegistration = () => {
title: "已取消报名", title: "已取消报名",
icon: "success", icon: "success",
}); });
setTimeout(() => {
goBack(); goBack();
}, 1500);
} }
}, },
}); });