|
|
@@ -136,10 +136,10 @@
|
|
|
<view class="tui-title">关闭APP</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <!-- #endif -->
|
|
|
<tui-list-cell @click="loginOut()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
|
|
|
<view class="tui-title">退出账号</view>
|
|
|
</tui-list-cell>
|
|
|
- <!-- #endif -->
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -187,6 +187,7 @@
|
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import { mainMy, applyCash } from "@/api/home";
|
|
|
+import { clearLogin } from "@/api/admin";
|
|
|
import { inMoney,outMoney } from "@/api/shop-money";
|
|
|
import ShopSelect from "@/components/module/shopSelect";
|
|
|
import { list } from "@/mixins";
|
|
|
@@ -365,15 +366,27 @@ export default {
|
|
|
this.lookMoney = data.lookMoney
|
|
|
uni.stopPullDownRefresh()
|
|
|
},
|
|
|
- // #ifdef APP-PLUS
|
|
|
loginOut(){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认退出?'},() => {
|
|
|
+ // #ifdef APP-PLUS
|
|
|
uni.clearStorage()
|
|
|
that.$store.commit("setLoginInfo", {})
|
|
|
plus.runtime.restart()
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ clearLogin().then(res=>{
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ uni.clearStorage()
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
+ uni.reLaunch({url:'/admin/home/workbench'})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
})
|
|
|
},
|
|
|
+ // #ifdef APP-PLUS
|
|
|
closeApp(){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认关闭?'},() => {
|