diff --git a/pages/user/index.vue b/pages/user/index.vue
index 035e58e..6294cbe 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -48,6 +48,7 @@ export default {
// 退出登陆
loginout(){
uni.clearStorage();
+ this.imService.disconnect()
this.$refs.uToast.show({
title: "退出登陆成功!",
type: 'success'
diff --git a/pages/user/myinfo.vue b/pages/user/myinfo.vue
index 5d461ae..a9d34d2 100644
--- a/pages/user/myinfo.vue
+++ b/pages/user/myinfo.vue
@@ -19,6 +19,10 @@
内容管理
+
+ 退出登录
+
+
发布
@@ -64,6 +68,18 @@ export default {
this.imService.connectIM()
},
methods: {
+ loginout(){
+ this.imService.disconnect()
+ uni.clearStorage();
+ this.$refs.uToast.show({
+ title: "退出登陆成功!",
+ type: 'success'
+ });
+ uni.reLaunch({
+ url:"../login/login"
+ })
+
+ },
// 获取个人信息
getmyinfo(){
let that = this;
diff --git a/static/imservice.js b/static/imservice.js
index 7be8708..297a33d 100644
--- a/static/imservice.js
+++ b/static/imservice.js
@@ -226,7 +226,6 @@ IMService.prototype.connectIM = function () {
this.subscribeFriendsPresence();
}).catch(error => {
console.log('连接失败,请确保网络正常,appkey和host正确,code:' + error.code + " content:" + error.content);
- this.connectIM()
});
} catch (error) {
console.log(12323)