修改登录
This commit is contained in:
parent
bbb669a4b0
commit
3677f25ab5
@ -61,6 +61,8 @@ class Basic extends AdminBase
|
||||
BasicLogic::setPlatform($post);
|
||||
} elseif ($post['type'] == 'shop') {
|
||||
BasicLogic::setShop($post);
|
||||
} elseif ($post['type'] == 'local_store'){
|
||||
BasicLogic::setLocalStore($post);
|
||||
}
|
||||
return JsonServer::success('修改成功');
|
||||
}
|
||||
|
||||
@ -48,6 +48,13 @@ class BasicLogic extends Logic
|
||||
'shop_admin_logo' => ConfigServer::get('website_shop', 'shop_admin_logo'),
|
||||
'shop_default_logo' => ConfigServer::get('website_shop', 'shop_default_logo'),
|
||||
'shop_default_bg' => ConfigServer::get('website_shop', 'shop_default_bg'),
|
||||
|
||||
'local_store_login_logo' => ConfigServer::get('website_local_store', 'local_store_login_logo'),
|
||||
'local_store_login_image' => ConfigServer::get('website_local_store', 'local_store_login_image'),
|
||||
'local_store_login_title' => ConfigServer::get('website_local_store', 'local_store_login_title'),
|
||||
'local_store_admin_logo' => ConfigServer::get('website_local_store', 'local_store_admin_logo'),
|
||||
'local_store_default_logo' => ConfigServer::get('website_local_store', 'local_store_default_logo'),
|
||||
'local_store_default_bg' => ConfigServer::get('website_local_store', 'local_store_default_bg'),
|
||||
];
|
||||
return $config;
|
||||
}
|
||||
@ -112,6 +119,18 @@ class BasicLogic extends Logic
|
||||
ConfigServer::set('website_shop', 'shop_default_bg', UrlServer::setFileUrl($post['shop_default_bg'] ?? ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地生活商家
|
||||
*/
|
||||
public static function setLocalStore($post)
|
||||
{
|
||||
ConfigServer::set('website_local_store', 'local_store_login_logo', UrlServer::setFileUrl($post['local_store_login_logo'] ?? ''));
|
||||
ConfigServer::set('website_local_store', 'local_store_login_image', UrlServer::setFileUrl($post['local_store_login_image'] ?? ''));
|
||||
ConfigServer::set('website_local_store', 'local_store_login_title', $post['local_store_login_title']);
|
||||
ConfigServer::set('website_local_store', 'local_store_admin_logo', UrlServer::setFileUrl($post['local_store_admin_logo'] ?? ''));
|
||||
ConfigServer::set('website_local_store', 'local_store_default_logo', UrlServer::setFileUrl($post['local_store_default_logo'] ?? ''));
|
||||
ConfigServer::set('website_local_store', 'local_store_default_bg', UrlServer::setFileUrl($post['local_store_default_bg'] ?? ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取版权资质
|
||||
@ -172,5 +191,4 @@ class BasicLogic extends Logic
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -45,13 +45,13 @@ class LoginLogic extends Logic
|
||||
{
|
||||
$adminModel = new LocalStoreAdmin();
|
||||
$admin_info = $adminModel->alias('a')
|
||||
->join('shop s', 's.id = a.shop_id')
|
||||
->field(['a.id', 'a.account', 'a.name', 'role_id', 'shop_id', 's.name' => 'shop_name', 's.type'])
|
||||
->join('local_store ls', 'ls.lstore_id = a.lstore_id')
|
||||
->field(['a.id', 'a.lstore_id', 'a.name', 'a.account', 'role_id', 'shop_id', 'ls.name' => 'shopName'])
|
||||
->where(['a.account' => $post['account'], 'a.del' => 0])
|
||||
->findOrEmpty()->toArray();
|
||||
|
||||
//session
|
||||
session('shop_info', $admin_info);
|
||||
session('local_store_info', $admin_info);
|
||||
|
||||
//登录信息更新
|
||||
$adminModel->where(['account' => $post['account']])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user