jufubao-base 1.0.169-beta2 → 1.0.169-beta20

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.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
  3. package/src/components/JfbBaseLogin/Attr.js +54 -16
  4. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +3 -1
  5. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  6. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
  7. package/src/components/JfbBaseOrderDetail/Api.js +12 -7
  8. package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
  9. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
  10. package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
  11. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  12. package/src/components/JfbBaseTfkCardBind/Attr.js +139 -15
  13. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +217 -19
  14. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  15. package/src/components/JfbBaseTfkCardDetail/Api.js +11 -0
  16. package/src/components/JfbBaseTfkCardDetail/Attr.js +158 -7
  17. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +159 -17
  18. package/src/components/JfbBaseTfkCardLogin/Attr.js +490 -4
  19. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +393 -106
  20. package/src/components/JfbBaseTfkCardLogin/Mock.js +6 -536
  21. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +75 -19
  22. package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
  23. package/src/components/JfbBaseTfkSearch/AllList.vue +350 -0
  24. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  25. package/src/components/JfbBaseTfkSearch/Attr.js +344 -32
  26. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  27. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +218 -0
  28. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +317 -0
  29. package/src/components/JfbBaseTfkSearch/ContentShop.vue +186 -0
  30. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  31. package/src/components/JfbBaseTfkSearch/CustomList.vue +453 -0
  32. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +286 -35
  33. package/src/components/JfbBaseTfkSearch/Mock.js +242 -11
  34. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  35. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  36. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  37. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  38. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  39. package/src/components/JfbBaseTfkSearch/listMixins.js +187 -0
  40. package/src/mixins/colorCardMixins.js +71 -9
  41. package/src/mixins/componentsMixins.js +376 -23
  42. package/src/mixins/posterMixins.js +122 -0
