123456789101112131415161718192021222324252627282930313233343536 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>登录</title>
- <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
- </head>
- <body>
- <div id="app">重定向...</div>
- <script>
- const redirectPath = getQueryString('redirectPath')
- if (redirectPath === '/pages/project/list') {
- wx.miniProgram.redirectTo({
- url: '/pages/project/list',
- })
- } else {
- wx.miniProgram.reLaunch({
- url: "/pages/home/index"
- });
- }
- function getQueryString(name, url) {
- let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
- let r = (url || window.location.search).substr(1).match(reg)
- if (r != null) {
- return decodeURIComponent(r[2])
- }
- return null
- }
- </script>
- </body>
- </html>
|