|
@@ -3,6 +3,7 @@ import { ref } from 'vue';
|
|
|
import { ElMessage, ElNotification } from 'element-plus'
|
|
|
import usePermissionStore from './permission';
|
|
|
import useUserStore from './user';
|
|
|
+import { setCookieWithExpireAt1150 } from '@/utils/index'
|
|
|
|
|
|
const VITE_HS_CTI_BASE_URL = import.meta.env.VITE_HS_CTI_BASE_URL;
|
|
|
|
|
@@ -200,18 +201,18 @@ const useVoiceStore = defineStore('voice', () => {
|
|
|
// console.log( "-----------------------" );
|
|
|
|
|
|
// 销毁实例调用签出接口成功后 - 坐席签出
|
|
|
- if ( workStatus === -1 ) {
|
|
|
- ElMessage({
|
|
|
- message: '当前坐席以签出',
|
|
|
- type: 'success',
|
|
|
- plain: true,
|
|
|
- })
|
|
|
- unInit();
|
|
|
- sessionStorage.removeItem('VOICE_STATUS');
|
|
|
- userStore.logOut().then(() => {
|
|
|
- location.href = '/index';
|
|
|
- })
|
|
|
- }
|
|
|
+ // if ( workStatus === -1 ) {
|
|
|
+ // ElMessage({
|
|
|
+ // message: '当前坐席以签出',
|
|
|
+ // type: 'success',
|
|
|
+ // plain: true,
|
|
|
+ // })
|
|
|
+ // unInit();
|
|
|
+ // sessionStorage.removeItem('VOICE_STATUS');
|
|
|
+ // userStore.logOut().then(() => {
|
|
|
+ // location.href = '/index';
|
|
|
+ // })
|
|
|
+ // }
|
|
|
|
|
|
// 登录CTI 成功
|
|
|
if ( workStatus === 0 ) {
|
|
@@ -291,6 +292,7 @@ const useVoiceStore = defineStore('voice', () => {
|
|
|
// HS_CTI.domainName = VITE_HS_CTI_BASE_URL
|
|
|
|
|
|
HS_CTI.init();
|
|
|
+ setCookieWithExpireAt1150('sdkRegister', 'true',24,0)
|
|
|
// getAgentStatus()
|
|
|
listenScoketEvent(CTIEvent);
|
|
|
}
|