fix: bug修复

This commit is contained in:
kaizheng(郑凯) 2025-02-28 14:38:28 +08:00
parent ef5d8cc4ed
commit be96abbeda
4 changed files with 44 additions and 38 deletions

View File

@ -72,13 +72,7 @@ module.exports = {
}
],
"handle-callback-err": [2, "^(err|error)$"],
indent: [
2,
2,
{
SwitchCase: 1
}
],
indent: off,
"jsx-quotes": [2, "prefer-single"],
"key-spacing": [
2,
@ -270,6 +264,18 @@ module.exports = {
objectsInObjects: false
}
],
"array-bracket-spacing": [2, "never"]
"array-bracket-spacing": [2, "never"],
"vue/html-self-closing": [
"error",
{
html: {
void: "always",
normal: "never",
component: "always"
},
svg: "always",
math: "always"
}
]
}
};

View File

@ -58,7 +58,7 @@ service.interceptors.response.use(
setTimeout(() => {
Message.closeAll();
Message({
message: res.message,
message: `${res.message}-${res.requestId}`,
duration: 2000,
type: "error"
});

View File

@ -232,12 +232,12 @@ export default {
showClose: false,
type: "success"
});
item.status = item.status === 1 ? 2 : 1;
this.$emit("modifyStateCallback", {
msgId: item.id,
status: item.status,
modifyType: 1
});
// item.status = item.status === 1 ? 2 : 1;
// this.$emit("modifyStateCallback", {
// msgId: item.id,
// status: item.status,
// modifyType: 1
// });
}
}
}

View File

@ -13,7 +13,7 @@
>
<li v-for="(item, index) in list" :key="index">
<div class="new-header">
<img :src="defaultAvatar.student">
<img :src="defaultAvatar.student" />
<div class="news-info">
<div class="news-info-top">
<div class="news-user">
@ -21,9 +21,13 @@
<label
v-if="[1, 3].includes(item.userType)"
:class="[item.userType === 1 ? 'blue' : 'orange']"
>{{ item.userType === 1 ? "老师" : "助教" }}</label>
>{{ item.userType === 1 ? "老师" : "助教" }}</label
>
<div v-if="item.userType !== 2">
<span><i v-if="item.readCount">{{ item.readCount }}</i><i v-if="item.totalCount">{{ item.totalCount }}</i></span>
<span
><i v-if="item.readCount">{{ item.readCount }}</i
><i v-if="item.totalCount">{{ item.totalCount }}</i></span
>
<span>已读</span>
</div>
</div>
@ -32,21 +36,17 @@
</div>
<div class="news-opt">
<div class="flex">
<el-link
type="success"
@click="setReplyMsg(item)"
>引用</el-link>
<el-link
v-if="item.userType === 2 && item.status === 1"
type="success"
@click="updateMessageStatus(item)"
>通过审核</el-link>
<el-link type="success" @click="setReplyMsg(item)"
>引用</el-link
>
<el-link type="success" @click="updateMessageStatus(item)">{{
item.status !== 2 ? "公开" : "取消公开"
}}</el-link>
</div>
<div class="flex">
<el-link
type="success"
@click="toPrivateChat(item)"
>私聊</el-link>
<el-link type="success" @click="toPrivateChat(item)"
>私聊</el-link
>
<el-link type="success" @click="prohibition(item)">{{
item.isForbidden === 1 ? "取消禁言" : "禁言"
@ -56,7 +56,7 @@
</div>
<div class="new-content">
<p v-if="item.contentType === 1">{{ item.content }}</p>
<img v-else :src="item.content" alt="">
<img v-else :src="item.content" alt="" />
</div>
</li>
</ul>
@ -244,12 +244,12 @@ export default {
showClose: false,
type: "success"
});
item.status = item.status === 1 ? 2 : 1;
this.modifyStateCallback({
msgId: item.id,
status: item.status,
modifyType: 1
});
// item.status = item.status === 1 ? 2 : 1;
// this.modifyStateCallback({
// msgId: item.id,
// status: item.status,
// modifyType: 1
// });
}
},
modifyStateCallback(item) {