Authored by 陈轩

fix

... ... @@ -14,7 +14,22 @@ const model = {
product(params) {
return api.get('', Object.assign({
method: 'h5.product.data'
}, params));
}, params))
.then(result => {
// result.storage 的 数值 不可靠,循环累加 库存
let storage = 0;
if (result.goodsList) {
for (let good of result.goodsList) {
for (let size of good.goodsSizeBoList) {
storage += size.goodsSizeStorageNum;
}
}
}
result.storage = storage;
return result;
});
},
... ...
... ... @@ -10,10 +10,12 @@
const $ = require('jquery');
const ANIMATIONS = {
none: { in : 'overlay-in',
none: {
in: 'overlay-in',
out: 'overlay-out'
},
fade: { in : 'overlay-fade-in',
fade: {
in: 'overlay-fade-in',
out: 'overlay-fade-out'
}
};
... ... @@ -28,7 +30,8 @@ class Overlay {
clickToClose: true, // 点击关闭
onClose: $.noop, // 关闭回调函数
animation: 'fade', // 动画效果
disableScrolling: true // 是否禁止
disableScrolling: true, // 是否禁止
disableTouchMove: false
};
// 初始化参数
... ... @@ -49,7 +52,7 @@ class Overlay {
}
});
if (this.settings.disableScrolling) {
if (this.settings.disableScrolling && this.settings.disableTouchMove) {
// 覆盖层出现时阻止滚动
document.body.addEventListener('touchmove', (e) => {
if (this.isVisible) {
... ...
... ... @@ -36,6 +36,7 @@
ul,
li {
position: relative;
margin: 0;
padding: 0;
list-style: none;
... ... @@ -192,8 +193,15 @@
}
a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 20px;
display: inline;
color: #000;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
... ...