Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Showing
6 changed files
with
43 additions
and
18 deletions
@@ -102,10 +102,14 @@ export default { | @@ -102,10 +102,14 @@ export default { | ||
102 | } | 102 | } |
103 | } | 103 | } |
104 | 104 | ||
105 | - let addressInfo = JSON.parse(item || "{}"); | ||
106 | - Object.assign(addressInfo, { isUpdate: !isAdd, orderCode: "" }); | 105 | + //编辑地址时保存item |
106 | + if (!isAdd) { | ||
107 | + let addressInfo = JSON.parse(item || "{}"); | ||
108 | + Object.assign(addressInfo, { isUpdate: !isAdd, orderCode: "" }); | ||
109 | + | ||
110 | + this.STORE_UPDATE_ADDRESS_INFO(addressInfo); | ||
111 | + } | ||
107 | 112 | ||
108 | - this.STORE_UPDATE_ADDRESS_INFO(addressInfo); | ||
109 | this.$router.push({ | 113 | this.$router.push({ |
110 | name: "addressEdit" | 114 | name: "addressEdit" |
111 | }); | 115 | }); |
@@ -334,7 +334,7 @@ export default { | @@ -334,7 +334,7 @@ export default { | ||
334 | <style lang="scss" scoped> | 334 | <style lang="scss" scoped> |
335 | .pane-body { | 335 | .pane-body { |
336 | height: 100%; | 336 | height: 100%; |
337 | - overflow-y: auto; | 337 | + overflow-y: hidden; |
338 | padding-top: 12px; | 338 | padding-top: 12px; |
339 | padding-left: 40px; | 339 | padding-left: 40px; |
340 | padding-right: 40px; | 340 | padding-right: 40px; |
@@ -43,16 +43,16 @@ export default { | @@ -43,16 +43,16 @@ export default { | ||
43 | <style lang="scss" scoped> | 43 | <style lang="scss" scoped> |
44 | .bind-alipay { | 44 | .bind-alipay { |
45 | width: 100%; | 45 | width: 100%; |
46 | - text-align: center; | ||
47 | - height: 88px; | ||
48 | - line-height: 88px; | ||
49 | - background-color: #fff; | ||
50 | - color: #D0021B; | ||
51 | - border-radius: 88px; | ||
52 | - font-size: 32px; | ||
53 | - margin-bottom: 20px; | ||
54 | - margin-top: 60px; | ||
55 | - border: solid 1px #eee; | 46 | + text-align: center; |
47 | + height: 88px; | ||
48 | + line-height: 88px; | ||
49 | + background-color: #fff; | ||
50 | + color: #D0021B; | ||
51 | + border-radius: 88px; | ||
52 | + font-size: 32px; | ||
53 | + margin-bottom: 20px; | ||
54 | + margin-top: 60px; | ||
55 | + border: solid 1px #eee; | ||
56 | } | 56 | } |
57 | .bind-tip { | 57 | .bind-tip { |
58 | margin: 0 40px; | 58 | margin: 0 40px; |
1 | <template> | 1 | <template> |
2 | <div class="layout"> | 2 | <div class="layout"> |
3 | - <LayoutHeader class="layout-header" :show-back="true" :key="productId"> | 3 | + <LayoutHeader class="layout-header" :show-back="true" :title="title" ref="header"> |
4 | <transition name="fade"> | 4 | <transition name="fade"> |
5 | <img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/> | 5 | <img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/> |
6 | </transition> | 6 | </transition> |
@@ -180,9 +180,21 @@ export default { | @@ -180,9 +180,21 @@ export default { | ||
180 | sizeList() { | 180 | sizeList() { |
181 | return get(this.productDetail, 'goods_list[0].size_list', null); | 181 | return get(this.productDetail, 'goods_list[0].size_list', null); |
182 | }, | 182 | }, |
183 | + title() { | ||
184 | + return get(this.productDetail, 'product_name', '商品详情'); | ||
185 | + }, | ||
186 | + }, | ||
187 | + watch: { | ||
188 | + title: { | ||
189 | + handler() { | ||
190 | + this.setTitle(); | ||
191 | + }, | ||
192 | + immediate: true, | ||
193 | + }, | ||
183 | }, | 194 | }, |
184 | mounted() { | 195 | mounted() { |
185 | this.imageHideThreadhold = -window.innerWidth * 0.693; | 196 | this.imageHideThreadhold = -window.innerWidth * 0.693; |
197 | + | ||
186 | }, | 198 | }, |
187 | activated() { | 199 | activated() { |
188 | if (this.productId !== this.productDetail.product_id) { | 200 | if (this.productId !== this.productDetail.product_id) { |
@@ -191,6 +203,15 @@ export default { | @@ -191,6 +203,15 @@ export default { | ||
191 | }, | 203 | }, |
192 | methods: { | 204 | methods: { |
193 | ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']), | 205 | ...mapActions(['fetchProductInfo', 'fetchTop3', 'fetchFav', 'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment']), |
206 | + setTitle() { | ||
207 | + if (this.productId === this.productDetail.product_id) { | ||
208 | + if (this.$refs.header && this.$refs.header.setTitle) { | ||
209 | + this.$refs.header.setTitle(this.title); | ||
210 | + } else if (document) { | ||
211 | + document.title = this.title; | ||
212 | + } | ||
213 | + } | ||
214 | + }, | ||
194 | refresh() { | 215 | refresh() { |
195 | this.$refs.slide.refresh(); | 216 | this.$refs.slide.refresh(); |
196 | this.headThumbnailVisible = false; | 217 | this.headThumbnailVisible = false; |
@@ -248,7 +269,7 @@ export default { | @@ -248,7 +269,7 @@ export default { | ||
248 | return; | 269 | return; |
249 | } | 270 | } |
250 | 271 | ||
251 | - this.toggleFav({ productId: this.productId, isFav }).then(() => { | 272 | + this.toggleFav({productId: this.productId, isFav}).then(() => { |
252 | const txt = isFav ? '收藏成功' : '取消收藏成功'; | 273 | const txt = isFav ? '收藏成功' : '取消收藏成功'; |
253 | 274 | ||
254 | this.$createToast({ | 275 | this.$createToast({ |
@@ -232,7 +232,7 @@ export default function() { | @@ -232,7 +232,7 @@ export default function() { | ||
232 | case 'buy': | 232 | case 'buy': |
233 | state.buyNum = item.sum; | 233 | state.buyNum = item.sum; |
234 | break; | 234 | break; |
235 | - case 'bid': | 235 | + case 'biding': |
236 | state.askBuyNum = item.sum; | 236 | state.askBuyNum = item.sum; |
237 | break; | 237 | break; |
238 | default: | 238 | default: |
1 | { | 1 | { |
2 | "name": "xianyu-ufo-app-web", | 2 | "name": "xianyu-ufo-app-web", |
3 | - "version": "0.0.2-beta-14", | 3 | + "version": "0.0.2-beta-15", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "Xianyu Project With Express", | 5 | "description": "Xianyu Project With Express", |
6 | "repository": { | 6 | "repository": { |
-
Please register or login to post a comment