This commit is contained in:
zhanchao 2026-02-08 09:51:56 +08:00
parent 714d478946
commit 1b654215f0
3 changed files with 32 additions and 58 deletions

View File

@ -53,12 +53,6 @@
"style": { "style": {
"navigationBarTitleText": "阳性发现" "navigationBarTitleText": "阳性发现"
} }
},
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "授权登录"
}
} }
], ],
"subPackages": [ "subPackages": [

View File

@ -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;