Authored by uedxwg

'购物判断条件修改'

... ... @@ -23,16 +23,17 @@ class Yohobuy
// const SERVICE_URL = 'http://service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL = 'http://apih5.yoho.cn/';
// const API_URL2 = 'http://apih5.yoho.cn/';
// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
/* 测试环境 */
const API_URL = 'http://testapi.yoho.cn:28078/';
const API_URL = 'http://testapi.yoho.cn:28078/';
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
/**
* 私钥列表
*
... ...
... ... @@ -275,10 +275,11 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
}
if (num === 1 || 0 === leftNum - 0) {
tip.show('您选择的数量不能为零~');
return;
}
if (num < 1) {
$num.val(1);
if (num < 0) {
tip.show('您选择的数量不能为零~');
return;
}
... ... @@ -299,7 +300,7 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
//TODO:库存数验证
if (num > leftNum - 1) {
$num.val(leftNum);
tip.show('您选择的数量超过了最大库存量~');
return;
}
$num.val(num + 1);
... ... @@ -317,11 +318,6 @@ $yohoPage.on('touchstart', '.btn-minus', function() {
if (!checkColorSizeNum()) {
return;
}
if (isNaN(num)) {
tip.show('您选择的数量不是一个数字~');
return;
}
//TODO status change
if ($('#chose-btn-sure').html() === '已售罄') {
... ...
... ... @@ -127,7 +127,6 @@
height: 90rem / $pxConvertRem;
line-height: 90rem / $pxConvertRem;
margin-bottom: 10rem / $pxConvertRem;
background: #f8f8f8;
padding: 0 20rem / $pxConvertRem;
&:last-child {
... ...
... ... @@ -52,7 +52,7 @@
<a class="btn btn-minus" href="javascript:void(0);">
<span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe625;</span>
</a>
<input id="good-num" class="good-num {{#if promotionId}}disabled{{/if}}" type="text" value="1" {{#if promotionId}}disabled="true"{{/if}}>
<input id="good-num" class="good-num disabled" type="text" value="1" disabled="true">
<a class="btn btn-plus" href="javascript:void(0);">
<span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe624;</span>
</a>
... ...