调整seeion

This commit is contained in:
liaofei 2019-11-19 14:56:25 +08:00
parent 84f81ab7e4
commit 850a88bfb6
6 changed files with 10 additions and 11 deletions

View File

@ -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

View File

@ -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();
}
/**

View File

@ -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;
}

View File

@ -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();

View File

@ -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());
}
}

View File

@ -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;