jufubao-base 1.0.169-beta6 → 1.0.169-beta7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +8 -0
- package/src/components/JfbBaseTfkCardLogin/Attr.js +22 -0
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +48 -19
- package/src/components/JfbBaseTfkSearch/AllList.vue +231 -0
- package/src/components/JfbBaseTfkSearch/Api.js +11 -42
- package/src/components/JfbBaseTfkSearch/Attr.js +125 -2
- package/src/components/JfbBaseTfkSearch/ContentCinema.vue +12 -2
- package/src/components/JfbBaseTfkSearch/{ContentItem.vue → ContentFilm.vue} +18 -4
- package/src/components/JfbBaseTfkSearch/ContentProduct.vue +308 -0
- package/src/components/JfbBaseTfkSearch/ContentShop.vue +184 -0
- package/src/components/JfbBaseTfkSearch/CusAttr.js +2 -0
- package/src/components/JfbBaseTfkSearch/CustomList.vue +179 -18
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +132 -20
- package/src/components/JfbBaseTfkSearch/Mock.js +90 -11
- package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +1 -2
- package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +52 -81
- package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
- package/src/components/JfbBaseTfkSearch/listMixins.js +71 -0
- package/src/components/JfbBaseTfkSearch/search.js +270 -152
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
marginBottom:$parentVm.outSpacing + 'rpx',
|
|
12
12
|
padding:contMarginComp,
|
|
13
13
|
borderRadius:$parentVm.contRradius+ 'rpx',
|
|
14
|
-
|
|
15
|
-
boxShadow:$parentVm.contShadow,
|
|
16
|
-
backgroundColor:$parentVm.contBgColor,
|
|
14
|
+
boxShadow:'0 0 10rpx rgba(0,0,0,0.1)',
|
|
17
15
|
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
18
16
|
}"
|
|
19
17
|
>
|
|
@@ -23,13 +21,111 @@
|
|
|
23
21
|
:product-config="$parentVm.productConfig"
|
|
24
22
|
:out-spacing="$parentVm.outSpacing"
|
|
25
23
|
></skeleton-product>
|
|
26
|
-
<skeleton-shop v-if="type_code === '
|
|
24
|
+
<skeleton-shop v-if="type_code === 'shop'" :out-spacing="$parentVm.outSpacing"></skeleton-shop>
|
|
27
25
|
<skeleton-film v-if="type_code === 'film'" :out-spacing="$parentVm.outSpacing"></skeleton-film>
|
|
28
26
|
<skeleton-cinema v-if="type_code === 'cinema'"></skeleton-cinema>
|
|
29
27
|
</view>
|
|
30
28
|
</view>
|
|
31
29
|
</view>
|
|
32
|
-
<view class="custom-list-data" v-else
|
|
30
|
+
<view class="custom-list-data" v-else>
|
|
31
|
+
<template v-if="type_other !== 2">
|
|
32
|
+
<view
|
|
33
|
+
v-for="item in dataList"
|
|
34
|
+
:key="item.id"
|
|
35
|
+
:style="{
|
|
36
|
+
marginBottom:$parentVm.outSpacing + 'rpx',
|
|
37
|
+
padding:contMarginComp,
|
|
38
|
+
borderRadius:$parentVm.contRradius+ 'rpx',
|
|
39
|
+
border: $parentVm.contBorder,
|
|
40
|
+
boxShadow:$parentVm.contShadow,
|
|
41
|
+
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
42
|
+
height: heightRpx,
|
|
43
|
+
backgroundColor: $parentVm.contBgColor
|
|
44
|
+
}">
|
|
45
|
+
<content-film
|
|
46
|
+
type="hot"
|
|
47
|
+
v-if="type_code === 'film'"
|
|
48
|
+
style="width: 100%; height: 100%"
|
|
49
|
+
:keyword="keyword"
|
|
50
|
+
:item="item"
|
|
51
|
+
:out-spacing="$parentVm.outSpacing"
|
|
52
|
+
:color="$parentVm.mainColor"
|
|
53
|
+
:border-radius="$parentVm.imgRradius"
|
|
54
|
+
@on-film-detail="(film_id)=>{$parentVm.handleFilmDetail(film_id, dataConfig)}"
|
|
55
|
+
@on-buy="(film_id)=>{$parentVm.handleBuy(film_id, dataConfig)}"
|
|
56
|
+
></content-film>
|
|
57
|
+
<content-cinema
|
|
58
|
+
v-if="type_code === 'cinema'"
|
|
59
|
+
style="width: 100%;height: 100%"
|
|
60
|
+
type="list"
|
|
61
|
+
:keyword="keyword"
|
|
62
|
+
:item="item"
|
|
63
|
+
:out-spacing="$parentVm.outSpacing"
|
|
64
|
+
:color="{SEAT:$parentVm.mainColor,CODE:$parentVm.subMainColor,SELL:$parentVm.successColor}"
|
|
65
|
+
:border-radius="$parentVm.imgRradius"
|
|
66
|
+
@on-schedule="(cinema)=>{$parentVm.handleSchedule(cinema,dataConfig)}"
|
|
67
|
+
@on-cashier-detail="(cinema)=>{$parentVm.handleCashierDetail(cinema,dataConfig)}"
|
|
68
|
+
@on-code-detail="(cinema)=>{$parentVm.handleCodeDetail(cinema,dataConfig)}"
|
|
69
|
+
></content-cinema>
|
|
70
|
+
<content-shop
|
|
71
|
+
v-if="type_code === 'shop'"
|
|
72
|
+
style="width: 100%; height: 100%"
|
|
73
|
+
:keyword="keyword"
|
|
74
|
+
:out-spacing="$parentVm.outSpacing"
|
|
75
|
+
:item="item"
|
|
76
|
+
:color="$parentVm.mainColor"
|
|
77
|
+
:border-radius="$parentVm.imgRradius"
|
|
78
|
+
:is-echange="'Y' || $parentVm.isShowExchange"
|
|
79
|
+
@on-shop-jhd="(shop)=>{$parentVm.handleShopJhd(shop,dataConfig)}"
|
|
80
|
+
@on-shop-detail="(shop)=>{$parentVm.handleShopDetail(shop,dataConfig)}"
|
|
81
|
+
></content-shop>
|
|
82
|
+
<content-product
|
|
83
|
+
v-if="$parentVm.productConfig !== null && type_code === 'product'"
|
|
84
|
+
style="width: 100%; height: 100%"
|
|
85
|
+
:product-config="$parentVm.productConfig"
|
|
86
|
+
:out-spacing="$parentVm.outSpacing"
|
|
87
|
+
:item="item"
|
|
88
|
+
:color="$parentVm.mainColor"
|
|
89
|
+
:border-radius="$parentVm.imgRradius"
|
|
90
|
+
:cell="type_other"
|
|
91
|
+
@on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
|
|
92
|
+
></content-product>
|
|
93
|
+
</view>
|
|
94
|
+
</template>
|
|
95
|
+
<view v-else class="productBox2">
|
|
96
|
+
<view v-for="(value, listKey) in productTowList" :key="listKey">
|
|
97
|
+
<view
|
|
98
|
+
v-if="productTowList[listKey] !== null"
|
|
99
|
+
v-for="item in productTowList[listKey]"
|
|
100
|
+
:key="item.id"
|
|
101
|
+
:style="{
|
|
102
|
+
marginBottom:$parentVm.outSpacing + 'rpx',
|
|
103
|
+
padding:contMarginComp,
|
|
104
|
+
borderRadius:$parentVm.contRradius+ 'rpx',
|
|
105
|
+
border: $parentVm.contBorder,
|
|
106
|
+
boxShadow:$parentVm.contShadow,
|
|
107
|
+
width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
|
|
108
|
+
height: heightRpx,
|
|
109
|
+
backgroundColor: $parentVm.contBgColor
|
|
110
|
+
}"
|
|
111
|
+
>
|
|
112
|
+
<content-product
|
|
113
|
+
v-if="$parentVm.productConfig !== null"
|
|
114
|
+
style="width: 100%; height: 100%"
|
|
115
|
+
:product-config="$parentVm.productConfig"
|
|
116
|
+
:out-spacing="$parentVm.outSpacing"
|
|
117
|
+
:item="item"
|
|
118
|
+
:height="outItemProduct"
|
|
119
|
+
:color="$parentVm.mainColor"
|
|
120
|
+
:border-radius="$parentVm.imgRradius"
|
|
121
|
+
:cell="type_other"
|
|
122
|
+
@on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
|
|
123
|
+
></content-product>
|
|
124
|
+
</view>
|
|
125
|
+
</view>
|
|
126
|
+
</view>
|
|
127
|
+
|
|
128
|
+
</view>
|
|
33
129
|
</view>
|
|
34
130
|
</template>
|
|
35
131
|
|
|
@@ -39,14 +135,22 @@ import SkeletonFilm from "./SkeletonFilm.vue";
|
|
|
39
135
|
import SkeletonCinema from "./SkeletonCinema.vue";
|
|
40
136
|
import SkeletonShop from "./SkeletonShop.vue";
|
|
41
137
|
import SkeletonProduct from "./SkeletonProduct.vue";
|
|
138
|
+
import ContentFilm from "./ContentFilm.vue";
|
|
139
|
+
import ContentCinema from "./ContentCinema.vue";
|
|
140
|
+
import ContentShop from "./ContentShop.vue";
|
|
141
|
+
import ContentProduct from "./ContentProduct.vue";
|
|
42
142
|
|
|
43
143
|
export default {
|
|
44
144
|
name: "CustomList",
|
|
45
145
|
components: {
|
|
146
|
+
ContentProduct,
|
|
46
147
|
SkeletonProduct,
|
|
47
148
|
SkeletonCinema,
|
|
48
149
|
SkeletonFilm,
|
|
49
|
-
SkeletonShop
|
|
150
|
+
SkeletonShop,
|
|
151
|
+
ContentFilm,
|
|
152
|
+
ContentCinema,
|
|
153
|
+
ContentShop,
|
|
50
154
|
},
|
|
51
155
|
props:{
|
|
52
156
|
keyword:{
|
|
@@ -75,18 +179,16 @@ export default {
|
|
|
75
179
|
if(this.keyword) params['keyword'] = this.keyword;
|
|
76
180
|
|
|
77
181
|
//设置城市
|
|
78
|
-
if(this.
|
|
182
|
+
if(this.stateCity && this.stateCity.city_code) {
|
|
79
183
|
params['city_code'] = this.stateCity.city_code;
|
|
80
184
|
}
|
|
81
185
|
|
|
82
186
|
//设置经纬度
|
|
83
|
-
if(this.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
params['longitude'] = this.stateLocation.longitude;
|
|
89
|
-
}
|
|
187
|
+
if(this.stateLocation &&
|
|
188
|
+
(this.stateLocation.latitude && this.stateLocation.longitude)
|
|
189
|
+
){
|
|
190
|
+
params['latitude'] = this.stateLocation.latitude;
|
|
191
|
+
params['longitude'] = this.stateLocation.longitude;
|
|
90
192
|
}
|
|
91
193
|
|
|
92
194
|
return params
|
|
@@ -104,12 +206,19 @@ export default {
|
|
|
104
206
|
num = num - this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20) - this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20);
|
|
105
207
|
return num - this.$parentVm.contBorderWidth * 2
|
|
106
208
|
},
|
|
209
|
+
heightRpx(){
|
|
210
|
+
let h = 'auto'
|
|
211
|
+
if(this.type_code === 'film') h = '240rpx'
|
|
212
|
+
if(this.type_code === 'cinema') h = 'auto';
|
|
213
|
+
if(this.type_code === 'shop') h = '200rpx';
|
|
214
|
+
return h;
|
|
215
|
+
}
|
|
107
216
|
},
|
|
108
217
|
data(){
|
|
109
218
|
return {
|
|
110
219
|
$parentVm:null,
|
|
111
220
|
parentStatus: false,
|
|
112
|
-
skeletonCount:
|
|
221
|
+
skeletonCount: 6,
|
|
113
222
|
|
|
114
223
|
page_token:'1',
|
|
115
224
|
page_size: 20,
|
|
@@ -124,7 +233,14 @@ export default {
|
|
|
124
233
|
//列表数据
|
|
125
234
|
dataList: null,
|
|
126
235
|
timer:null,
|
|
127
|
-
|
|
236
|
+
dataConfig: null,
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
//商品两列功能
|
|
240
|
+
productTowList:{
|
|
241
|
+
left:null,
|
|
242
|
+
right:null,
|
|
243
|
+
},
|
|
128
244
|
}
|
|
129
245
|
},
|
|
130
246
|
|
|
@@ -157,6 +273,7 @@ export default {
|
|
|
157
273
|
},
|
|
158
274
|
|
|
159
275
|
methods:{
|
|
276
|
+
|
|
160
277
|
parseTab(){
|
|
161
278
|
let tabs = this.tabId.split('@');
|
|
162
279
|
this.type_code = tabs[1];
|
|
@@ -164,14 +281,24 @@ export default {
|
|
|
164
281
|
this.is_open_city = tabs[2];
|
|
165
282
|
if(this.type_code === 'product'){
|
|
166
283
|
this.type_other = Number(tabs[3]);
|
|
167
|
-
if(this.type_other === 2) this.skeletonCount =
|
|
284
|
+
if(this.type_other === 2) this.skeletonCount = 12
|
|
285
|
+
else this.skeletonCount = 6
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
this.skeletonCount = 6;
|
|
289
|
+
this.type_other = null
|
|
168
290
|
}
|
|
169
|
-
else this.type_other = null
|
|
170
291
|
},
|
|
171
292
|
|
|
172
293
|
handleClear(){
|
|
294
|
+
this.is_open_city = 'N';
|
|
295
|
+
this.dataConfig = null;
|
|
173
296
|
this.page_token = '1';
|
|
174
297
|
this.dataList = null;
|
|
298
|
+
this.productTowList = {
|
|
299
|
+
left:null,
|
|
300
|
+
right:null,
|
|
301
|
+
}
|
|
175
302
|
},
|
|
176
303
|
|
|
177
304
|
getParentMV(){
|
|
@@ -198,6 +325,32 @@ export default {
|
|
|
198
325
|
this.$emit('on-list', {
|
|
199
326
|
params:this.getParams,
|
|
200
327
|
cb:(res)=>{
|
|
328
|
+
this.dataConfig = res;
|
|
329
|
+
|
|
330
|
+
//整理为统一ID
|
|
331
|
+
res.items = res.items.map((item,index)=>{
|
|
332
|
+
if(!item.id){
|
|
333
|
+
item.id = item.product_id || item.resource_shop_id || item.cinema_id
|
|
334
|
+
}
|
|
335
|
+
//item.list_title = `${index} - ${ item.list_title}`
|
|
336
|
+
return item;
|
|
337
|
+
})
|
|
338
|
+
|
|
339
|
+
//商品模式并且为两列功能
|
|
340
|
+
if(this.type_code === 'product' && this.type_other === 2){
|
|
341
|
+
let right = [], left=[];
|
|
342
|
+
res.items.map((item,index) =>{
|
|
343
|
+
item.testiIndex = index
|
|
344
|
+
if(index%2===0) left.push(item);
|
|
345
|
+
else right.push(item);
|
|
346
|
+
})
|
|
347
|
+
this.productTowList = {
|
|
348
|
+
left:(this.productTowList.left ||[]).concat(left),
|
|
349
|
+
right:(this.productTowList.right ||[]).concat(right)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
this.dataList = (this.dataList||[]).concat(res.items);
|
|
353
|
+
this.page_token = res.next_page_token
|
|
201
354
|
this.$xdHideLoading();
|
|
202
355
|
}
|
|
203
356
|
})
|
|
@@ -218,4 +371,12 @@ export default {
|
|
|
218
371
|
.productItemCell2 {
|
|
219
372
|
|
|
220
373
|
}
|
|
374
|
+
|
|
375
|
+
.productBox2 {
|
|
376
|
+
display: flex;
|
|
377
|
+
justify-content: space-between;
|
|
378
|
+
align-items: flex-start;
|
|
379
|
+
flex-flow: wrap;
|
|
380
|
+
}
|
|
381
|
+
|
|
221
382
|
</style>
|
|
@@ -15,9 +15,32 @@
|
|
|
15
15
|
<!-- #endif -->
|
|
16
16
|
<view class="jfb-base-tfk-search__body">
|
|
17
17
|
<view class="x-line"></view>
|
|
18
|
+
<view class="menu_wrap" :style="menuWrapBoxStyle">
|
|
19
|
+
<view class="menu_list" :style="menuBoxStyle">
|
|
20
|
+
<view class="menu_item"
|
|
21
|
+
v-for="(item, i) in showMenuList" :key="item.value"
|
|
22
|
+
@click="handleSwitchMenu(item)"
|
|
23
|
+
>
|
|
24
|
+
<view class="menu_inner"
|
|
25
|
+
:style="[
|
|
26
|
+
menuItemBoxStyle,
|
|
27
|
+
item.value === tabId ? menuItemActiveStyle : menuItemStyle,
|
|
28
|
+
{
|
|
29
|
+
marginRight: i === showMenuList.length - 1 ? '0' : menuItemMargin + 'rpx',
|
|
30
|
+
}
|
|
31
|
+
]"
|
|
32
|
+
>{{ item.label }}</view>
|
|
33
|
+
</view>
|
|
34
|
+
</view>
|
|
35
|
+
</view>
|
|
36
|
+
|
|
18
37
|
<view class="tfk-search" :style="{padding: outSpacing + 'rpx'}">
|
|
19
|
-
<
|
|
38
|
+
<all-list v-if="!tabId"
|
|
39
|
+
@on-parent-vm="handleParentVm"
|
|
40
|
+
@on-list="handleList"
|
|
41
|
+
></all-list>
|
|
20
42
|
<custom-list
|
|
43
|
+
v-else
|
|
21
44
|
:tab-id="tabId"
|
|
22
45
|
:keyword="keyword"
|
|
23
46
|
ref="customList"
|
|
@@ -39,12 +62,14 @@
|
|
|
39
62
|
import listMixins from "./listMixins";
|
|
40
63
|
import CustomList from "./CustomList.vue";
|
|
41
64
|
import search from './search';
|
|
65
|
+
import AllList from "./AllList.vue";
|
|
42
66
|
|
|
43
67
|
export default {
|
|
44
68
|
name: "JfbBaseTfkSearch",
|
|
45
69
|
components: {
|
|
46
70
|
CustomList,
|
|
47
|
-
XdFontIcon
|
|
71
|
+
XdFontIcon,
|
|
72
|
+
AllList
|
|
48
73
|
},
|
|
49
74
|
mixins: [
|
|
50
75
|
componentsMixins, extsMixins, JfbBaseTfkSearchMixin,listMixins
|
|
@@ -52,15 +77,79 @@
|
|
|
52
77
|
data() {
|
|
53
78
|
return {
|
|
54
79
|
hideMask: true,
|
|
55
|
-
tabId: '
|
|
80
|
+
tabId: '10@cinema@Y@1', //cinema/film/shop/product
|
|
56
81
|
keyword: '',
|
|
57
82
|
options:{},
|
|
58
|
-
|
|
59
|
-
|
|
83
|
+
menuList: [],
|
|
60
84
|
//公共样式
|
|
61
85
|
outSpacing:20,
|
|
86
|
+
|
|
87
|
+
//面板
|
|
88
|
+
menuMargin: {},
|
|
89
|
+
menuPadding: {},
|
|
90
|
+
menuBgColor: {},
|
|
91
|
+
menuItemPadding: {},
|
|
92
|
+
menuTabColor: {},
|
|
93
|
+
menuBorderWidth: 1,
|
|
94
|
+
menuItemMargin: 40,
|
|
95
|
+
searchScope: [],
|
|
62
96
|
}
|
|
63
97
|
},
|
|
98
|
+
computed: {
|
|
99
|
+
showMenuList(){
|
|
100
|
+
return [{label: "全部", value: ""}, ...this.menuList]
|
|
101
|
+
},
|
|
102
|
+
menuWrapBoxStyle(){
|
|
103
|
+
let padding = `${this.checkValue(this.menuMargin.top, 20)}rpx`;
|
|
104
|
+
padding = `${padding} ${this.checkValue(this.menuMargin.right, 20)}rpx`;
|
|
105
|
+
padding = `${padding} ${this.checkValue(this.menuMargin.bottom, 20)}rpx`;
|
|
106
|
+
padding = `${padding} ${this.checkValue(this.menuMargin.left, 20)}rpx`;
|
|
107
|
+
return this.styleObjectToString({
|
|
108
|
+
padding: padding,
|
|
109
|
+
})
|
|
110
|
+
},
|
|
111
|
+
menuBoxStyle(){
|
|
112
|
+
let padding = `${this.checkValue(this.menuPadding.top, 20)}rpx`;
|
|
113
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.right, 20)}rpx`;
|
|
114
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.bottom, 20)}rpx`;
|
|
115
|
+
padding = `${padding} ${this.checkValue(this.menuPadding.left, 20)}rpx`;
|
|
116
|
+
return this.styleObjectToString({
|
|
117
|
+
padding: padding,
|
|
118
|
+
backgroundColor: this.menuBgColor,
|
|
119
|
+
})
|
|
120
|
+
},
|
|
121
|
+
menuItemBoxStyle(){
|
|
122
|
+
let padding = `${this.checkValue(this.menuItemPadding.top, 20)}rpx`;
|
|
123
|
+
padding = `${padding} ${this.checkValue(this.menuItemPadding.right, 20)}rpx`;
|
|
124
|
+
padding = `${padding} ${this.checkValue(this.menuItemPadding.bottom, 20)}rpx`;
|
|
125
|
+
padding = `${padding} ${this.checkValue(this.menuItemPadding.left, 20)}rpx`;
|
|
126
|
+
return this.styleObjectToString({
|
|
127
|
+
padding
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
menuItemStyle(){
|
|
131
|
+
let styleObj = {
|
|
132
|
+
color: this.menuTabColor['color'] || '#333',
|
|
133
|
+
background: this.menuTabColor['bgColor'] || 'transparent',
|
|
134
|
+
fontSize: this.menuTabColor['fontSize'] || '30rpx',
|
|
135
|
+
fontWeight: this.menuTabColor['fontWeight'] || 'normal',
|
|
136
|
+
borderWidth: this.menuBorderWidth + 'px',
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return this.styleObjectToString(styleObj)
|
|
140
|
+
},
|
|
141
|
+
menuItemActiveStyle(){
|
|
142
|
+
let defaultTextColor = this.mainColor;
|
|
143
|
+
let styleActiveObj = {
|
|
144
|
+
color: this.menuTabColor['actColor'] || defaultTextColor,
|
|
145
|
+
background: this.menuTabColor['actBgColor'] || 'transparent',
|
|
146
|
+
fontSize: this.menuTabColor['actFontSize'] || '30rpx',
|
|
147
|
+
fontWeight: this.menuTabColor['actFontWeight'] || 'normal',
|
|
148
|
+
borderBottom: `${this.menuBorderWidth}px solid ${this.menuTabColor['actColor'] || defaultTextColor}`
|
|
149
|
+
}
|
|
150
|
+
return this.styleObjectToString(styleActiveObj)
|
|
151
|
+
},
|
|
152
|
+
},
|
|
64
153
|
watch: {
|
|
65
154
|
container(value, oldValue) {
|
|
66
155
|
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
@@ -82,23 +171,26 @@
|
|
|
82
171
|
* @param cb {Function}
|
|
83
172
|
*/
|
|
84
173
|
handleList({params, cb}){
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
174
|
+
let data = {...params};
|
|
175
|
+
if(this.tabId === ''){
|
|
176
|
+
data['search_range'] = this.menuList.map(item => item.value).join(',');
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
jfbRootExec("getTfkSearchList", {
|
|
180
|
+
vm: this,
|
|
181
|
+
data: data
|
|
182
|
+
}).then(res => {
|
|
183
|
+
if(this.tabId === ''){
|
|
184
|
+
cb(res.list)
|
|
185
|
+
}else{
|
|
186
|
+
cb(res.list[0])
|
|
187
|
+
}
|
|
188
|
+
})
|
|
89
189
|
},
|
|
90
190
|
|
|
91
191
|
onJfbLoad(options) {
|
|
92
192
|
this.options = options;
|
|
93
|
-
// jfbRootExec('baiduUserLogin', {
|
|
94
|
-
|
|
95
|
-
// vm: this,// data: {
|
|
96
|
-
|
|
97
|
-
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
98
193
|
|
|
99
|
-
// }
|
|
100
|
-
|
|
101
|
-
// }).then().catch()
|
|
102
194
|
},
|
|
103
195
|
/**
|
|
104
196
|
* @description 监听事件变化
|
|
@@ -106,10 +198,24 @@
|
|
|
106
198
|
*/
|
|
107
199
|
init(container) {
|
|
108
200
|
this.outSpacing = getContainerPropsValue(container, 'content.outSpacing', '20');
|
|
201
|
+
this.menuMargin = getContainerPropsValue(container, 'content.menuMargin', {});
|
|
202
|
+
this.menuPadding = getContainerPropsValue(container, 'content.menuPadding', {});
|
|
203
|
+
this.menuBgColor = getContainerPropsValue(container, 'content.menuBgColor', '');
|
|
204
|
+
this.menuItemPadding = getContainerPropsValue(container, 'content.menuItemPadding', {});
|
|
205
|
+
this.menuTabColor = getContainerPropsValue(container, 'content.menuTabColor', {});
|
|
206
|
+
this.menuBorderWidth = getContainerPropsValue(container, 'content.menuBorderWidth', 1);
|
|
207
|
+
this.menuItemMargin = getContainerPropsValue(container, 'content.menuItemMargin', 40);
|
|
208
|
+
this.searchScope = getContainerPropsValue(container, 'content.searchScope', []);
|
|
209
|
+
|
|
210
|
+
if(this.$configProject['isPreview']){
|
|
211
|
+
this.menuList = this.searchScope;
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
handleSwitchMenu(item){
|
|
215
|
+
this.tabId = item.value;
|
|
109
216
|
},
|
|
110
|
-
|
|
111
217
|
onJfbScroll(options) {
|
|
112
|
-
console.log('event.onJfbScroll', options)
|
|
218
|
+
// console.log('event.onJfbScroll', options)
|
|
113
219
|
},
|
|
114
220
|
|
|
115
221
|
onJfbShow(options) {
|
|
@@ -137,7 +243,13 @@
|
|
|
137
243
|
|
|
138
244
|
.jfb-base-tfk-search {
|
|
139
245
|
&__body{
|
|
140
|
-
|
|
246
|
+
.menu_wrap{
|
|
247
|
+
box-sizing: border-box;
|
|
248
|
+
}
|
|
249
|
+
.menu_list{
|
|
250
|
+
display: flex;
|
|
251
|
+
box-sizing: border-box;
|
|
252
|
+
}
|
|
141
253
|
}
|
|
142
254
|
}
|
|
143
255
|
</style>
|
|
@@ -1,13 +1,92 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
getTfkSearchList: {
|
|
5
|
+
list: [
|
|
6
|
+
{
|
|
7
|
+
type: "product",
|
|
8
|
+
name: "蛋糕",
|
|
9
|
+
detail_redirect_data:
|
|
10
|
+
'{"dir":"wtxsaas","host":"sandbox-website-05.jufubao.cn","path":"\\/main\\/order\\/detail","appType":"h5","site_id":"17928cc37788be02","site_url":"https:\\/\\/sandbox-website-05.jufubao.cn\\/wtxsaas\\/main\\/order\\/detail","frontPath":"\\/wtxsaas\\/main\\/order\\/detail","fixed_business_code":""}',
|
|
11
|
+
detail1_redirect_data: "",
|
|
12
|
+
more_redirect_data: "",
|
|
13
|
+
sort: 0,
|
|
14
|
+
setting_id: 1,
|
|
15
|
+
next_page_token: 'a:2:{i:0;d:1705.0785;i:1;s:8:"60030143";}',
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
brand_id: 100003,
|
|
19
|
+
brand_name: "品牌jls0519",
|
|
20
|
+
list_title: "3",
|
|
21
|
+
market_price: 2000,
|
|
22
|
+
market_tags: [],
|
|
23
|
+
product_id: 60030143,
|
|
24
|
+
product_name: "仅快递实物商品(北京廊坊支持配送)",
|
|
25
|
+
product_type: "good",
|
|
26
|
+
promo_price: 0,
|
|
27
|
+
sale_num: 8,
|
|
28
|
+
sale_price: 3000,
|
|
29
|
+
status: "ok",
|
|
30
|
+
thumb: "/uploads/20231215/b2ce0235129aa592044f96343f25c338.jpeg"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "shop",
|
|
36
|
+
name: "门店",
|
|
37
|
+
detail_redirect_data: "",
|
|
38
|
+
detail1_redirect_data: "",
|
|
39
|
+
more_redirect_data: "",
|
|
40
|
+
sort: 1,
|
|
41
|
+
setting_id: 5,
|
|
42
|
+
next_page_token: "a:1:{i:0;d:4.4;}",
|
|
43
|
+
items: [
|
|
44
|
+
{
|
|
45
|
+
brand_id: 0,
|
|
46
|
+
brand_name: "",
|
|
47
|
+
shop_icon:
|
|
48
|
+
"https://dimg04.uat.qa.nt.ctripcorp.com/images/1lo4a12000007fyeg8D96.gif",
|
|
49
|
+
distance: 4,
|
|
50
|
+
business_status: "5",
|
|
51
|
+
full_address: "北京北京北京市东城区景山前街4号",
|
|
52
|
+
phone: "",
|
|
53
|
+
consume_mode: ["TRAVEL"],
|
|
54
|
+
consume_mode_name: "",
|
|
55
|
+
shop_id: 1052782,
|
|
56
|
+
resource_shop_id: 8000302,
|
|
57
|
+
resource_shop_name: "故宫-测试1-攻略修改",
|
|
58
|
+
shop_tags: {},
|
|
59
|
+
stars: 2
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: "cinema",
|
|
65
|
+
name: "影院",
|
|
66
|
+
detail_redirect_data:
|
|
67
|
+
'{"dir":"apply06","host":"sandbox-website-05.jufubao.cn","path":"\\/main\\/movie\\/suhedule","appType":"h5","site_id":"17928cc37788be02","site_url":"https:\\/\\/sandbox-website-05.jufubao.cn\\/apply06\\/main\\/movie\\/suhedule","frontPath":"\\/apply06\\/main\\/movie\\/suhedule","fixed_business_code":""}',
|
|
68
|
+
detail1_redirect_data:
|
|
69
|
+
'{"dir":"apply06","host":"sandbox-website-05.jufubao.cn","path":"\\/main\\/movie\\/cdetailnew","appType":"h5","site_id":"17928cc37788be02","site_url":"https:\\/\\/sandbox-website-05.jufubao.cn\\/apply06\\/main\\/movie\\/cdetailnew","frontPath":"\\/apply06\\/main\\/movie\\/cdetailnew","fixed_business_code":""}',
|
|
70
|
+
more_redirect_data: "",
|
|
71
|
+
sort: 3,
|
|
72
|
+
setting_id: 10,
|
|
73
|
+
next_page_token: 1,
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
address: "朝阳区安慧里三区10号 (北辰购物中心对面)",
|
|
77
|
+
brand_id: 0,
|
|
78
|
+
brand_name: "",
|
|
79
|
+
cinema_id: 6771413,
|
|
80
|
+
cinema_name: "北京剧院",
|
|
81
|
+
cinema_type: ["SEAT"],
|
|
82
|
+
cinema_type_name: ["在线选座"],
|
|
83
|
+
distance: "",
|
|
84
|
+
is_open: "Y",
|
|
85
|
+
shop_icon: ""
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
request_id: "f6c04f1d2eb3385b"
|
|
91
|
+
}
|
|
92
|
+
};
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
|
|
18
18
|
<style scoped lang="less">
|
|
19
19
|
.skeleton-wrap-item {
|
|
20
|
-
height:
|
|
20
|
+
height: 200rpx;
|
|
21
21
|
display: block;
|
|
22
22
|
|
|
23
23
|
& > .title {
|
|
@@ -32,7 +32,6 @@ export default {
|
|
|
32
32
|
display: flex;
|
|
33
33
|
justify-content: space-between;
|
|
34
34
|
align-items: center;
|
|
35
|
-
padding-top: 30rpx;
|
|
36
35
|
|
|
37
36
|
& > .local {
|
|
38
37
|
.skeleton-item(120rpx, 30rpx);
|