zhangguidong 2 anos atrás
pai
commit
6d137c4b58
2 arquivos alterados com 27 adições e 0 exclusões
  1. 9 0
      app/api/controller/Index.php
  2. 18 0
      app/model/shop/Config.php

+ 9 - 0
app/api/controller/Index.php

@@ -445,6 +445,15 @@ class Index extends BaseApi
         $platform_privacy = $config_model->getPlatformPrivacy();
         return $this->response($platform_privacy);
     }
+    /**
+     * @return false|string
+     * 隐私协议
+     */
+    public function about_us(){
+        $config_model = new ConfigModel();
+        $platform_privacy = $config_model->getPlatformPrivacy();
+        return $this->response($platform_privacy);
+    }
 
 
 

+ 18 - 0
app/model/shop/Config.php

@@ -119,6 +119,24 @@ class Config extends BaseModel
         return $info;
     }
     /**
+     * 设置隐私协议
+     */
+    public function seAboutUs($title, $content)
+    {
+        $document = new DocumentModel();
+        $res = $document->setDocument($title, $content, [ [ 'site_id', '=', 0 ], [ 'app_module', '=', 'admin' ], [ 'document_key', '=', "ABOUT_US" ] ]);
+        return $res;
+    }
+    /**
+     * 获取隐私协议
+     */
+    public function getAboutUs()
+    {
+        $document = new DocumentModel();
+        $info = $document->getDocument([ [ 'site_id', '=', 0 ], [ 'app_module', '=', 'admin' ], [ 'document_key', '=', "ABOUT_US" ] ]);
+        return $info;
+    }
+    /**
      * 设置入驻协议
      */
     public function setENTRYPAGE($title, $content)