Commit c57814536ead50e70cbad716793dd81282ded708

Authored by pengye
1 parent cea98153

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

@@ -90,11 +90,11 @@ Page({ @@ -90,11 +90,11 @@ Page({
90 removeStaff:function(){ 90 removeStaff:function(){
91 var id=this.data.id; 91 var id=this.data.id;
92 var data={seller_user_id:id}; 92 var data={seller_user_id:id};
93 - if(this.data.service_info.code){ 93 + if(this.data.service_info && this.data.service_info.code){
94 var code=this.data.service_info.code; 94 var code=this.data.service_info.code;
95 data.code=code; 95 data.code=code;
96 } 96 }
97 - App.Seller.DeleteAuthUser({id:this.ope.id}).then((json)=>{ 97 + App.Seller.DeleteAuthUser({id:this.data.opt.id}).then((json)=>{
98 if(json.ret==200){ 98 if(json.ret==200){
99 wx.showToast({ 99 wx.showToast({
100 title:'已移除', 100 title:'已移除',
@@ -713,15 +713,17 @@ module.exports = { @@ -713,15 +713,17 @@ module.exports = {
713 powercontro:function(acttype){ 713 powercontro:function(acttype){
714 var powerlist=this.cache('userpower'); 714 var powerlist=this.cache('userpower');
715 var powercan=false; 715 var powercan=false;
  716 + // identity 1管理员
716 if((this.cache('identity') && this.cache('identity')==0) && !this.cache('manage')){ 717 if((this.cache('identity') && this.cache('identity')==0) && !this.cache('manage')){
717 - powerlist.forEach(function(v,i){  
718 - if(v.node_name==acttype){  
719 - powercan=true  
720 - }  
721 - })  
722 - if(powerlist.length==0){  
723 - powercan=true  
724 - } 718 + // powerlist.forEach(function(v,i){
  719 + // if(v.node_name==acttype){
  720 + // powercan=true
  721 + // }
  722 + // })
  723 + // if(powerlist.length==0){
  724 + // powercan=true
  725 + // }
  726 + powercan=false
725 }else{ 727 }else{
726 powercan=true 728 powercan=true
727 } 729 }