调整抢课的跳转
This commit is contained in:
parent
ea059d2a80
commit
7e104cfbbb
@ -97,3 +97,12 @@ export const xkqddeleteApi = async (params: any) => {
|
|||||||
export const xkkclxFindAllApi = async () => {
|
export const xkkclxFindAllApi = async () => {
|
||||||
return await get("/api/xkkclx/findByXkkclx");
|
return await get("/api/xkkclx/findByXkkclx");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取课程详情
|
||||||
|
* @param params
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const getXkkcDetailByIdApi = async (id: string) => {
|
||||||
|
return await get("/api/xkkc/getXkkcDetailById?id=" + id);
|
||||||
|
};
|
||||||
@ -181,6 +181,7 @@ const submit = debounce(async () => {
|
|||||||
title: error.message || "报名失败",
|
title: error.message || "报名失败",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
|
PageUtils.toHome(xklxId.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { jsFindByIdApi } from "@/api/base/jsApi";
|
import { jsFindByIdApi } from "@/api/base/jsApi";
|
||||||
import { xkkclxFindAllApi } from "@/api/base/xkApi";
|
import { xkkclxFindAllApi, getXkkcDetailByIdApi } from "@/api/base/xkApi";
|
||||||
|
|
||||||
interface CommonState {
|
interface CommonState {
|
||||||
data: any;
|
data: any;
|
||||||
@ -35,6 +35,14 @@ export const useCommonStore = defineStore({
|
|||||||
}
|
}
|
||||||
return Promise.resolve(this.data.xkkcLx);
|
return Promise.resolve(this.data.xkkcLx);
|
||||||
},
|
},
|
||||||
|
async getXkkcDetailByIdApi(id: string) : Promise<any> {
|
||||||
|
if (!this.data.xkkc || !this.data.xkkc[id]) {
|
||||||
|
this.data.xkkc = this.data.xkkc || {};
|
||||||
|
const res = await getXkkcDetailByIdApi(id);
|
||||||
|
console.log(res);
|
||||||
|
}
|
||||||
|
return Promise.resolve(this.data.xkkc[id]);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
persist: {
|
persist: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user