From 3677f25ab53724c065c077ea9b22ecf7887a4d27 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Mon, 16 Dec 2024 11:23:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/setting/Basic.php | 2 ++ app/admin/logic/setting/BasicLogic.php | 20 +++++++++++++++++++- app/localstore/logic/LoginLogic.php | 6 +++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/app/admin/controller/setting/Basic.php b/app/admin/controller/setting/Basic.php index 67c1d571..14b90034 100755 --- a/app/admin/controller/setting/Basic.php +++ b/app/admin/controller/setting/Basic.php @@ -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('修改成功'); } diff --git a/app/admin/logic/setting/BasicLogic.php b/app/admin/logic/setting/BasicLogic.php index f17b0dd9..0c098707 100755 --- a/app/admin/logic/setting/BasicLogic.php +++ b/app/admin/logic/setting/BasicLogic.php @@ -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; } - } \ No newline at end of file diff --git a/app/localstore/logic/LoginLogic.php b/app/localstore/logic/LoginLogic.php index 2b41ebfc..7d9c76a2 100755 --- a/app/localstore/logic/LoginLogic.php +++ b/app/localstore/logic/LoginLogic.php @@ -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']])