|
@@ -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, {
|