From 9f310f801d70eeaa8434e2b65ef64507eb51c98c Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Wed, 24 Oct 2018 01:14:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=B6=88=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AlipayLifeMessageController.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php index b98100fdd..89681a9e4 100644 --- a/service/Application/Admin/Controller/AlipayLifeMessageController.class.php +++ b/service/Application/Admin/Controller/AlipayLifeMessageController.class.php @@ -183,16 +183,21 @@ class AlipayLifeMessageController extends CommonController $this->assign('send_type', empty($alipay_openid) ? 1 : 0); // 生活号 - $where = []; if(!empty($_GET['alipay_life_id'])) { - $where['id'] = intval(I('alipay_life_id')); + $alipay_life_list = M('AlipayLife')->field('id,name')->where(['id'=>intval(I('alipay_life_id'))])->select(); + } else { + $alipay_life_list = []; } - $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(); + if(empty($alipay_openid)) + { + $alipay_life_category = M('AlipayLifeCategory')->where(['is_enable'=>1])->field('id,name')->select(); + } else { + $alipay_life_category = []; + } $this->assign('alipay_life_category', $alipay_life_category); // 参数