Skip to content

Commit

Permalink
fix: 修复已知问题
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Dec 25, 2023
1 parent c8b96a8 commit 865dc61
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 31 deletions.
10 changes: 1 addition & 9 deletions resources/assets/js/pages/manage/components/DialogWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
</div>

<!--跳转提示-->
<div v-if="positionStatus && positionMsg" class="dialog-position" :class="{'down': tagShow}">
<div v-if="listPreparedStatus && positionMsg" class="dialog-position" :class="{'down': tagShow}">
<div class="position-label" @click="onPositionMark">
<Icon v-if="positionLoad > 0" type="ios-loading" class="icon-loading"></Icon>
<i v-else class="taskfont">&#xe624;</i>
Expand Down Expand Up @@ -733,7 +733,6 @@ export default {
positionLoad: 0, // 定位跳转加载中
firstMsgLength: 0, // 首次加载消息数量
isFirstShowTag: false, // 是否首次显示标签
positionStatus: false, // 定位跳转状态
msgPreparedStatus: false, // 消息准备完成
listPreparedStatus: false, // 消息准备完成
selectedTextStatus: false, // 是否选择文本
Expand Down Expand Up @@ -1091,7 +1090,6 @@ export default {
this.searchShow = false
this.unreadMsgId = 0
this.firstMsgLength = this.allMsgList.length || 1
this.positionStatus = false
this.listPreparedStatus = false
this.scrollToBottomAndRefresh = false
//
Expand Down Expand Up @@ -1341,12 +1339,6 @@ export default {
}
}
},
readEnabled(val) {
if (!this.positionStatus && val) {
this.positionStatus = true
}
},
},
methods: {
Expand Down
32 changes: 15 additions & 17 deletions resources/assets/js/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2767,23 +2767,12 @@ export default {
dispatch("saveDialogMsg", msg)
});
} else if ($A.isJson(data)) {
let delay = false
if (typeof data.__delay__ !== "undefined") {
delete data.__delay__
delay = true
}
const index = state.dialogMsgs.findIndex(({id}) => id == data.id);
data = Object.assign({}, state.dialogMsgs[index], data)
if (index > -1) {
state.dialogMsgs.splice(index, 1, data);
} else {
if (delay) {
setTimeout(_ => {
state.dialogMsgs.push(data);
}, 100)
} else {
state.dialogMsgs.push(data);
}
state.dialogMsgs.push(data);
}
$A.IDBSave("dialogMsgs", state.dialogMsgs, 600)
//
Expand Down Expand Up @@ -3317,16 +3306,25 @@ export default {
Store.set('dialogMsgPush', data);
}
}
// 更新消息列表
dispatch("saveDialogMsg", Object.assign(data, {__delay__: true}))
// 更新最后消息
dispatch("updateDialogLastMsg", data);
const saveMsg = (data, count) => {
if (count > 5 || state.dialogMsgs.find(({id}) => id == data.id)) {
// 更新消息列表
dispatch("saveDialogMsg", data)
// 更新最后消息
dispatch("updateDialogLastMsg", data);
return;
}
setTimeout(_ => {
saveMsg(data, ++count)
}, 20);
}
saveMsg(data, 0);
break;
case 'update':
case 'readed':
const updateMsg = (data, count) => {
if (state.dialogMsgs.find(({id}) => id == data.id)) {
dispatch("saveDialogMsg", Object.assign(data, {__delay__: true}))
dispatch("saveDialogMsg", data)
// 更新待办
if (typeof data.todo !== "undefined") {
dispatch("getDialogTodo", dialog_id)
Expand Down
4 changes: 0 additions & 4 deletions resources/assets/sass/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,6 @@ body.dark-mode-reverse {
color: #333;
}
}

.mention {
color: #333;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sass/pages/components/dialog-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@
opacity: 0;
transform: translateX(100%);
animation: position-in-animation 200ms ease-out forwards;
animation-delay: 300ms;
animation-delay: 600ms;

.position-label {
display: flex;
Expand Down

0 comments on commit 865dc61

Please sign in to comment.