|
@@ -1539,6 +1539,13 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
data.loading = false;
|
|
|
+ // 重新登录
|
|
|
+ if (res.code === 5000) {
|
|
|
+ window.location.href = `${
|
|
|
+ /(192|localhost)/.test(location.origin) ? "https://test.lexiaoya.cn" : location.origin
|
|
|
+ }/classroom`;
|
|
|
+ return;
|
|
|
+ }
|
|
|
return res;
|
|
|
};
|
|
|
const setSaveLoading = (tips: boolean) => {
|
|
@@ -1558,7 +1565,7 @@ export default defineComponent({
|
|
|
console.log("🚀 ~ pngUrl:", pngUrl);
|
|
|
try {
|
|
|
if (query.id) {
|
|
|
- await api_musicSheetCreationUpdate({
|
|
|
+ const res = await api_musicSheetCreationUpdate({
|
|
|
name: data.musicName || "未命名乐谱",
|
|
|
creator: data.creator || "未命名乐谱",
|
|
|
creationConfig: renderMeasures(abcData.abc, {
|
|
@@ -1572,6 +1579,13 @@ export default defineComponent({
|
|
|
filePath: wavUrl,
|
|
|
coverImg: pngUrl,
|
|
|
});
|
|
|
+ // 重新登录
|
|
|
+ if (res.code === 5000) {
|
|
|
+ window.location.href = `${
|
|
|
+ /(192|localhost)/.test(location.origin) ? "https://test.lexiaoya.cn" : location.origin
|
|
|
+ }/classroom`;
|
|
|
+ return;
|
|
|
+ }
|
|
|
} else {
|
|
|
const res = await api_musicSheetCreationSave({
|
|
|
name: data.musicName || "未命名乐谱",
|
|
@@ -1597,6 +1611,13 @@ export default defineComponent({
|
|
|
}
|
|
|
location.hash = hash[0] + "?" + qs.stringify(qs_data);
|
|
|
}
|
|
|
+ // 重新登录
|
|
|
+ if (res.code === 5000) {
|
|
|
+ window.location.href = `${
|
|
|
+ /(192|localhost)/.test(location.origin) ? "https://test.lexiaoya.cn" : location.origin
|
|
|
+ }/classroom`;
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
@@ -1957,6 +1978,13 @@ export default defineComponent({
|
|
|
message.info("已是最新版本");
|
|
|
}
|
|
|
}
|
|
|
+ // 重新登录
|
|
|
+ if (res.code === 5000) {
|
|
|
+ window.location.href = `${
|
|
|
+ /(192|localhost)/.test(location.origin) ? "https://test.lexiaoya.cn" : location.origin
|
|
|
+ }/classroom`;
|
|
|
+ return;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
return () => (
|