Showing
2 changed files
with
7 additions
and
7 deletions
@@ -22,9 +22,9 @@ const parseUrl = (url) => { | @@ -22,9 +22,9 @@ const parseUrl = (url) => { | ||
22 | return { | 22 | return { |
23 | path: url[0], | 23 | path: url[0], |
24 | query: query | 24 | query: query |
25 | - }; | ||
26 | -} | ||
27 | -let env = '' | 25 | + } |
26 | +}; | ||
27 | +let env = ''; | ||
28 | export default { | 28 | export default { |
29 | //evn | 29 | //evn |
30 | env: function () { | 30 | env: function () { |
@@ -33,7 +33,7 @@ export default { | @@ -33,7 +33,7 @@ export default { | ||
33 | document.addEventListener('deviceready', function () { | 33 | document.addEventListener('deviceready', function () { |
34 | }); | 34 | }); |
35 | env = 'app'; | 35 | env = 'app'; |
36 | - } else if ((!envFlag && navigator.userAgent.match(/miniProgram/i)) || (envFlag == 'miniprogram')) { | 36 | + } else if ((!envFlag && navigator.userAgent.match(/miniProgram/i)) || (envFlag === 'miniprogram')) { |
37 | env = 'miniprogram'; | 37 | env = 'miniprogram'; |
38 | } else if (location.origin === 'https://www.yohobuy.com') { | 38 | } else if (location.origin === 'https://www.yohobuy.com') { |
39 | env = 'pc' | 39 | env = 'pc' |
@@ -89,11 +89,11 @@ export default { | @@ -89,11 +89,11 @@ export default { | ||
89 | if (r.code === 200) { | 89 | if (r.code === 200) { |
90 | uid = Number(r.data) | 90 | uid = Number(r.data) |
91 | } | 91 | } |
92 | - resolve(uid) | 92 | + resolve(uid); |
93 | }); | 93 | }); |
94 | } else { | 94 | } else { |
95 | let uid = Number(cookies.cookie('app_uid')) || Number(getQueryObj().uid) || 0; | 95 | let uid = Number(cookies.cookie('app_uid')) || Number(getQueryObj().uid) || 0; |
96 | - resolve(uid) | 96 | + resolve(uid); |
97 | } | 97 | } |
98 | }) | 98 | }) |
99 | } | 99 | } |
-
Please register or login to post a comment