zhangchong 1 рік тому
батько
коміт
c0c48f3687

+ 8 - 8
.env.development

@@ -25,15 +25,15 @@ VITE_AMAP_SECURITYJSCODE=dd12ddafb11921dbcdc5b9c4484bb4e2
 # #高德地图KEY
 VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
 
-# # 维尔信websocket地址
-VITE_WEX_SOCKET_URL=ws://222.212.82.225:1003
+# # 呼叫中心socket地址
+VITE_CALLCENTER_SOCKET_URL=internal.ttf-cti.com:8080
 
-# # 维尔信请求地址
-VITE_WEX_API_URL=http://222.212.82.225:8083
+# # 呼叫中心请求地址
+VITE_CALLCENTER_API_URL=http://internal.ttf-cti.com:8080
 
-# # 维尔信默认账号
-VITE_WEX_DEFAULT_ACCOUNT=admin
+# # 呼叫中心默认账号
+VITE_CALLCENTER_DEFAULT_ACCOUNT=yscs
 
-# # 维尔信默认密码
-VITE_WEX_DEFAULT_PASSWORD=Wex@12345
+# # 呼叫中心默认密码
+VITE_CALLCENTER_DEFAULT_PASSWORD=123456
 

+ 8 - 8
.env.production

@@ -25,14 +25,14 @@ VITE_AMAP_SECURITYJSCODE=dd12ddafb11921dbcdc5b9c4484bb4e2
 # #高德地图KEY
 VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
 
-# # 维尔信websocket地址
-VITE_WEX_SOCKET_URL=ws://222.212.82.225:1003
+# # 呼叫中心socket地址
+VITE_CALLCENTER_SOCKET_URL=internal.ttf-cti.com:8080
 
-# # 维尔信请求地址
-VITE_WEX_API_URL=http://222.212.82.225:8083
+# # 呼叫中心请求地址
+VITE_CALLCENTER_API_URL=http://internal.ttf-cti.com:8080
 
-# # 维尔信默认账号
-VITE_WEX_DEFAULT_ACCOUNT=admin
+# # 呼叫中心默认账号
+VITE_CALLCENTER_DEFAULT_ACCOUNT=yscs
 
-# # 维尔信默认密码
-VITE_WEX_DEFAULT_PASSWORD=Wex@12345
+# # 呼叫中心默认密码
+VITE_CALLCENTER_DEFAULT_PASSWORD=123456

+ 8 - 8
.env.test

@@ -24,14 +24,14 @@ VITE_AMAP_SECURITYJSCODE=dd12ddafb11921dbcdc5b9c4484bb4e2
 # #高德地图KEY
 VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
 
-# # 维尔信websocket地址
-VITE_WEX_SOCKET_URL=ws://222.212.82.225:1003
+# # 呼叫中心socket地址
+VITE_CALLCENTER_SOCKET_URL=internal.ttf-cti.com:8080
 
-# # 维尔信请求地址
-VITE_WEX_API_URL=http://222.212.82.225:8083
+# # 呼叫中心请求地址
+VITE_CALLCENTER_API_URL=https://internal.ttf-cti.com:10085
 
-# # 维尔信默认账号
-VITE_WEX_DEFAULT_ACCOUNT=admin
+# # 呼叫中心默认账号
+VITE_CALLCENTER_DEFAULT_ACCOUNT=yscs
 
-# # 维尔信默认密码
-VITE_WEX_DEFAULT_PASSWORD=Wex@12345
+# # 呼叫中心默认密码
+VITE_CALLCENTER_DEFAULT_PASSWORD=123456

+ 14 - 11
src/api/public/wex.ts

@@ -68,29 +68,32 @@ export const telUnrestWex = () => {
         method: 'get',
     });
 };
-
+/*------------------------------呼叫中心--------------------------------------------- */
 /**
- * @description 威而信登录
+ * @description 呼叫中心登录
  * @param data
  */
