|
|
/* global wx */
|
|
|
// 1. 优惠券领取
|
|
|
// 2. YOHO币领取
|
|
|
|
...
|
...
|
@@ -79,7 +80,7 @@ let _getCoin = function(data) { |
|
|
|
|
|
let _getCoupon = function(data){
|
|
|
data.app = utils.queryString();
|
|
|
|
|
|
|
|
|
data.app.uid = cookies.cookie('app_uid') || data.app.uid;
|
|
|
data.app.app_version = cookies.cookie('app_version') || data.app.app_version;
|
|
|
data.app.client_type = cookies.cookie('app_client_type') || data.app.client_type;
|
...
|
...
|
@@ -127,7 +128,7 @@ let _initCoin = function(uid){ |
|
|
uid: uid
|
|
|
});
|
|
|
|
|
|
cookies.setCookie('yoho-coin-token', '');
|
|
|
cookies.setCookie('yoho-coin-token', '');
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -171,6 +172,14 @@ let _initCoupon = function(uid) { |
|
|
});
|
|
|
} else {
|
|
|
cookies.setCookie('yoho-conpon-token', token);
|
|
|
|
|
|
if (window.__wxjs_environment === 'miniprogram' && wx && wx.miniProgram) {
|
|
|
wx.miniProgram.navigateTo({
|
|
|
url: `/pages/userCenter/userCenter?h5back=${encodeURIComponent(location.href)}`
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if ($('#intimacy-link').length <= 0) {
|
|
|
$('body').append('<a href=\'' + user.noLoginUrl() + '\' style="display:none;" id="intimacy-link"><span class="intimacy-link"></span></a>');
|
|
|
}
|
...
|
...
|
@@ -185,4 +194,4 @@ export default { |
|
|
_initCoin(uid); // 初始化有货币
|
|
|
_initCoupon(uid); // 初始化优惠券
|
|
|
}
|
|
|
}; |
|
|
\ No newline at end of file |
|
|
}; |
...
|
...
|
|