321
This commit is contained in:
@@ -63,10 +63,13 @@ function createService() {
|
||||
break
|
||||
case 401:
|
||||
err("登录状态已过期,需要重新登录")
|
||||
// 清楚本地localStorage
|
||||
// 清除本地localStorage
|
||||
tool.local.clear()
|
||||
// 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面
|
||||
if (error.response.data.data.code === 40001) {
|
||||
if (
|
||||
error.response.data.data.code === 40001 ||
|
||||
error.response.data.data.detail === "No active account found with the given credentials"
|
||||
) {
|
||||
} else {
|
||||
window.location.href = "/"
|
||||
}
|
||||
|
||||
@@ -613,22 +613,26 @@ const soDutColumn = ref([
|
||||
{
|
||||
title: "空行",
|
||||
dataIndex: "black_line",
|
||||
formType: "input"
|
||||
formType: "input-number",
|
||||
rules: [{ required: true, message: "空行数必填" }],
|
||||
},
|
||||
{
|
||||
title: "纯注释",
|
||||
dataIndex: "comment_line",
|
||||
formType: "input"
|
||||
formType: "input-number",
|
||||
rules: [{ required: true, message: "纯注释数必填" }],
|
||||
},
|
||||
{
|
||||
title: "混合行",
|
||||
dataIndex: "mix_line",
|
||||
formType: "input"
|
||||
formType: "input-number",
|
||||
rules: [{ required: true, message: "混合行必填" }],
|
||||
},
|
||||
{
|
||||
title: "纯代码",
|
||||
dataIndex: "code_line",
|
||||
formType: "input"
|
||||
formType: "input-number",
|
||||
rules: [{ required: true, message: "纯代码行必填" }],
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
@@ -61,8 +61,16 @@ function createService() {
|
||||
break
|
||||
case 401:
|
||||
err("登录状态已过期,需要重新登录")
|
||||
// 清楚本地localStorage
|
||||
tool.local.clear()
|
||||
window.location.href = "/login"
|
||||
// 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面
|
||||
if (
|
||||
error.response.data.data.code === 40001 ||
|
||||
error.response.data.data.detail === "No active account found with the given credentials"
|
||||
) {
|
||||
} else {
|
||||
window.location.href = "/"
|
||||
}
|
||||
break
|
||||
case 403:
|
||||
err("没有权限访问该资源")
|
||||
|
||||
@@ -176,28 +176,32 @@ const crudColumns = ref([
|
||||
hide: true,
|
||||
align: "center",
|
||||
dataIndex: "black_line",
|
||||
formType: "input-number"
|
||||
formType: "input-number",
|
||||
commonRules: [{ required: true, message: "空行数必填" }],
|
||||
},
|
||||
{
|
||||
title: "纯代码行",
|
||||
hide: true,
|
||||
align: "center",
|
||||
dataIndex: "code_line",
|
||||
formType: "input-number"
|
||||
formType: "input-number",
|
||||
commonRules: [{ required: true, message: "纯代码行数必填" }],
|
||||
},
|
||||
{
|
||||
title: "纯注释行",
|
||||
hide: true,
|
||||
align: "center",
|
||||
dataIndex: "comment_line",
|
||||
formType: "input-number"
|
||||
formType: "input-number",
|
||||
commonRules: [{ required: true, message: "纯注释行数必填" }],
|
||||
},
|
||||
{
|
||||
title: "混合行",
|
||||
hide: true,
|
||||
align: "center",
|
||||
dataIndex: "mix_line",
|
||||
formType: "input-number"
|
||||
formType: "input-number",
|
||||
commonRules: [{ required: true, message: "混合行数必填" }],
|
||||
},
|
||||
{
|
||||
title: "注释率 %",
|
||||
|
||||
Reference in New Issue
Block a user