|
@@ -34,7 +34,9 @@ export default {
|
|
|
{ name: "拆散", page: "/pages/home/make",flag:'selItem' },
|
|
{ name: "拆散", page: "/pages/home/make",flag:'selItem' },
|
|
|
{ name: "美团", page: "/pages/home/mt",flag:'mt' },
|
|
{ name: "美团", page: "/pages/home/mt",flag:'mt' },
|
|
|
{ name: "散花", page: "/pages/home/sh",flag:'sh' },
|
|
{ name: "散花", page: "/pages/home/sh",flag:'sh' },
|
|
|
- { name: "现金", page: "/pages/home/xj",flag:'xh' }
|
|
|
|
|
|
|
+ { name: "现金", page: "/pages/home/xj",flag:'xh' },
|
|
|
|
|
+ { name: "退出", page: "/pages/home/logout",flag:'logout'},
|
|
|
|
|
+ { name: "关闭", page: "/pages/home/close",flag:'close'},
|
|
|
],
|
|
],
|
|
|
device:''
|
|
device:''
|
|
|
};
|
|
};
|
|
@@ -80,7 +82,38 @@ export default {
|
|
|
},
|
|
},
|
|
|
goTo(item) {
|
|
goTo(item) {
|
|
|
this.$util.hitVoice()
|
|
this.$util.hitVoice()
|
|
|
- this.$util.pageTo({ url: item.page, type: 2 })
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(item.flag == 'close'){
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ let type = uni.getSystemInfoSync().platform
|
|
|
|
|
+ switch(type){
|
|
|
|
|
+ case 'android':
|
|
|
|
|
+ plus.runtime.quit()
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'ios':
|
|
|
|
|
+ that.$msg('IOS暂不支持关闭')
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ }else if(item.flag == 'logout'){
|
|
|
|
|
+ this.$util.hitVoice()
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '确认退出?',
|
|
|
|
|
+ success: function (res){
|
|
|
|
|
+ if (res.confirm){
|
|
|
|
|
+ uni.clearStorage()
|
|
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ plus.runtime.restart()
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$util.pageTo({ url: item.page, type: 2 })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|