jiangping
2023-10-16 d7fe8ae3888c8e2b1eea3c1e3769be0d42a21cc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script>
  var url = window.location.href
  if (url.indexOf('?code') === -1) {
    let query = url.split('?')[1]
    // let tempUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_url=https://www.mes.red/h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect`
    // let tempUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_url=https://dmtest.ahapp.net/doumeeplant_h5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect`
    let tempUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6ea339a336f26380&redirect_uri=https://www.mes.red/lingyangh5/redirect.html&response_type=code&scope=snsapi_base&state=#wechat_redirect'
    window.location.replace(tempUrl)
  } else {
    var code = url.substring(url.indexOf('?') + 6, url.indexOf('&'))
    // let href1 = `https://www.mes.red/h5/#/wxLogin?code=${code}`
    // let href1 = `https://dmtest.ahapp.net/doumeeplant_h5/#/wxLogin?code=${code}`
    let href1 = `https://www.mes.red/lingyangh5/#/wxLogin?code=${code}`
    window.location.replace(href1)
  }
</script>
</body>
</html>