作者 刘朕
1 个管道 的构建 通过 耗费 20 秒

商城盈利页面报错修复

@@ -718,6 +718,8 @@ class PersonalcenterController extends WeChatBaseController{ @@ -718,6 +718,8 @@ class PersonalcenterController extends WeChatBaseController{
718 718
719 //显示学校年级 719 //显示学校年级
720 $school = Db::name('school') -> where('uid',$uid) -> select() -> toArray(); 720 $school = Db::name('school') -> where('uid',$uid) -> select() -> toArray();
  721 + $schools = [];
  722 + $grade_class_show = [];
721 if(count($school) != 0){ 723 if(count($school) != 0){
722 $grade_class = Db::name('grade_class') -> where("school_id",$school[0]['id']) -> select(); 724 $grade_class = Db::name('grade_class') -> where("school_id",$school[0]['id']) -> select();
723 foreach ($grade_class as $key => $val){ 725 foreach ($grade_class as $key => $val){
@@ -730,9 +732,6 @@ class PersonalcenterController extends WeChatBaseController{ @@ -730,9 +732,6 @@ class PersonalcenterController extends WeChatBaseController{
730 $schools[$key]['value'] = $val['id']; 732 $schools[$key]['value'] = $val['id'];
731 $schools[$key]['text'] = $val['school']; 733 $schools[$key]['text'] = $val['school'];
732 } 734 }
733 - }else{  
734 - $schools = '';  
735 - $grade_class_show = '';  
736 } 735 }
737 $this -> assign('school',json_encode($schools)); 736 $this -> assign('school',json_encode($schools));
738 $this -> assign('grade_class_show',$grade_class_show); 737 $this -> assign('grade_class_show',$grade_class_show);