Merge remote-tracking branch 'origin/develop' into develop
Showing
16 changed files
with
228 additions
and
119 deletions
@@ -191,7 +191,6 @@ export default { | @@ -191,7 +191,6 @@ export default { | ||
191 | } | 191 | } |
192 | 192 | ||
193 | .change-bid-price-wrapper { | 193 | .change-bid-price-wrapper { |
194 | - position: absolute; | ||
195 | width: 600px; | 194 | width: 600px; |
196 | background-color: #fff; | 195 | background-color: #fff; |
197 | transform: scale(0.9); | 196 | transform: scale(0.9); |
@@ -48,7 +48,16 @@ export default { | @@ -48,7 +48,16 @@ export default { | ||
48 | border-color: #f5f5f5; | 48 | border-color: #f5f5f5; |
49 | } | 49 | } |
50 | 50 | ||
51 | + /deep/ input::-webkit-input-placeholder { | ||
52 | + font-size: 0.9rem; | ||
53 | + padding: 0.2rem; | ||
54 | + bottom: 0.4rem; | ||
55 | + } | ||
56 | + | ||
51 | /deep/ .cube-input-field { | 57 | /deep/ .cube-input-field { |
58 | + font-family: "DINAlternate-Bold", "ufofont", "PingFang-SC-Regular", sans-serif; | ||
59 | + padding: 0.25rem; | ||
60 | + font-size: 1rem; | ||
52 | color: #000; | 61 | color: #000; |
53 | } | 62 | } |
54 | } | 63 | } |
@@ -4,44 +4,42 @@ | @@ -4,44 +4,42 @@ | ||
4 | </div> | 4 | </div> |
5 | <div v-else> | 5 | <div v-else> |
6 | <LayoutApp title="选择地址" :show-back="true" :back-action="goBack"> | 6 | <LayoutApp title="选择地址" :show-back="true" :back-action="goBack"> |
7 | - <CubeScroll class="main-container" ref="scroll" :options="scrollOpts"> | ||
8 | - <div class="user-list"> | ||
9 | - <div | ||
10 | - v-for="(item, index) in addressList" | ||
11 | - :key="index" | ||
12 | - class="item" | ||
13 | - @click="toOrderPage(item)" | ||
14 | - > | ||
15 | - <slot name="item" :data="item"> | ||
16 | - <div class="user-item"> | 7 | + <div class="user-list"> |
8 | + <div | ||
9 | + v-for="(item, index) in addressList" | ||
10 | + :key="index" | ||
11 | + class="item" | ||
12 | + @click="toOrderPage(item)" | ||
13 | + > | ||
14 | + <slot name="item" :data="item"> | ||
15 | + <div class="user-item"> | ||
16 | + <div | ||
17 | + :class="{ | ||
18 | + 'uncheck-item': item.address_id !== selectedAddressId, | ||
19 | + 'check-item': item.address_id === selectedAddressId | ||
20 | + }" | ||
21 | + ></div> | ||
22 | + <div class="user-info"> | ||
23 | + <div class="extra"> | ||
24 | + <p class="name">{{ item.consignee }}</p> | ||
25 | + <p class="mobile">{{ item.mobile }}</p> | ||
26 | + <div v-if="item.is_default === 'Y'" class="tag-btn">默认</div> | ||
27 | + <div v-if="item.tag_code && item.tag" class="tag-btn">{{ item.tag }}</div> | ||
17 | <div | 28 | <div |
18 | - :class="{ | ||
19 | - 'uncheck-item': item.address_id !== selectedAddressId, | ||
20 | - 'check-item': item.address_id === selectedAddressId | ||
21 | - }" | ||
22 | - ></div> | ||
23 | - <div class="user-info"> | ||
24 | - <div class="extra"> | ||
25 | - <p class="name">{{ item.consignee }}</p> | ||
26 | - <p class="mobile">{{ item.mobile }}</p> | ||
27 | - <div v-if="item.is_default === 'Y'" class="tag-btn">默认</div> | ||
28 | - <div v-if="item.tag_code && item.tag" class="tag-btn">{{ item.tag }}</div> | ||
29 | - <div | ||
30 | - class="option-btn" | ||
31 | - :data-item="JSON.stringify(item)" | ||
32 | - :data-add="0" | ||
33 | - @click="toEditorPage" | ||
34 | - >编辑</div> | ||
35 | - </div> | ||
36 | - <p class="address">{{ item.area }}{{ item.address }}</p> | ||
37 | - </div> | 29 | + class="option-btn" |
30 | + :data-item="JSON.stringify(item)" | ||
31 | + :data-add="0" | ||
32 | + @click="toEditorPage" | ||
33 | + >编辑</div> | ||
38 | </div> | 34 | </div> |
39 | - </slot> | ||
40 | - <div class="border-line"></div> | 35 | + <p class="address">{{ item.area }}{{ item.address }}</p> |
36 | + </div> | ||
41 | </div> | 37 | </div> |
42 | - </div> | ||
43 | - <div class="add-btn" :data-add="1" @click="toEditorPage">新增地址</div> | ||
44 | - </CubeScroll> | 38 | + </slot> |
39 | + <div class="border-line"></div> | ||
40 | + </div> | ||
41 | + </div> | ||
42 | + <div class="add-btn" :data-add="1" @click="toEditorPage">新增地址</div> | ||
45 | </LayoutApp> | 43 | </LayoutApp> |
46 | </div> | 44 | </div> |
47 | </template> | 45 | </template> |
@@ -156,19 +154,6 @@ export default { | @@ -156,19 +154,6 @@ export default { | ||
156 | </script> | 154 | </script> |
157 | 155 | ||
158 | <style lang="scss" scoped> | 156 | <style lang="scss" scoped> |
159 | -/deep/ { | ||
160 | - .cube-scroll-content { | ||
161 | - min-height: 100%; | ||
162 | - } | ||
163 | - | ||
164 | - .cube-scroll-list-wrapper { | ||
165 | - overflow: auto; | ||
166 | - } | ||
167 | - | ||
168 | - .cube-loading-spinners { | ||
169 | - margin: auto; | ||
170 | - } | ||
171 | -} | ||
172 | 157 | ||
173 | .father-img { | 158 | .father-img { |
174 | position: absolute; | 159 | position: absolute; |
@@ -186,6 +171,7 @@ export default { | @@ -186,6 +171,7 @@ export default { | ||
186 | } | 171 | } |
187 | 172 | ||
188 | .user-list { | 173 | .user-list { |
174 | + display: block; | ||
189 | background-color: white; | 175 | background-color: white; |
190 | 176 | ||
191 | .border-line { | 177 | .border-line { |
@@ -255,14 +241,14 @@ export default { | @@ -255,14 +241,14 @@ export default { | ||
255 | 241 | ||
256 | .option-btn { | 242 | .option-btn { |
257 | display: block; | 243 | display: block; |
258 | - width: 65px; | ||
259 | - line-height: 44px; | 244 | + width: 80px; |
245 | + line-height: 50px; | ||
260 | letter-spacing: -0.29px; | 246 | letter-spacing: -0.29px; |
261 | color: black; | 247 | color: black; |
262 | font-size: 24px; | 248 | font-size: 24px; |
263 | position: absolute; | 249 | position: absolute; |
264 | - right: 40px; | ||
265 | - text-align: right; | 250 | + right: 30px; |
251 | + text-align: center; | ||
266 | } | 252 | } |
267 | } | 253 | } |
268 | 254 |
1 | <template> | 1 | <template> |
2 | <LayoutApp :title="title" :show-back="true"> | 2 | <LayoutApp :title="title" :show-back="true"> |
3 | - <div class="pane-body"> | 3 | + <div class="pane-body" ref="paneBody"> |
4 | <FormItem> | 4 | <FormItem> |
5 | <CInput | 5 | <CInput |
6 | label="收货人" | 6 | label="收货人" |
@@ -71,6 +71,7 @@ | @@ -71,6 +71,7 @@ | ||
71 | ></Radio> | 71 | ></Radio> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | + <div class="white-space"></div> | ||
74 | <div :class="submitClass" @touchend="onSubmit">确 认</div> | 75 | <div :class="submitClass" @touchend="onSubmit">确 认</div> |
75 | 76 | ||
76 | <AddressAct | 77 | <AddressAct |
@@ -279,12 +280,15 @@ export default { | @@ -279,12 +280,15 @@ export default { | ||
279 | chooseArea() { | 280 | chooseArea() { |
280 | this.isShowProvince = true; | 281 | this.isShowProvince = true; |
281 | 282 | ||
283 | + this.$refs.paneBody.style.overflow = 'hidden'; | ||
284 | + | ||
282 | this.$refs.addressAct.parentHandleclick({ | 285 | this.$refs.addressAct.parentHandleclick({ |
283 | areaCode: this.area_code | 286 | areaCode: this.area_code |
284 | }); | 287 | }); |
285 | }, | 288 | }, |
286 | popHidden() { | 289 | popHidden() { |
287 | let that = this; | 290 | let that = this; |
291 | + this.$refs.paneBody.style.overflow = 'auto'; | ||
288 | that.isShowProvince = false; | 292 | that.isShowProvince = false; |
289 | }, | 293 | }, |
290 | modifyAddressAct(info) { | 294 | modifyAddressAct(info) { |
@@ -402,6 +406,13 @@ export default { | @@ -402,6 +406,13 @@ export default { | ||
402 | } | 406 | } |
403 | } | 407 | } |
404 | 408 | ||
409 | +.white-space { | ||
410 | + position: relative; | ||
411 | + display: block; | ||
412 | + overflow: hidden; | ||
413 | + height: 120px; | ||
414 | +} | ||
415 | + | ||
405 | .wrapper-tag { | 416 | .wrapper-tag { |
406 | margin: 30px 0; | 417 | margin: 30px 0; |
407 | 418 | ||
@@ -449,7 +460,7 @@ export default { | @@ -449,7 +460,7 @@ export default { | ||
449 | background-color: #cccccc; | 460 | background-color: #cccccc; |
450 | color: white; | 461 | color: white; |
451 | border-radius: 40px; | 462 | border-radius: 40px; |
452 | - position: absolute; | 463 | + position: fixed; |
453 | left: 32px; | 464 | left: 32px; |
454 | right: 32px; | 465 | right: 32px; |
455 | bottom: 24px; | 466 | bottom: 24px; |
@@ -25,9 +25,9 @@ | @@ -25,9 +25,9 @@ | ||
25 | <div ref="scrollNav" class="scroll-nav-wrap" v-if="navList.length"> | 25 | <div ref="scrollNav" class="scroll-nav-wrap" v-if="navList.length"> |
26 | <ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav> | 26 | <ScrollNav :list="navList" :current="active" @transfer="getIndex"></ScrollNav> |
27 | </div> | 27 | </div> |
28 | - <div class="list-wrap"> | ||
29 | - <ProductList ref="product" :list="productList.list" :yasParams="listYasParams" v-if="productList.list.length > 0"></ProductList> | ||
30 | - <UfoNoItem class="channel-no-item" :style="noItemStyle" :tip="`暂无数据`" v-else></UfoNoItem> | 28 | + <div class="list-wrap" :style="minHeight"> |
29 | + <ProductList ref="product" :list="productList.list" yasEventName="XY_UFO_MAIN_EVENT" :yasParams="listYasParams" v-if="productList.list.length > 0"></ProductList> | ||
30 | + <UfoNoItem class="channel-no-item" :style="'height:' +total+'px'" :tip="`暂无数据`" v-else></UfoNoItem> | ||
31 | </div> | 31 | </div> |
32 | </div> | 32 | </div> |
33 | </LayoutScroll> | 33 | </LayoutScroll> |
@@ -70,6 +70,7 @@ export default { | @@ -70,6 +70,7 @@ export default { | ||
70 | isShow: false, | 70 | isShow: false, |
71 | total: 0, | 71 | total: 0, |
72 | active: 0, | 72 | active: 0, |
73 | + yasHeight: 0, | ||
73 | listBaseParams: { | 74 | listBaseParams: { |
74 | isHome: true, | 75 | isHome: true, |
75 | }, | 76 | }, |
@@ -107,22 +108,23 @@ export default { | @@ -107,22 +108,23 @@ export default { | ||
107 | }; | 108 | }; |
108 | }, | 109 | }, |
109 | computed: { | 110 | computed: { |
110 | - ...mapState(['channelList','contentCode']), | 111 | + ...mapState(['channelList', 'contentCode']), |
111 | navList() { | 112 | navList() { |
112 | return get(find(this.channelList.list, ['template_name', 'guessLike']), 'data') || []; | 113 | return get(find(this.channelList.list, ['template_name', 'guessLike']), 'data') || []; |
113 | }, | 114 | }, |
114 | navInfo() { | 115 | navInfo() { |
115 | - let index = findIndex(this.channelList.list, ['template_name', 'guessLike']) | ||
116 | - let id = get(find(this.channelList.list, ['template_name', 'guessLike']), 'template_id') | 116 | + let index = findIndex(this.channelList.list, ['template_name', 'guessLike']); |
117 | + let id = get(find(this.channelList.list, ['template_name', 'guessLike']), 'template_id'); | ||
118 | + | ||
117 | return { | 119 | return { |
118 | F_ID: id, | 120 | F_ID: id, |
119 | F_NAME: 'guessLike', | 121 | F_NAME: 'guessLike', |
120 | F_INDEX: index + 1 | 122 | F_INDEX: index + 1 |
121 | - } | 123 | + }; |
122 | }, | 124 | }, |
123 | - noItemStyle() { | 125 | + minHeight() { |
124 | return { | 126 | return { |
125 | - height: this.total + 'px' | 127 | + minHeight: this.total + 'px' |
126 | }; | 128 | }; |
127 | } | 129 | } |
128 | }, | 130 | }, |
@@ -162,7 +164,7 @@ export default { | @@ -162,7 +164,7 @@ export default { | ||
162 | this.refreshProductList(this.active); | 164 | this.refreshProductList(this.active); |
163 | }, | 165 | }, |
164 | methods: { | 166 | methods: { |
165 | - ...mapActions(['fetchChannelList','getAllInboxCatInfo']), | 167 | + ...mapActions(['fetchChannelList', 'getAllInboxCatInfo']), |
166 | ...mapActionsList(['fetchProductList']), | 168 | ...mapActionsList(['fetchProductList']), |
167 | init() { | 169 | init() { |
168 | this.$nextTick(() => { | 170 | this.$nextTick(() => { |
@@ -290,26 +292,30 @@ export default { | @@ -290,26 +292,30 @@ export default { | ||
290 | I_INDEX: Number(params.index) + 1, | 292 | I_INDEX: Number(params.index) + 1, |
291 | TAB_ID: Number(params.index) + 1, | 293 | TAB_ID: Number(params.index) + 1, |
292 | TAB_NAME: params.title}); | 294 | TAB_NAME: params.title}); |
293 | - console.log(this.listYasParams) | ||
294 | } | 295 | } |
295 | }, | 296 | }, |
296 | getIndex({index, params}) { | 297 | getIndex({index, params}) { |
297 | this.selectedCategory = params; | 298 | this.selectedCategory = params; |
298 | this.active = Number(index); | 299 | this.active = Number(index); |
299 | this.isShow && this.$refs.scroll.scrollTo(this.navTop); | 300 | this.isShow && this.$refs.scroll.scrollTo(this.navTop); |
301 | + | ||
300 | // this.setYasParam({index, ...params}); | 302 | // this.setYasParam({index, ...params}); |
301 | this.guessLikeListParams({index, ...params}); | 303 | this.guessLikeListParams({index, ...params}); |
304 | + | ||
302 | // 商品列表曝光 | 305 | // 商品列表曝光 |
303 | - this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.listScrollY); | 306 | + this.productList.list.length > 0 && this.listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight); |
304 | }, | 307 | }, |
305 | scrollEndHandler({y}) { | 308 | scrollEndHandler({y}) { |
306 | let scrollHeight = Math.abs(y); | 309 | let scrollHeight = Math.abs(y); |
307 | let viewHeight = this.$refs.scroll.$el.offsetHeight; | 310 | let viewHeight = this.$refs.scroll.$el.offsetHeight; |
308 | let productListTop = this.$refs.product && this.$refs.product.$el.offsetTop || this.navTop + this.navHeight; | 311 | let productListTop = this.$refs.product && this.$refs.product.$el.offsetTop || this.navTop + this.navHeight; |
309 | let listScrollY = scrollHeight + viewHeight - productListTop; | 312 | let listScrollY = scrollHeight + viewHeight - productListTop; |
310 | - this.listScrollY = listScrollY | 313 | + |
314 | + this.listScrollY = listScrollY; | ||
315 | + this.yasHeight = scrollHeight - this.navTop; | ||
316 | + | ||
311 | // 商品列表曝光 | 317 | // 商品列表曝光 |
312 | - listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(listScrollY); | 318 | + listScrollY > 0 && this.$refs.product && this.$refs.product.yasShowEvent(this.yasHeight); |
313 | if (scrollHeight >= this.navTop) { | 319 | if (scrollHeight >= this.navTop) { |
314 | return; | 320 | return; |
315 | } | 321 | } |
@@ -319,15 +325,7 @@ export default { | @@ -319,15 +325,7 @@ export default { | ||
319 | this.scrollY = -y; | 325 | this.scrollY = -y; |
320 | 326 | ||
321 | if (this.navTop) { | 327 | if (this.navTop) { |
322 | - if (this.scrollY >= this.navTop) { | ||
323 | - this.isShow = true; | ||
324 | - | ||
325 | - // this.isA = false; | ||
326 | - } else { | ||
327 | - this.isShow = false; | ||
328 | - | ||
329 | - // this.isA = true; | ||
330 | - } | 328 | + this.isShow = (this.scrollY >= this.$refs.topSource.offsetHeight); |
331 | } | 329 | } |
332 | }, | 330 | }, |
333 | async refreshProductList(index) { | 331 | async refreshProductList(index) { |
@@ -448,7 +446,6 @@ export default { | @@ -448,7 +446,6 @@ export default { | ||
448 | .yohoufo-channel-page { | 446 | .yohoufo-channel-page { |
449 | background-color: #fefefe; | 447 | background-color: #fefefe; |
450 | } | 448 | } |
451 | - | ||
452 | .scroll-nav-wrap { | 449 | .scroll-nav-wrap { |
453 | position: relative; | 450 | position: relative; |
454 | 451 |
@@ -22,6 +22,10 @@ export default { | @@ -22,6 +22,10 @@ export default { | ||
22 | props: { | 22 | props: { |
23 | list: Array, | 23 | list: Array, |
24 | yasParams: Object, | 24 | yasParams: Object, |
25 | + yasEventName: { | ||
26 | + type: String, | ||
27 | + default: 'XY_UFO_PRD_LIST_C' | ||
28 | + }, | ||
25 | priceKey: { | 29 | priceKey: { |
26 | type: String, | 30 | type: String, |
27 | default: 'available_now_price', | 31 | default: 'available_now_price', |
@@ -54,11 +58,11 @@ export default { | @@ -54,11 +58,11 @@ export default { | ||
54 | } | 58 | } |
55 | }); | 59 | }); |
56 | }, | 60 | }, |
57 | - yasShowEvent(height) { | 61 | + yasShowEvent: function(height) { |
58 | // 获取列表单个元素高度 | 62 | // 获取列表单个元素高度 |
59 | let index = 0; | 63 | let index = 0; |
60 | 64 | ||
61 | - if (height) { | 65 | + if (Number(height) > 0) { |
62 | // 获取第一个曝光元素 | 66 | // 获取第一个曝光元素 |
63 | let item = document.querySelector('.product-list-item'); | 67 | let item = document.querySelector('.product-list-item'); |
64 | let itemHeight = item.offsetHeight; | 68 | let itemHeight = item.offsetHeight; |
@@ -92,6 +96,7 @@ export default { | @@ -92,6 +96,7 @@ export default { | ||
92 | list.map((value, i) => { | 96 | list.map((value, i) => { |
93 | DATA.push({...this.yasParams, I_INDEX: i + index + 1, PRD_ID: value.id}); | 97 | DATA.push({...this.yasParams, I_INDEX: i + index + 1, PRD_ID: value.id}); |
94 | }); | 98 | }); |
99 | + | ||
95 | this.$store.dispatch('reportYas', { | 100 | this.$store.dispatch('reportYas', { |
96 | params: { | 101 | params: { |
97 | param: {DATA}, | 102 | param: {DATA}, |
@@ -112,8 +117,8 @@ export default { | @@ -112,8 +117,8 @@ export default { | ||
112 | // 7.PRD_ID:商品id | 117 | // 7.PRD_ID:商品id |
113 | this.$store.dispatch('reportYas', { | 118 | this.$store.dispatch('reportYas', { |
114 | params: { | 119 | params: { |
115 | - param: {...this.yasParams, I_INDEX: index, PRD_ID: id }, | ||
116 | - appop: 'XY_UFO_PRD_LIST_C' | 120 | + param: {...this.yasParams, I_INDEX: index + 1, PRD_ID: id }, |
121 | + appop: this.yasEventName | ||
117 | } | 122 | } |
118 | }); | 123 | }); |
119 | } | 124 | } |
@@ -96,7 +96,9 @@ export default { | @@ -96,7 +96,9 @@ export default { | ||
96 | }; | 96 | }; |
97 | }, | 97 | }, |
98 | activated: async function() { | 98 | activated: async function() { |
99 | - if (this.yoho.direction === 'forword') { | 99 | + let {list} = this.productList; |
100 | + | ||
101 | + if (this.yoho.direction === 'forword' || !list.length) { | ||
100 | this.$refs.filtrate.hide(); | 102 | this.$refs.filtrate.hide(); |
101 | Object.assign(this.$data, this.$options.data()); | 103 | Object.assign(this.$data, this.$options.data()); |
102 | this.changeArrow(); | 104 | this.changeArrow(); |
@@ -111,6 +113,7 @@ export default { | @@ -111,6 +113,7 @@ export default { | ||
111 | this.setYasParam({param: params, tab: {index: 1, name: '人气'}}); | 113 | this.setYasParam({param: params, tab: {index: 1, name: '人气'}}); |
112 | !params.order && (params.order = 'sale_desc'); | 114 | !params.order && (params.order = 'sale_desc'); |
113 | await this.fetchList({...params, isReset: true}); | 115 | await this.fetchList({...params, isReset: true}); |
116 | + this.$refs.product.yasShowEvent(0); | ||
114 | } else { | 117 | } else { |
115 | this.scrollY && this.$refs.scroll.scrollTo(this.scrollY); | 118 | this.scrollY && this.$refs.scroll.scrollTo(this.scrollY); |
116 | } | 119 | } |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | </div> | 25 | </div> |
26 | </Scroll> | 26 | </Scroll> |
27 | <Scroll v-show="query.length" :options="scrollOptions" :data="searchSuggestList"> | 27 | <Scroll v-show="query.length" :options="scrollOptions" :data="searchSuggestList"> |
28 | - <div class="item-line middle" v-if="searchSuggestList.length" v-for="(item, index) of searchSuggestList" @click="goSearch({query : item.item} ,{type: 3, index})"> | 28 | + <div class="item-line middle" v-if="searchSuggestList.length" v-for="(item, index) of searchSuggestList" @click="goSearch({query : item.item} ,{type: 0, index: 0})"> |
29 | {{item.item}} | 29 | {{item.item}} |
30 | </div> | 30 | </div> |
31 | </Scroll> | 31 | </Scroll> |
@@ -60,6 +60,13 @@ export default { | @@ -60,6 +60,13 @@ export default { | ||
60 | this.fetchDefaultSearchWords(); | 60 | this.fetchDefaultSearchWords(); |
61 | this.setLocalList(); | 61 | this.setLocalList(); |
62 | }, | 62 | }, |
63 | + beforeRouteEnter: function(to, from, next) { | ||
64 | + next(vm => { | ||
65 | + if (from.name === 'List') { | ||
66 | + vm.SEARCH_POS = 3; | ||
67 | + } | ||
68 | + }); | ||
69 | + }, | ||
63 | computed: { | 70 | computed: { |
64 | ...mapState(['searchWord', 'defaultSearchWord', 'searchSuggestList']), | 71 | ...mapState(['searchWord', 'defaultSearchWord', 'searchSuggestList']), |
65 | }, | 72 | }, |
@@ -108,11 +115,6 @@ export default { | @@ -108,11 +115,6 @@ export default { | ||
108 | } | 115 | } |
109 | this.localHistory = localHistory; | 116 | this.localHistory = localHistory; |
110 | }, | 117 | }, |
111 | - beforeRouteEnter: function(to, from, next) { | ||
112 | - if (from.name !== 'List') { | ||
113 | - this.SEARCH_POS = 3; | ||
114 | - } | ||
115 | - }, | ||
116 | addLocalWord: function(query) { | 118 | addLocalWord: function(query) { |
117 | if (this.query || query) { | 119 | if (this.query || query) { |
118 | let addQuery = query || this.query; | 120 | let addQuery = query || this.query; |
@@ -310,7 +310,7 @@ export default { | @@ -310,7 +310,7 @@ export default { | ||
310 | 310 | ||
311 | <style lang="scss" scoped> | 311 | <style lang="scss" scoped> |
312 | .footer { | 312 | .footer { |
313 | - position: absolute; | 313 | + position: fixed; |
314 | bottom: 0; | 314 | bottom: 0; |
315 | width: 100%; | 315 | width: 100%; |
316 | z-index: 100; | 316 | z-index: 100; |
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <div>{{productDetail.product_name}} {{goodsName}}</div> | 17 | <div>{{productDetail.product_name}} {{goodsName}}</div> |
18 | </div> | 18 | </div> |
19 | <div class="size-list"> | 19 | <div class="size-list"> |
20 | - <cube-scroll ref="scroll" :data="sizeViewList"> | 20 | + <cube-scroll ref="scroll" :data="sizeViewList" class="size-list-scroll"> |
21 | <ul> | 21 | <ul> |
22 | <li class="size-item" v-for="(item, idx) in sizeViewList" :key="idx" @click="buy(item)"> | 22 | <li class="size-item" v-for="(item, idx) in sizeViewList" :key="idx" @click="buy(item)"> |
23 | <div class="size"><span>{{item.name}}</span><span v-if="item.subName">{{item.subName}}</span></div> | 23 | <div class="size"><span>{{item.name}}</span><span v-if="item.subName">{{item.subName}}</span></div> |
@@ -111,7 +111,6 @@ export default { | @@ -111,7 +111,6 @@ export default { | ||
111 | buy(product) { | 111 | buy(product) { |
112 | this.$yoho.auth() | 112 | this.$yoho.auth() |
113 | .then((res) => { | 113 | .then((res) => { |
114 | - | ||
115 | if (res) { | 114 | if (res) { |
116 | this.hide(); | 115 | this.hide(); |
117 | this.updateTradeInfo({ | 116 | this.updateTradeInfo({ |
@@ -135,7 +134,33 @@ export default { | @@ -135,7 +134,33 @@ export default { | ||
135 | productId: get(data, 'productId', ''), | 134 | productId: get(data, 'productId', ''), |
136 | image: this.imageUrl, | 135 | image: this.imageUrl, |
137 | skup: product.skup, | 136 | skup: product.skup, |
138 | - }) | 137 | + }); |
138 | + | ||
139 | + /** | ||
140 | + * 数据埋点 | ||
141 | + * 购买确认订单 | ||
142 | + * 购买-选择尺码生成订单 | ||
143 | + * 商品详情页-选择尺码确认后上报 | ||
144 | + * 商品详情页点击出售/购买/求购按钮 | ||
145 | + * event: XY_UFO_PRD_DT_BUY_SEL_C | ||
146 | + * 1.PRD_ID:商品ID; | ||
147 | + * 2.PRD_SKU:商品SKU; | ||
148 | + * 3.PRD_SIZE:尺码; | ||
149 | + * 新增字段: | ||
150 | + * 4.ORD_TYPE:订单类型;1-购买,2-出售,3-求购,4-变现; | ||
151 | + */ | ||
152 | + this.$store.dispatch('reportYas', { | ||
153 | + params: { | ||
154 | + appop: 'XY_UFO_PRD_DT_BUY_SEL_C', | ||
155 | + param: { | ||
156 | + PRD_ID: data.productId, | ||
157 | + PRD_SKU: product.skup, | ||
158 | + PRD_SIZE: product.size_id, | ||
159 | + ORD_TYPE: 3, | ||
160 | + }, | ||
161 | + }, | ||
162 | + }); | ||
163 | + | ||
139 | this.$router.push({ | 164 | this.$router.push({ |
140 | name: 'buyerAskOrder', | 165 | name: 'buyerAskOrder', |
141 | query: { | 166 | query: { |
@@ -144,9 +169,7 @@ export default { | @@ -144,9 +169,7 @@ export default { | ||
144 | }); | 169 | }); |
145 | }); | 170 | }); |
146 | } | 171 | } |
147 | - | ||
148 | - }) | ||
149 | - | 172 | + }); |
150 | }, | 173 | }, |
151 | hide() { | 174 | hide() { |
152 | this.$refs.popup.hide(); | 175 | this.$refs.popup.hide(); |
@@ -173,6 +196,15 @@ export default { | @@ -173,6 +196,15 @@ export default { | ||
173 | .size-list { | 196 | .size-list { |
174 | flex: 1; | 197 | flex: 1; |
175 | overflow: hidden; | 198 | overflow: hidden; |
199 | + position: relative; | ||
200 | + | ||
201 | + &-scroll { | ||
202 | + position: absolute; | ||
203 | + top: 0; | ||
204 | + left: 0; | ||
205 | + right: 0; | ||
206 | + bottom: 0; | ||
207 | + } | ||
176 | } | 208 | } |
177 | 209 | ||
178 | .header { | 210 | .header { |
1 | <template> | 1 | <template> |
2 | <action-sheet @hidden="onHidden" @hide="onHide" @shown="onShown" position="right" ref="popup" :full="true"> | 2 | <action-sheet @hidden="onHidden" @hide="onHide" @shown="onShown" position="right" ref="popup" :full="true"> |
3 | <div class="buy-sheet"> | 3 | <div class="buy-sheet"> |
4 | - <div class="header"> | ||
5 | - <div class="back-wrapper flex" @touchend="onBack"> | ||
6 | - <div class="back"></div> | ||
7 | - </div> | ||
8 | - </div> | ||
9 | <div class="title"> | 4 | <div class="title"> |
10 | <h1>添加尺码</h1> | 5 | <h1>添加尺码</h1> |
11 | <h3>请选择希望添加的尺码</h3> | 6 | <h3>请选择希望添加的尺码</h3> |
@@ -124,8 +119,10 @@ export default { | @@ -124,8 +119,10 @@ export default { | ||
124 | position: absolute; | 119 | position: absolute; |
125 | left: 0; | 120 | left: 0; |
126 | top: 0; | 121 | top: 0; |
127 | - width: 100%; | ||
128 | - height: 100%; | 122 | + bottom: 0; |
123 | + right: 0; | ||
124 | + /*width: 100%;*/ | ||
125 | + /*height: 100%;*/ | ||
129 | background: #fff; | 126 | background: #fff; |
130 | 127 | ||
131 | .size-list { | 128 | .size-list { |
@@ -190,6 +190,7 @@ export default { | @@ -190,6 +190,7 @@ export default { | ||
190 | } | 190 | } |
191 | this.$emit('select', { | 191 | this.$emit('select', { |
192 | size_name: this.selectedSize.size_name, | 192 | size_name: this.selectedSize.size_name, |
193 | + size_id: this.selectedSize.size_id, | ||
193 | productId: this.product.product_id, | 194 | productId: this.product.product_id, |
194 | storageId: this.selectedSize.storage_id, | 195 | storageId: this.selectedSize.storage_id, |
195 | skup: this.selectedSize.skup, | 196 | skup: this.selectedSize.skup, |
@@ -220,19 +221,27 @@ export default { | @@ -220,19 +221,27 @@ export default { | ||
220 | 221 | ||
221 | /** | 222 | /** |
222 | * 数据埋点 | 223 | * 数据埋点 |
224 | + * 购买确认订单 | ||
225 | + * 购买-选择尺码生成订单 | ||
226 | + * 商品详情页-选择尺码确认后上报 | ||
223 | * 商品详情页点击出售/购买/求购按钮 | 227 | * 商品详情页点击出售/购买/求购按钮 |
224 | - * event: XY_UFO_PRD_DT_SALE_C | ||
225 | - * params: 1.TAB_ID:1-出售,2-购买,3-求购, 4-变现; | ||
226 | - * 2.PRD_ID:商品ID; | 228 | + * event: XY_UFO_PRD_DT_BUY_SEL_C |
229 | + * 1.PRD_ID:商品ID; | ||
230 | + * 2.PRD_SKU:商品SKU; | ||
231 | + * 3.PRD_SIZE:尺码; | ||
232 | + * 新增字段: | ||
233 | + * 4.ORD_TYPE:订单类型;1-购买,2-出售,3-求购,4-变现; | ||
227 | */ | 234 | */ |
228 | this.$store.dispatch('reportYas', { | 235 | this.$store.dispatch('reportYas', { |
229 | params: { | 236 | params: { |
230 | appop: 'XY_UFO_PRD_DT_BUY_SEL_C', | 237 | appop: 'XY_UFO_PRD_DT_BUY_SEL_C', |
231 | param: { | 238 | param: { |
232 | - TAB_ID: 4, | ||
233 | - PRD_ID: this.product.product_id, | 239 | + PRD_ID: this.product.product_id, |
240 | + PRD_SKU: get(this.selectedSize, 'bid_skup', 0), | ||
241 | + PRD_SIZE: get(this.selectedSize, 'size_id', 0), | ||
242 | + ORD_TYPE: 4, | ||
234 | }, | 243 | }, |
235 | - } | 244 | + }, |
236 | }); | 245 | }); |
237 | 246 | ||
238 | // 跳转变现 | 247 | // 跳转变现 |
@@ -244,9 +253,7 @@ export default { | @@ -244,9 +253,7 @@ export default { | ||
244 | } | 253 | } |
245 | }); | 254 | }); |
246 | } | 255 | } |
247 | - | ||
248 | }); | 256 | }); |
249 | - | ||
250 | }, | 257 | }, |
251 | }, | 258 | }, |
252 | }; | 259 | }; |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | class="cube-scroll-wrapper" | 7 | class="cube-scroll-wrapper" |
8 | @scroll-end="scrollEndHandler"> | 8 | @scroll-end="scrollEndHandler"> |
9 | <div class="slide"> | 9 | <div class="slide"> |
10 | - <cube-slide ref="slide" :data="imageList"> | 10 | + <cube-slide ref="slide" :options="slideOptions" :data="imageList"> |
11 | <cube-slide-item v-for="(item, index) in imageList" :key="index"> | 11 | <cube-slide-item v-for="(item, index) in imageList" :key="index"> |
12 | <a click="javascript:void 0" class="square-img-container"> | 12 | <a click="javascript:void 0" class="square-img-container"> |
13 | <square-img v-if="!item.initial" :src="item.image_url" :width="600" :height="600" /> | 13 | <square-img v-if="!item.initial" :src="item.image_url" :width="600" :height="600" /> |
@@ -128,6 +128,9 @@ export default { | @@ -128,6 +128,9 @@ export default { | ||
128 | }, | 128 | }, |
129 | data() { | 129 | data() { |
130 | return { | 130 | return { |
131 | + slideOptions: { | ||
132 | + eventPassthrough: 'vertical', | ||
133 | + }, | ||
131 | prdDetailTip, | 134 | prdDetailTip, |
132 | prdDetailImage, | 135 | prdDetailImage, |
133 | 136 | ||
@@ -459,6 +462,22 @@ export default { | @@ -459,6 +462,22 @@ export default { | ||
459 | 462 | ||
460 | // 购买 | 463 | // 购买 |
461 | buy() { | 464 | buy() { |
465 | + /** | ||
466 | + * 数据埋点 | ||
467 | + * 商品详情页点击出售/购买/求购按钮 | ||
468 | + * event: XY_UFO_PRD_DT_SALE_C | ||
469 | + * params: 1.TAB_ID:1-出售,2-购买,3-求购; | ||
470 | + * 2.PRD_ID:商品ID; | ||
471 | + */ | ||
472 | + this.$store.dispatch('reportYas', { | ||
473 | + params: { | ||
474 | + appop: 'XY_UFO_PRD_DT_SALE_C', | ||
475 | + param: { | ||
476 | + TAB_ID: 2, | ||
477 | + PRD_ID: this.productId | ||
478 | + }, | ||
479 | + } | ||
480 | + }); | ||
462 | this.resetSelectedSize(); | 481 | this.resetSelectedSize(); |
463 | this.selectSizeConfig = { | 482 | this.selectSizeConfig = { |
464 | dest: 'OrderBuyConfirm', | 483 | dest: 'OrderBuyConfirm', |
@@ -477,6 +496,22 @@ export default { | @@ -477,6 +496,22 @@ export default { | ||
477 | return; | 496 | return; |
478 | } | 497 | } |
479 | 498 | ||
499 | + /** | ||
500 | + * 数据埋点 | ||
501 | + * 商品详情页点击出售/购买/求购按钮 | ||
502 | + * event: XY_UFO_PRD_DT_SALE_C | ||
503 | + * params: 1.TAB_ID:1-出售,2-购买,3-求购; | ||
504 | + * 2.PRD_ID:商品ID; | ||
505 | + */ | ||
506 | + this.$store.dispatch('reportYas', { | ||
507 | + params: { | ||
508 | + appop: 'XY_UFO_PRD_DT_SALE_C', | ||
509 | + param: { | ||
510 | + TAB_ID: 1, | ||
511 | + PRD_ID: this.productId | ||
512 | + }, | ||
513 | + } | ||
514 | + }); | ||
480 | this.resetSelectedSize(); | 515 | this.resetSelectedSize(); |
481 | this.selectSizeConfig = { | 516 | this.selectSizeConfig = { |
482 | dest: 'OrderSellConfirm', | 517 | dest: 'OrderSellConfirm', |
@@ -490,17 +525,25 @@ export default { | @@ -490,17 +525,25 @@ export default { | ||
490 | async onSelectTradeProduct(tradeProduct) { | 525 | async onSelectTradeProduct(tradeProduct) { |
491 | /** | 526 | /** |
492 | * 数据埋点 | 527 | * 数据埋点 |
528 | + * 购买确认订单 | ||
529 | + * 购买-选择尺码生成订单 | ||
530 | + * 商品详情页-选择尺码确认后上报 | ||
493 | * 商品详情页点击出售/购买/求购按钮 | 531 | * 商品详情页点击出售/购买/求购按钮 |
494 | - * event: XY_UFO_PRD_DT_SALE_C | ||
495 | - * params: 1.TAB_ID:1-出售,2-购买,3-求购; | ||
496 | - * 2.PRD_ID:商品ID; | 532 | + * event: XY_UFO_PRD_DT_BUY_SEL_C |
533 | + * 1.PRD_ID:商品ID; | ||
534 | + * 2.PRD_SKU:商品SKU; | ||
535 | + * 3.PRD_SIZE:尺码; | ||
536 | + * 新增字段: | ||
537 | + * 4.ORD_TYPE:订单类型;1-购买,2-出售,3-求购,4-变现; | ||
497 | */ | 538 | */ |
498 | this.$store.dispatch('reportYas', { | 539 | this.$store.dispatch('reportYas', { |
499 | params: { | 540 | params: { |
500 | appop: 'XY_UFO_PRD_DT_BUY_SEL_C', | 541 | appop: 'XY_UFO_PRD_DT_BUY_SEL_C', |
501 | param: { | 542 | param: { |
502 | - TAB_ID: this.selectSizeConfig.type === 'buy' ? 2 : 1, | ||
503 | - PRD_ID: tradeProduct.productId | 543 | + PRD_ID: tradeProduct.productId, |
544 | + PRD_SKU: tradeProduct.skup, | ||
545 | + PRD_SIZE: tradeProduct.size_id, | ||
546 | + ORD_TYPE: this.selectSizeConfig.type === 'buy' ? 1 : 2 | ||
504 | }, | 547 | }, |
505 | } | 548 | } |
506 | }); | 549 | }); |
@@ -573,6 +616,14 @@ export default { | @@ -573,6 +616,14 @@ export default { | ||
573 | // 打开求购列表 | 616 | // 打开求购列表 |
574 | qiugou() { | 617 | qiugou() { |
575 | this.showBidSheet = true; | 618 | this.showBidSheet = true; |
619 | + | ||
620 | + /** | ||
621 | + * 数据埋点 | ||
622 | + * 商品详情页点击出售/购买/求购按钮 | ||
623 | + * event: XY_UFO_PRD_DT_SALE_C | ||
624 | + * params: 1.TAB_ID:1-出售,2-购买,3-求购; | ||
625 | + * 2.PRD_ID:商品ID; | ||
626 | + */ | ||
576 | this.$store.dispatch('reportYas', { | 627 | this.$store.dispatch('reportYas', { |
577 | params: { | 628 | params: { |
578 | appop: 'XY_UFO_PRD_DT_SALE_C', | 629 | appop: 'XY_UFO_PRD_DT_SALE_C', |
-
Please register or login to post a comment