lrf402788946 4 gadi atpakaļ
vecāks
revīzija
2d10f5a2bc
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      app/service/wxpay.js

+ 2 - 1
app/service/wxpay.js

@@ -22,10 +22,11 @@ class WxpayService extends CrudService {
     if (token) return;
     let url;
     try {
+      console.log(this.appInfo.id, this.appInfo.secret, code);
       url = `https://api.weixin.qq.com/sns/jscode2session?appid=${this.appInfo.id}&secret=${this.appInfo.secret}&js_code=${code}&grant_type=authorization_code`;
       console.log(`url=>${url}`);
     } catch (error) {
-      throw new BusinessError(ErrorCode.SERVICE_FAULT, 'url拼接出错');
+      throw new BusinessError(ErrorCode.SERVICE_FAULT, `url拼接出错.参数=>appInfo:${JSON.stringify(this.appInfo) || ''};code:${code};id:${id}`);
     }
     try {
       const res = await this.ctx.curl(url, {