添加了退出登录 #69
@ -48,6 +48,7 @@ export default {
|
||||
// 退出登陆
|
||||
loginout(){
|
||||
uni.clearStorage();
|
||||
this.imService.disconnect()
|
||||
this.$refs.uToast.show({
|
||||
title: "退出登陆成功!",
|
||||
type: 'success'
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user