Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李奇
8 years ago
Commit
4b6693e139239318450bb77fbe20d7bdc1d807ce
1 parent
83a73378
master
...
feature/blk-miniapp
feature/brand-multi-shops
feature/change
feature/context
feature/context-and-tracking
feature/docker
feature/hotfix
feature/leftScrollMore
feature/listGoodsList
feature/style
feature/tracking
feature/webpack-hash
gray
hotfix/moreGoods
hotfix/ssr
release/0725
release/5.8
fixed:商品图片显示不完整
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
apps/product/controllers/detail.js
public/vue/product/detail/image-swiper.vue
apps/product/controllers/detail.js
View file @
4b6693e
...
...
@@ -64,7 +64,7 @@ const component = {
product
.
formatPrice
=
product
.
format_sales_price
!==
'0'
?
product
.
format_sales_price
:
product
.
format_market_price
;
//eslint-disable-line
product
.
isDiscount
=
product
.
market_price
>
product
.
sales_price
;
product
.
coverImage
=
product
.
goods_list
[
0
].
color_image
;
product
.
coverImage
=
product
.
goods_list
[
0
].
images_list
[
0
].
image_url
;
res
.
render
(
'pdetail'
,
{
module
:
'product'
,
...
...
public/vue/product/detail/image-swiper.vue
View file @
4b6693e
...
...
@@ -4,7 +4,7 @@
<swiper :options="swiperOption" ref="swiper">
<swiper-slide v-for="item in goodsList" :key="item.title">
<img :title="item.title"
v-img-src="{src: item.
color_image
, width: 580, height: 770}"
v-img-src="{src: item.
image_url
, width: 580, height: 770}"
width="100%">
</swiper-slide>
</swiper>
...
...
@@ -19,6 +19,7 @@
</template>
<script>
require('swiper/dist/css/swiper.css');
import _ from 'lodash';
import yoho from 'yoho';
import util from 'common/util';
import vas from 'vue-awesome-swiper';
...
...
@@ -31,6 +32,7 @@
let vm = this;
return {
imageList: [],
slideCount: 0,
activeIndex: 0,
goodsList: [],
...
...
@@ -55,8 +57,16 @@
}
},
watch: {
goods(val) {
let temp = val.slice();
goods(list) {
let temp = [];
_.each(list, item => {
_.each(item.images_list, img => {
temp.push({
image_url: img.image_url
});
});
});
const len = temp.length;
if (len > 1) {
...
...
@@ -64,7 +74,7 @@
}
this.goodsList = temp;
this.slideCount =
this.goodsList.length
;
this.slideCount =
len
;
}
},
methods: {
...
...
Please
register
or
login
to post a comment