소스 검색

非跳转和小程序去除url

zqwang 1 년 전
부모
커밋
cedc32ba5f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      modules/WechatPlatform/Services/WechatMenuService.php

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

@@ -49,7 +49,7 @@ class WechatMenuService extends BaseService
         if (is_empty($info)) {
             self::throwErrMsg('该菜单不存在或已删除');
         }
-        $appIds = WechatAccountMenuDetail::where(['status' => 1, 'menu_id' => $info->id])->pluck('id')->toArray();
+
         WechatMenu::where('id', $id)->update($param);
         $data = [
             'type' => $param['type'],
@@ -57,6 +57,7 @@ class WechatMenuService extends BaseService
             'msg_content' => $param['msg_content']
         ];
         WechatAccountMenuDetail::where('menu_id', $id)->update($data);
+        $appIds = WechatAccountMenuDetail::where(['status' => 1, 'menu_id' => $info->id])->pluck('wechat_authorization_info_id')->toArray();
         // 更新公众号菜单
         self::createWechatMenus($appIds,$id);
         return ['msg' => '操作成功'];