From 19723978d27cae8a94666995f2ab8a0992e315a2 Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Thu, 18 Apr 2019 01:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/plugins/petscms/Service.php | 20 +- .../plugins/view/petscms/pets/detail.html | 470 +++++++++--------- .../plugins/view/petscms/pets/index.html | 2 +- .../plugins/view/petscms/pets/saveinfo.html | 8 +- .../plugins/view/petscms/petsadmin/index.html | 2 +- .../view/petscms/petsadmin/saveinfo.html | 71 ++- .../plugins/css/petscms/pets.detail.css | 22 + 7 files changed, 311 insertions(+), 284 deletions(-) diff --git a/application/plugins/petscms/Service.php b/application/plugins/petscms/Service.php index f8d4dfec1..bab7de3f2 100644 --- a/application/plugins/petscms/Service.php +++ b/application/plugins/petscms/Service.php @@ -73,7 +73,7 @@ class Service foreach($data as &$v) { // 类型 - $v['type_name'] = self::$pets_attribute_type_list[$v['type']]['name']; + $v['type_name'] = empty($v['type']) ? '' : self::$pets_attribute_type_list[$v['type']]['name']; // 性别 $v['gender_name'] = self::$pets_attribute_gender_list[$v['gender']]['name']; @@ -249,20 +249,20 @@ class Service 'checked_type' => 'length', 'key_name' => 'title', 'checked_data' => '1,60', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '标题格式 1~60 个字符之间', ], [ 'checked_type' => 'length', 'key_name' => 'name', 'checked_data' => '1,30', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '宠物名字格式 1~30 个字符之间', ], [ 'checked_type' => 'empty', 'key_name' => 'birthday', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '请填写出生日期', ], [ @@ -276,7 +276,7 @@ class Service 'checked_type' => 'length', 'key_name' => 'varieties', 'checked_data' => '30', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '品种格式最多 30 个字符', ], [ @@ -296,35 +296,35 @@ class Service [ 'checked_type' => 'empty', 'key_name' => 'photo', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '请上传宠物相册', ], [ 'checked_type' => 'length', 'key_name' => 'content', 'checked_data' => '105000', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '宠物简介内容最多 105000 个字符', ], [ 'checked_type' => 'length', 'key_name' => 'person_name', 'checked_data' => '1,30', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '主人姓名格式 1~30 个字符之间', ], [ 'checked_type' => 'length', 'key_name' => 'person_tel', 'checked_data' => '1,30', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '主人电话格式 1~30 个字符之间', ], [ 'checked_type' => 'length', 'key_name' => 'person_weixin', 'checked_data' => '1,30', - 'is_checked' => 2, + 'is_checked' => 1, 'error_msg' => '主人微信格式 1~30 个字符之间', ], [ diff --git a/application/plugins/view/petscms/pets/detail.html b/application/plugins/view/petscms/pets/detail.html index 756930846..1f0b3196c 100644 --- a/application/plugins/view/petscms/pets/detail.html +++ b/application/plugins/view/petscms/pets/detail.html @@ -14,192 +14,202 @@ {{if !empty($data)}}
-
-
- {{if !empty($data['photo'])}} -
-
    - {{foreach $data.photo as $photo}} -
  • - {{$data.title}} -
  • - {{/foreach}} -
-
- {{/if}} -
-
-

{{$data.title}}

-
    -
  • - 编号 - {{$data.pest_no}} -
  • -
  • - 名字 - {{$data.name}} -
  • -
  • - 类型 - {{$data.type_name}} -
  • -
  • - 性别 - {{$data.gender_name}} -
  • -
  • - 生日 - {{$data.birthday_name}} -
  • -
  • - 年龄 - {{$data.age}} -
  • -
  • - 品种 - {{$data.varieties}} -
  • -
  • - 绝育 - {{$data.sterilization_name}} -
  • -
  • - 疫苗 - {{$data.vaccine_name}} -
  • -
  • - 状态 - {{$data.status_name}} -
  • -
+ {{if isset($data['user_id']) and $data['user_id'] gt 0}} +
+
+ {{if !empty($data['photo'])}} +
+
    + {{foreach $data.photo as $photo}} +
  • + {{$data.title}} +
  • + {{/foreach}} +
+
+ {{/if}} +
+
+

{{$data.title}}

+
    +
  • + 编号 + {{$data.pest_no}} +
  • +
  • + 名字 + {{$data.name}} +
  • +
  • + 类型 + {{$data.type_name}} +
  • +
  • + 性别 + {{$data.gender_name}} +
  • +
  • + 生日 + {{$data.birthday_name}} +
  • +
  • + 年龄 + {{$data.age}} +
  • +
  • + 品种 + {{$data.varieties}} +
  • +
  • + 绝育 + {{$data.sterilization_name}} +
  • +
  • + 疫苗 + {{$data.vaccine_name}} +
  • +
  • + 状态 + {{$data.status_name}} +
  • +
- {{if isset($data['status']) and $data['status'] eq 1}} - + {{if isset($data['status']) and $data['status'] eq 1}} + - -
-
-
-

提供信息

- × -
-
-
-
- - -
-
- - -
-
- - -
- -
- - - - -
-
- -
- - - - - - + +
+
+
+

提供信息

+ × +
+
+ +
+ + +
+
+ + +
+
+ +
-
-
-
- - -
- +
+ + + + +
+
+ +
+ + + + + + +
+
+
+ +
+ + +
+ +
-
- {{/if}} - - -
-
- -
-
-
- - {{if isset($data['status']) and $data['status'] eq 1}} -
-
- {{if !empty($data['lose_features'])}} -

{{$data.lose_features|raw}}

{{/if}} -
    - {{if !empty($data['person_name'])}} -
  • - 主人姓名 - {{$data.person_name}} -
  • - {{/if}} - {{if !empty($data['person_tel'])}} -
  • - 主人电话 - {{$data.person_tel}} -
  • - {{/if}} - {{if !empty($data['person_weixin'])}} -
  • - 主人微信 - {{$data.person_weixin}} -
  • - {{/if}} - {{if !empty($data['lose_time_name'])}} -
  • - 丢失时间 - {{$data.lose_time_name}} -
  • - {{/if}} - {{if !empty($data['lose_reward_amount']) and $data['lose_reward_amount'] gt 0}} -
  • - 悬赏金额 - ¥{{$data.lose_reward_amount}} -
  • - {{/if}} - {{if !empty($data['lose_address'])}} -
  • - 丢失地址 - {{$data.province_name}}{{$data.city_name}}{{$data.county_name}}{{$data.lose_address}} -
  • - {{/if}} -
+ +
+
+ +
- {{if !empty($data['lose_lng']) and !empty($data['lose_lat'])}} -
- {{/if}}
- {{/if}} - {{if !empty($data['content'])}} -
-
- - 宠物详情 + {{if isset($data['status']) and $data['status'] eq 1}} +
+
+ {{if !empty($data['lose_features'])}} +

{{$data.lose_features|raw}}

+ {{/if}} +
    + {{if !empty($data['person_name'])}} +
  • + 主人姓名 + {{$data.person_name}} +
  • + {{/if}} + {{if !empty($data['person_tel'])}} +
  • + 主人电话 + {{$data.person_tel}} +
  • + {{/if}} + {{if !empty($data['person_weixin'])}} +
  • + 主人微信 + {{$data.person_weixin}} +
  • + {{/if}} + + {{if !empty($data['lose_time_name'])}} +
  • + 丢失时间 + {{$data.lose_time_name}} +
  • + {{/if}} + {{if !empty($data['lose_reward_amount']) and $data['lose_reward_amount'] gt 0}} +
  • + 悬赏金额 + ¥{{$data.lose_reward_amount}} +
  • + {{/if}} + {{if !empty($data['lose_address'])}} +
  • + 丢失地址 + {{$data.province_name}}{{$data.city_name}}{{$data.county_name}}{{$data.lose_address}} +
  • + {{/if}} +
+
+ {{if !empty($data['lose_lng']) and !empty($data['lose_lat'])}} +
+ {{/if}}
-
{{$data.content|raw}}
+ {{/if}} + + {{if !empty($data['content'])}} +
+
+ + 宠物详情 +
+
{{$data.content|raw}}
+
+ {{/if}} + {{else /}} +
+ +
+ 该宠物还没有主人领取,立即领取可爱的宠物宝宝哦! +
+ 我要领取
{{/if}}
@@ -209,65 +219,67 @@ {{include file="public/footer" /}} - - +{{if isset($data['user_id']) and $data['user_id'] gt 0}} + + - \ No newline at end of file + // 设置版权控件位置 + var cr = new BMap.CopyrightControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT}); + map.addControl(cr); //添加版权控件 + var bs = map.getBounds(); //返回地图可视区域 + cr.addCopyright({id: 1, content: "
拖动红色图标直接定位
", bounds:bs}); + {{/if}} + }); + +{{/if}} \ No newline at end of file diff --git a/application/plugins/view/petscms/pets/index.html b/application/plugins/view/petscms/pets/index.html index 9f5adb881..0894a9567 100644 --- a/application/plugins/view/petscms/pets/index.html +++ b/application/plugins/view/petscms/pets/index.html @@ -99,7 +99,7 @@ diff --git a/application/plugins/view/petscms/pets/saveinfo.html b/application/plugins/view/petscms/pets/saveinfo.html index c5c4758e0..4af320233 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'])}} + {{if empty($data['id']) and !empty($params['pest_no'])}}
- - + +
{{/if}} @@ -63,7 +63,7 @@
- +
diff --git a/application/plugins/view/petscms/petsadmin/index.html b/application/plugins/view/petscms/petsadmin/index.html index 17187978e..39501bd47 100644 --- a/application/plugins/view/petscms/petsadmin/index.html +++ b/application/plugins/view/petscms/petsadmin/index.html @@ -86,7 +86,7 @@ diff --git a/application/plugins/view/petscms/petsadmin/saveinfo.html b/application/plugins/view/petscms/petsadmin/saveinfo.html index 303a01846..2fb0d13f2 100644 --- a/application/plugins/view/petscms/petsadmin/saveinfo.html +++ b/application/plugins/view/petscms/petsadmin/saveinfo.html @@ -11,31 +11,24 @@
- {{if empty($data['id'])}} -
- - -
- {{/if}} -
- - + +
- - + +
- - + +
- - {{foreach $pets_attribute_type_list as $v}} @@ -44,13 +37,13 @@
- - + +
- - {{foreach $pets_attribute_gender_list as $v}} @@ -59,8 +52,8 @@
- - {{foreach $pets_attribute_is_text_list as $v}} @@ -69,8 +62,8 @@
- - {{foreach $pets_attribute_is_text_list as $v}} @@ -80,7 +73,7 @@
- +
    {{if !empty($data['photo'])}} {{foreach $data.photo as $v}} @@ -97,7 +90,7 @@
    - +
@@ -107,16 +100,16 @@

主人信息


- - + +
- - + +
- - + +
@@ -125,19 +118,19 @@

丢失信息(丢失状态下有效)


- +
- +
- +
- + @@ -149,11 +142,11 @@
- +
- + @@ -163,8 +156,8 @@
- - {{foreach $pets_attribute_status_list as $v}} diff --git a/public/static/plugins/css/petscms/pets.detail.css b/public/static/plugins/css/petscms/pets.detail.css index 5ab166946..2908bbe8d 100644 --- a/public/static/plugins/css/petscms/pets.detail.css +++ b/public/static/plugins/css/petscms/pets.detail.css @@ -51,6 +51,28 @@ background: transparent; } +/** + * 未绑定 + */ +.pets-not-bind { + text-align: center; + max-width: 600px; + margin: auto; + margin-top: 30px; + margin-bottom: 50px; + padding: 0 5px; +} +.pets-not-bind i { + font-size: 60px; + color: #00b0ff; +} +.pets-not-bind .am-alert-secondary { + margin-top: 0; +} +.pets-not-bind .am-btn { + margin-top: 10px; +} + /** * 左侧 */