1234567891011121314151617181920212223242526272829303132333435363738 |
- <!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 === "back") {
- wx.miniProgram.navigateBack();
- } else if (redirectPath === '/pages/mine/index') {
- wx.miniProgram.switchTab({
- url: "/pages/mine/index",
- });
- } 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>
|