|
@@ -63,19 +63,20 @@ export const openDefaultWebView = (url?: string, callBack?: any) => {
|
|
*/
|
|
*/
|
|
export const goWechatAuth = (wxAppId: string, urlString?: string) => {
|
|
export const goWechatAuth = (wxAppId: string, urlString?: string) => {
|
|
// 开发环境
|
|
// 开发环境
|
|
- if (import.meta.env.DEV) {
|
|
|
|
- const replaceUrl =
|
|
|
|
- `https://online.lexiaoya.cn/getWxCode?appid=${
|
|
|
|
- wxAppId || 'wx8654c671631cfade'
|
|
|
|
- }&state=STATE&redirect_uri=` +
|
|
|
|
- encodeURIComponent(urlString || window.location.href);
|
|
|
|
- window.location.replace(replaceUrl);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (import.meta.env.DEV) {
|
|
|
|
+ // const replaceUrl =
|
|
|
|
+ // `https://online.lexiaoya.cn/getWxCode?appid=${
|
|
|
|
+ // wxAppId || 'wx8654c671631cfade'
|
|
|
|
+ // }&state=STATE&redirect_uri=` +
|
|
|
|
+ // encodeURIComponent(urlString || window.location.href);
|
|
|
|
+ // window.location.replace(replaceUrl);
|
|
|
|
+ // }
|
|
|
|
|
|
- // 生产环境
|
|
|
|
- if (import.meta.env.PROD) {
|
|
|
|
- goAuth(wxAppId, urlString);
|
|
|
|
- }
|
|
|
|
|
|
+ // // 生产环境
|
|
|
|
+ // if (import.meta.env.PROD) {
|
|
|
|
+ // goAuth(wxAppId, urlString);
|
|
|
|
+ // }
|
|
|
|
+ goAuth(wxAppId, urlString);
|
|
};
|
|
};
|
|
|
|
|
|
const goAuth = (wxAppId: string, urlString?: string) => {
|
|
const goAuth = (wxAppId: string, urlString?: string) => {
|
|
@@ -99,15 +100,15 @@ export const goAliAuth = (alipayAppId: string, urlString?: string) => {
|
|
const urlNow = encodeURIComponent(urlString || window.location.href);
|
|
const urlNow = encodeURIComponent(urlString || window.location.href);
|
|
const appid = alipayAppId || '2021004100630808';
|
|
const appid = alipayAppId || '2021004100630808';
|
|
// 开发环境
|
|
// 开发环境
|
|
- if (import.meta.env.DEV) {
|
|
|
|
|
|
+ // if (import.meta.env.DEV) {
|
|
let url = `https://kt.colexiu.com/getAliCode?app_id=${appid}&state=STATE&redirect_uri=${urlNow}`;
|
|
let url = `https://kt.colexiu.com/getAliCode?app_id=${appid}&state=STATE&redirect_uri=${urlNow}`;
|
|
window.location.replace(url);
|
|
window.location.replace(url);
|
|
- }
|
|
|
|
|
|
+ // }
|
|
|
|
|
|
// 生产环境
|
|
// 生产环境
|
|
- if (import.meta.env.PROD) {
|
|
|
|
- alipayAuth(alipayAppId, urlString);
|
|
|
|
- }
|
|
|
|
|
|
+ // if (import.meta.env.PROD) {
|
|
|
|
+ // alipayAuth(alipayAppId, urlString);
|
|
|
|
+ // }
|
|
};
|
|
};
|
|
|
|
|
|
const alipayAuth = (alipayAppId: string, urlString?: string) => {
|
|
const alipayAuth = (alipayAppId: string, urlString?: string) => {
|