|
@@ -2,27 +2,28 @@
|
|
|
namespace app\inter\service;
|
|
|
|
|
|
use think\Db;
|
|
|
+use think\Log;
|
|
|
|
|
|
class WechatService {
|
|
|
|
|
|
|
|
|
public function pushWechatOrder($exam_id) {
|
|
|
var_dump($exam_id);
|
|
|
- // $openids = $this->getPushOpenId($exam_id);
|
|
|
- // var_dump($openids);
|
|
|
- // if(!$openids) {
|
|
|
- // log::record('---------没有找到对应openid--------');
|
|
|
- // return false;
|
|
|
- // }
|
|
|
+ $openids = $this->getPushOpenId($exam_id);
|
|
|
+ var_dump($openids);
|
|
|
+ if(!$openids) {
|
|
|
+ log::record('---------没有找到对应openid--------');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // foreach($openids as $v) {
|
|
|
- // $url = "http://wechat.pacsonline.cn/wx_patient/api/sendMsg?pushType=1&openid=";
|
|
|
- // $full_url = $url . $v['openid'];
|
|
|
- // // 请求
|
|
|
- // $res = $this->curl_request($full_url, 'GET');
|
|
|
- // var_dump($res);
|
|
|
- // }
|
|
|
- // return true;
|
|
|
+ foreach($openids as $v) {
|
|
|
+ $url = "http://wechat.pacsonline.cn/wx_patient/api/sendMsg?pushType=1&openid=";
|
|
|
+ $full_url = $url . $v['openid'];
|
|
|
+ // 请求
|
|
|
+ $res = $this->curl_request($full_url, 'GET');
|
|
|
+ var_dump($res);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
public function pushWechatCancel() {
|