diff --git a/application/admin/controller/Index.php b/application/admin/controller/Index.php index 3a78c6b6..6a6835c5 100644 --- a/application/admin/controller/Index.php +++ b/application/admin/controller/Index.php @@ -160,7 +160,7 @@ class Index extends AuthController ->group("FROM_UNIXTIME(add_time, '%Y%m%e')") ->order('add_time asc') ->select()->toArray(); - if(empty($order_list)) return false; + if(empty($order_list)) return Json::fail('无数据'); foreach ($order_list as $k=>&$v){ $order_list[$v['day']] = $v; } diff --git a/application/admin/controller/system/SystemCleardata.php b/application/admin/controller/system/SystemCleardata.php index 6da840f1..98208360 100644 --- a/application/admin/controller/system/SystemCleardata.php +++ b/application/admin/controller/system/SystemCleardata.php @@ -87,7 +87,7 @@ class SystemCleardata extends AuthController } //修改用户默认密码 public function userdate(){ - SystemCleardata::ClearData('user',1); +// SystemCleardata::ClearData('user',1); $headimgurl= WechatUser::Where('uid',1)->value('headimgurl'); $data['account']='crmeb'; $data['pwd']=md5(123456); @@ -141,7 +141,7 @@ class SystemCleardata extends AuthController } //递归删除文件 function delDirAndFile($dirName,$subdir=true){ - if ($handle = opendir("$dirName")){ + if ($handle = @opendir("$dirName")){ while(false !== ($item = readdir($handle))){ if($item != "." && $item != ".."){ if(is_dir("$dirName/$item")) diff --git a/extend/behavior/wechat/UserBehavior.php b/extend/behavior/wechat/UserBehavior.php index 7b777271..5f7481d1 100644 --- a/extend/behavior/wechat/UserBehavior.php +++ b/extend/behavior/wechat/UserBehavior.php @@ -24,7 +24,12 @@ class UserBehavior if(isset($wechatInfo['unionid']) && $wechatInfo['unionid'] != '' && WechatUser::be(['unionid'=>$wechatInfo['unionid']])){ WechatUser::edit($wechatInfo,$wechatInfo['unionid'],'unionid'); $uid = WechatUser::where('unionid',$wechatInfo['unionid'])->value('uid'); - User::updateWechatUser($wechatInfo,$uid); + if(!User::be(['uid'=>$uid])){ + $wechatInfo = WechatUser::where('uid',$uid)->find(); + User::setWechatUser($wechatInfo); + }else{ + User::updateWechatUser($wechatInfo,$uid); + } }else if(WechatUser::be(['openid'=>$wechatInfo['openid']])){ WechatUser::edit($wechatInfo,$wechatInfo['openid'],'openid'); User::updateWechatUser($wechatInfo,WechatUser::openidToUid($wechatInfo['openid'])); diff --git a/view/crmebN/pages/buycar/buycar.wxml b/view/crmebN/pages/buycar/buycar.wxml index 7b4a4cfb..3aa125ba 100644 --- a/view/crmebN/pages/buycar/buycar.wxml +++ b/view/crmebN/pages/buycar/buycar.wxml @@ -1,7 +1,8 @@