no message

This commit is contained in:
kuaifan 2022-12-07 19:51:13 +08:00
parent 4ef5deac69
commit 42031982a3
5 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ export default {
audio.controls = false; audio.controls = false;
audio.loop = false; audio.loop = false;
audio.volume = 1; audio.volume = 1;
if (/\d+/.test(msg)) { if (/^\d+$/.test(msg)) {
msg = msg == this.audioId msg = msg == this.audioId
} }
if (typeof msg === "boolean") { if (typeof msg === "boolean") {

View File

@ -180,7 +180,7 @@ export default {
onAdd(data) { onAdd(data) {
data = $A.isJson(data) ? data : {}; data = $A.isJson(data) ? data : {};
// //
if (/\d+/.test(data.dialog_id)) { if (/^\d+$/.test(data.dialog_id)) {
this.loadIng++; this.loadIng++;
this.$store.dispatch("call", { this.$store.dispatch("call", {
url: 'dialog/user', url: 'dialog/user',

View File

@ -184,7 +184,7 @@ export default {
let userids = $A.isArray(record.userid) ? record.userid : [record.userid] let userids = $A.isArray(record.userid) ? record.userid : [record.userid]
let userNode = []; let userNode = [];
userids.some(userid => { userids.some(userid => {
if (/\d+/.test(userid)) { if (/^\d+$/.test(userid)) {
userNode.push(h('UserAvatar', { userNode.push(h('UserAvatar', {
props: { props: {
size: 18, size: 18,

View File

@ -1433,7 +1433,7 @@ export default {
onBack() { onBack() {
const {name, params} = this.$store.state.routeHistoryLast; const {name, params} = this.$store.state.routeHistoryLast;
if (name === this.$route.name && /\d+/.test(params.projectId)) { if (name === this.$route.name && /^\d+$/.test(params.projectId)) {
this.goForward({name: this.$route.name, params: {projectId: 'all'}}); this.goForward({name: this.$route.name, params: {projectId: 'all'}});
} else { } else {
this.goBack(); this.goBack();

View File

@ -2225,7 +2225,7 @@ export default {
return return
} }
// 关闭会话后只保留会话最后50条数据 // 关闭会话后只保留会话最后50条数据
const retain = 5 const retain = 50
const msgs = state.dialogMsgs.filter(item => item.dialog_id == dialog_id) const msgs = state.dialogMsgs.filter(item => item.dialog_id == dialog_id)
if (msgs.length > retain) { if (msgs.length > retain) {
const delIds = msgs.sort((a, b) => { const delIds = msgs.sort((a, b) => {