Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
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
张文文
5 years ago
Commit
6a0e24e7852b7c96cffa3c151c50acc1aa91242a
1 parent
8815de99
商品添加销售标签
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
3 deletions
apps/pages/list/components/productList.vue
apps/pages/product/components/top-list.vue
package.json
apps/pages/list/components/productList.vue
View file @
6a0e24e
<template>
<div class="bg">
<div class="product-list-item" v-if="list.length" v-for="(product,index) in list" @click="goDetail(product, index)"
<div class="bg" v-if="list.length">
<div class="product-list-item" v-for="(product,index) in list" @click="goDetail(product, index)"
:key="index" :class="(index) % 2 === 0 && 'magrin-right'">
<div class="item-top">
<div class="item-price">
...
...
@@ -10,6 +10,14 @@
</div>
<ImgSize class="item-imge" :src="product.default_images" :width="274" :height="274"/>
<div class="item-name">{{product.product_name}}</div>
<div
v-if="product.customize_tag && product.customize_tag.length"
class="tag-wrapper">
<ImgSize class="item-tag" :src="product.customize_tag[0].url2" :width="200" :height="200"/>
</div>
</div>
</div>
</template>
...
...
@@ -186,6 +194,18 @@ export default {
margin: 0 10px;
}
.tag-wrapper {
width: 120px;
height: 40px;
position: absolute;
top: 72px;
}
.item-tag {
width: 84px;
height: 26px;
}
.item-name {
font-size: 24px;
color: #000;
...
...
apps/pages/product/components/top-list.vue
View file @
6a0e24e
...
...
@@ -11,6 +11,8 @@
</div>
<div class="name"><span>{{product.product_name}}</span></div>
<div class="price"><i>¥</i>{{product.price}}</div>
<ImgSize v-if="product.customize_tag && product.customize_tag.length" class="item-tag" :src="product.customize_tag[0].url2" :width="200" :height="60"/>
</div>
</div>
</div>
...
...
@@ -18,11 +20,13 @@
<script>
import SquareImg from './square-img';
import ImgSize from '../../../components/img-size';
export default {
name: 'TopList',
components: {
SquareImg,
ImgSize
},
props: {
list: {
...
...
@@ -76,6 +80,17 @@ export default {
width: 222px;
padding: 0 8px;
float: left;
position: relative;
&:before {
content: "";
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
}
}
}
...
...
@@ -86,6 +101,14 @@ export default {
overflow: hidden;
}
.item-tag {
position: absolute;
top: 0;
left: 10px;
width: 84px;
height: 26px;
}
.name {
width: 200px;
margin: 0 auto 8px;
...
...
package.json
View file @
6a0e24e
{
"name"
:
"xianyu-ufo-app-web"
,
"version"
:
"0.0.2-beta-
2
"
,
"version"
:
"0.0.2-beta-
3
"
,
"private"
:
true
,
"description"
:
"Xianyu Project With Express"
,
"repository"
:
{
...
...
Please
register
or
login
to post a comment