|
@@ -29,7 +29,7 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- if (process.env.IS_OPENIM){
|
|
|
|
|
|
|
+ if (process.env.VUE_APP_IS_OPENIM){
|
|
|
this.OpenIM = getOpenIM();
|
|
this.OpenIM = getOpenIM();
|
|
|
this.initListener()
|
|
this.initListener()
|
|
|
}
|
|
}
|
|
@@ -100,10 +100,7 @@
|
|
|
},
|
|
},
|
|
|
login() {
|
|
login() {
|
|
|
accountCheck(this.$store.getters.userID).then(response => {
|
|
accountCheck(this.$store.getters.userID).then(response => {
|
|
|
- console.log("response",response)
|
|
|
|
|
this.userToken = response.token
|
|
this.userToken = response.token
|
|
|
- console.log("this.userToken",this.userToken)
|
|
|
|
|
- console.log(this.$store.getters.userID);
|
|
|
|
|
const config = {
|
|
const config = {
|
|
|
userID: this.$store.getters.userID,
|
|
userID: this.$store.getters.userID,
|
|
|
token: this.userToken,
|
|
token: this.userToken,
|
|
@@ -113,10 +110,11 @@
|
|
|
wsAddr: process.env.VUE_APP_WS_ADDR,
|
|
wsAddr: process.env.VUE_APP_WS_ADDR,
|
|
|
dataDir: '/imdata' // 添加数据存储目录
|
|
dataDir: '/imdata' // 添加数据存储目录
|
|
|
}
|
|
}
|
|
|
- console.log("config",config)
|
|
|
|
|
- console.log("userToken",this.userToken)
|
|
|
|
|
- this.checkSDKReadyState();
|
|
|
|
|
|
|
+
|
|
|
this.OpenIM.login(config).then(() => {
|
|
this.OpenIM.login(config).then(() => {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.checkSDKReadyState();
|
|
|
|
|
+ });
|
|
|
this.$store.commit('toggleIsLogin', true);
|
|
this.$store.commit('toggleIsLogin', true);
|
|
|
this.$store.commit('startComputeCurrent');
|
|
this.$store.commit('startComputeCurrent');
|
|
|
this.$store.commit('showMessage', {
|
|
this.$store.commit('showMessage', {
|
|
@@ -132,6 +130,7 @@
|
|
|
type: 'error',
|
|
type: 'error',
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 添加SDK就绪状态检查
|
|
// 添加SDK就绪状态检查
|