Authored by hongyong.zhao

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

... ... @@ -21,7 +21,7 @@ import ImgSize from '../../../components/img-size';
export default {
props: {
list: Array,
param: Object,
yasParams: Object,
},
data: function() {
return {
... ... @@ -30,7 +30,9 @@ export default {
},
methods: {
goDetail(product, index) {
this.yasDetail(product.id,index);
if (Object.keys(this.yasParams).length) {
this.yasDetail(product.id, index);
}
this.$router.push({
name: 'ProductDetail',
params: {
... ... @@ -74,9 +76,8 @@ export default {
let DATA = [];
list.map((value, i) => {
DATA.push({...this.param, I_INDEX: i + index, PRD_ID: value.id});
DATA.push({...this.yasParams, I_INDEX: i + index, PRD_ID: value.id});
});
console.log(DATA)
this.$store.dispatch('reportYas', {
params: {
param: {DATA},
... ... @@ -95,11 +96,10 @@ export default {
// 5.TAB_NAME:tab切名称,人气,价格,新品;
// 6.I_INDEX:商品顺序号,从1开始递增;
// 7.PRD_ID:商品id
console.log({...this.param, I_INDEX: index, PRD_ID: id })
this.$store.dispatch('reportYas', {
params: {
param: {...this.param, I_INDEX: index, PRD_ID: id },
appop: 'XY_UFO_SHOW_EVENT'
param: {...this.yasParams, I_INDEX: index, PRD_ID: id },
appop: 'XY_UFO_PRD_LIST_C'
}
});
}
... ...
... ... @@ -24,7 +24,7 @@
:data="productList.list"
@scroll-end="scrollHandler"
@pulling-up="onPullingUp">
<ProductList ref="product" :list="productList.list" :param="yasParams"></ProductList>
<ProductList ref="product" :list="productList.list" :yasParams="yasParams"></ProductList>
</Scroll>
<EmptyList class="empty-wrapper product-list" :tip="`暂无数据`" v-show="productList.isEmpty">
</EmptyList>
... ... @@ -50,7 +50,7 @@ export default {
Filtrate,
EmptyList
},
data: function () {
data: function() {
return {
scrollOptions: {
bounce: {
... ... @@ -94,7 +94,7 @@ export default {
},
};
},
activated: function() {
activated: async function() {
if (this.yoho.direction === 'forword') {
this.$refs.filtrate.hide();
Object.assign(this.$data, this.$options.data());
... ... @@ -110,7 +110,8 @@ export default {
this.title = '商品列表';
}
!params.order && (params.order = 'sale_desc');
this.fetchList({...params, isReset: true});
await this.fetchList({...params, isReset: true});
this.yasShowPage();
},
computed: {
... ... @@ -186,7 +187,7 @@ export default {
},
// 点击tab flag, 0: 推荐, 1: 价格, 2: 人气, 3: 新品
pressType(flag) {
async pressType(flag) {
if (flag === this.selectedType && flag !== 1) {
return;
}
... ... @@ -214,9 +215,11 @@ export default {
params.order = 'st_desc';
}
params.isReset = true;
this.fetchList(params);
await this.fetchList(params);
this.$refs.scroll.scrollTo(0, 0, 300);
this.changeArrow();
this.yasShowPage();
this.yasTab();
},
goSearch() {
this.$router.push({
... ... @@ -260,12 +263,34 @@ export default {
});
}
if(tab && typeof tab === 'object' && Object.keys(tab).length) {
if (tab && typeof tab === 'object' && Object.keys(tab).length) {
this.yasParams.TAB_ID = tab.index;
this.yasParams.TAB_NAME = tab.name;
}
},
yasShowPage() {
let {total, list} = this.productList;
let PRD_LIST = [];
for (let item of list) {
PRD_LIST.push(item.id);
}
PRD_LIST = PRD_LIST.toString();
this.$store.dispatch('reportYas', {
params: {
param: {...this.yasParams, TOTAL: total, PRD_LIST},
appop: 'XY_UFO_PRD_LIST_L'
}
});
},
yasTab() {
this.$store.dispatch('reportYas', {
params: {
param: {...this.yasParams},
appop: 'XY_UFO_PRD_LIST_TAB_C'
}
});
}
}
};
</script>
... ...
... ... @@ -68,8 +68,8 @@ export default {
span {
font-size: 0.7em;
line-height: 1.4;
border: 1px solid #f00;;
color: #f00;
border: 1px solid #feabac;
color: #feabac;
text-align: center;
padding: 0 0.9em;
margin-right: 0.8em;
... ...
... ... @@ -206,6 +206,7 @@ export default {
align-items: baseline;
font-size: 40px;
letter-spacing: 0;
font-family: $num-font;
span:nth-child(2) {
font-size: 0.8em;
... ...
... ... @@ -200,7 +200,7 @@ export default {
li {
box-sizing: border-box;
width: 25%;
width: 25%; // 当前固定为4列
float: left;
border: 1px solid #ddd;
margin-right: -1px;
... ... @@ -245,6 +245,7 @@ export default {
.size-info {
color: #000;
font-family: $num-font;
font-weight: bold;
font-size: 40px;
display: inline-block;
... ...
... ... @@ -225,6 +225,7 @@ export default {
i {
float: right;
color: #999;
}
}
... ... @@ -232,7 +233,8 @@ export default {
padding: 0 40px 16px;
}
.select-size, .select-type {
.select-size,
.select-type {
display: flex;
flex-direction: column;
height: 60vh;
... ... @@ -254,7 +256,6 @@ export default {
padding-top: 30px;
font-size: 32px;
color: #000;
font-family: "Alte DIN 1451 Mittelschrift";
}
}
}
... ... @@ -335,6 +336,10 @@ export default {
overflow: scroll;
}
.crash-info {
font-family: $num-font;
}
.footer {
padding: 16px 0;
display: flex;
... ... @@ -344,9 +349,9 @@ export default {
span {
font-size: 28px;
margin-left: 8px;
i {
font-family: "Alte DIN 1451 Mittelschrift";
font-size: 20px;
font-style: normal;
}
... ...
... ... @@ -5,12 +5,12 @@
<div @click="onAllClick">全部 <i class="cubeic-arrow"></i></div>
</div>
<div class="row">
<div class="col" v-for="(product, idx) in list" :key="idx">
<div class="product-item" @click="onItemClick(product)">
<div class="col" v-for="(product, idx) in list" :key="idx" @click="onItemClick(product)">
<div class="product-item">
<square-img :src="product.default_images" :width="300" :height="300" />
<div class="name"><span>{{product.product_name}}</span></div>
<div class="price"><i>¥</i>{{product.price}}</div>
</div>
<div class="name"><span>{{product.product_name}}</span></div>
<div class="price"><i>¥</i>{{product.price}}</div>
</div>
</div>
</div>
... ... @@ -61,26 +61,30 @@ export default {
font-size: 36px;
font-weight: bold;
color: #000;
font-weight: bold;
}
.row {
overflow: hidden;
margin: 0 -8px;
margin: 0 -6px;
.col {
width: 33.3333%;
width: 222px;
padding: 0 8px;
float: left;
}
}
.product-item {
margin-top: 10px;
margin: 10px auto 0;
width: 180px;
text-align: center;
overflow: hidden;
}
.name {
width: 200px;
margin: 0 auto 8px;
height: 64px;
display: flex;
flex-direction: column;
... ... @@ -98,13 +102,15 @@ export default {
}
.price {
font-family: $num-font;
font-weight: bold;
font-size: 24px;
font-size: 32px;
color: #d0021b;
text-align: center;
i {
font-style: normal;
font-size: 0.9em;
font-size: 24px;
vertical-align: baseline;
}
}
... ...
$primary-color : #08304b;
$sub-color : #64ad88;
$num-font: "DINAlternate-Bold", "din alternate", "PingFang SC", "HiraginoSansGB-W3", "SanFranciscoText-Regular", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
@mixin cube-ufo-btn {
[type="button"] {
... ...
... ... @@ -19,8 +19,8 @@
<div class="info">
<div class="info-price">
<template v-if="productDetail.least_price >= 0"> ¥{{productDetail.least_price}}</template>
<template v-else>&nbsp;</template>
<template v-if="productDetail.least_price == null">{{'\u200E'}}</template>
<template v-else><i>¥</i>{{productDetail.least_price}}</template>
</div>
<div class="info-name">{{productDetail.product_name}}</div>
</div>
... ... @@ -55,15 +55,23 @@
<div class="footer">
<div class="heart">
<div class="icon-fav" v-if="isFav" @click="_toggleFav(false)">
<svg id="icon-heart" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
<title>heart</title>
<path d="M14 26c-0.25 0-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313 0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281z"></path>
<svg style="width: 1rem; height: 1rem;" viewBox="0 0 24 24">
<title>已收藏</title>
<g id="icon/已收藏" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g fill="#002B47">
<path d="M11.9998882,18.7717254 L6.90760779,20.9153484 C6.3574449,21.1469424 5.72370571,20.8886913 5.49211167,20.3385284 C5.42388696,20.1764573 5.39623656,20.0001874 5.41155922,19.8250107 L5.88943154,14.3617254 L5.88943154,14.3617254 L2.2755824,10.2271262 C1.88274872,9.77768578 1.92863753,9.09488771 2.37807795,8.70205402 C2.51228845,8.58474724 2.67342863,8.50245519 2.84714548,8.46250776 L8.22341829,7.22619542 L8.22341829,7.22619542 L11.0754231,2.5175655 C11.3846728,2.00699755 12.0492663,1.84379684 12.5598342,2.15304652 C12.708963,2.24337339 12.8340264,2.36843679 12.9243532,2.5175655 L15.7763581,7.22619542 L15.7763581,7.22619542 L21.1526309,8.46250776 C21.734369,8.59628261 22.097515,9.1763205 21.9637402,9.75805866 C21.9237928,9.93177551 21.8415007,10.0929157 21.7241939,10.2271262 L18.1103448,14.3617254 L18.1103448,14.3617254 L18.5882171,19.8250107 C18.6402311,20.4196615 18.200337,20.9438868 17.6056863,20.9959008 C17.4305096,21.0112235 17.2542397,20.9835731 17.0921686,20.9153484 L11.9998882,18.7717254 L11.9998882,18.7717254 Z"></path>
</g>
</g>
</svg>
</div>
<div class="icon-fav" v-else @click="_toggleFav(true)">
<svg id="icon-heart-o" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
<title>heart-o</title>
<path d="M26 9.312c0-4.391-2.969-5.313-5.469-5.313-2.328 0-4.953 2.516-5.766 3.484-0.375 0.453-1.156 0.453-1.531 0-0.812-0.969-3.437-3.484-5.766-3.484-2.5 0-5.469 0.922-5.469 5.313 0 2.859 2.891 5.516 2.922 5.547l9.078 8.75 9.063-8.734c0.047-0.047 2.938-2.703 2.938-5.563zM28 9.312c0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281s-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313z"></path>
<svg id="icon-heart-o" style="width: 1rem; height: 1rem;" viewBox="0 0 24 24">
<title>未收藏</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g stroke="#B2B2B2" stroke-width="1.62123234">
<path d="M6.59310422,20.1682298 L11.9998882,17.892215 L17.4066721,20.1682298 C17.4471899,20.185286 17.4912574,20.1921986 17.5350516,20.188368 C17.6837143,20.1753645 17.7936878,20.0443081 17.7806843,19.8956454 L17.2727172,14.088301 L21.113856,9.69365996 C21.1431827,9.66010733 21.1637558,9.61982229 21.1737426,9.57639307 C21.2071863,9.43095853 21.1163998,9.28594906 20.9709653,9.25250535 L15.2606075,7.93936778 L12.2310044,2.93752506 C12.2084227,2.90024288 12.1771569,2.86897703 12.1398747,2.84639531 C12.0122327,2.76908289 11.8460843,2.80988307 11.7687719,2.93752506 L8.73916885,7.93936778 L3.02881107,9.25250535 C2.98538186,9.26249221 2.94509681,9.28306522 2.91154419,9.31239191 C2.79918408,9.41060033 2.78771188,9.58129985 2.8859203,9.69365996 L6.72705916,14.088301 L6.21909207,19.8956454 C6.21526141,19.9394396 6.22217401,19.9835071 6.23923019,20.0240249 C6.2971287,20.1615656 6.4555635,20.2261284 6.59310422,20.1682298 Z"></path>
</g>
</g>
</svg>
</div>
收藏
... ... @@ -407,6 +415,8 @@ export default {
}
.slide {
height: 520px;
.square-img-container {
display: block;
width: 520px;
... ... @@ -467,8 +477,8 @@ export default {
span {
display: inline-block;
border: 1px solid #f00;
color: #f00;
border: 1px solid #feabac;
color: #feabac;
line-height: 1.8;
margin-right: 15px;
font-size: 0.8em;
... ... @@ -486,8 +496,10 @@ export default {
&-price {
color: #d0021b;
font-size: 48px;
font-family: $num-font;
font-weight: bold;
text-align: center;
letter-spacing: 0;
i {
font-style: normal;
... ... @@ -553,6 +565,7 @@ export default {
display: flex;
text-align: center;
padding: 16px 30px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
@include cube-ufo-btn;
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-35",
"version": "0.0.2-beta-36",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...