From 19a9bcf03833678f564e480f6fc438aba066591c Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Wed, 24 Oct 2018 00:54:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=B6=88=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=9C=89=E5=AE=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AlipayLifeMessageController.class.php | 17 +++--- .../Admin/Lang/zh-cn/alipaylife.php | 2 + .../Admin/Lang/zh-cn/alipaylifemessage.php | 4 +- .../Admin/View/Default/AlipayLife/Index.html | 4 ++ .../Default/AlipayLifeMessage/SendInfo.html | 52 +++++++++++-------- service/Public/Common/Css/Common.css | 2 + 6 files changed, 52 insertions(+), 29 deletions(-) diff --git a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php index e3d185848..b98100fdd 100644 --- a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php +++ b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php @@ -175,18 +175,23 @@ class AlipayLifeMessageController extends CommonController $this->assign('alipay_life_message_type_list', L('alipay_life_message_type_list')); // 单用户发消息用户信息 - $user = empty($_GET['user_id']) ? '' : M('User')->find(intval(I('user_id'))); - $this->assign('user', $user); + $alipay_openid = empty($_GET['user_id']) ? '' : M('User')->where(['id'=>intval(I('user_id'))])->getField('alipay_openid'); + $this->assign('alipay_openid', $alipay_openid); // 消息发送类型 $this->assign('alipay_life_message_send_type_list', L('alipay_life_message_send_type_list')); - $this->assign('send_type', empty($user) ? 1 : 0); + $this->assign('send_type', empty($alipay_openid) ? 1 : 0); - // 生活号消息分类 - $alipay_life_list = M('AlipayLife')->field('id,name')->select(); + // 生活号 + $where = []; + if(!empty($_GET['alipay_life_id'])) + { + $where['id'] = intval(I('alipay_life_id')); + } + $alipay_life_list = M('AlipayLife')->field('id,name')->where($where)->select(); $this->assign('alipay_life_list', $alipay_life_list); - // 生活号消息分类 + // 生活号分类 $alipay_life_category = M('AlipayLifeCategory')->where(['is_enable'=>1])->field('id,name')->select(); $this->assign('alipay_life_category', $alipay_life_category); diff --git a/service/Application/Admin/Lang/zh-cn/alipaylife.php b/service/Application/Admin/Lang/zh-cn/alipaylife.php index 83f7752f9..59a802ce6 100755 --- a/service/Application/Admin/Lang/zh-cn/alipaylife.php +++ b/service/Application/Admin/Lang/zh-cn/alipaylife.php @@ -35,5 +35,7 @@ return array( 'alipay_life_is_shelves_text' => '上下架', 'alipay_life_save_category_error' => '分类添加失败', + + 'alipay_life_user_send_text' => '发消息', ); ?> \ No newline at end of file diff --git a/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php b/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php index 2697a9e60..680368c6f 100755 --- a/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php +++ b/service/Application/Admin/Lang/zh-cn/alipaylifemessage.php @@ -9,7 +9,7 @@ */ return array( // 添加/编辑 - 'alipay_life_message_add_name' => '生活号消息添加', + 'alipay_life_message_add_name' => '生活号消息创建', 'alipay_life_message_life_text' => '生活号', 'alipay_life_message_life_format' => '请选择生活号', @@ -46,5 +46,7 @@ return array( 0 => array('value' => 0, 'name' => '单条'), 1 => array('value' => 1, 'name' => '批量'), ), + + 'alipay_life_message_user_text' => '给用户发送消息', ); ?> \ No newline at end of file diff --git a/service/Application/Admin/View/Default/AlipayLife/Index.html b/service/Application/Admin/View/Default/AlipayLife/Index.html index c30cdfa58..d695d82a3 100755 --- a/service/Application/Admin/View/Default/AlipayLife/Index.html +++ b/service/Application/Admin/View/Default/AlipayLife/Index.html @@ -82,6 +82,10 @@ + + + + diff --git a/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html b/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html index 0974c36c6..3d78bc72a 100755 --- a/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html +++ b/service/Application/Admin/View/Default/AlipayLifeMessage/SendInfo.html @@ -25,35 +25,45 @@ -
- - -
+ +
+ + +
+
+ +
+ + +
+
+
- - + + +
- value="{{$data.title}}" /> +
- +
@@ -61,25 +71,23 @@ - value="{{$data.image_url}}"" data-validation-message="{{:L('alipay_life_message_image_url_format')}}" readonly="readonly" /> - +
- {{$image_host}}{{$data.image_url}}{{$image_host}}/Public/Admin/Default/Images/default-images.png
" id="form-img-icon" class="block m-t-5 am-img-thumbnail am-radius" width="100" height="100" data-default="{{$image_host}}/Public/Admin/Default/Images/default-images.png" /> +
- value="{{$data.url}}" required /> +
- value="{{$data.action_name}}" /> +
- value="{{$data.id}}" />
diff --git a/service/Public/Common/Css/Common.css b/service/Public/Common/Css/Common.css index 0ef517fba..a550040ef 100755 --- a/service/Public/Common/Css/Common.css +++ b/service/Public/Common/Css/Common.css @@ -40,6 +40,8 @@ .am-tagsinput { display: block; } .am-tagsinput { padding: 0 5px 5px 5px; } .am-tagsinput .tag { margin-top: 5px; } +.chosen-disabled .chosen-choices, .chosen-disabled .chosen-single { background-color: #ccc; } +.chosen-disabled .search-choice { background: #d6d6d6 !important; } /** * 公共提示信息