Merge pull request '添加了退出登录' (#69) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/demingshangjia/pulls/69
This commit was merged in pull request #69.
This commit is contained in:
2020-08-22 16:59:04 +08:00
3 changed files with 17 additions and 1 deletions

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;