diff --git a/crmeb/app/admin/controller/agent/AgentManage.php b/crmeb/app/admin/controller/agent/AgentManage.php index 25515b23..13b575d7 100644 --- a/crmeb/app/admin/controller/agent/AgentManage.php +++ b/crmeb/app/admin/controller/agent/AgentManage.php @@ -221,11 +221,11 @@ class AgentManage extends AuthController } /* - * + * 获取公众号二维码 * */ public function wechant_code($uid) { - $qr_code = \crmeb\services\QrcodeService::getTemporaryQrcode('spread',$uid); + $qr_code = \crmeb\services\QrcodeService::getForeverQrcode('spread',$uid); if(isset($qr_code['url'])) return ['code_src'=>$qr_code['url']]; else diff --git a/crmeb/app/admin/model/system/SystemAdmin.php b/crmeb/app/admin/model/system/SystemAdmin.php index 8931a449..70088346 100644 --- a/crmeb/app/admin/model/system/SystemAdmin.php +++ b/crmeb/app/admin/model/system/SystemAdmin.php @@ -67,6 +67,7 @@ class SystemAdmin extends BaseModel { Session::set('adminId',$adminInfo['id']); Session::set('adminInfo',$adminInfo->toArray()); + Session::save(); } /** @@ -76,7 +77,7 @@ class SystemAdmin extends BaseModel { Session::delete('adminInfo'); Session::delete('adminId'); - Session::clear(); + Session::save(); } /** diff --git a/crmeb/app/admin/model/wechat/WechatQrcode.php b/crmeb/app/admin/model/wechat/WechatQrcode.php index 006f1d0c..03731f0c 100644 --- a/crmeb/app/admin/model/wechat/WechatQrcode.php +++ b/crmeb/app/admin/model/wechat/WechatQrcode.php @@ -105,7 +105,7 @@ class WechatQrcode extends BaseModel self::createForeverQrcode($id, $type); $res = self::getForeverQrcode($type, $id); } - if(!$res['ticket']) exception('临时二维码获取错误'); + if(!$res['ticket']) exception('永久二维码获取错误'); return $res; } diff --git a/crmeb/app/api/controller/publics/ArticleController.php b/crmeb/app/api/controller/publics/ArticleController.php index 4bca6151..3acec4da 100644 --- a/crmeb/app/api/controller/publics/ArticleController.php +++ b/crmeb/app/api/controller/publics/ArticleController.php @@ -22,8 +22,8 @@ class ArticleController public function lst(Request $request, $cid) { list($page, $limit) = UtilService::getMore([ - ['page',0], - ['limit',0], + ['page',1], + ['limit',10], ],$request, true); $list = Article::cidByArticleList($cid,$page,$limit,"id,title,image_input,visit,from_unixtime(add_time,'%Y-%m-%d %H:%i') as add_time,synopsis,url") ?? []; if(is_object($list)) $list = $list->toArray(); diff --git a/crmeb/app/api/controller/store/CategoryController.php b/crmeb/app/api/controller/store/CategoryController.php index fba12753..bbff9fc7 100644 --- a/crmeb/app/api/controller/store/CategoryController.php +++ b/crmeb/app/api/controller/store/CategoryController.php @@ -9,7 +9,7 @@ class CategoryController { public function category(Request $request) { - $cateogry = StoreCategory::with('children')->where('is_show',1)->where('pid',0)->select(); + $cateogry = StoreCategory::with('children')->where('is_show',1)->order('sort desc,id desc')->where('pid',0)->select(); return app('json')->success($cateogry->hidden(['add_time','is_show','sort','children.sort','children.add_time','children.pid','children.is_show'])->toArray()); } } \ No newline at end of file diff --git a/crmeb/crmeb/traits/LogicTrait.php b/crmeb/crmeb/traits/LogicTrait.php index 71150470..73a12e5f 100644 --- a/crmeb/crmeb/traits/LogicTrait.php +++ b/crmeb/crmeb/traits/LogicTrait.php @@ -145,13 +145,11 @@ trait LogicTrait */ public function __call($method, $ages) { - $keys = property_exists($this, 'propsRule') ? array_keys($this->providers) : []; + $keys = property_exists($this, 'providers') ? array_keys($this->providers) : []; $propsRuleKeys = property_exists($this, 'propsRule') ? array_keys($this->propsRule) : []; if (strstr($method, 'set') !== false) { $attribute = lcfirst(str_replace('set', '', $method)); - if (property_exists($this, $attribute) - && in_array($attribute, $propsRuleKeys) - && isset($this->propsRule[$attribute])) { + if (property_exists($this, $attribute) && in_array($attribute, $propsRuleKeys)) { $propsRuleValeu = $this->propsRule[$attribute]; $type = $propsRuleValeu[1] ?? 'string'; $callable = $propsRuleValeu[2] ?? null;