Authored by lea guo

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

... ... @@ -102,10 +102,14 @@ export default {
}
}
//编辑地址时保存item
if (!isAdd) {
let addressInfo = JSON.parse(item || "{}");
Object.assign(addressInfo, { isUpdate: !isAdd, orderCode: "" });
this.STORE_UPDATE_ADDRESS_INFO(addressInfo);
}
this.$router.push({
name: "addressEdit"
});
... ...
... ... @@ -334,7 +334,7 @@ export default {
<style lang="scss" scoped>
.pane-body {
height: 100%;
overflow-y: auto;
overflow-y: hidden;
padding-top: 12px;
padding-left: 40px;
padding-right: 40px;
... ...
<template>
<div class="layout">
<LayoutHeader class="layout-header" :show-back="true" :key="productId">
<LayoutHeader class="layout-header" :show-back="true" :title="title" ref="header">
<transition name="fade">
<img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
</transition>
... ... @@ -180,9 +180,21 @@ export default {
sizeList() {
return get(this.productDetail, 'goods_list[0].size_list', null);
},
title() {
return get(this.productDetail, 'product_name', '商品详情');
},
},
watch: {
title: {
handler() {
this.setTitle();
},
immediate: true,
},
},
mounted() {
this.imageHideThreadhold = -window.innerWidth * 0.693;
},
activated() {
if (this.productId !== this.productDetail.product_id) {
... ... @@ -191,6 +203,15 @@ export default {
},
methods: {
...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']),
setTitle() {
if (this.productId === this.productDetail.product_id) {
if (this.$refs.header && this.$refs.header.setTitle) {
this.$refs.header.setTitle(this.title);
} else if (document) {
document.title = this.title;
}
}
},
refresh() {
this.$refs.slide.refresh();
this.headThumbnailVisible = false;
... ... @@ -248,7 +269,7 @@ export default {
return;
}
this.toggleFav({ productId: this.productId, isFav }).then(() => {
this.toggleFav({productId: this.productId, isFav}).then(() => {
const txt = isFav ? '收藏成功' : '取消收藏成功';
this.$createToast({
... ...
... ... @@ -232,7 +232,7 @@ export default function() {
case 'buy':
state.buyNum = item.sum;
break;
case 'bid':
case 'biding':
state.askBuyNum = item.sum;
break;
default:
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-14",
"version": "0.0.2-beta-15",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...