Authored by 郝肖肖

有货币使用调整

... ... @@ -366,11 +366,11 @@
</dl>
{{/if}}
<dl class="play-bi-pan pan">
<dt class="{{#unless yohoCoinCompute.yohoCoinClick}}not-btn{{/unless}}">
<span class="not-btn-tip red {{#if yohoCoinCompute.yohoCoinClick}}hide{{/if}}">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
<dt>
<span class="not-btn-tip red hide">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
</dt>
<dd>
<div class="errbitip red"></div>
<div class="errbitip red">{{#unless yohoCoinCompute.yohoCoinClick}}{{yohoCoinCompute.yohoCoinMsg}}{{/unless}}</div>
<ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
<li>
<div class="float-left num-list-width">
... ... @@ -394,7 +394,7 @@
<li>
您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个
</li>
<li>
<li class="{{#unless yohoCoinCompute.yohoCoinClick}}coin-gray{{/unless}} yohoCoinTip">
本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin">¥{{yohoCoinCompute.yohoCoin}}</span>
</li>
<li>
... ...
... ... @@ -112,11 +112,11 @@
</ul>
<dl class="play-bi-pan pan">
<dt class="{{#unless yohoCoinCompute.yohoCoinClick}}not-btn{{/unless}}">
<span class="not-btn-tip red {{#if yohoCoinCompute.yohoCoinClick}}hide{{/if}}">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
<dt>
<span class="not-btn-tip red hide">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
</dt>
<dd>
<div class="errbitip red"></div>
<div class="errbitip red">{{#unless yohoCoinCompute.yohoCoinClick}}{{yohoCoinCompute.yohoCoinMsg}}{{/unless}}</div>
<ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
<li>
<div class="float-left num-list-width">
... ... @@ -140,7 +140,7 @@
<li>
您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个
</li>
<li>
<li class="{{#unless yohoCoinCompute.yohoCoinClick}}coin-gray{{/unless}} yohoCoinTip">
本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin"{{yohoCoinCompute.yohoCoin}}</span>
</li>
<li>
... ...
... ... @@ -279,12 +279,15 @@ var Order = {
//有货币清零状态更新
$('dl.play-bi-pan').find('dt').removeClass('not-btn');
$('.not-btn-tip').addClass('hide');
$('.yohoCoinTip').removeClass('coin-gray');
if (!data.yohoCoinCompute.yohoCoinClick) {
//不可以使用状态
$('dl.play-bi-pan').find('dt').addClass('not-btn');
$('.not-btn-tip').removeClass('hide');
//如果有货币按钮为打开状态,则关闭
Order.Common.winHide($('.play-bi-pan'));
}
$('#biprice').data('.yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
$('#biprice').data('yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
$('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit);
$('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum);
$('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum);
... ... @@ -517,11 +520,7 @@ var Order = {
var pan = $(this).parents('dl.pan');
var juanText;
if (!$('#biprice').data('yoho-coin-click')) {
$('.errbitip').html('抱歉,您的订单实付款不满足有货币使用条件');
return true;
}
$('.errbitip').html('');
$('#biprice').addClass('is-select');
getSelectData(function(d) {
... ... @@ -542,12 +541,18 @@ var Order = {
url: '/cart/index/orderCompute',
data: d,
success: function(data) {
let result = data.data;
e.$loading.hide();
if (data.code === 200) {
if (result.yohoCoinCompute && !result.yohoCoinCompute.yohoCoinClick) {
$('.errbitip').html(result.yohoCoinCompute.yohoCoinMsg);
$('#biprice').removeClass('is-select');
$('.yohoCoinTip').addClass('coin-gray');
return false;
}
u.render(data.data, juanText);
u.render(result, juanText);
c.winHide(pan);
} else {
... ...
... ... @@ -166,11 +166,7 @@ var TicketCat = {
var pan = $(this).parents('dl.pan');
var selectData = {};
if (!$('#biprice').data('yoho-coin-click')) {
$('.errbitip').html('抱歉,您的订单实付款不满足有货币使用条件');
return true;
}
$('.errbitip').html('');
$('#biprice').addClass('is-select');
selectData = _this.getSelectData();
if (selectData.yohoCoin * 1 <= 0) {
... ... @@ -185,9 +181,17 @@ var TicketCat = {
url: '/cart/index/setTicket',
data: selectData,
success: function(data) {
var result = data.data;
el.$loading.hide();
if (data.code === 200) {
_this.render(data.data);
if (result.yohoCoinCompute && !result.yohoCoinCompute.yohoCoinClick) {
$('.errbitip').html(result.yohoCoinCompute.yohoCoinMsg);
$('#biprice').removeClass('is-select');
$('.yohoCoinTip').addClass('coin-gray');
return false;
}
_this.render(result);
c.winHide(pan);
} else {
$('.errbitip').html(data.message);
... ... @@ -305,7 +309,7 @@ var TicketCat = {
for (i = 0; i < dArr.length; i++) {
if (dArr[i].promotion === '有货币') {
if (dArr[i].promotion === '有货币') {
dArr[i].promotion = '有货币<span class="bi-modify">[修改]</span>:';
}
... ... @@ -327,12 +331,15 @@ var TicketCat = {
//有货币清零状态更新
$('dl.play-bi-pan').find('dt').removeClass('not-btn');
$('.not-btn-tip').addClass('hide');
$('.yohoCoinTip').removeClass('coin-gray');
if (!data.yohoCoinCompute.yohoCoinClick) {
//不可以使用状态
$('dl.play-bi-pan').find('dt').addClass('not-btn');
$('.not-btn-tip').removeClass('hide');
//如果有货币按钮为打开状态,则关闭
Order.Common.winHide($('.play-bi-pan'));
}
$('#biprice').data('.yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
$('#biprice').data('yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
$('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit);
$('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum);
$('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum);
... ...