...
|
...
|
@@ -8,9 +8,9 @@ |
|
|
<div class="fav-del-left {{editmodel ? 'delshow': ''}}" @click="showDelBtn(item.fav_id)">
|
|
|
<span class="fav-del-span"><span class="icon icon-edit-del"></span></span>
|
|
|
</div>
|
|
|
<a :href="item.link">
|
|
|
<a :href="item.link | goodsUrl">
|
|
|
<div class="fav-img-box">
|
|
|
<img :src="item.imgUrl" alt=""/>
|
|
|
<img :src="item.imgUrl | resize 152 203" alt=""/>
|
|
|
</div>
|
|
|
<div class="fav-info-list">
|
|
|
<span class="title">{{item.title}}</span>
|
...
|
...
|
@@ -34,7 +34,7 @@ |
|
|
</ul>
|
|
|
<div class="fav-null-box {{ nullbox }}">
|
|
|
<span class="fav-null">您暂无收藏任何商品</span>
|
|
|
<a slot="go-shopping" class="go-shopping" :href="productUrl">随便逛逛</a>
|
|
|
<a slot="go-shopping" class="go-shopping" href='/product/new'>随便逛逛</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
...
|
...
|
@@ -45,7 +45,6 @@ |
|
|
const yoho = require('yoho');
|
|
|
|
|
|
module.exports = {
|
|
|
props: ['productUrl'],
|
|
|
data() {
|
|
|
return {
|
|
|
nullbox: 'hide',
|
...
|
...
|
@@ -69,21 +68,39 @@ |
|
|
data: {
|
|
|
page: ++_this.page
|
|
|
}
|
|
|
}).then(result => {
|
|
|
if (result.isend) {
|
|
|
}).then(data => {
|
|
|
if (_this.page === data.pageTotal) {
|
|
|
_this.busy = true;
|
|
|
} else {
|
|
|
_this.busy = false;
|
|
|
}
|
|
|
|
|
|
if (result.list.length) {
|
|
|
result.list.forEach(function(o) {
|
|
|
if (!_this.keys[o.fav_id]) {
|
|
|
_this.keys[o.fav_id] = true;
|
|
|
_this.productData.push(o);
|
|
|
data.productList.forEach(function(o){
|
|
|
if (!o.productSkn) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!_this.keys[o.productId]) {
|
|
|
_this.keys[o.productId] = true;
|
|
|
|
|
|
let discountPrice = false;
|
|
|
|
|
|
if (Number(o.marketPrice) - Number(o.salesPrice) > 0) {
|
|
|
discountPrice = '¥' + Number(Math.max(o.salesPrice, 0)).toFixed(2);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
_this.productData.push({
|
|
|
fav_id: o.productId,
|
|
|
link: o.goodsId && o.cnAlphabet ? o.productId : '',
|
|
|
imgUrl: o.image,
|
|
|
title: o.productName,
|
|
|
price: '¥' + Number(Math.max(o.marketPrice, 0)).toFixed(2),
|
|
|
discountPrice: discountPrice,
|
|
|
sellOut: o.storage <= 0,
|
|
|
invalidGoods: o.status === 0
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
|
|
|
_this.nullbox = _this.productData.length ? 'hide' : '';
|
|
|
}).fail(() => {
|
...
|
...
|
|