mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-11 10:12:48 +00:00
调整seeion
This commit is contained in:
parent
84f81ab7e4
commit
850a88bfb6
@ -221,11 +221,11 @@ class AgentManage extends AuthController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* 获取公众号二维码
|
||||||
* */
|
* */
|
||||||
public function wechant_code($uid)
|
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']))
|
if(isset($qr_code['url']))
|
||||||
return ['code_src'=>$qr_code['url']];
|
return ['code_src'=>$qr_code['url']];
|
||||||
else
|
else
|
||||||
|
|||||||
@ -67,6 +67,7 @@ class SystemAdmin extends BaseModel
|
|||||||
{
|
{
|
||||||
Session::set('adminId',$adminInfo['id']);
|
Session::set('adminId',$adminInfo['id']);
|
||||||
Session::set('adminInfo',$adminInfo->toArray());
|
Session::set('adminInfo',$adminInfo->toArray());
|
||||||
|
Session::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,7 +77,7 @@ class SystemAdmin extends BaseModel
|
|||||||
{
|
{
|
||||||
Session::delete('adminInfo');
|
Session::delete('adminInfo');
|
||||||
Session::delete('adminId');
|
Session::delete('adminId');
|
||||||
Session::clear();
|
Session::save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -105,7 +105,7 @@ class WechatQrcode extends BaseModel
|
|||||||
self::createForeverQrcode($id, $type);
|
self::createForeverQrcode($id, $type);
|
||||||
$res = self::getForeverQrcode($type, $id);
|
$res = self::getForeverQrcode($type, $id);
|
||||||
}
|
}
|
||||||
if(!$res['ticket']) exception('临时二维码获取错误');
|
if(!$res['ticket']) exception('永久二维码获取错误');
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,8 @@ class ArticleController
|
|||||||
public function lst(Request $request, $cid)
|
public function lst(Request $request, $cid)
|
||||||
{
|
{
|
||||||
list($page, $limit) = UtilService::getMore([
|
list($page, $limit) = UtilService::getMore([
|
||||||
['page',0],
|
['page',1],
|
||||||
['limit',0],
|
['limit',10],
|
||||||
],$request, true);
|
],$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") ?? [];
|
$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();
|
if(is_object($list)) $list = $list->toArray();
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class CategoryController
|
|||||||
{
|
{
|
||||||
public function category(Request $request)
|
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());
|
return app('json')->success($cateogry->hidden(['add_time','is_show','sort','children.sort','children.add_time','children.pid','children.is_show'])->toArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,13 +145,11 @@ trait LogicTrait
|
|||||||
*/
|
*/
|
||||||
public function __call($method, $ages)
|
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) : [];
|
$propsRuleKeys = property_exists($this, 'propsRule') ? array_keys($this->propsRule) : [];
|
||||||
if (strstr($method, 'set') !== false) {
|
if (strstr($method, 'set') !== false) {
|
||||||
$attribute = lcfirst(str_replace('set', '', $method));
|
$attribute = lcfirst(str_replace('set', '', $method));
|
||||||
if (property_exists($this, $attribute)
|
if (property_exists($this, $attribute) && in_array($attribute, $propsRuleKeys)) {
|
||||||
&& in_array($attribute, $propsRuleKeys)
|
|
||||||
&& isset($this->propsRule[$attribute])) {
|
|
||||||
$propsRuleValeu = $this->propsRule[$attribute];
|
$propsRuleValeu = $this->propsRule[$attribute];
|
||||||
$type = $propsRuleValeu[1] ?? 'string';
|
$type = $propsRuleValeu[1] ?? 'string';
|
||||||
$callable = $propsRuleValeu[2] ?? null;
|
$callable = $propsRuleValeu[2] ?? null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user