-export const wexLogin = (data:object) => {
+export const callCenterLogin = (data:object) => {
     return request({
         url: `/login/token`,
         method: 'post',
-        baseURL:import.meta.env.VITE_WEX_API_URL,
+        baseURL:import.meta.env.VITE_CALLCENTER_API_URL,
         data
     });
 }
 /**
- * @description 查询威而信所有分机
- * @param data
+ * @description 查询呼叫中心分机列表
+ * @param params
  */
-export const getTelList = (data?:object) => {
+export const getTelList = (params?:object) => {
     return request({
-        url: `/api/reg/device`,
-        method: 'post',
-        baseURL:import.meta.env.VITE_WEX_API_URL,
-        data
+        url: `/api/ola/dicts/detail`,
+        method: 'get',
+        baseURL:import.meta.env.VITE_CALLCENTER_API_URL,
+        params,
+        headers:{
+            'content-type': 'application/x-www-form-urlencoded'
+        },
     });
 }
 /**

+ 5 - 1
src/components/ProcessAudit/index.vue

@@ -542,6 +542,7 @@ const state = reactive<any>({
 		//流程表单
 		opinion: '', // 意见
 		nextStepCode: '', // 下一节点
+    nextStepName:'', // 下一节点名称
 		backToCountersignEnd: false, // 是否回到会签结束节点
 		nextHandlers: [], // 下一节点处理人
 		nextMainHandler: '', // 主办人
@@ -647,12 +648,14 @@ const handleResult = (res: any) => {
 	}*/
 	if (state.nextStepOptions.length === 1) {
 		// 下一节点是否只有一个 默认选中第一个
-		state.ruleForm.nextStepCode = state.nextStepOptions[0].key; // 下一节点
+		state.ruleForm.nextStepCode = state.nextStepOptions[0].key; // 下一节点code
+    state.ruleForm.nextStepName = state.nextStepOptions[0].value; // 下一节点name
 		selectNextStep(state.nextStepOptions[0].key); // 查询流程下一节点参数
 
 		isCollect.value = state.nextStepOptions[0].stepType === 3 && handelArr.includes(state.processType); // 是否是汇总节点(汇总需要填入其他参数)
 	} else {
 		state.ruleForm.nextStepCode = '';
+    state.ruleForm.nextStepName = '';
 		isCollect.value = false;
 	}
 };
@@ -789,6 +792,7 @@ const selectNextStep = (val: any) => {
 	ruleFormRef.value?.resetFields('nextHandlers');
 	ruleFormRef.value?.resetFields('nextMainHandler');
 	const items = state.nextStepOptions.find((item: any) => item.key === val).items;
+  state.ruleForm.nextStepName = state.nextStepOptions.find((item: any) => item.key === val).value; // 下一节点name
 	state.handlerOptions = items ?? [];
 	/*const next = state.nextStepOptions.find((item: any) => item.code === val);
 	getNextStepOption(state.handleId, next.code);

+ 0 - 1
src/router/backEnd.ts

@@ -1,5 +1,4 @@
 import { RouteRecordRaw } from 'vue-router';
-// import { storeToRefs } from 'pinia';
 import pinia from '/@/stores/index';
 import { useUserInfo } from '/@/stores/userInfo';
 import { useAppConfig } from '/@/stores/appConfig';

+ 346 - 0
src/utils/ola_api.ts

@@ -0,0 +1,346 @@
+/**
+ * @description 呼叫中心对接接口
+ */
+export const ola: any = {
+	version: '2.0.1',
+	ws: undefined,
+	uuid: '73836387-0000-0000-0000-0000-0000000000',
+	connected: false,
+	socket_connected: false,
+	onConnect: undefined,
+	onMessage: undefined,
+	onClose: undefined,
+	_connectSuccess: undefined,
+	_connectError: undefined,
+	_username: undefined,
+	_password: undefined,
+	_extn: undefined,
+
+	connect: function (url: string | URL, username: any, password: any, success: any, error: any) {
+		if (!url) url = 'ws://' + document.location.hostname + ':' + document.location.port + '/ola_socket';
+
+		if ('WebSocket' in window) {
+			// browser supports websockets
+			this.ws = new WebSocket(url);
+			if (this.ws) {
+				this.ws.onclose = ola.onClose;
+				this.ws.onopen = ola._onOpen;
+				this.ws.onmessage = ola._onMessage;
+				this._connectSuccess = success;
+				this._connectError = error;
+				this._username = username;
+				this._password = password;
+			}
+		} else {
+			// browser does not support websockets
+			if ('console' in window) {
+				console.log("you don't have websocket");
+			}
+			return false;
+		}
+
+		return this;
+	},
+
+	close: function () {
+		ola.ws.close();
+	},
+
+	_onOpen: function () {
+		ola.auth(ola._username, ola._password);
+	},
+
+	_onMessage: function (evt: { data: string; }) {
+		console.log(evt.data);
+
+		const msg = JSON.parse(evt.data);
+		if (msg.event_name == 'command/reply' && msg.code == 200) {
+			ola.ws.onmessage = this.onMessage;
+		}
+		ola.ws.onmessage = ola.onMessage;
+		ola.onConnect();
+	},
+
+	auth: function (username: any, password: any) {
+		return ola.send({ cmd: 'auth', args: { username, password, accept: 'application/json' } });
+	},
+
+	get_agent_state: function () {
+		return this.send({ action: 'api', cmd: 'get_agent_state', args: { extn: this._extn } });
+	},
+
+	get_trunk_state: function () {
+		return this.send({ action: 'api', cmd: 'get_trunk_state' });
+	},
+
+	login: function (queue: any, extn: any, params: any) {
+		const args = { queue, extn };
+		this.merge(args, params);
+		this._extn = extn;
+		return ola.send({ action: 'api', cmd: 'login', args: args });
+	},
+
+	logout: function () {
+		return this.send({ action: 'api', cmd: 'logout', args: { extn: this._extn } });
+	},
+
+	collect_dtmf: function (extn: any, soundfile: any) {
+		return this.send({ action: 'api', cmd: 'collect_dtmf', args: { extn, soundfile } });
+	},
+	collect_judge: function (extn: any) {
+		return this.send({ action: 'api', cmd: 'collect_judge', args: { extn: extn } });
+	},
+
+	ping: function () {
+		return ola.send({ cmd: 'ping' });
+	},
+
+	subscribe: function (k: any) {
+		return ola.send({ cmd: 'subscribe', args: { key: k } });
+	},
+
+	unsubscribe: function (k: any) {
+		return ola.send({ cmd: 'unsubscribe', args: { key: k } });
+	},
+
+	go_ready: function () {
+		return this.send({ action: 'api', cmd: 'go_ready', args: { extn: this._extn } });
+	},
+
+	go_ready2: function (extn:any) {
+		return this.send({ action: 'api', cmd: 'go_ready', args: { extn: extn } });
+	},
+
+	go_break: function (reason: any) {
+		return this.send({ action: 'api', cmd: 'go_break', args: { extn: this._extn, reason: reason } });
+	},
+
+	go_break2: function (extn:any) {
+		return this.send({ action: 'api', cmd: 'go_break', args: { extn: extn, reason: '' } });
+	},
+
+	toggle_ready: function () {
+		return this.send({ action: 'api', cmd: 'toggle_ready', args: { extn: this._extn } });
+	},
+
+	answer: function () {
+		return this.send({ action: 'api', cmd: 'answer', args: { extn: this._extn } });
+	},
+
+	hangup: function () {
+		return this.send({ action: 'api', cmd: 'hangup_other', args: { extn: this._extn } });
+	},
+
+	dial: function (dst: any, otherStr: any, gateway: any) {
+		return this.send({ action: 'api', cmd: 'dial', args: { extn: this._extn, dest: dst, gateway: gateway, otherStr: otherStr } });
+	},
+
+	transfer: function (dst: any, src: any) {
+		let extn = src;
+
+		if (extn == null || typeof extn == 'undefined') {
+			extn = this._extn;
+		}
+
+		return this.send({ action: 'api', cmd: 'transfer', args: { extn: extn, dest: dst } });
+	},
+
+	transfer_uuid: function (uuid: any, dst: any) {
+		return this.send({ action: 'api', cmd: 'transfer', args: { channel_uuid: uuid, dest: dst } });
+	},
+
+	monitor: function (dst: any, src: any) {
+		let extn = src;
+		if (extn == null || typeof extn == 'undefined') {
+			extn = this._extn;
+		}
+
+		return this.send({ action: 'api', cmd: 'monitor', args: { extn: extn, dest: dst } });
+	},
+
+	monitor_uuid: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'monitor', args: { extn: this._extn, channel_uuid: uuid } });
+	},
+
+	intercept: function (dst: any, src: any, gateway: any) {
+		let extn = src;
+
+		if (extn == null || typeof extn == 'undefined') {
+			extn = this._extn;
+		}
+
+		return this.send({ action: 'api', cmd: 'intercept', args: { extn: extn, dest: dst } });
+	},
+
+	intercept_uuid: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'intercept', args: { extn: this._extn, channel_uuid: uuid } });
+	},
+
+	three_way: function (dst: any, src: any, gateway: any) {
+		let extn = src;
+
+		if (extn == null || typeof extn == 'undefined') {
+			extn = this._extn;
+		}
+
+		return this.send({ action: 'api', cmd: 'monitor', args: { extn: extn, dest: dst, three_way: 'true', goip_gateway: gateway } });
+	},
+	/* hangup the thrid party */
+	exit_three_way: function (ext: any) {
+		return this.send({ action: 'api', cmd: 'unmonitor', args: { extn: ext, three_way: 'true' } });
+	},
+	three_way_uuid: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'monitor', args: { extn: this._extn, channel_uuid: uuid, three_way: 'true' } });
+	},
+
+	unmonitor: function (ext: any) {
+		return this.send({ action: 'api', cmd: 'unmonitor', args: { extn: ext } });
+	},
+
+	whisper: function (w: any) {
+		// who = "agent" / "caller" / "both" / "none"
+		return this.send({ action: 'api', cmd: 'whisper', args: { extn: this._extn, who: w } });
+	},
+
+	consult: function (dst: any) {
+		return this.send({ action: 'api', cmd: 'consult', args: { extn: this._extn, dest: dst } });
+	},
+	unconsult: function (dst: any) {
+		return this.send({ action: 'api', cmd: 'unconsult', args: { extn: this._extn, dest: dst } });
+	},
+	consult_to_three_way: function (dst: any) {
+		return this.send({ action: 'api', cmd: 'consult_to_three_way', args: { extn: this._extn, dest: dst } });
+	},
+
+	hold: function () {
+		return this.send({ action: 'api', cmd: 'hold', args: { extn: this._extn } });
+	},
+
+	unhold: function () {
+		return this.send({ action: 'api', cmd: 'unhold', args: { extn: this._extn } });
+	},
+
+	toggle_hold: function () {
+		return this.send({ action: 'api', cmd: 'toggle_hold', args: { extn: this._extn } });
+	},
+
+	take_call: function (channel_uuid: any) {
+		return this.send({ action: 'api', cmd: 'take_call', args: { extn: this._extn, channel_uuid: channel_uuid } });
+	},
+	next_queue: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'next_queue', args: { extn: this._extn, channel_uuid: uuid } });
+	},
+
+	conference: function (dst: any) {
+		return this.send({ action: 'api', cmd: 'conference', args: { extn: this._extn, dest: dst } });
+	},
+
+	conference_uuid: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'conference', args: { extn: this._extn, channel_uuid: uuid } });
+	},
+
+	broadcast: function (numbers: any, mute: any) {
+		return this.send({ action: 'api', cmd: 'broadcast', args: { extn: this._extn, numbers, mute } });
+	},
+
+	/* send chat to a queue or an agent
+      to = queue             send to queue
+      to = queue.agent       send to agent
+    */
+	chat: function (to: any, message: any, content_type: any) {
+		return this.send({ action: 'api', cmd: 'chat', args: { to: to, message: message, content_type: content_type } });
+	},
+
+	message: function (from: any, to: any, message: any, content_type: any) {
+		return this.send({ action: 'api', cmd: 'message', args: { from: from, to: to, message: message, content_type: content_type } });
+	},
+
+	alarm: function (queue: any, state: any) {
+		return this.send({ action: 'api', cmd: 'alarm', args: { queue, state } });
+	},
+
+	/* dispatching apis */
+
+	dlogin: function (ext: any) {
+		return this.send({ action: 'api', cmd: 'dlogin', args: { extn: ext } });
+	},
+
+	dlogout: function (ext: any) {
+		return this.send({ action: 'api', cmd: 'dlogout', args: { extn: ext } });
+	},
+
+	inject: function (ext: any, uuid: any) {
+		return this.send({ action: 'api', cmd: 'inject', args: { extn: ext, channel_uuid: uuid } });
+	},
+
+	kill: function (uuid: any, extn: any) {
+		return this.send({ action: 'api', cmd: 'kill', args: { channel_uuid: uuid, extn: extn } });
+	},
+
+	eavesdrop: function (uuid: any) {
+		return this.send({ action: 'api', cmd: 'eavesdrop', args: { channel_uuid: uuid } });
+	},
+
+	conf: function (name: any, action: any, member: any) {
+		return this.send({ action: 'api', cmd: 'conf', args: { name: name, action: action, member: member } });
+	},
+
+	answer_all: function (ext: any, queue: any) {
+		return this.send({ action: 'api', cmd: 'answer_all', args: { extn: ext, queue: queue } });
+	},
+
+	group_call: function (ext: any, queue: any, numbers: any, batch_accept: any) {
+		return this.send({ action: 'api', cmd: 'group_call', args: { extn: ext, queue: queue, numbers: numbers, batch_accept: batch_accept } });
+	},
+
+	sip_gateway: function (profile: any, gateway: any, op: any) {
+		return this.send({ action: 'api', cmd: 'sip_gateway', args: { profile: profile, gateway: gateway, op: op } });
+	},
+
+	playback: function (filename: any) {
+		return this.send({ action: 'api', cmd: 'playback', args: { extn: this._extn, soundfile: filename } });
+	},
+
+	stop_playback: function () {
+		return this.send({ action: 'api', cmd: 'stop_playback', args: { extn: this._extn } });
+	},
+
+	merge_call: function (ext1: any, ext2: any) {
+		return this.send({ action: 'api', cmd: 'merge_call', args: { extn1: ext1, extn2: ext2 } });
+	},
+
+	/* common apis*/
+
+	/*phone control api, only yealink support for now*/
+	api_handfree: function (ext: any) {
+		return this.send({ action: 'api', cmd: 'api_handfree', args: { extn: ext } });
+	},
+	status: function () {
+		return ola.ws.readyState;
+	},
+
+	send: function (msg: { uuid: any; }) {
+		msg.uuid = ola.next_uuid();
+		console.log(JSON.stringify(msg));
+		ola.ws.send(JSON.stringify(msg));
+		return msg.uuid;
+	},
+
+	merge: function (target: { [x: string]: any; }, additional: { [x: string]: any; hasOwnProperty: (arg0: string) => any; }) {
+		for (const i in additional) {
+			if (additional.hasOwnProperty(i)) {
+				target[i] = additional[i];
+			}
+		}
+	},
+
+	next_uuid: function () {
+		let u = (parseFloat(ola.uuid.substring(29)) + 1).toString();
+		u = u == '2147483647' ? '0' : u;
+		while (u.length < 12) {
+			u = '0' + u;
+		}
+		ola.uuid = '73836387-0000-0000-0000-0000-' + u;
+		return ola.uuid;
+	},
+};

