Showing
2 changed files
with
1 additions
and
11 deletions
@@ -237,7 +237,7 @@ let _getProduct = function(param) { | @@ -237,7 +237,7 @@ let _getProduct = function(param) { | ||
237 | 237 | ||
238 | export default { | 238 | export default { |
239 | init(uid) { | 239 | init(uid) { |
240 | - if (utils.isApp()) { | 240 | + if (!uid && utils.isApp()) { |
241 | document.addEventListener('deviceready', function() { | 241 | document.addEventListener('deviceready', function() { |
242 | window.yohoInterface.triggerEvent(function(data) { | 242 | window.yohoInterface.triggerEvent(function(data) { |
243 | user.uid = data.uid; // app端 获取uid | 243 | user.uid = data.uid; // app端 获取uid |
@@ -12,16 +12,6 @@ $(function() { | @@ -12,16 +12,6 @@ $(function() { | ||
12 | openapp.init(); | 12 | openapp.init(); |
13 | 13 | ||
14 | user.init().then(uid => { | 14 | user.init().then(uid => { |
15 | - if (!uid) { // 没有uid时,尝试从app中获取 | ||
16 | - document.addEventListener('deviceready', function() { | ||
17 | - window.yohoInterface.triggerEvent(function(data) { | ||
18 | - user.uid = data.uid; // app端 获取uid | ||
19 | - }, function() {}, { | ||
20 | - method: 'get.analyticAppData' | ||
21 | - }); | ||
22 | - }, false); | ||
23 | - } | ||
24 | - | ||
25 | individuation.init(uid); // 个性化推荐 | 15 | individuation.init(uid); // 个性化推荐 |
26 | promotion.init(uid); // 促销 | 16 | promotion.init(uid); // 促销 |
27 | user.auth(); // 权限验证 | 17 | user.auth(); // 权限验证 |
-
Please register or login to post a comment