zxhxx 3 anos atrás
pai
commit
cf881f697b

+ 2 - 2
application/api/controller/Project.php

@@ -5,8 +5,8 @@ use app\common\model\project\ProjectDonation;
 use app\common\model\project\ProjectDonationOrder;
 use app\common\model\project\ProjectDonationRocord;
 use app\common\model\project\ProjectDonationUser;
-use app\Request;
-use crmeb\services\UtilService;
+use think\Request;
+use liuniu\UtilService;
 
 class Project extends Api
 {

+ 2 - 2
application/common/library/Auth.php

@@ -185,7 +185,7 @@ class Auth
         Db::startTrans();
         try {
             $user = User::create($params, true);
-            UserRelation::create(['user_id'=>$user->id,'nickname'=>$params['nickname'],'user_type'=>$params['user_type'],'cid'=>$cid]);
+            UserRelation::create(['user_id'=>$user->id,'nickname'=>$params['nickname'],'login_type'=>'0','cid'=>$cid]);
             $this->_user = User::get($user->id);
 
             //设置Token
@@ -199,7 +199,7 @@ class Auth
             Hook::listen("user_register_successed", $this->_user, $data);
             Db::commit();
         } catch (Exception $e) {
-            $this->setError($e->getMessage());
+            $this->setError($e->getFile().'--'.$e->getLine().'--'.$e->getMessage());
             Db::rollback();
             return false;
         }

+ 2 - 1
application/common/model/Article.php

@@ -93,11 +93,12 @@ class Article extends Model
         if(isset($where['is_rec']) && $where['is_rec']==1) $model = $model->where('is_recdata',$where['is_rec']);
         if(isset($where['ifyid']) && $where['ifyid']>0)
         {
-            $ids = get_all_categories(ArticleCategory::lst(['cid'=>$where['cid']]));
+            $ids = get_all_categories(ArticleCategory::lst(['cid'=>$where['cid']]),$where['ifyid']);
             $model = $model->wherein('article_category_id',$ids);
         }
         if(isset($where['key']) && $where['key']!='') $model->whereLike('title',"%{$where['key']}%");
         $rs = $model->order('sort desc,id desc')->page($where['page'],$where['limit'])->select();
+        echo $model->getLastSql();
         return $rs;
 
     }

+ 0 - 1
application/common/model/project/ProjectDonation.php

@@ -102,7 +102,6 @@ class ProjectDonation extends BaseModel
         if (isset($where['title']) && $where['title'] !== '') $model = $model->where('title', 'LIKE', "%$where[title]%");
         if (isset($where['status']) && $where['status']>-2) $model = $model->where('status',$where['status']);
         if (isset($where['uid']) && $where['uid']>0) $model = $model->where('uid',$where['uid']);
-
         $model = $model->order('sort desc,id desc');
         $count = $model->count();
         $list =  $model->page($where['page'],$where['limit'])->select();