+ 111 - 68
src/utils/request.ts

@@ -1,21 +1,21 @@
 import axios, { AxiosInstance, AxiosResponse, AxiosError, AxiosRequestConfig } from 'axios';
 import { ElMessage, ElMessageBox, ElLoading, LoadingOptionsResolved } from 'element-plus';
-import {Session, Local, Cookie} from '/@/utils/storage';
-import router from "/@/router/index"
+import { Session, Local, Cookie } from '/@/utils/storage';
+import router from '/@/router/index';
 // 重复请求队列
 const pendingMap = new Map();
 // 全局loading
 const LoadingInstance = {
 	_target: null as any,
-	_count: 0
+	_count: 0,
 };
 type customOptionsType = {
-	repeat_request_cancel?: boolean,// 是否开启取消重复请求, 默认为 true
-	loading?: boolean,// 是否开启全屏loading层效果, 默认为false
-	reduct_data_format?: boolean,// 是否开启简洁的数据结构响应 减少一层data, 默认为true
-	error_message_show?: boolean,// 是否开启接口错误信息展示,默认为true
-	code_message_show?: boolean,// 是否开启code不为0时的信息提示, 默认为false
-}
+	repeat_request_cancel?: boolean; // 是否开启取消重复请求, 默认为 true
+	loading?: boolean; // 是否开启全屏loading层效果, 默认为false
+	reduct_data_format?: boolean; // 是否开启简洁的数据结构响应 减少一层data, 默认为true
+	error_message_show?: boolean; // 是否开启接口错误信息展示,默认为true
+	code_message_show?: boolean; // 是否开启code不为0时的信息提示, 默认为false
+};
 export default function myAxios(axiosConfig: any, customOptions?: customOptionsType, loadingOptions?: LoadingOptionsResolved) {
 	// 配置新建一个 axios 实例
 	const service: AxiosInstance = axios.create({
@@ -25,13 +25,16 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 	});
 
 	// 自定义配置
-	let custom_options = Object.assign({
-		repeat_request_cancel: true, // 是否开启取消重复请求, 默认为 true
-		loading: false, // 是否开启全屏loading层效果, 默认为false
-		reduct_data_format: true, // 是否开启简洁的数据结构响应 减少一层data, 默认为true
-		error_message_show: true, // 是否开启接口错误信息展示,默认为true
-		code_message_show: false, // 是否开启code不为0时的信息提示, 默认为false
-	}, customOptions);
+	let custom_options = Object.assign(
+		{
+			repeat_request_cancel: true, // 是否开启取消重复请求, 默认为 true
+			loading: false, // 是否开启全屏loading层效果, 默认为false
+			reduct_data_format: true, // 是否开启简洁的数据结构响应 减少一层data, 默认为true
+			error_message_show: true, // 是否开启接口错误信息展示,默认为true
+			code_message_show: false, // 是否开启code不为0时的信息提示, 默认为false
+		},
+		customOptions
+	);
 
 	// 添加请求拦截器
 	service.interceptors.request.use(
@@ -49,19 +52,25 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 			if (Cookie.get('token')) {
 				(<any>config.headers)['Authorization'] = `Bearer ${Cookie.get('token')}`;
 			}
-			if (config.baseURL === import.meta.env.VITE_WEX_API_URL) { // 维尔信登录
-				if (!Cookie.get('wexToken')) {
-					const res = await axios.post(import.meta.env.VITE_WEX_API_URL + '/login/token', {username: import.meta.env.VITE_WEX_DEFAULT_ACCOUNT, password: import.meta.env.VITE_WEX_DEFAULT_PASSWORD});
-						if (res.data.code === 200) {
-							Cookie.set('wexToken', res.data.data.token);
-						}else{
-							ElMessage({
-								type: 'error',
-								message: res.data.msg
-							})
-						}
+			if (config.baseURL === import.meta.env.VITE_CALLCENTER_API_URL) {
+				// 呼叫中心
+				if (!Cookie.get('callCenterToken')) {
+					const res = await axios.get(`${import.meta.env.VITE_CALLCENTER_API_URL}/api/login?username=${import.meta.env.
+						VITE_CALLCENTER_DEFAULT_ACCOUNT}&password=${import.meta.env.VITE_CALLCENTER_DEFAULT_PASSWORD}`, {
+						headers:{'content-type': 'application/x-www-form-urlencoded'}
+					})
+					console.log(`${import.meta.env.VITE_CALLCENTER_API_URL}/api/login?username=${import.meta.env.
+						VITE_CALLCENTER_DEFAULT_ACCOUNT}&password=${import.meta.env.VITE_CALLCENTER_DEFAULT_PASSWORD}`,'211')
+					if (res.data.code === 200) {
+						Cookie.set('wexToken', res.data.data.token);
+					} else {
+						ElMessage({
+							type: 'error',
+							message: res.data.msg,
+						});
+					}
 				}
-				(<any>config.headers)['Token'] = `${Cookie.get('wexToken')}`;
+				(<any>config.headers)['Token'] = `${Cookie.get('callCenterToken')}`;
 			}
 			return config;
 		},
@@ -74,9 +83,11 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 		(response: AxiosResponse): any => {
 			removePending(response.config);
 			custom_options.loading && closeLoading(custom_options); // 关闭loading
-			if (response.config.baseURL === import.meta.env.VITE_WEX_API_URL) { // 维尔信登录
-				if (response.data.code === 401) { // token过期
-					Cookie.remove('wexToken');
+			if (response.config.baseURL === import.meta.env.VITE_CALLCENTER_API_URL) {
+				// 维尔信登录
+				if (response.data.code === 401) {
+					// token过期
+					Cookie.remove('callCenterToken');
 					return myAxios(axiosConfig, customOptions, loadingOptions);
 				}
 			}
@@ -84,8 +95,8 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 			if (custom_options.code_message_show && response.data && response.data.code !== 0) {
 				ElMessage({
 					type: 'error',
-					message: response.data.message
-				})
+					message: response.data.message,
+				});
 				return Promise.reject(response.data); // code不等于0, 页面具体逻辑就不执行了
 			}
 			return custom_options.reduct_data_format ? response.data : response;
@@ -98,12 +109,12 @@ export default function myAxios(axiosConfig: any, customOptions?: customOptionsT
 		}
 	);
 
-	return service(axiosConfig)
+	return service(axiosConfig);
 }
 
-/**	
+/**
  * @description 处理异常
- * @param {*} error 
+ * @param {*} error
  */
 function httpErrorStatusHandle(error: any) {
 	// 设置一个变量 处理同一时间多个错误重复弹窗口
@@ -113,39 +124,69 @@ function httpErrorStatusHandle(error: any) {
 	let message = '';
 	if (error && error.response) {
 		switch (error.response.status) {
-			case 302: message = '接口重定向了!'; break;
-			case 400: message = '参数不正确!'; break;
+			case 302:
+				message = '接口重定向了!';
+				break;
+			case 400:
+				message = '参数不正确!';
+				break;
 			case 401:
 				if (!tokenAbnormal) {
 					tokenAbnormal = true;
 					// 弹出框
-					ElMessageBox.alert('你已被登出,请重新登录', '提示', { type: 'warning' }).then(() => {
-						Session.clear(); // 清除浏览器全部临时缓存
-						Local.clear(); // 清除浏览器全部临时缓存
-						Cookie.clear(); // 清除浏览器全部临时缓存
-						router.replace(`/login?redirect=${router.currentRoute.value.path}&params=${JSON.stringify(router.currentRoute.value.query ? router.currentRoute.value.query : router.currentRoute.value.params)}`); // 去登录页
-						location.reload(); //刷新页面
-					}).catch((): void => { });
+					ElMessageBox.alert('你已被登出,请重新登录', '提示', { type: 'warning' })
+						.then(() => {
+							Session.clear(); // 清除浏览器全部临时缓存
+							Local.clear(); // 清除浏览器全部临时缓存
+							Cookie.clear(); // 清除浏览器全部临时缓存
+							router.replace(
+								`/login?redirect=${router.currentRoute.value.path}&params=${JSON.stringify(
+									router.currentRoute.value.query ? router.currentRoute.value.query : router.currentRoute.value.params
+								)}`
+							); // 去登录页
+							location.reload(); //刷新页面
+						})
+						.catch((): void => {});
 					// 设置定时器,确保下次异常时弹出框正常弹出
 					setTimeout(() => {
 						tokenAbnormal = false;
 					}, 3000);
 				}
 				break;
-			case 403: message = '您没有权限操作!'; break;
-			case 404: message = `请求地址出错: ${error.response.config.url}`; break; // 在正确域名下
-			case 408: message = '请求超时!'; break;
-			case 409: message = '系统已存在相同数据!'; break;
+			case 403:
+				message = '您没有权限操作!';
+				break;
+			case 404:
+				message = `请求地址出错: ${error.response.config.url}`;
+				break; // 在正确域名下
+			case 408:
+				message = '请求超时!';
+				break;
+			case 409:
+				message = '系统已存在相同数据!';
+				break;
 			case 500:
 				if (error.response?.data.message) message = error.response.data.message;
 				else message = '服务器内部错误!';
 				break;
-			case 501: message = '服务未实现!'; break;
-			case 502: message = '网关错误!'; break;
-			case 503: message = '服务不可用!'; break;
-			case 504: message = '服务暂时无法访问,请稍后再试!'; break;
-			case 505: message = 'HTTP版本不受支持!'; break;
-			default: message = '异常问题,请联系管理员!'; break
+			case 501:
+				message = '服务未实现!';
+				break;
+			case 502:
+				message = '网关错误!';
+				break;
+			case 503:
+				message = '服务不可用!';
+				break;
+			case 504:
+				message = '服务暂时无法访问,请稍后再试!';
+				break;
+			case 505:
+				message = 'HTTP版本不受支持!';
+				break;
+			default:
+				message = '异常问题,请联系管理员!';
+				break;
 		}
 	}
 	if (error.message.includes('timeout')) message = '网络请求超时!';
@@ -153,13 +194,13 @@ function httpErrorStatusHandle(error: any) {
 
 	ElMessage({
 		type: 'error',
-		message
-	})
+		message,
+	});
 }
 
 /**
  * @description 关闭Loading层实例
- * @param {*} _options 
+ * @param {*} _options
  */
 function closeLoading(_options: any) {
 	if (_options.loading && LoadingInstance._count > 0) LoadingInstance._count--;
@@ -171,20 +212,22 @@ function closeLoading(_options: any) {
 
 /**
  * @description 储存每个请求的唯一cancel回调, 以此为标识
- * @param {*} config 
+ * @param {*} config
  */
 function addPending(config: AxiosRequestConfig) {
 	const pendingKey = getPendingKey(config);
-	config.cancelToken = config.cancelToken || new axios.CancelToken((cancel) => {
-		if (!pendingMap.has(pendingKey)) {
-			pendingMap.set(pendingKey, cancel);
-		}
-	});
+	config.cancelToken =
+		config.cancelToken ||
+		new axios.CancelToken((cancel) => {
+			if (!pendingMap.has(pendingKey)) {
+				pendingMap.set(pendingKey, cancel);
+			}
+		});
 }
 
 /**
  * @description 删除重复的请求
- * @param {*} config 
+ * @param {*} config
  */
 function removePending(config: AxiosRequestConfig) {
 	const pendingKey = getPendingKey(config);
@@ -198,11 +241,11 @@ function removePending(config: AxiosRequestConfig) {
 
 /**
  * @description 生成唯一的每个请求的唯一key
- * @param {*} config 
- * @returns 
+ * @param {*} config
+ * @returns
  */
 function getPendingKey(config: AxiosRequestConfig) {
 	let { url, method, params, data } = config;
-	if (typeof data === 'string') data = JSON.parse(data); // response里面返回的config.data是个字符串对象
+	// if (typeof data === 'string') data = JSON.parse(data); // response里面返回的config.data是个字符串对象
 	return [url, method, JSON.stringify(params), JSON.stringify(data)].join('&');
 }