fix
This commit is contained in:
@@ -211,12 +211,8 @@ function resolveRedirectUri(options, win) {
|
||||
|
||||
function exchangeCodeForOpenid(code) {
|
||||
const cfg = getOAuthConfig();
|
||||
const apiUrl = cfg.oauthApiUrl;
|
||||
if (!apiUrl) {
|
||||
return Promise.reject(new Error("initWechatPayment.oauthApiUrl is required"));
|
||||
}
|
||||
return request({
|
||||
url: apiUrl,
|
||||
url: cfg.oauthApiUrl,
|
||||
method: "POST",
|
||||
json: true,
|
||||
data: { code },
|
||||
@@ -225,15 +221,11 @@ function exchangeCodeForOpenid(code) {
|
||||
|
||||
function fetchAuthorizeInfo(redirectUri) {
|
||||
const cfg = getOAuthConfig();
|
||||
const apiUrl = cfg.oauthAuthorizeUrlApiUrl;
|
||||
if (!apiUrl) {
|
||||
return Promise.reject(new Error("initWechatPayment.oauthAuthorizeUrlApiUrl is required"));
|
||||
}
|
||||
if (!redirectUri) {
|
||||
return Promise.reject(new Error("redirectUri is required for wechat oauth authorize url"));
|
||||
}
|
||||
return request({
|
||||
url: apiUrl,
|
||||
url: cfg.oauthAuthorizeUrlApiUrl,
|
||||
method: "POST",
|
||||
json: true,
|
||||
data: { redirectUri },
|
||||
|
||||
Reference in New Issue
Block a user