添加了退出登录 #69

Merged
theluyuan merged 1 commits from xbx into master 2020-08-22 08:59:05 +00:00
3 changed files with 17 additions and 1 deletions
Showing only changes of commit 9361f5bffe - Show all commits

View File

@ -48,6 +48,7 @@ export default {
// 退
loginout(){
uni.clearStorage();
this.imService.disconnect()
this.$refs.uToast.show({
title: "退出登陆成功!",
type: 'success'

View File

@ -19,6 +19,10 @@
<text>内容管理</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="nav" @click="loginout()">
<text>退出登录</text>
<image src="/static/image/user/1.png"></image>
</view>
<view class="release-btn" @click="publish">
<image src="../../static/image/index/publish.png"></image>
<view class="text">发布</view>
@ -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;

View File

@ -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)