@@ -0,0 +1,350 @@
1
+ <template>
2
+ <view class="search_all_list" >
3
+ <view class="module_item" v-for="parent in list" :key="parent.setting_id"
4
+ :style="moduleItemStyle"
5
+ >
6
+ <view class="module_title" :style="moduleItemTitleStyle">{{ parent.name }}</view>
7
+ <view v-if="parent.type !== 'product'" class="module_cont">
8
+ <view v-for="(item, i) in parent.items" :key="item.key"
9
+ class="module_cont_inner"
10
+ :style="moduleItemContStyle"
11
+ >
12
+ <content-cinema v-if="parent.type === 'cinema'"
13
+ style="width: 100%; height: 100%"
14
+ :keyword="keyword"
15
+ :item="item"
16
+ :out-spacing="listItemStyle.outSpacing"
17
+ :color="{SEAT:listItemStyle.mainColor,CODE:listItemStyle.subMainColor,SELL:listItemStyle.successColor}"
18
+ :border-radius="listItemStyle.imgRradius"
19
+ :brand-color="listItemStyle.brandColor"
20
+ @on-schedule="handleFilmDetail"
21
+ @on-cashier-detail="handleCashierDetail"
22
+ @on-code-detail="handleCodeDetail"
23
+ ></content-cinema>
24
+ <content-film v-if="parent.type === 'film'"
25
+ type="hot"
26
+ style="width: 100%; height: 100%"
27
+ :keyword="keyword"
28
+ :item="item"
29
+ :out-spacing="listItemStyle.outSpacing"
30
+ :color="listItemStyle.mainColor"
31
+ :border-radius="listItemStyle.imgRradius"
32
+ :brand-color="listItemStyle.brandColor"
33
+ @on-film-detail="handleFilmDetail"
34
+ @on-buy="handleBuy"
35
+ ></content-film>
36
+ <content-shop v-if="parent.type === 'shop'"
37
+ style="width: 100%; height: 100%"
38
+ :keyword="keyword"
39
+ :item="item"
40
+ :out-spacing="listItemStyle.outSpacing"
41
+ :color="listItemStyle.mainColor"
42
+ :border-radius="listItemStyle.imgRradius"
43
+ :brand-color="listItemStyle.brandColor"
44
+ :is-echange="'Y' || listItemStyle.isShowExchange"
45
+ @on-shop-jhd="handleShopJhd"
46
+ @on-shop-detail="handleShopDetail"
47
+ ></content-shop>
48
+ </view>
49
+ </view>
50
+ <view v-else class="module_cont product_wrap">
51
+ <view v-for="(item, i) in parent.items" :key="item.key"
52
+ class="module_cont_inner"
53
+ :style="[moduleItemContStyle, {
54
+ width: getProductCell(parent.tab) == 2 ? `calc(50% - ${allStyle.allModuleItemContMargin/2}rpx)`: '100%',
55
+ }]"
56
+ >
57
+ <content-product v-if="parent.type === 'product'"
58
+ style="width: 100%; height: 100%"
59
+ :keyword="keyword"
60
+ :item="item"
61
+ :height="outItemProduct"
62
+ :product-config="productConfig"
63
+ :out-spacing="listItemStyle.outSpacing"
64
+ :color="listItemStyle.mainColor"
65
+ :brand-color="listItemStyle.brandColor"
66
+ :border-radius="listItemStyle.imgRradius"
67
+ :cell="getProductCell(parent.tab)"
68
+ @on-product-detail="handleProductDetail"
69
+ ></content-product>
70
+ </view>
71
+ </view>
72
+ <view class="module_more">
73
+ <view class="more_inner" :style="moduleMoreStyle" @click="switchMenu(parent)">查看全部</view>
74
+ </view>
75
+ </view>
76
+ </view>
77
+ </template>
78
+
79
+ <script>
80
+ import ContentCinema from "./ContentCinema.vue"
81
+ import ContentFilm from "./ContentFilm.vue"
82
+ import ContentShop from "./ContentShop.vue"
83
+ import ContentProduct from "./ContentProduct.vue"
84
+ import {mapState} from "vuex";
85
+ export default{
86
+ name: "SearchAllList",
87
+ components: {
88
+ ContentCinema,
89
+ ContentFilm,
90
+ ContentShop,
91
+ ContentProduct
92
+ },
93
+ props: {
94
+ keyword:{
95
+ type:String,
96
+ default:'',
97
+ },
98
+ allStyle: {
99
+ type:Object,
100
+ },
101
+ listItemStyle:{
102
+ type:Object|null,
103
+ default:null,
104
+ },
105
+ productConfig:{
106
+ type:Object|null,
107
+ default:null,
108
+ },
109
+ },
110
+ computed: {
111
+ ...mapState({
112
+ stateCity: state => state.cityLocation.city,
113
+ stateLocation: (state) => state.cityLocation.location || {},
114
+ }),
115
+ contMarginComp(){
116
+ if(this.getParent === null) return 0
117
+ let str = `${this.getParent().checkValue(this.listItemStyle.contMargin.top, 20)}rpx`;
118
+ str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.right, 20)}rpx`;
119
+ str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.bottom, 20)}rpx`;
120
+ str = `${str} ${this.getParent().checkValue(this.listItemStyle.contMargin.left, 20)}rpx`;
121
+ return str
122
+ },
123
+ moduleItemStyle(){
124
+ const { allModuleRadius, allModulePadding, allListBgColor, allModuleMargin } = this.allStyle;
125
+ let padding = `${this.checkValue(allModulePadding.top, 20)}rpx`;
126
+ padding = `${padding} ${this.checkValue(allModulePadding.right, 20)}rpx`;
127
+ padding = `${padding} ${this.checkValue(allModulePadding.bottom, 20)}rpx`;
128
+ padding = `${padding} ${this.checkValue(allModulePadding.left, 20)}rpx`;
129
+
130
+ return this.styleObjectToString({
131
+ background: allListBgColor,
132
+ padding: padding,
133
+ marginBottom: allModuleMargin + 'rpx',
134
+ borderRadius: allModuleRadius + 'rpx',
135
+ })
136
+ },
137
+ moduleItemTitleStyle(){
138
+ const { allModuleTitlePadding, allModuleTitleStyle, allModuleTitleBgColor } = this.allStyle;
139
+ let padding = `${this.checkValue(allModuleTitlePadding.top, 20)}rpx`;
140
+ padding = `${padding} ${this.checkValue(allModuleTitlePadding.right, 20)}rpx`;
141
+ padding = `${padding} ${this.checkValue(allModuleTitlePadding.bottom, 20)}rpx`;
142
+ padding = `${padding} ${this.checkValue(allModuleTitlePadding.left, 20)}rpx`;
143
+
144
+ let style = {padding: padding};
145
+ if(allModuleTitleStyle === 'underline'){
146
+ style['borderBottom'] = '1px solid #EEEEEE';
147
+ }else{
148
+ style['background'] = allModuleTitleBgColor;
149
+ }
150
+
151
+ return this.styleObjectToString(style);
152
+ },
153
+ moduleItemContStyle(){
154
+ let {
155
+ allModuleItemContBorder, allModuleItemContShadow, allModuleItemContPadding, allModuleItemContMargin,
156
+ allModuleItemContRadius, allModuleItemContBgColor
157
+ } = this.allStyle;
158
+ let border = "none";
159
+ let boxShadow = "none";
160
+ if(allModuleItemContBorder && allModuleItemContBorder.type === 'Y'){
161
+ let { width, color } = allModuleItemContBorder.value;
162
+ border = `${width}rpx solid ${color}`;
163
+ }
164
+ if(allModuleItemContShadow && allModuleItemContShadow.type === 'Y'){
165
+ let { width, color } = allModuleItemContShadow.value;
166
+ boxShadow = `0 0 ${width}rpx ${color}`;
167
+ }
168
+ let padding = `${this.checkValue(allModuleItemContPadding.top, 20)}rpx`;
169
+ padding = `${padding} ${this.checkValue(allModuleItemContPadding.right, 20)}rpx`;
170
+ padding = `${padding} ${this.checkValue(allModuleItemContPadding.bottom, 20)}rpx`;
171
+ padding = `${padding} ${this.checkValue(allModuleItemContPadding.left, 20)}rpx`;
172
+ console.log("allModuleItemContShadow", allModuleItemContShadow)
173
+ return this.styleObjectToString({
174
+ padding: padding,
175
+ border: border,
176
+ borderRadius: allModuleItemContRadius + 'rpx',
177
+ boxShadow: boxShadow,
178
+ marginBottom: allModuleItemContMargin + 'rpx',
179
+ background: allModuleItemContBgColor,
180
+ })
181
+ },
182
+ moduleMoreStyle(){
183
+ const { allModuleMoreStyle } = this.allStyle;
184
+ let style = {};
185
+ if(allModuleMoreStyle === 'text'){
186
+
187
+ }else{
188
+ style['border'] = '1px solid #EEEEEE';
189
+ style['background'] = '#EEEEEE';
190
+ style['color'] = '#999999';
191
+ }
192
+ return this.styleObjectToString(style);
193
+ },
194
+ outItemProduct(){
195
+ if(this.getParent === null) return 0
196
+ //获取每列元素最大宽度
197
+ let num = (750 - 3 * Number(this.listItemStyle.outSpacing))/2;
198
+ num = num - this.getParent().checkValue(this.listItemStyle.contMargin.right, 20) - this.getParent().checkValue(this.listItemStyle.contMargin.left, 20);
199
+ return num - this.listItemStyle.contBorderWidth * 2
200
+ },
201
+ },
202
+ watch: {
203
+ keyword(){
204
+ this.getList()
205
+ },
206
+ stateCity(n, o){
207
+ if(n && JSON.stringify(n) !== JSON.stringify(o)){
208
+ this.getList()
209
+ }
210
+ },
211
+ },
212
+ data(){
213
+ return {
214
+ /**@type Function|null**/
215
+ getParent:null,
216
+ $parentVm:null,
217
+ parentStatus: false,
218
+
219
+ list: [],
220
+ }
221
+ },
222
+ created(){
223
+ this.getParentMV();
224
+ this.getList();
225
+ },
226
+ methods: {
227
+ checkValue(value, defaultValue){
228
+ return this.getParent().checkValue(value, defaultValue);
229
+ },
230
+ getProductCell(str = ''){
231
+ let cellNum = str.split("@")[3] || 1;
232
+ return Number(cellNum);
233
+ },
234
+ getParentMV(){
235
+ this.$emit('on-parent-vm', (getParent)=>{
236
+ this.getParent = getParent;
237
+ this.parentStatus = true;
238
+ })
239
+ },
240
+ getList(){
241
+ let params = {keyword: this.keyword};
242
+ //设置城市
243
+ if(this.stateCity && this.stateCity.city_code) {
244
+ params['city_code'] = this.stateCity.city_code;
245
+ }
246
+
247
+ //设置经纬度
248
+ if(this.stateLocation &&
249
+ (this.stateLocation.latitude && this.stateLocation.longitude)
250
+ ){
251
+ params['latitude'] = this.stateLocation.latitude;
252
+ params['longitude'] = this.stateLocation.longitude;
253
+ }
254
+
255
+ this.$xdShowLoading({});
256
+ this.$emit('on-list', {
257
+ params: params,
258
+ cb:(list)=>{
259
+ this.list = (list || []).map(parent => {
260
+ parent.items = parent.items.map(item => {
261
+ item['key'] = item.product_id || item.resource_shop_id || item.cinema_id || item.film_id;
262
+ return item;
263
+ })
264
+ return parent;
265
+ });
266
+ this.$xdHideLoading();
267
+ }
268
+ })
269
+ },
270
+ switchMenu(item){
271
+ this.$emit('on-switch', {...item, value: item.tab});
272
+ },
273
+
274
+
275
+ //影片
276
+ handleFilmDetail(film){
277
+ this.getParent().handleFilmDetail(film, this.dataConfig)
278
+ },
279
+ handleBuy(film){
280
+ this.getParent().handleBuy(film, this.dataConfig)
281
+ },
282
+
283
+ //影院
284
+ handleSchedule(cinema){
285
+ this.getParent().handleSchedule(cinema, this.dataConfig)
286
+ },
287
+ handleCashierDetail(cinema){
288
+ this.getParent().handleCashierDetail(cinema, this.dataConfig)
289
+ },
290
+ handleCodeDetail(cinema){
291
+ this.getParent().handleCodeDetail(cinema, this.dataConfig)
292
+ },
293
+
294
+ //门店
295
+ handleShopJhd(shop){
296
+ this.getParent().handleShopJhd(shop, this.dataConfig)
297
+ },
298
+ handleShopDetail(shop){
299
+ this.getParent().handleShopDetail(shop, this.dataConfig)
300
+ },
301
+
302
+ //商品
303
+ handleProductDetail(product){
304
+ this.getParent().handleProductDetail(product, this.dataConfig)
305
+ },
306
+ }
307
+ }
308
+ </script>
309
+
310
+ <style lang="less" scoped>
311
+ .search_all_list{
312
+ .module_item{
313
+ background-color: #FFFFFF;
314
+ margin-bottom: 20rpx;
315
+ }
316
+ .module_title{
317
+ font-size: 28rpx;
318
+ color: #333333;
319
+ }
320
+ .module_cont{
321
+ padding: 20rpx 0;
322
+
323
+ &.product_wrap{
324
+ display: flex;
325
+ justify-content: space-between;
326
+ flex-wrap: wrap;
327
+ }
328
+
329
+ .module_cont_inner{
330
+ box-sizing: border-box;
331
+ }
332
+ }
333
+ .module_more{
334
+ display: flex;
335
+ justify-content: center;
336
+ align-items: center;
337
+ font-size: 26rpx;
338
+ color: #999999;
339
+ margin-top: 32rpx;
340
+ .more_inner{
341
+ display: flex;
342
+ justify-content: center;
343
+ align-items: center;
344
+ height: 70rpx;
345
+ width: 200rpx;
346
+ border-radius: 80rpx;
347
+ }
348
+ }
349
+ }
350
+ </style>
@@ -7,50 +7,19 @@
7
7
  module.exports = [
8
8
  {
9
9
  //设置方法名字当别忘记加上【模块名字】:Tfk
10
- mapFnName: 'getTfkByIdFilmSquate',
11
- title: '获取电影广场列表',
12
- path: '/api/account/film/list-film-square',
10
+ mapFnName: 'getTfkSearchList',
11
+ title: '获取s搜索列表',
12
+ path: '/mall/v1/msearch',
13
13
  isRule: false,
14
14
  params: {
15
- last_key: ['当前页', 'Number', '必选'],
16
- page_size: ['每页数量', 'Number', '必选'],
17
- },
18
- isConsole: true,
19
- disabled: true,
20
- },
21
- {
22
- //设置方法名字当别忘记加上【模块名字】:Tfk
23
- mapFnName: 'updateTfkFilmPaiqiDate',
24
- title: '更新排期',
25
- path: '/api/account/film/paiqi-date',
26
- isRule: false,
27
- params: {
28
- film_id: ['电影id', 'Number', '必选'],
29
- cinema_id: ['影院id', 'Number', '必选'],
30
- },
31
- isConsole: true,
32
- disabled: true,
33
- },
34
- {
35
- //设置方法名字当别忘记加上【模块名字】:Tfk
36
- mapFnName: 'removeTfkFilmAddress',
37
- title: '删除我的配送地址',
38
- path: '/api/account/film/paiqi-date',
39
- isRule: false,
40
- params: {
41
- film_id: ['电影id', 'Number', '必选'],
42
- },
43
- isConsole: true,
44
- disabled: true,
45
- },
46
- {
47
- //设置方法名字当别忘记加上【模块名字】:Tfk
48
- mapFnName: 'addTfkFilmcart',
49
- title: '添加购物车',
50
- path: '/api/account/film/paiqi-date',
51
- isRule: false,
52
- params: {
53
- film_id: ['电影id', 'Number', '必选'],
15
+ keyword: ['模糊搜索关键字', 'Number', '必选'],
16
+ namespace: ['业务线', 'Number', '必选'],
17
+ city_code: ['城市编码', 'Number', '必选'],
18
+ latitude: ['纬度', 'Number', '必选'],
19
+ longitude: ['经度', 'Number', '必选'],
20
+ search_range: ['搜索范围', 'Number', '必选'],
21
+ page_size: ['每页条数', 'Number', '必选'],
22
+ page_token: ['当前页码', 'Number', '必选'],
54
23
  },
55
24
  isConsole: true,
56
25
  disabled: true,