|
|
@@ -29,6 +29,8 @@ export default {
|
|
|
return {
|
|
|
nav: [
|
|
|
{ name: "收银", page: "/pages/home/selectCustom",flag:'casher' },
|
|
|
+ { name: "关闭", page: "/pages/home/close",flag:'close' },
|
|
|
+ { name: "退出", page: "/pages/home/logout",flag:'logout' },
|
|
|
{ name: "零售", page: "/pages/home/waste",flag:'retail' },
|
|
|
//{ name: "损耗", page: "/pages/home/waste",flag:'waste' },
|
|
|
//{ name: "订单", page: "/pages/home/order",flag:'order' }
|
|
|
@@ -105,9 +107,38 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
goTo(item) {
|
|
|
+ let that = this
|
|
|
this.$util.hitVoice();
|
|
|
if(item.flag == 'retail'){
|
|
|
this.openRetail()
|
|
|
+ }else 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 });
|
|
|
}
|