作者 Cool
1 个管道 的构建 通过 耗费 2 秒

模板消息注释

@@ -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 }