正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
@@ -333,18 +333,18 @@ class Api | @@ -333,18 +333,18 @@ class Api | ||
333 | */ | 333 | */ |
334 | public function wxsendmessage($open_id, $data, $templateId,$url) | 334 | public function wxsendmessage($open_id, $data, $templateId,$url) |
335 | { | 335 | { |
336 | - if (empty($open_id) || empty($data) || empty($templateId)) { | ||
337 | - return false; | ||
338 | - } | ||
339 | - $app = new Application(ConfigService::load()); | ||
340 | - $notice = $app->notice; | ||
341 | - $userId = $open_id; | ||
342 | - $userService = $app->user; | ||
343 | - $user = $userService->get($open_id); | ||
344 | - // 判断是否关注公众号 | ||
345 | - if($user->subscribe == 1) { | ||
346 | - $notice->uses($templateId)->withUrl($url)->andData($data)->andReceiver($userId)->send(); | ||
347 | - } | 336 | +// if (empty($open_id) || empty($data) || empty($templateId)) { |
337 | +// return false; | ||
338 | +// } | ||
339 | +// $app = new Application(ConfigService::load()); | ||
340 | +// $notice = $app->notice; | ||
341 | +// $userId = $open_id; | ||
342 | +// $userService = $app->user; | ||
343 | +// $user = $userService->get($open_id); | ||
344 | +// // 判断是否关注公众号 | ||
345 | +// if($user->subscribe == 1) { | ||
346 | +// $notice->uses($templateId)->withUrl($url)->andData($data)->andReceiver($userId)->send(); | ||
347 | +// } | ||
348 | return true; | 348 | return true; |
349 | } | 349 | } |
350 | } | 350 | } |
-
请 注册 或 登录 后发表评论