Authored by 郝肖肖

有货币使用调整

@@ -366,11 +366,11 @@ @@ -366,11 +366,11 @@
366 </dl> 366 </dl>
367 {{/if}} 367 {{/if}}
368 <dl class="play-bi-pan pan"> 368 <dl class="play-bi-pan pan">
369 - <dt class="{{#unless yohoCoinCompute.yohoCoinClick}}not-btn{{/unless}}">  
370 - <span class="not-btn-tip red {{#if yohoCoinCompute.yohoCoinClick}}hide{{/if}}">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付 369 + <dt>
  370 + <span class="not-btn-tip red hide">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
371 </dt> 371 </dt>
372 <dd> 372 <dd>
373 - <div class="errbitip red"></div> 373 + <div class="errbitip red">{{#unless yohoCoinCompute.yohoCoinClick}}{{yohoCoinCompute.yohoCoinMsg}}{{/unless}}</div>
374 <ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}> 374 <ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
375 <li> 375 <li>
376 <div class="float-left num-list-width"> 376 <div class="float-left num-list-width">
@@ -394,7 +394,7 @@ @@ -394,7 +394,7 @@
394 <li> 394 <li>
395 您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 395 您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个
396 </li> 396 </li>
397 - <li> 397 + <li class="{{#unless yohoCoinCompute.yohoCoinClick}}coin-gray{{/unless}} yohoCoinTip">
398 本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin">¥{{yohoCoinCompute.yohoCoin}}</span> 398 本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin">¥{{yohoCoinCompute.yohoCoin}}</span>
399 </li> 399 </li>
400 <li> 400 <li>
@@ -112,11 +112,11 @@ @@ -112,11 +112,11 @@
112 </ul> 112 </ul>
113 113
114 <dl class="play-bi-pan pan"> 114 <dl class="play-bi-pan pan">
115 - <dt class="{{#unless yohoCoinCompute.yohoCoinClick}}not-btn{{/unless}}">  
116 - <span class="not-btn-tip red {{#if yohoCoinCompute.yohoCoinClick}}hide{{/if}}">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付 115 + <dt>
  116 + <span class="not-btn-tip red hide">抱歉,您的订单实付款不满足有货币使用条件</span>使用有货币支付
117 </dt> 117 </dt>
118 <dd> 118 <dd>
119 - <div class="errbitip red"></div> 119 + <div class="errbitip red">{{#unless yohoCoinCompute.yohoCoinClick}}{{yohoCoinCompute.yohoCoinMsg}}{{/unless}}</div>
120 <ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}> 120 <ul class="play-pan" id="biprice" data-yoho-coin-num={{yohoCoinCompute.yohoCoinNum}} data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
121 <li> 121 <li>
122 <div class="float-left num-list-width"> 122 <div class="float-left num-list-width">
@@ -140,7 +140,7 @@ @@ -140,7 +140,7 @@
140 <li> 140 <li>
141 您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 141 您当前共有有货币<span class="sign-amount totalYohoCoinNum">{{yohoCoinCompute.totalYohoCoinNum}}</span>个,可用<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个
142 </li> 142 </li>
143 - <li> 143 + <li class="{{#unless yohoCoinCompute.yohoCoinClick}}coin-gray{{/unless}} yohoCoinTip">
144 本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin"{{yohoCoinCompute.yohoCoin}}</span> 144 本次使用有货币<span class="sign-amount yohoCoinNum">{{yohoCoinCompute.yohoCoinNum}}</span>个 抵扣<span class="sign-amount yohoCoin"{{yohoCoinCompute.yohoCoin}}</span>
145 </li> 145 </li>
146 <li> 146 <li>
@@ -279,12 +279,15 @@ var Order = { @@ -279,12 +279,15 @@ var Order = {
279 //有货币清零状态更新 279 //有货币清零状态更新
280 $('dl.play-bi-pan').find('dt').removeClass('not-btn'); 280 $('dl.play-bi-pan').find('dt').removeClass('not-btn');
281 $('.not-btn-tip').addClass('hide'); 281 $('.not-btn-tip').addClass('hide');
  282 + $('.yohoCoinTip').removeClass('coin-gray');
282 if (!data.yohoCoinCompute.yohoCoinClick) { 283 if (!data.yohoCoinCompute.yohoCoinClick) {
283 //不可以使用状态 284 //不可以使用状态
284 $('dl.play-bi-pan').find('dt').addClass('not-btn'); 285 $('dl.play-bi-pan').find('dt').addClass('not-btn');
285 $('.not-btn-tip').removeClass('hide'); 286 $('.not-btn-tip').removeClass('hide');
  287 + //如果有货币按钮为打开状态,则关闭
  288 + Order.Common.winHide($('.play-bi-pan'));
286 } 289 }
287 - $('#biprice').data('.yoho-coin-click', data.yohoCoinCompute.yohoCoinClick); 290 + $('#biprice').data('yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
288 $('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit); 291 $('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit);
289 $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); 292 $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum);
290 $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); 293 $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum);
@@ -517,11 +520,7 @@ var Order = { @@ -517,11 +520,7 @@ var Order = {
517 var pan = $(this).parents('dl.pan'); 520 var pan = $(this).parents('dl.pan');
518 var juanText; 521 var juanText;
519 522
520 - if (!$('#biprice').data('yoho-coin-click')) {  
521 - $('.errbitip').html('抱歉,您的订单实付款不满足有货币使用条件');  
522 - return true;  
523 - }  
524 - 523 + $('.errbitip').html('');
525 $('#biprice').addClass('is-select'); 524 $('#biprice').addClass('is-select');
526 525
527 getSelectData(function(d) { 526 getSelectData(function(d) {
@@ -542,12 +541,18 @@ var Order = { @@ -542,12 +541,18 @@ var Order = {
542 url: '/cart/index/orderCompute', 541 url: '/cart/index/orderCompute',
543 data: d, 542 data: d,
544 success: function(data) { 543 success: function(data) {
  544 + let result = data.data;
545 545
546 e.$loading.hide(); 546 e.$loading.hide();
547 -  
548 if (data.code === 200) { 547 if (data.code === 200) {
  548 + if (result.yohoCoinCompute && !result.yohoCoinCompute.yohoCoinClick) {
  549 + $('.errbitip').html(result.yohoCoinCompute.yohoCoinMsg);
  550 + $('#biprice').removeClass('is-select');
  551 + $('.yohoCoinTip').addClass('coin-gray');
  552 + return false;
  553 + }
549 554
550 - u.render(data.data, juanText); 555 + u.render(result, juanText);
551 c.winHide(pan); 556 c.winHide(pan);
552 557
553 } else { 558 } else {
@@ -166,11 +166,7 @@ var TicketCat = { @@ -166,11 +166,7 @@ var TicketCat = {
166 var pan = $(this).parents('dl.pan'); 166 var pan = $(this).parents('dl.pan');
167 var selectData = {}; 167 var selectData = {};
168 168
169 - if (!$('#biprice').data('yoho-coin-click')) {  
170 - $('.errbitip').html('抱歉,您的订单实付款不满足有货币使用条件');  
171 - return true;  
172 - }  
173 - 169 + $('.errbitip').html('');
174 $('#biprice').addClass('is-select'); 170 $('#biprice').addClass('is-select');
175 selectData = _this.getSelectData(); 171 selectData = _this.getSelectData();
176 if (selectData.yohoCoin * 1 <= 0) { 172 if (selectData.yohoCoin * 1 <= 0) {
@@ -185,9 +181,17 @@ var TicketCat = { @@ -185,9 +181,17 @@ var TicketCat = {
185 url: '/cart/index/setTicket', 181 url: '/cart/index/setTicket',
186 data: selectData, 182 data: selectData,
187 success: function(data) { 183 success: function(data) {
  184 + var result = data.data;
  185 +
188 el.$loading.hide(); 186 el.$loading.hide();
189 if (data.code === 200) { 187 if (data.code === 200) {
190 - _this.render(data.data); 188 + if (result.yohoCoinCompute && !result.yohoCoinCompute.yohoCoinClick) {
  189 + $('.errbitip').html(result.yohoCoinCompute.yohoCoinMsg);
  190 + $('#biprice').removeClass('is-select');
  191 + $('.yohoCoinTip').addClass('coin-gray');
  192 + return false;
  193 + }
  194 + _this.render(result);
191 c.winHide(pan); 195 c.winHide(pan);
192 } else { 196 } else {
193 $('.errbitip').html(data.message); 197 $('.errbitip').html(data.message);
@@ -305,7 +309,7 @@ var TicketCat = { @@ -305,7 +309,7 @@ var TicketCat = {
305 309
306 for (i = 0; i < dArr.length; i++) { 310 for (i = 0; i < dArr.length; i++) {
307 311
308 - if (dArr[i].promotion === '有货币') { 312 + if (dArr[i].promotion === '有货币') {
309 dArr[i].promotion = '有货币<span class="bi-modify">[修改]</span>:'; 313 dArr[i].promotion = '有货币<span class="bi-modify">[修改]</span>:';
310 } 314 }
311 315
@@ -327,12 +331,15 @@ var TicketCat = { @@ -327,12 +331,15 @@ var TicketCat = {
327 //有货币清零状态更新 331 //有货币清零状态更新
328 $('dl.play-bi-pan').find('dt').removeClass('not-btn'); 332 $('dl.play-bi-pan').find('dt').removeClass('not-btn');
329 $('.not-btn-tip').addClass('hide'); 333 $('.not-btn-tip').addClass('hide');
  334 + $('.yohoCoinTip').removeClass('coin-gray');
330 if (!data.yohoCoinCompute.yohoCoinClick) { 335 if (!data.yohoCoinCompute.yohoCoinClick) {
331 //不可以使用状态 336 //不可以使用状态
332 $('dl.play-bi-pan').find('dt').addClass('not-btn'); 337 $('dl.play-bi-pan').find('dt').addClass('not-btn');
333 $('.not-btn-tip').removeClass('hide'); 338 $('.not-btn-tip').removeClass('hide');
  339 + //如果有货币按钮为打开状态,则关闭
  340 + Order.Common.winHide($('.play-bi-pan'));
334 } 341 }
335 - $('#biprice').data('.yoho-coin-click', data.yohoCoinCompute.yohoCoinClick); 342 + $('#biprice').data('yoho-coin-click', data.yohoCoinCompute.yohoCoinClick);
336 $('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit); 343 $('#biprice').find('.num-limit-coin').html(data.yohoCoinCompute.yoho_coin_pay_rule.num_limit);
337 $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum); 344 $('#biprice').find('.totalYohoCoinNum').html(data.yohoCoinCompute.totalYohoCoinNum);
338 $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum); 345 $('#biprice').find('.yohoCoinNum').html(data.yohoCoinCompute.yohoCoinNum);