|
|
|
@ -2,12 +2,13 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-06-07 15:41:05
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-09 10:25:49
|
|
|
|
|
* @LastEditTime: 2022-06-13 14:03:18
|
|
|
|
|
* @Description: file content
|
|
|
|
|
*/
|
|
|
|
|
import * as api from '@/api/chat';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
const state = {
|
|
|
|
|
curCustomerService: {},
|
|
|
|
|
sessionData: [],
|
|
|
|
|
customerServiceList: [],
|
|
|
|
|
messageType: { 1: 'text', 2: 'audio', 3: 'image', 4: 'video', 5: 'revoke', 6: 'custom', 7: 'notify' },
|
|
|
|
@ -105,6 +106,9 @@ const getters = {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
const mutations = {
|
|
|
|
|
SET_CUR_SERVICE(state, data) {
|
|
|
|
|
state.curCustomerService = data;
|
|
|
|
|
},
|
|
|
|
|
SET_SESSION_DATA(state, data) {
|
|
|
|
|
state.sessionData = data;
|
|
|
|
|
},
|
|
|
|
@ -113,6 +117,12 @@ const mutations = {
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
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({
|
|
|
|
|
storeId: 1,
|
|
|
|
|
...data,
|
|
|
|
|