Authored by 陈峰

Merge branch 'hotfix/coupon' into 'master'

Hotfix/coupon



See merge request !5
{
"name": "yoho-js-sdk",
"version": "1.3.1",
"version": "1.3.2",
"description": "YOHO!前端js的功能封装包,主要用于在活动页面中,对主要功能的封装。",
"keywords": [
"YOHO!",
... ...
... ... @@ -78,6 +78,7 @@ let _getCoin = function(data) {
});
};
let isSendCoupon = false;
let _getCoupon = function(data){
data.app = utils.queryString();
... ... @@ -86,10 +87,16 @@ let _getCoupon = function(data){
data.app.client_type = data.app.client_type || cookies.cookie('app_client_type');
data.app.session_key = data.app.session_key || cookies.cookie('app_session_key');
if (isSendCoupon) {
return;
}
isSendCoupon = true;
jsonp({
url: '//m.yohobuy.com/activity/feature/couponSend?callback=?',
data: data
}).then(function(res) {
isSendCoupon = false;
if (res.code === 200) {
utils.showTip({
title: '领取成功',
... ... @@ -110,6 +117,7 @@ let _getCoupon = function(data){
});
}
}, function(){
isSendCoupon = false;
utils.showTip({
title: '领取失败<br>请刷新重新领取',
content: '如多次领取失败,请联系客服人员<br>带来不便敬请谅解',
... ...