2 Commits 50f23a5bb0 ... 821d765bcd

Author SHA1 Message Date
  zqwang 821d765bcd 修改提示语 2 years ago
  zqwang a34255da7c 公众号授权去重 2 years ago

+ 1 - 1
modules/WechatPlatform/Http/Controllers/WechatKeywordsController.php

@@ -31,7 +31,7 @@ class WechatKeywordsController extends CatchController
     {
         $param  = $request->all();
         if(!getProp($param,'miniprogram_id')){
-            WechatKeywordsService::throwErrMsg("参数错误");
+            WechatKeywordsService::throwErrMsg("没有绑定小程序");
         }
         $userContext = $this->getUserContext(null);
         $param['user_id'] = $userContext['loginUser']->id;

+ 3 - 0
modules/WechatPlatform/Http/Controllers/WechatMenuController.php

@@ -32,6 +32,9 @@ class WechatMenuController extends CatchController
     public function List(Request $request)
     {
         $param = $request->all();
+        if(!getProp($param,'miniprogram_id')){
+            WechatMenuService::throwErrMsg("没有绑定小程序");
+        }
         $userContext = $this->getUserContext(null);
         $param['user_id'] = $userContext['loginUser']->id;
         $param['puser_id'] = $userContext['loginUser']->pid;

+ 1 - 1
modules/WechatPlatform/Http/Controllers/WechatSubscribeController.php

@@ -34,7 +34,7 @@ class WechatSubscribeController extends CatchController
     {
         $param  = $request->all();
         if(!getProp($param,'miniprogram_id')){
-            WechatSubscribeService::throwErrMsg("参数错误");
+            WechatSubscribeService::throwErrMsg("没有绑定小程序");
         }
         $userContext = $this->getUserContext(null);
         $param['user_id'] = $userContext['loginUser']->id;

+ 1 - 1
modules/WechatPlatform/Services/WechatKeywordsService.php

@@ -137,7 +137,7 @@ class WechatKeywordsService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountKeywordLog::where('weacht_keyworld_id', $id)->get();
+        $authList = WechatAccountKeywordLog::where('weacht_keyworld_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;

+ 1 - 1
modules/WechatPlatform/Services/WechatMenuService.php

@@ -141,7 +141,7 @@ class WechatMenuService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountMenuDetail::where('menu_id', $id)->get();
+        $authList = WechatAccountMenuDetail::where('menu_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;

+ 1 - 1
modules/WechatPlatform/Services/WechatSubscribeService.php

@@ -208,7 +208,7 @@ class WechatSubscribeService extends BaseService
         $list = DB::table('wechat_authorization_infos')
             ->where('user_id', $userId)
             ->select('id', 'nick_name', 'is_enabled')->get();
-        $authList = WechatAccountSubscribeDetail::where('subscribe_id', $id)->get();
+        $authList = WechatAccountSubscribeDetail::where('subscribe_id', $id)->where('status' , 1)->distinct('appid')->get();
         if (!$list->isEmpty()) {
             foreach ($list as $val) {
                 $val->is_auth = 0;