|
@@ -8,6 +8,7 @@ use app\api\controller\ApiController;
|
|
|
use app\api\controller\v1\Wechat;
|
|
use app\api\controller\v1\Wechat;
|
|
|
use app\common\model\Taxi;
|
|
use app\common\model\Taxi;
|
|
|
use app\http\IResponse;
|
|
use app\http\IResponse;
|
|
|
|
|
+use EasyWeChat\Factory;
|
|
|
use think\App;
|
|
use think\App;
|
|
|
use app\api\service\JWTAuth as IAuth;
|
|
use app\api\service\JWTAuth as IAuth;
|
|
|
use think\Db;
|
|
use think\Db;
|
|
@@ -232,7 +233,18 @@ class Order extends ApiController
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $wechat = new Wechat($app,$this->auth);
|
|
|
|
|
|
|
+ // 模板消息
|
|
|
|
|
+ $wechat = sys_config('', 'wechat');
|
|
|
|
|
+ $config = [
|
|
|
|
|
+ 'app_id' => $wechat['mini_appid'],
|
|
|
|
|
+ 'secret' => $wechat['mni_secret_key'],
|
|
|
|
|
+ 'response_type' => 'array',
|
|
|
|
|
+ 'log' => [
|
|
|
|
|
+ 'level' => 'debug',
|
|
|
|
|
+ 'file' => app()->getRuntimePath() . 'log/'.date('Ym').'/wechat_debug.log',
|
|
|
|
|
+ ],
|
|
|
|
|
+ ];
|
|
|
|
|
+ $wechat = Factory::miniProgram($config);
|
|
|
$wechat->subscribe_message->send($this->tpl1);
|
|
$wechat->subscribe_message->send($this->tpl1);
|
|
|
return IResponse::success('接单成功,请尽快前往客户所在地接驾');
|
|
return IResponse::success('接单成功,请尽快前往客户所在地接驾');
|
|
|
}
|
|
}
|