Browse Source

fix: 协议

super-yimizi 1 month ago
parent
commit
138791bcb4
2 changed files with 10 additions and 10 deletions
  1. 3 3
      addons/shop/config.php
  2. 7 7
      application/api/controller/Page.php

+ 3 - 3
addons/shop/config.php

@@ -42,7 +42,7 @@ return [
         'title' => '公司名称',
         'type' => 'string',
         'content' => [],
-        'value' => '公司名称',
+        'value' => '宜宾市三人行营销策划有限责任公司',
         'rule' => 'required',
         'msg' => '',
         'tip' => '',
@@ -54,7 +54,7 @@ return [
         'title' => 'ICP备案号',
         'type' => 'string',
         'content' => [],
-        'value' => 'ICP备案号',
+        'value' => '',
         'rule' => '',
         'msg' => '',
         'tip' => '',
@@ -78,7 +78,7 @@ return [
         'title' => '公安备案号',
         'type' => 'string',
         'content' => [],
-        'value' => '公安备案号',
+        'value' => '',
         'rule' => '',
         'msg' => '',
         'tip' => '',

+ 7 - 7
application/api/controller/Page.php

@@ -15,16 +15,16 @@ class Page extends Base
     //单页详情
     public function index()
     {
-        $diyname = $this->request->param('diyname');
-        if ($diyname && !is_numeric($diyname)) {
-            $page = PageModel::getByDiyname($diyname);
+        $keyword = $this->request->param('keyword');
+        if ($keyword && !is_numeric($keyword)) {
+            $page = PageModel::getByDiyname($keyword);
         } else {
-            $id = $diyname ? $diyname : $this->request->param('id', '');
+            $id =  $keyword ? $keyword : $this->request->param('id', '');
             $page = PageModel::get($id);
         }
-        if (!$page || $page['status'] != 'normal') {
-            $this->error('未找到指定的单页');
-        }
+        // if (!$page || $page['status'] != 'normal') {
+        //     $this->error('未找到指定的单页');
+        // }
         $page->setInc('views');
         $image = $page->getData('image');
         $fields = explode(',', 'id,title,content,image,description,status,createtime');