Commit 3eb712379a56169cc898a4ad94d4d1d23d232df2
1 parent
4d5cf991
App外需要登录检测优化~
Showing
2 changed files
with
23 additions
and
19 deletions
index.html
| 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 2 | <html> | 2 | <html> |
| 3 | - <head> | ||
| 4 | - <meta charset="utf-8"> | ||
| 5 | - <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"> | ||
| 6 | - <link rel="Shortcut Icon" href="static/img/favicon.png" /> | ||
| 7 | - <!-- HTTP 1.1 --> | 3 | + <head> |
| 4 | + <meta charset="utf-8"> | ||
| 5 | + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"> | ||
| 6 | + <link rel="Shortcut Icon" href="static/img/favicon.png" /> | ||
| 7 | + <!-- HTTP 1.1 --> | ||
| 8 | <meta http-equiv="pragma" content="no-cache"> | 8 | <meta http-equiv="pragma" content="no-cache"> |
| 9 | <!-- HTTP 1.0 --> | 9 | <!-- HTTP 1.0 --> |
| 10 | <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> | 10 | <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> |
| 11 | <!-- Prevent caching at the proxy server --> | 11 | <!-- Prevent caching at the proxy server --> |
| 12 | <meta http-equiv="expires" content="0"> | 12 | <meta http-equiv="expires" content="0"> |
| 13 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /> | 13 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /> |
| 14 | - <title> </title> | 14 | + <title> </title> |
| 15 | 15 | ||
| 16 | - <!-- Crypto.js AES加密 CDN引用方式 --> | 16 | + <!-- Crypto.js AES加密 CDN引用方式 --> |
| 17 | <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/core.min.js"></script> | 17 | <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/core.min.js"></script> |
| 18 | <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/enc-base64.min.js"></script> | 18 | <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/enc-base64.min.js"></script> |
| 19 | <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/md5.min.js"></script> --> | 19 | <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/md5.min.js"></script> --> |
| @@ -30,10 +30,10 @@ | @@ -30,10 +30,10 @@ | ||
| 30 | <script type="text/javascript" charset="UTF-8" src="https://wjj.ys1.cnliveimg.com/769/h5/js/jquery.min.js"></script> | 30 | <script type="text/javascript" charset="UTF-8" src="https://wjj.ys1.cnliveimg.com/769/h5/js/jquery.min.js"></script> |
| 31 | <script type="text/javascript" charset="UTF-8" src="//res.cdn.openinstall.io/openinstall.js"></script> | 31 | <script type="text/javascript" charset="UTF-8" src="//res.cdn.openinstall.io/openinstall.js"></script> |
| 32 | <script type="text/javascript" src="static/js/cnLive_openinstall.js"></script> | 32 | <script type="text/javascript" src="static/js/cnLive_openinstall.js"></script> |
| 33 | - </head> | ||
| 34 | - <body> | ||
| 35 | - <div class="warpper"> | ||
| 36 | - <div id="app"></div> | ||
| 37 | - </div> | ||
| 38 | - </body> | ||
| 39 | -</html> | 33 | + </head> |
| 34 | + <body> | ||
| 35 | + <div class="warpper"> | ||
| 36 | + <div id="app"></div> | ||
| 37 | + </div> | ||
| 38 | + </body> | ||
| 39 | +</html> | ||
| 40 | \ No newline at end of file | 40 | \ No newline at end of file |
src/pages/common/common.vue
| @@ -116,7 +116,7 @@ | @@ -116,7 +116,7 @@ | ||
| 116 | }, 100); | 116 | }, 100); |
| 117 | } | 117 | } |
| 118 | }, | 118 | }, |
| 119 | - | 119 | + |
| 120 | /** | 120 | /** |
| 121 | * 设置访问设备 | 121 | * 设置访问设备 |
| 122 | */ | 122 | */ |
| @@ -285,11 +285,15 @@ | @@ -285,11 +285,15 @@ | ||
| 285 | // 如果不在App内,未登录,调用mall项目登录页面 | 285 | // 如果不在App内,未登录,调用mall项目登录页面 |
| 286 | } else { | 286 | } else { |
| 287 | 287 | ||
| 288 | - // 设置跳转登录域名 | ||
| 289 | - let loginUrl = (this.mode == "prod") ? "https://managemall.cnlive.com/html/mall/1/#/pages/users/login/login" : "https://wjjshop.cnlive.com/html/mall/1/#/pages/users/login/login"; | 288 | + // 判断是否要调用App内登录,默认调用 |
| 289 | + if (doLogin) { | ||
| 290 | 290 | ||
| 291 | - // 跳转mall项目登录 | ||
| 292 | - window.location.href = loginUrl + "?processing=redirect&pages=" + encodeURIComponent(window.location.href); | 291 | + // 设置跳转登录域名 |
| 292 | + let loginUrl = (this.mode == "prod") ? "https://managemall.cnlive.com/html/mall/1/#/pages/users/login/login" : "https://wjjshop.cnlive.com/html/mall/1/#/pages/users/login/login"; | ||
| 293 | + | ||
| 294 | + // 跳转mall项目登录 | ||
| 295 | + window.location.href = loginUrl + "?processing=redirect&pages=" + encodeURIComponent(window.location.href); | ||
| 296 | + } | ||
| 293 | 297 | ||
| 294 | return false; | 298 | return false; |
| 295 | } | 299 | } |