|
|
@ -2,12 +2,13 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-06-07 15:41:05
|
|
|
|
* @Date: 2022-06-07 15:41:05
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-09 10:25:49
|
|
|
|
* @LastEditTime: 2022-06-13 14:03:18
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
import * as api from '@/api/chat';
|
|
|
|
import * as api from '@/api/chat';
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
const state = {
|
|
|
|
const state = {
|
|
|
|
|
|
|
|
curCustomerService: {},
|
|
|
|
sessionData: [],
|
|
|
|
sessionData: [],
|
|
|
|
customerServiceList: [],
|
|
|
|
customerServiceList: [],
|
|
|
|
messageType: { 1: 'text', 2: 'audio', 3: 'image', 4: 'video', 5: 'revoke', 6: 'custom', 7: 'notify' },
|
|
|
|
messageType: { 1: 'text', 2: 'audio', 3: 'image', 4: 'video', 5: 'revoke', 6: 'custom', 7: 'notify' },
|
|
|
@ -105,6 +106,9 @@ const getters = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const mutations = {
|
|
|
|
const mutations = {
|
|
|
|
|
|
|
|
SET_CUR_SERVICE(state, data) {
|
|
|
|
|
|
|
|
state.curCustomerService = data;
|
|
|
|
|
|
|
|
},
|
|
|
|
SET_SESSION_DATA(state, data) {
|
|
|
|
SET_SESSION_DATA(state, data) {
|
|
|
|
state.sessionData = data;
|
|
|
|
state.sessionData = data;
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -113,6 +117,12 @@ const mutations = {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const actions = {
|
|
|
|
const actions = {
|
|
|
|
|
|
|
|
queryCurCustomerService: ({ commit }) => {
|
|
|
|
|
|
|
|
api.getCustomerService().then((res) => {
|
|
|
|
|
|
|
|
commit('SET_CUR_SERVICE', res);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询可转移客服列表
|
|
|
|
* 查询可转移客服列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -127,7 +137,7 @@ const actions = {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 提交转移会话
|
|
|
|
* 提交转移会话
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
submitTransferSession: ({ dispatch }, data) => {
|
|
|
|
submitTransferSession: ({}, data) => {
|
|
|
|
api.transferCustomerService({
|
|
|
|
api.transferCustomerService({
|
|
|
|
storeId: 1,
|
|
|
|
storeId: 1,
|
|
|
|
...data,
|
|
|
|
...data,
|
|
|
|