From 912d8a299b6ac253ab5856434a379b5d78c4c7e2 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 1 Dec 2024 14:11:10 +0800 Subject: [PATCH] UserShare --- .../src/controller/UserShare.php | 9 ++- .../src/view/user_share/detail.html | 75 +++++++++++++++++++ .../src/view/user_share/index.html | 2 +- .../src/view/user_share/info.html | 29 ------- 4 files changed, 83 insertions(+), 32 deletions(-) create mode 100644 plugs/think-plugs-ticket/src/view/user_share/detail.html delete mode 100644 plugs/think-plugs-ticket/src/view/user_share/info.html diff --git a/plugs/think-plugs-ticket/src/controller/UserShare.php b/plugs/think-plugs-ticket/src/controller/UserShare.php index eeddc58..fe197e1 100644 --- a/plugs/think-plugs-ticket/src/controller/UserShare.php +++ b/plugs/think-plugs-ticket/src/controller/UserShare.php @@ -41,9 +41,14 @@ class UserShare extends Controller * @menu true * @return void */ - public function info() + public function detail() { $this->title = '随手拍详情'; - TicketUserShare::mForm('form'); + $where = $this->_vali([ + 'id.require' => '随手拍ID不能为空', + ]); + $this->vo = TicketUserShare::mk()->where($where)->findOrEmpty(); + if ($this->vo->isEmpty()) $this->error('用户随手拍不存在!'); + $this->fetch('detail'); } } \ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/user_share/detail.html b/plugs/think-plugs-ticket/src/view/user_share/detail.html new file mode 100644 index 0000000..7142d30 --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/user_share/detail.html @@ -0,0 +1,75 @@ +
+
随手拍内容
+
+
+ 随手拍编号:{$vo.id|default=""} +
+
+ 随手拍类型:{$vo.type_name|default=""} +
+
+ 联系方式:{$vo.contact_phone|default="未填写联系方式"}, +
+
+ 随手拍地址:{$vo.ticket_address|default=""} +
+
+ 随手拍内容:{$vo.content|default=""} +
+
+ 随手拍图片: +
+ {foreach $vo.imgs_arr as $img} + image +   + {/foreach} +
+
+
+
+{if $vo.ticket_lat && $vo.ticket_lng} +
+
地图位置
+
+
+
+
+ + +{/if} \ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/user_share/index.html b/plugs/think-plugs-ticket/src/view/user_share/index.html index 2b523f9..68375ad 100644 --- a/plugs/think-plugs-ticket/src/view/user_share/index.html +++ b/plugs/think-plugs-ticket/src/view/user_share/index.html @@ -19,7 +19,7 @@ 详情 - 流转 + {/block} diff --git a/plugs/think-plugs-ticket/src/view/user_share/info.html b/plugs/think-plugs-ticket/src/view/user_share/info.html deleted file mode 100644 index 44f3100..0000000 --- a/plugs/think-plugs-ticket/src/view/user_share/info.html +++ /dev/null @@ -1,29 +0,0 @@ -
-
随手拍内容
-
-
- 随手拍编号:{$vo.id|default=""} -
-
- 随手拍类型:{$vo.type_name|default=""} -
-
- 联系方式:{$vo.contact_phone|default="未填写联系方式"}, -
-
- 随手拍地址:{$vo.ticket_address|default=""} -
-
- 随手拍内容:{$vo.content|default=""} -
-
- 随手拍图片: -
- {foreach $vo.imgs_arr as $img} - image -   - {/foreach} -
-
-
-
\ No newline at end of file