From 3a77781c03c034382ab88dd9ff2be38ad5f205fe Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 1 Aug 2019 14:25:53 +0800 Subject: [PATCH] Update Index.php --- application/service/controller/Index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/service/controller/Index.php b/application/service/controller/Index.php index 0e333b9f2..0924e53ff 100644 --- a/application/service/controller/Index.php +++ b/application/service/controller/Index.php @@ -81,14 +81,14 @@ class Index extends Controller $appid = $this->request->get('appid'); $where = ['authorizer_appid' => $appid, 'is_deleted' => '0', 'status' => '1']; $author = Db::name('WechatServiceConfig')->where($where)->find(); - empty($author) && $this->error('无效的授权信息,请同步其它公众号!'); + if (empty($author)) $this->error('无效的授权信息,请同步其它公众号!'); $data = BuildService::filter(WechatService::service()->getAuthorizerInfo($appid)); $data['authorizer_appid'] = $appid; $where = ['authorizer_appid' => $data['authorizer_appid']]; $appkey = Db::name('WechatServiceConfig')->where($where)->value('appkey'); if (empty($appkey)) $data['appkey'] = md5(uniqid('', true)); if (data_save('WechatServiceConfig', $data, 'authorizer_appid')) { - $this->success('更新公众号授权信息成功!', ''); + $this->success('更新公众号授权成功!', ''); } } catch (\think\exception\HttpResponseException $exception) { throw $exception;