Commit c57814536ead50e70cbad716793dd81282ded708

Authored by pengye
1 parent cea98153

移除店员,删除菜品操作报错问题处理

... ... @@ -90,11 +90,11 @@ Page({
removeStaff:function(){
var id=this.data.id;
var data={seller_user_id:id};
if(this.data.service_info.code){
if(this.data.service_info && this.data.service_info.code){
var code=this.data.service_info.code;
data.code=code;
}
App.Seller.DeleteAuthUser({id:this.ope.id}).then((json)=>{
App.Seller.DeleteAuthUser({id:this.data.opt.id}).then((json)=>{
if(json.ret==200){
wx.showToast({
title:'已移除',
... ...
... ... @@ -713,15 +713,17 @@ module.exports = {
powercontro:function(acttype){
var powerlist=this.cache('userpower');
var powercan=false;
// identity 1管理员
if((this.cache('identity') && this.cache('identity')==0) && !this.cache('manage')){
powerlist.forEach(function(v,i){
if(v.node_name==acttype){
powercan=true
}
})
if(powerlist.length==0){
powercan=true
}
// powerlist.forEach(function(v,i){
// if(v.node_name==acttype){
// powercan=true
// }
// })
// if(powerlist.length==0){
// powercan=true
// }
powercan=false
}else{
powercan=true
}
... ...