From d4895a606830027467073f71b713c478112d7dbf Mon Sep 17 00:00:00 2001 From: devil_gong Date: Thu, 18 Apr 2019 11:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/plugins/petscms/Pets.php | 8 ++++-- .../plugins/view/petscms/pets/saveinfo.html | 26 ++++++++++--------- .../view/petscms/petsadmin/saveinfo.html | 20 +++++++------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/application/plugins/petscms/Pets.php b/application/plugins/petscms/Pets.php index f320555d6..b569f251c 100644 --- a/application/plugins/petscms/Pets.php +++ b/application/plugins/petscms/Pets.php @@ -118,8 +118,12 @@ class Pets extends Controller } unset($params['id']); } - $this->assign('data', $data); + + // 是否绑定 + $this->assign('pest_no', empty($params['pest_no']) ? '' : $params['pest_no']); + unset($params['pest_no']); $this->assign('params', $params); + $this->assign('data', $data); $this->assign('pets_attribute_status_list', Service::$pets_attribute_status_list); $this->assign('pets_attribute_is_text_list', Service::$pets_attribute_is_text_list); $this->assign('pets_attribute_gender_list', Service::$pets_attribute_gender_list); @@ -174,7 +178,7 @@ class Pets extends Controller // 用户 $params['user_id'] = $this->user['id']; - return Service::PestSave($params); + return Service::PetsSave($params); } /** diff --git a/application/plugins/view/petscms/pets/saveinfo.html b/application/plugins/view/petscms/pets/saveinfo.html index bf44ad91e..618de13ee 100644 --- a/application/plugins/view/petscms/pets/saveinfo.html +++ b/application/plugins/view/petscms/pets/saveinfo.html @@ -30,10 +30,10 @@
- {{if empty($data['id']) and !empty($params['pest_no'])}} + {{if empty($data['id']) and !empty($pest_no)}}
- +
{{/if}} @@ -114,6 +114,18 @@
+上传相册
+ {{if empty($pest_no)}} +
+ + +
+ {{/if}} +
@@ -181,16 +193,6 @@
-
- - -
-
diff --git a/application/plugins/view/petscms/petsadmin/saveinfo.html b/application/plugins/view/petscms/petsadmin/saveinfo.html index c49d7e8a9..a422076ed 100644 --- a/application/plugins/view/petscms/petsadmin/saveinfo.html +++ b/application/plugins/view/petscms/petsadmin/saveinfo.html @@ -88,6 +88,16 @@
+上传相册
+
+ + +
+
@@ -155,16 +165,6 @@
-
- - -
-
-- GitLab