|
|
@@ -113,11 +113,10 @@
|
|
|
<tui-list-cell @click="closeApp()" class="line-cell" :hover="false" :arrow="true" v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentShopId > 0">
|
|
|
<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.currentShopId > 0">
|
|
|
<view class="tui-title">退出账号</view>
|
|
|
</tui-list-cell>
|
|
|
- <!-- #endif -->
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -144,6 +143,7 @@ import { selectShop } from "@/mixins";
|
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import NotLogin from "@/components/not-login";
|
|
|
+import { clearLogin } from "@/api/admin";
|
|
|
export default {
|
|
|
name: "me",
|
|
|
components: {
|
|
|
@@ -232,15 +232,26 @@ export default {
|
|
|
closeAccount(){
|
|
|
this.$util.pageTo({ url: '/admin/home/close'})
|
|
|
},
|
|
|
- // #ifdef APP-PLUS
|
|
|
loginOut(){
|
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认退出?'},() => {
|
|
|
- uni.clearStorage()
|
|
|
- that.$store.commit("setLoginInfo", {})
|
|
|
- plus.runtime.restart()
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ uni.clearStorage()
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
+ plus.runtime.restart()
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ clearLogin().then(res=>{
|
|
|
+ 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:'确认关闭?'},() => {
|