Commit f7a1c2ba by zhujian

'fixed'

parent 493c9ba4
...@@ -81,6 +81,14 @@ ...@@ -81,6 +81,14 @@
prod: 'https://gateway-heimdall.xiaomai5.com/' prod: 'https://gateway-heimdall.xiaomai5.com/'
}; };
var APPID_MAP = {
dev: 'ww80fd6928a46cf33a',
dev1: 'ww80fd6928a46cf33a',
rc: 'ww2009937c82bc57bd',
gray: 'ww2009937c82bc57bd',
prod: 'ww2009937c82bc57bd'
};
function getParameterByName(name) { function getParameterByName(name) {
...@@ -98,8 +106,7 @@ ...@@ -98,8 +106,7 @@
const ticket = getParameterByName('ticket'); const ticket = getParameterByName('ticket');
console.log(appTermEnum, code, ticket); console.log(appTermEnum, code, ticket);
if (!code) { if (!code) {
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APPID_MAP[env]}&redirect_uri=${encodeURIComponent(location.href)}&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww80fd6928a46cf33a&redirect_uri=${encodeURIComponent(location.href)}&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
location.href = url location.href = url
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment