mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-19 14:18:10 +00:00
优化回复消息
This commit is contained in:
parent
3728b1d3a0
commit
3cc6a3317e
@ -222,6 +222,36 @@ class DialogController extends AbstractController
|
|||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {get} api/dialog/msg/one 05. 获取单个消息
|
||||||
|
*
|
||||||
|
* @apiDescription 主要用于获取回复消息的详情,需要token身份
|
||||||
|
* @apiVersion 1.0.0
|
||||||
|
* @apiGroup dialog
|
||||||
|
* @apiName msg__one
|
||||||
|
*
|
||||||
|
* @apiParam {Number} msg_id 消息ID
|
||||||
|
*
|
||||||
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
|
* @apiSuccess {Object} data 返回数据
|
||||||
|
*/
|
||||||
|
public function msg__one()
|
||||||
|
{
|
||||||
|
User::auth();
|
||||||
|
//
|
||||||
|
$msg_id = intval(Request::input('msg_id'));
|
||||||
|
//
|
||||||
|
$dialogMsg = WebSocketDialogMsg::find($msg_id);
|
||||||
|
if (empty($dialogMsg)) {
|
||||||
|
return Base::retError('消息不存在或已被删除');
|
||||||
|
}
|
||||||
|
//
|
||||||
|
WebSocketDialog::checkDialog($dialogMsg->dialog_id);
|
||||||
|
//
|
||||||
|
return Base::retSuccess('success', $dialogMsg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} api/dialog/msg/unread 06. 获取未读消息数量
|
* @api {get} api/dialog/msg/unread 06. 获取未读消息数量
|
||||||
*
|
*
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
<div class="chat-input-box" :class="boxClass" v-clickoutside="hidePopover">
|
<div class="chat-input-box" :class="boxClass" v-clickoutside="hidePopover">
|
||||||
<div class="chat-input-wrapper" @click.stop="focus">
|
<div class="chat-input-wrapper" @click.stop="focus">
|
||||||
<!-- 回复 -->
|
<!-- 回复 -->
|
||||||
<div v-if="replyItem.id" class="chat-reply">
|
<div v-if="replyData" class="chat-reply">
|
||||||
<UserAvatar :userid="replyItem.userid" :show-icon="false" :show-name="true" :tooltip-disabled="true"/>
|
<UserAvatar :userid="replyData.userid" :show-icon="false" :show-name="true" :tooltip-disabled="true"/>
|
||||||
<div class="reply-desc">{{formatMsgDesc(replyItem)}}</div>
|
<div class="reply-desc">{{formatMsgDesc(replyData)}}</div>
|
||||||
<i class="taskfont" @click.stop="onCancelReply"></i>
|
<i class="taskfont" @click.stop="onCancelReply"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -186,9 +186,9 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: "top"
|
default: "top"
|
||||||
},
|
},
|
||||||
replyItem: {
|
replyId: {
|
||||||
type: Object,
|
type: Number,
|
||||||
default: () => ({})
|
default: 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -277,7 +277,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic']),
|
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic', 'dialogMsgs', 'dialogReplys']),
|
||||||
|
|
||||||
isEnterSend() {
|
isEnterSend() {
|
||||||
if (typeof this.enterSend === "boolean") {
|
if (typeof this.enterSend === "boolean") {
|
||||||
@ -346,6 +346,22 @@ export default {
|
|||||||
if (minute < 10) minute = `0${minute}`
|
if (minute < 10) minute = `0${minute}`
|
||||||
if (seconds < 10) seconds = `0${seconds}`
|
if (seconds < 10) seconds = `0${seconds}`
|
||||||
return `${minute}:${seconds}″${millisecond}`
|
return `${minute}:${seconds}″${millisecond}`
|
||||||
|
},
|
||||||
|
|
||||||
|
replyData() {
|
||||||
|
const {replyId} = this;
|
||||||
|
if (replyId > 0) {
|
||||||
|
let data = this.dialogMsgs.find(item => item.id === replyId)
|
||||||
|
if (data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
data = this.dialogReplys.find(item => item.id === replyId)
|
||||||
|
if (data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
this.$store.dispatch("getDialogReply", replyId)
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ export default {
|
|||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
replyId: {
|
replyId: {
|
||||||
type: [Number, String],
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
maxSize: {
|
maxSize: {
|
||||||
|
|||||||
@ -172,7 +172,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['dialogMsgs', 'audioPlaying', 'windowActive']),
|
...mapState(['dialogMsgs', 'dialogReplys', 'audioPlaying', 'windowActive']),
|
||||||
|
|
||||||
viewClass() {
|
viewClass() {
|
||||||
const {msgData, replyData, operateAction, operateEnter} = this;
|
const {msgData, replyData, operateAction, operateEnter} = this;
|
||||||
@ -234,7 +234,15 @@ export default {
|
|||||||
replyData() {
|
replyData() {
|
||||||
const {reply_id} = this.msgData;
|
const {reply_id} = this.msgData;
|
||||||
if (reply_id > 0) {
|
if (reply_id > 0) {
|
||||||
return this.dialogMsgs.find(item => item.id === reply_id) || null;
|
let data = this.dialogMsgs.find(item => item.id === reply_id)
|
||||||
|
if (data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
data = this.dialogReplys.find(item => item.id === reply_id)
|
||||||
|
if (data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
this.$store.dispatch("getDialogReply", reply_id)
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@
|
|||||||
ref="chatUpload"
|
ref="chatUpload"
|
||||||
class="chat-upload"
|
class="chat-upload"
|
||||||
:dialog-id="dialogId"
|
:dialog-id="dialogId"
|
||||||
:reply-id="replyItem.id"
|
:reply-id="replyId"
|
||||||
@on-progress="chatFile('progress', $event)"
|
@on-progress="chatFile('progress', $event)"
|
||||||
@on-success="chatFile('success', $event)"
|
@on-success="chatFile('success', $event)"
|
||||||
@on-error="chatFile('error', $event)"/>
|
@on-error="chatFile('error', $event)"/>
|
||||||
@ -108,7 +108,7 @@
|
|||||||
ref="input"
|
ref="input"
|
||||||
v-model="msgText"
|
v-model="msgText"
|
||||||
:dialog-id="dialogId"
|
:dialog-id="dialogId"
|
||||||
:reply-item="replyItem"
|
:reply-id="replyId"
|
||||||
:emoji-bottom="windowSmall"
|
:emoji-bottom="windowSmall"
|
||||||
:maxlength="200000"
|
:maxlength="200000"
|
||||||
@on-focus="onEventFocus"
|
@on-focus="onEventFocus"
|
||||||
@ -325,7 +325,7 @@ export default {
|
|||||||
recordState: '',
|
recordState: '',
|
||||||
wrapperStart: 0,
|
wrapperStart: 0,
|
||||||
|
|
||||||
replyItem: {},
|
replyId: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -539,7 +539,7 @@ export default {
|
|||||||
let tempMsg = {
|
let tempMsg = {
|
||||||
id: tempId,
|
id: tempId,
|
||||||
dialog_id: this.dialogData.id,
|
dialog_id: this.dialogData.id,
|
||||||
reply_id: this.replyItem.id,
|
reply_id: this.replyId,
|
||||||
type: 'text',
|
type: 'text',
|
||||||
userid: this.userId,
|
userid: this.userId,
|
||||||
msg: {
|
msg: {
|
||||||
@ -556,7 +556,7 @@ export default {
|
|||||||
url: 'dialog/msg/sendtext',
|
url: 'dialog/msg/sendtext',
|
||||||
data: {
|
data: {
|
||||||
dialog_id: this.dialogId,
|
dialog_id: this.dialogId,
|
||||||
reply_id: this.replyItem.id,
|
reply_id: this.replyId,
|
||||||
text: msgText,
|
text: msgText,
|
||||||
},
|
},
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -581,7 +581,7 @@ export default {
|
|||||||
this.tempMsgs.push({
|
this.tempMsgs.push({
|
||||||
id: tempId,
|
id: tempId,
|
||||||
dialog_id: this.dialogData.id,
|
dialog_id: this.dialogData.id,
|
||||||
reply_id: this.replyItem.id,
|
reply_id: this.replyId,
|
||||||
type: 'loading',
|
type: 'loading',
|
||||||
userid: this.userId,
|
userid: this.userId,
|
||||||
msg,
|
msg,
|
||||||
@ -591,7 +591,7 @@ export default {
|
|||||||
url: 'dialog/msg/sendrecord',
|
url: 'dialog/msg/sendrecord',
|
||||||
data: Object.assign(msg, {
|
data: Object.assign(msg, {
|
||||||
dialog_id: this.dialogId,
|
dialog_id: this.dialogId,
|
||||||
reply_id: this.replyItem.id,
|
reply_id: this.replyId,
|
||||||
}),
|
}),
|
||||||
method: 'post'
|
method: 'post'
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
@ -707,7 +707,7 @@ export default {
|
|||||||
this.tempMsgs.push({
|
this.tempMsgs.push({
|
||||||
id: file.tempId,
|
id: file.tempId,
|
||||||
dialog_id: this.dialogData.id,
|
dialog_id: this.dialogData.id,
|
||||||
reply_id: this.replyItem.id,
|
reply_id: this.replyId,
|
||||||
type: 'loading',
|
type: 'loading',
|
||||||
userid: this.userId,
|
userid: this.userId,
|
||||||
msg: { },
|
msg: { },
|
||||||
@ -983,12 +983,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onReply() {
|
onReply() {
|
||||||
this.replyItem = this.operateItem;
|
this.replyId = this.operateItem.id;
|
||||||
this.inputFocus()
|
this.inputFocus()
|
||||||
},
|
},
|
||||||
|
|
||||||
onCancelReply() {
|
onCancelReply() {
|
||||||
this.replyItem = {};
|
this.replyId = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
onWithdraw() {
|
onWithdraw() {
|
||||||
|
|||||||
53
resources/assets/js/store/actions.js
vendored
53
resources/assets/js/store/actions.js
vendored
@ -403,7 +403,7 @@ export default {
|
|||||||
saveUserBasic({state}, data) {
|
saveUserBasic({state}, data) {
|
||||||
$A.execMainDispatch("saveUserBasic", data)
|
$A.execMainDispatch("saveUserBasic", data)
|
||||||
//
|
//
|
||||||
let index = state.cacheUserBasic.findIndex(({userid}) => userid == data.userid);
|
const index = state.cacheUserBasic.findIndex(({userid}) => userid == data.userid);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
data = Object.assign({}, state.cacheUserBasic[index], data)
|
data = Object.assign({}, state.cacheUserBasic[index], data)
|
||||||
state.cacheUserBasic.splice(index, 1, data);
|
state.cacheUserBasic.splice(index, 1, data);
|
||||||
@ -544,7 +544,7 @@ export default {
|
|||||||
});
|
});
|
||||||
} else if ($A.isJson(data)) {
|
} else if ($A.isJson(data)) {
|
||||||
let base = {_load: false, _edit: false};
|
let base = {_load: false, _edit: false};
|
||||||
let index = state.files.findIndex(({id}) => id == data.id);
|
const index = state.files.findIndex(({id}) => id == data.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.files.splice(index, 1, Object.assign(base, state.files[index], data));
|
state.files.splice(index, 1, Object.assign(base, state.files[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -646,7 +646,7 @@ export default {
|
|||||||
dispatch("saveColumn", data.project_column)
|
dispatch("saveColumn", data.project_column)
|
||||||
delete data.project_column;
|
delete data.project_column;
|
||||||
}
|
}
|
||||||
let index = state.cacheProjects.findIndex(({id}) => id == data.id);
|
const index = state.cacheProjects.findIndex(({id}) => id == data.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheProjects.splice(index, 1, Object.assign({}, state.cacheProjects[index], data));
|
state.cacheProjects.splice(index, 1, Object.assign({}, state.cacheProjects[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -684,7 +684,7 @@ export default {
|
|||||||
//
|
//
|
||||||
let ids = $A.isArray(project_id) ? project_id : [project_id];
|
let ids = $A.isArray(project_id) ? project_id : [project_id];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.cacheProjects.findIndex(project => project.id == id);
|
const index = state.cacheProjects.findIndex(project => project.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheProjects.splice(index, 1);
|
state.cacheProjects.splice(index, 1);
|
||||||
}
|
}
|
||||||
@ -874,7 +874,7 @@ export default {
|
|||||||
dispatch("saveColumn", column)
|
dispatch("saveColumn", column)
|
||||||
});
|
});
|
||||||
} else if ($A.isJson(data)) {
|
} else if ($A.isJson(data)) {
|
||||||
let index = state.cacheColumns.findIndex(({id}) => id == data.id);
|
const index = state.cacheColumns.findIndex(({id}) => id == data.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheColumns.splice(index, 1, Object.assign({}, state.cacheColumns[index], data));
|
state.cacheColumns.splice(index, 1, Object.assign({}, state.cacheColumns[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -898,7 +898,7 @@ export default {
|
|||||||
let ids = $A.isArray(column_id) ? column_id : [column_id];
|
let ids = $A.isArray(column_id) ? column_id : [column_id];
|
||||||
let project_ids = [];
|
let project_ids = [];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.cacheColumns.findIndex(column => column.id == id);
|
const index = state.cacheColumns.findIndex(column => column.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
project_ids.push(state.cacheColumns[index].project_id)
|
project_ids.push(state.cacheColumns[index].project_id)
|
||||||
dispatch('getProjectOne', state.cacheColumns[index].project_id).catch(() => {})
|
dispatch('getProjectOne', state.cacheColumns[index].project_id).catch(() => {})
|
||||||
@ -1026,7 +1026,7 @@ export default {
|
|||||||
delete data.update_marking;
|
delete data.update_marking;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
let index = state.cacheTasks.findIndex(({id}) => id == data.id);
|
const index = state.cacheTasks.findIndex(({id}) => id == data.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheTasks.splice(index, 1, Object.assign({}, state.cacheTasks[index], data));
|
state.cacheTasks.splice(index, 1, Object.assign({}, state.cacheTasks[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -1077,7 +1077,7 @@ export default {
|
|||||||
let parent_ids = [];
|
let parent_ids = [];
|
||||||
let project_ids = [];
|
let project_ids = [];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.cacheTasks.findIndex(task => task.id == id);
|
const index = state.cacheTasks.findIndex(task => task.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
if (state.cacheTasks[index].parent_id) {
|
if (state.cacheTasks[index].parent_id) {
|
||||||
parent_ids.push(state.cacheTasks[index].parent_id)
|
parent_ids.push(state.cacheTasks[index].parent_id)
|
||||||
@ -1448,7 +1448,7 @@ export default {
|
|||||||
dispatch("saveTaskContent", item)
|
dispatch("saveTaskContent", item)
|
||||||
});
|
});
|
||||||
} else if ($A.isJson(data)) {
|
} else if ($A.isJson(data)) {
|
||||||
let index = state.taskContents.findIndex(({task_id}) => task_id == data.task_id);
|
const index = state.taskContents.findIndex(({task_id}) => task_id == data.task_id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.taskContents.splice(index, 1, Object.assign({}, state.taskContents[index], data));
|
state.taskContents.splice(index, 1, Object.assign({}, state.taskContents[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -1474,7 +1474,7 @@ export default {
|
|||||||
},
|
},
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
result.data.forEach((data) => {
|
result.data.forEach((data) => {
|
||||||
let index = state.taskFiles.findIndex(({id}) => id == data.id)
|
const index = state.taskFiles.findIndex(({id}) => id == data.id)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.taskFiles.splice(index, 1, data)
|
state.taskFiles.splice(index, 1, data)
|
||||||
} else {
|
} else {
|
||||||
@ -1499,7 +1499,7 @@ export default {
|
|||||||
forgetTaskFile({state, dispatch}, file_id) {
|
forgetTaskFile({state, dispatch}, file_id) {
|
||||||
let ids = $A.isArray(file_id) ? file_id : [file_id];
|
let ids = $A.isArray(file_id) ? file_id : [file_id];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.taskFiles.findIndex(file => file.id == id)
|
const index = state.taskFiles.findIndex(file => file.id == id)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.taskFiles.splice(index, 1)
|
state.taskFiles.splice(index, 1)
|
||||||
}
|
}
|
||||||
@ -1789,7 +1789,7 @@ export default {
|
|||||||
let task = state.cacheTasks.find(({id}) => id == task_id)
|
let task = state.cacheTasks.find(({id}) => id == task_id)
|
||||||
let {data} = result
|
let {data} = result
|
||||||
data.turns.some(item => {
|
data.turns.some(item => {
|
||||||
let index = state.taskFlowItems.findIndex(({id}) => id == item.id);
|
const index = state.taskFlowItems.findIndex(({id}) => id == item.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.taskFlowItems.splice(index, 1, item);
|
state.taskFlowItems.splice(index, 1, item);
|
||||||
} else {
|
} else {
|
||||||
@ -1808,7 +1808,7 @@ export default {
|
|||||||
})
|
})
|
||||||
//
|
//
|
||||||
delete data.turns;
|
delete data.turns;
|
||||||
let index = state.taskFlows.findIndex(({task_id}) => task_id == data.task_id);
|
const index = state.taskFlows.findIndex(({task_id}) => task_id == data.task_id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.taskFlows.splice(index, 1, data);
|
state.taskFlows.splice(index, 1, data);
|
||||||
} else {
|
} else {
|
||||||
@ -1892,7 +1892,7 @@ export default {
|
|||||||
* @param task_id
|
* @param task_id
|
||||||
*/
|
*/
|
||||||
saveTaskBrowse({state}, task_id) {
|
saveTaskBrowse({state}, task_id) {
|
||||||
let index = state.cacheTaskBrowse.findIndex(({id}) => id == task_id)
|
const index = state.cacheTaskBrowse.findIndex(({id}) => id == task_id)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheTaskBrowse.splice(index, 1)
|
state.cacheTaskBrowse.splice(index, 1)
|
||||||
}
|
}
|
||||||
@ -2088,7 +2088,7 @@ export default {
|
|||||||
//
|
//
|
||||||
let ids = $A.isArray(dialog_id) ? dialog_id : [dialog_id];
|
let ids = $A.isArray(dialog_id) ? dialog_id : [dialog_id];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.cacheDialogs.findIndex(dialog => dialog.id == id);
|
const index = state.cacheDialogs.findIndex(dialog => dialog.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.cacheDialogs.splice(index, 1);
|
state.cacheDialogs.splice(index, 1);
|
||||||
}
|
}
|
||||||
@ -2152,7 +2152,7 @@ export default {
|
|||||||
dispatch("saveDialogMsg", msg)
|
dispatch("saveDialogMsg", msg)
|
||||||
});
|
});
|
||||||
} else if ($A.isJson(data)) {
|
} else if ($A.isJson(data)) {
|
||||||
let index = state.dialogMsgs.findIndex(({id}) => id == data.id);
|
const index = state.dialogMsgs.findIndex(({id}) => id == data.id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
state.dialogMsgs.splice(index, 1, Object.assign({}, state.dialogMsgs[index], data));
|
state.dialogMsgs.splice(index, 1, Object.assign({}, state.dialogMsgs[index], data));
|
||||||
} else {
|
} else {
|
||||||
@ -2171,7 +2171,7 @@ export default {
|
|||||||
//
|
//
|
||||||
let ids = $A.isArray(msg_id) ? msg_id : [msg_id];
|
let ids = $A.isArray(msg_id) ? msg_id : [msg_id];
|
||||||
ids.some(id => {
|
ids.some(id => {
|
||||||
let index = state.dialogMsgs.findIndex(item => item.id == id);
|
const index = state.dialogMsgs.findIndex(item => item.id == id);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
Store.set('audioSubscribe', id);
|
Store.set('audioSubscribe', id);
|
||||||
state.dialogMsgs.splice(index, 1);
|
state.dialogMsgs.splice(index, 1);
|
||||||
@ -2179,6 +2179,25 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取回复消息
|
||||||
|
* @param state
|
||||||
|
* @param dispatch
|
||||||
|
* @param msg_id
|
||||||
|
*/
|
||||||
|
getDialogReply({state, dispatch}, msg_id) {
|
||||||
|
dispatch("call", {
|
||||||
|
url: 'dialog/msg/one',
|
||||||
|
data: {
|
||||||
|
msg_id: msg_id,
|
||||||
|
},
|
||||||
|
}).then(({data}) => {
|
||||||
|
state.dialogReplys.push(data)
|
||||||
|
}).catch(e => {
|
||||||
|
console.warn(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取会话消息
|
* 获取会话消息
|
||||||
* @param state
|
* @param state
|
||||||
|
|||||||
1
resources/assets/js/store/state.js
vendored
1
resources/assets/js/store/state.js
vendored
@ -71,6 +71,7 @@ const stateData = {
|
|||||||
dialogId: 0,
|
dialogId: 0,
|
||||||
dialogIns: [],
|
dialogIns: [],
|
||||||
dialogMsgs: [],
|
dialogMsgs: [],
|
||||||
|
dialogReplys: [],
|
||||||
dialogInputCache: $A.getStorageArray("cacheDialogInput"),
|
dialogInputCache: $A.getStorageArray("cacheDialogInput"),
|
||||||
dialogMsgTransfer: {time: 0},
|
dialogMsgTransfer: {time: 0},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user