Authored by 李奇

猜你喜欢修改

... ... @@ -240,15 +240,6 @@ const component = {
* @param next
*/
mightLike: (req, res, next) => {
const uid = req.user.uid;
if (!uid) {
return res.json({
code: 200,
data: []
});
}
const channel = req.query.channel || req.cookies._Channel || 'men';
const params = {
uid: req.user.uid,
... ... @@ -262,6 +253,7 @@ const component = {
};
model.mightLike(params).then(result => {
console.log(result.data.product_list);
if (result && result.code === 200) {
res.json({
code: 200,
... ...
... ... @@ -124,7 +124,7 @@
font-size: 20px;
line-height: 1.4;
height: 67.1999999999px;
font-weight: normal;
font-weight: normal;
a {
color: #888;
... ...
... ... @@ -3,8 +3,10 @@
<div class="list-wrap">
<div class="product-item" v-for="item in list">
<a :href="item.url">
<img :src="item.default_images">
<p class="product-name">{{item.product_name}}</p>
<a href="{{item | goodsUrl}}">
<img :src="item.default_images | resize 250 335">
<p class="product-name">{{item.product_name}}</p>
</a>
</a>
<div class="price">
<span class="discount" v-if="item.sales_price">¥{{item.sales_price}}</span>
... ... @@ -37,7 +39,6 @@
.product-item {
display: inline-block;
width: 250px;
height: 330px;
padding: 0;
margin-right: 20px;
text-align: left;
... ...
... ... @@ -2,12 +2,11 @@
<div class="image-swipe">
<div class="swipe-wrap">
<swiper :options="swiperOption" v-ref:swiper>
<swiper-slide v-for="item in goods">
<swiper-slide v-for="(index, item) in goods">
<img title="{{item.title}}"
:src="item.color_image | resize 580 770"
width="100%" alt=""
data-index="{{$index}}"
@click.prevent="showcase()">
@click="showcase(index)">
</swiper-slide>
</swiper>
</div>
... ... @@ -83,17 +82,17 @@
},
computed: {
swiper() {
return this.$refs.swiper.swiper
return this.$refs.swiper.wisper
}
},
methods: {
showcase: function() {
alert(this.swiper.activeIndex);
showcase: function(index) {
alert(index);
const opts = {
index,
images: this.goods.map((item) => {
return item.color_image;
}).filter(image => image),
index: this.swiper.activeIndex
};
yoho.goImageBrowser(opts);
... ...