选课跳转处理
This commit is contained in:
parent
c245940f0f
commit
9f26117137
@ -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)
|
||||||
) {
|
) {
|
||||||
showPicker();
|
if (getUser.xsList.length > 1 ) {
|
||||||
|
showPicker();
|
||||||
|
} else {
|
||||||
|
switchXs(getUser.xsList[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
url: "/pages/base/course-selection/payment",
|
setTimeout(() => {
|
||||||
});
|
xsFlag.value = false;
|
||||||
|
}, 1000);
|
||||||
|
if (curXk.value.sfjf === 1) {
|
||||||
|
// 跳转到支付页面
|
||||||
|
uni.navigateTo({
|
||||||
|
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,
|
||||||
|
|||||||
@ -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(() => {
|
||||||
url: "/pages/base/course-selection/payment",
|
xsFlag.value = false;
|
||||||
});
|
}, 1000);
|
||||||
|
if (curXk.value.sfjf === 1) {
|
||||||
|
// 跳转到支付页面
|
||||||
|
uni.navigateTo({
|
||||||
|
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,
|
||||||
|
|||||||
@ -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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user