|
@@ -190,7 +190,8 @@ class WeixinAuthService extends AxiosService {
|
|
|
|
|
|
// 发送微信模板消息
|
|
|
async sendTemplateMsg(templateid, openid, first, keyword1, keyword2, remark, tourl) {
|
|
|
- const url = this.ctx.app.config.sendDirMq + this.ctx.app.config.appid;
|
|
|
+ const { wxapi } = this.ctx.app.config;
|
|
|
+ const url = wxapi.sendDirMq + wxapi.appid;
|
|
|
let _url = '';
|
|
|
if (tourl) {
|
|
|
// 通过openid取得用户基本信息
|
|
@@ -238,7 +239,8 @@ class WeixinAuthService extends AxiosService {
|
|
|
|
|
|
// 发送微信模板消息自定义消息
|
|
|
async sendTemplateDesign(templateid, openid, first, keyword1, keyword2, remark, tourl) {
|
|
|
- const url = this.ctx.app.config.sendDirMq + this.ctx.app.config.appid;
|
|
|
+ const { wxapi } = this.ctx.app.config;
|
|
|
+ const url = wxapi.sendDirMq + wxapi.appid;
|
|
|
const requestData = { // 发送模板消息的数据
|
|
|
touser: openid,
|
|
|
template_id: templateid,
|