|
@@ -33,14 +33,17 @@ function getQueryVariable(variable) {
|
|
// 微信鉴权登入
|
|
// 微信鉴权登入
|
|
var isAuthorization = getQueryVariable('isAuthorization');
|
|
var isAuthorization = getQueryVariable('isAuthorization');
|
|
if (isAuthorization) {
|
|
if (isAuthorization) {
|
|
|
|
+ alert(1)
|
|
var url = 'https://jiasm.zfire.top/recycleh5/#/pages/login/indexs';
|
|
var url = 'https://jiasm.zfire.top/recycleh5/#/pages/login/indexs';
|
|
const href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd935838591c00e16&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo#wechat_redirect`;
|
|
const href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd935838591c00e16&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo#wechat_redirect`;
|
|
window.location.href = href;
|
|
window.location.href = href;
|
|
} else {
|
|
} else {
|
|
var code = getQueryVariable('code');
|
|
var code = getQueryVariable('code');
|
|
if (code) {
|
|
if (code) {
|
|
|
|
+ alert(code)
|
|
uni.setStorageSync('code', code);
|
|
uni.setStorageSync('code', code);
|
|
} else if (!uni.getStorageSync('code')) {
|
|
} else if (!uni.getStorageSync('code')) {
|
|
|
|
+ alert("重定向")
|
|
const url = location.href;
|
|
const url = location.href;
|
|
const href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd935838591c00e16&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo#wechat_redirect`;
|
|
const href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd935838591c00e16&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo#wechat_redirect`;
|
|
window.location.href = href;
|
|
window.location.href = href;
|