Browse Source

获取的登录文案

moonsflyer 5 tháng trước cách đây
mục cha
commit
2f07dfdd92

+ 6 - 2
app/shopapi/controller/ConfigController.php

@@ -27,7 +27,7 @@ use app\shopapi\logic\ConfigLogic;
  */
 class ConfigController extends BaseShopController
 {
-    public array $notNeedLogin = ['getconfig', 'getPolicyAgreement','getKefuConfig','getShareConfig'];
+    public array $notNeedLogin = ['getconfig','getLoginContent', 'getPolicyAgreement','getKefuConfig','getShareConfig'];
 
     /**
      * @notes 获取商城配置
@@ -40,7 +40,11 @@ class ConfigController extends BaseShopController
         $data = (new ConfigLogic())->getConfig();
         return $this->success('',$data);
     }
-
+    public function getLoginContent()
+    {
+        $data = (new ConfigLogic())->getLoginContentConfig();
+        return $this->success('',$data);
+    }
     /**
      * @notes 获取政策协议
      * @return \think\response\Json

+ 4 - 1
app/shopapi/logic/ConfigLogic.php

@@ -131,7 +131,10 @@ class ConfigLogic
         ];
         return $config;
     }
-
+    public function  getLoginContentConfig(){
+        $login_content    = ConfigService::get('shop', 'login_content');
+        return $config['login_content'] = $login_content;
+    }
     /**
      * @notes 获取政策协议
      * @return array|string