cloud_card.html 984 B

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>登录</title>
  8. <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  9. </head>
  10. <body>
  11. <div id="app">重定向...</div>
  12. <script>
  13. const redirectPath = getQueryString('redirectPath')
  14. if (redirectPath === '/pages/project/list') {
  15. wx.miniProgram.redirectTo({
  16. url: '/pages/project/list',
  17. })
  18. } else {
  19. wx.miniProgram.reLaunch({
  20. url: "/pages/home/index"
  21. });
  22. }
  23. function getQueryString(name, url) {
  24. let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
  25. let r = (url || window.location.search).substr(1).match(reg)
  26. if (r != null) {
  27. return decodeURIComponent(r[2])
  28. }
  29. return null
  30. }
  31. </script>
  32. </body>
  33. </html>