123
This commit is contained in:
parent
714d478946
commit
1b654215f0
@ -53,12 +53,6 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "阳性发现"
|
"navigationBarTitleText": "阳性发现"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/login/login",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "授权登录"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
|
|||||||
@ -93,26 +93,6 @@ function toMpOauth() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toMpOauth() {
|
|
||||||
// 写死:公众号网页授权(snsapi_base)
|
|
||||||
// TODO: 把 YOUR_MP_APPID 替换为真实「公众号 appid」
|
|
||||||
// 注意:redirect_uri 的域名必须在公众号后台配置为“网页授权域名”(你们是 www.youcan365.com)
|
|
||||||
const MP_APPID = __VITE_ENV__.MP_WX_MP_APP_ID;
|
|
||||||
const REDIRECT_URI = "https://www.youcan365.com/wx-callback";
|
|
||||||
const state = `ykt_wxapp_${Date.now()}`;
|
|
||||||
const oauthUrl =
|
|
||||||
`https://open.weixin.qq.com/connect/oauth2/authorize` +
|
|
||||||
`?appid=${MP_APPID}` +
|
|
||||||
`&redirect_uri=${encodeURIComponent(REDIRECT_URI)}` +
|
|
||||||
`&response_type=code` +
|
|
||||||
`&scope=snsapi_base` +
|
|
||||||
`&state=${encodeURIComponent(state)}` +
|
|
||||||
`#wechat_redirect`;
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/webview/webview?purpose=mp_oauth&url=${encodeURIComponent(oauthUrl)}`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getPhoneNumber(e) {
|
async function getPhoneNumber(e) {
|
||||||
console.log('e', e);
|
console.log('e', e);
|
||||||
const phoneCode = e && e.detail && e.detail.code;
|
const phoneCode = e && e.detail && e.detail.code;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user