Authored by huangyi

活动sdk init

@@ -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 }
@@ -62,7 +62,7 @@ export default class { @@ -62,7 +62,7 @@ export default class {
62 return true; 62 return true;
63 } 63 }
64 }) 64 })
65 - } 65 + };
66 66
67 wxShare = shareDate => { 67 wxShare = shareDate => {
68 this.wxSignature(function(){ 68 this.wxSignature(function(){