Authored by 张文文

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

# Conflicts:
#	apps/pages/second/list.vue
#	package.json
... ... @@ -47,7 +47,7 @@ export default {
* 1.P_NAME:页面名称,UFOProductDetail_LIST;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id;
* 4.PRD_ID:商品id;
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
recommendYasParams: {
... ... @@ -95,7 +95,7 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id
* 4.PRD_ID:商品id
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
this.yasTargets[id] = {
... ... @@ -103,7 +103,7 @@ export default {
offsetTop: productElList[idx].offsetTop,
offsetHeight: productElList[idx].offsetHeight,
},
yasParams: {...this.recommendYasParams, I_INDEX: idx + 1, PRD_SKN: item.id},
yasParams: {...this.recommendYasParams, I_INDEX: idx + 1, PRD_ID: item.id},
};
}
});
... ...
... ... @@ -5,7 +5,7 @@
<div @click="onAllClick">全部 <i class="cubeic-arrow"></i></div>
</div>
<div class="row">
<div class="col" v-for="(product, idx) in viewList" :key="idx" @click="onItemClick(product)">
<div class="col" v-for="(product, idx) in viewList" :key="idx" @click="onItemClick(product, idx)">
<div class="product-item">
<square-img :src="product.default_images" :width="600" :height="600" />
</div>
... ... @@ -36,8 +36,8 @@ export default {
},
},
methods: {
onItemClick(item) {
this.$emit('itemClick', item);
onItemClick(item, index) {
this.$emit('itemClick', { product:item, index });
},
onAllClick() {
this.$emit('allClick');
... ...
... ... @@ -171,7 +171,7 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id;
* 4.PRD_ID:商品id;
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
recommendYasParams: {
... ... @@ -434,13 +434,13 @@ export default {
* 1.P_NAME:页面名称,XY_UFOProductDetail;
* 2.P_PARAM:页面参数;
* 3.I_INDEX:曝光顺序;
* 4.PRD_SKN:商品id
* 4.PRD_ID:商品id
* 5.POS_ID: 1:相关商品,2: 推荐推荐,3: 相关商品列表页面
*/
this.topList.slice(0, 3).forEach((value, i) => {
this.yasTargets[`topList${i}`] = {
el: elInfo,
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_SKN: value.id, POS_ID: 1 },
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_ID: value.id, POS_ID: 1 },
};
});
}
... ... @@ -459,7 +459,7 @@ export default {
offsetTop: productElList[i].offsetTop,
offsetHeight: productElList[i].offsetHeight,
},
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_SKN: item.id },
yasParams: { ...this.recommendYasParams, I_INDEX: i + 1, PRD_ID: item.id },
};
}
});
... ... @@ -520,17 +520,45 @@ export default {
txt,
type: 'txt',
}).show();
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_GDS_DT_FAV',
param: {
PRD_ID: this.productId,
FAVTYPE: isFav ? 1 : 0
}
}
});
});
},
// 进入商品详情
gotoProduct(product) {
gotoProduct({product, index}) {
this.$router.push({
name: this.$route.name,
params: {
productId: product.id,
productInfo: product,
},
yasParams: {
P_NAME: 'XY_UFOProductDetail',
P_PARAM: this.productId,
POS_ID: 1,
}
}
});
this.$store.dispatch('reportYas', {
params: {
appop: 'XY_UFO_PRD_LIST_C',
param: {
P_NAME: 'XY_UFOProductDetail',
P_PARAM: this.productId,
POS_ID: 1,
I_INDEX: index + 1,
PRD_ID: product.id
}
}
});
},
... ...
... ... @@ -49,7 +49,7 @@ export default {
methods: {
goDetail(product, index) {
if (this.yasParams && Object.keys(this.yasParams).length) {
this.yasDetail(product.product_id, index);
this.yasDetail({ item: product, index });
}
this.$router.push({
... ... @@ -100,7 +100,7 @@ export default {
list.forEach((value, i) => {
const prdType = value.pre_sale_flag === 5 ? 2 : 1; // flag=5全新瑕疵,6二手
DATA.push({ ...this.yasParams, I_INDEX: i + index + 1, PRD_ID: value.product_id, PRD_TYPE: prdType });
DATA.push({ ...this.yasParams, I_INDEX: i + index + 1, PRD_SKUP: value.skup, PRD_ID: value.product_id, PRD_TYPE: prdType });
});
this.$store.dispatch('reportYas', {
... ... @@ -112,10 +112,10 @@ export default {
}
},
yasDetail(id, index) {
yasDetail({ item, index }) {
this.$store.dispatch('reportYas', {
params: {
param: { ...this.yasParams, I_INDEX: index + 1, PRD_ID: id },
param: { ...this.yasParams, I_INDEX: index + 1, PRD_ID: item.product_id, PRD_SKUP: item.skup },
appop: this.yasEventName
}
});
... ...
... ... @@ -43,7 +43,7 @@ export default {
methods: {
goDetail(item, index) {
if (this.yasParams && Object.keys(this.yasParams).length) {
this.yasDetail(index);
this.yasDetail({ item, index });
}
this.$router.push({
... ... @@ -94,7 +94,8 @@ export default {
list.forEach((value, i) => {
const prdType = value.pre_sale_flag === 5 ? 2 : 1; // flag=5全新瑕疵,6二手
DATA.push({ ...this.yasParams, I_INDEX: i + index + 1, PRD_ID: value.skup, PRD_TYPE: prdType });
// DATA.push({ ...this.yasParams, I_INDEX: i + index + 1, PRD_ID: value.skup, PRD_TYPE: prdType });
DATA.push({ ...this.yasParams, I_INDEX: i + index + 1, PRD_SKUP: value.skup, PRD_TYPE: prdType });
});
this.$store.dispatch('reportYas', {
... ... @@ -106,10 +107,10 @@ export default {
}
},
yasDetail(index) {
yasDetail({ item, index }) {
this.$store.dispatch('reportYas', {
params: {
param: { ...this.yasParams, I_INDEX: index + 1 },
param: { ...this.yasParams, I_INDEX: index + 1, PRD_SKUP: item.skup },
appop: this.yasEventName
}
});
... ...
... ... @@ -13,7 +13,7 @@
ref="pageScroll"
@scroll-end="false"
:loading="{hide: true, noMore: true}">
<cube-slide ref="slide" v-if="info.imageList" :options="slideOptions" :data="info.imageList">
<cube-slide ref="slide" :options="slideOptions" :data="info.imageList">
<cube-slide-item v-for="(item, index) in info.imageList" :key="index">
<image-format
:lazy="false"
... ...
... ... @@ -2,6 +2,7 @@
<LayoutApp :show-back="true" title="二手" class="list-wrapper">
<LayoutScroll
ref="scrolllist"
@scroll="onScroll"
@scroll-end="scrollEndHandler"
@pulling-up="fetchSkupList(isMore)"
v-if="skupList.list.length"
... ... @@ -52,10 +53,11 @@ export default {
await this.fetchSecondSkupList({ isReset: false });
}
},
onScroll({ y }) {
this.scrollY = -y;
},
scrollEndHandler({ y }) {
this.scrollY = -y;
this.$refs.second.yasShowEvent(-y);
},
... ...
... ... @@ -10,7 +10,25 @@ export default {
* @ version: v1.0.0
*/
[Types.UPDATE_PRODUCT_DETAIL](state, { info }) {
state.info = info;
if (info) {
state.info = info;
} else {
state.info = {
imageList: [],
price: '',
sizeName: '',
shoeBoxDesc: '',
productId: '',
productName: '',
productCode: '',
colorName: '',
describeInfo: '',
brandName: '',
shoeQualityDesc: '',
soldTime: '',
image: ''
};
}
},
/*
... ...
{
"name": "xianyu-ufo-app-web",
"version": "1.1.0-beta-20",
"version": "1.1.0-beta-23",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...