jufubao-base 1.0.169 → 1.0.171

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 (41) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
  3. package/src/components/JfbBaseLogin/Attr.js +1133 -491
  4. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +369 -63
  5. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  6. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
  7. package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
  8. package/src/components/JfbBaseTfkCardBind/Attr.js +708 -38
  9. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +688 -22
  10. package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
  11. package/src/components/JfbBaseTfkCardDetail/Api.js +19 -32
  12. package/src/components/JfbBaseTfkCardDetail/Attr.js +740 -33
  13. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +639 -23
  14. package/src/components/JfbBaseTfkCardDetail/Mock.js +151 -11
  15. package/src/components/JfbBaseTfkCardLogin/Api.js +19 -34
  16. package/src/components/JfbBaseTfkCardLogin/Attr.js +1094 -32
  17. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +775 -17
  18. package/src/components/JfbBaseTfkCardLogin/Mock.js +191 -11
  19. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +275 -0
  20. package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
  21. package/src/components/JfbBaseTfkSearch/AllList.vue +337 -0
  22. package/src/components/JfbBaseTfkSearch/Api.js +11 -42
  23. package/src/components/JfbBaseTfkSearch/Attr.js +344 -32
  24. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
  25. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +218 -0
  26. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +317 -0
  27. package/src/components/JfbBaseTfkSearch/ContentShop.vue +186 -0
  28. package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
  29. package/src/components/JfbBaseTfkSearch/CustomList.vue +453 -0
  30. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +286 -35
  31. package/src/components/JfbBaseTfkSearch/Mock.js +242 -11
  32. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
  33. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
  34. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
  35. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
  36. package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
  37. package/src/components/JfbBaseTfkSearch/listMixins.js +187 -0
  38. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -1
  39. package/src/mixins/colorCardMixins.js +71 -9
  40. package/src/mixins/componentsMixins.js +376 -23
  41. package/src/mixins/posterMixins.js +122 -0
@@ -0,0 +1,337 @@
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% - ${listItemStyle.outSpacing/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
+ const { contBgColor, contShadow, contBorder, contMargin, contRradius, outSpacing } = this.listItemStyle;
155
+
156
+ let padding = `${this.checkValue(contMargin.top, 20)}rpx`;
157
+ padding = `${padding} ${this.checkValue(contMargin.right, 20)}rpx`;
158
+ padding = `${padding} ${this.checkValue(contMargin.bottom, 20)}rpx`;
159
+ padding = `${padding} ${this.checkValue(contMargin.left, 20)}rpx`;
160
+ return this.styleObjectToString({
161
+ padding: padding,
162
+ border: contBorder,
163
+ borderRadius: contRradius + 'rpx',
164
+ boxShadow: contShadow,
165
+ marginBottom: outSpacing + 'rpx',
166
+ background: contBgColor,
167
+ })
168
+ },
169
+ moduleMoreStyle(){
170
+ const { allModuleMoreStyle } = this.allStyle;
171
+ let style = {};
172
+ if(allModuleMoreStyle === 'text'){
173
+
174
+ }else{
175
+ style['border'] = '1px solid #EEEEEE';
176
+ style['background'] = '#EEEEEE';
177
+ style['color'] = '#999999';
178
+ }
179
+ return this.styleObjectToString(style);
180
+ },
181
+ outItemProduct(){
182
+ if(this.getParent === null) return 0
183
+ //获取每列元素最大宽度
184
+ let num = (750 - 3 * Number(this.listItemStyle.outSpacing))/2;
185
+ num = num - this.getParent().checkValue(this.listItemStyle.contMargin.right, 20) - this.getParent().checkValue(this.listItemStyle.contMargin.left, 20);
186
+ return num - this.listItemStyle.contBorderWidth * 2
187
+ },
188
+ },
189
+ watch: {
190
+ keyword(){
191
+ this.getList()
192
+ },
193
+ stateCity(n, o){
194
+ if(n && JSON.stringify(n) !== JSON.stringify(o)){
195
+ this.getList()
196
+ }
197
+ },
198
+ },
199
+ data(){
200
+ return {
201
+ /**@type Function|null**/
202
+ getParent:null,
203
+ $parentVm:null,
204
+ parentStatus: false,
205
+
206
+ list: [],
207
+ }
208
+ },
209
+ created(){
210
+ this.getParentMV();
211
+ this.getList();
212
+ },
213
+ methods: {
214
+ checkValue(value, defaultValue){
215
+ return this.getParent().checkValue(value, defaultValue);
216
+ },
217
+ getProductCell(str = ''){
218
+ let cellNum = str.split("@")[3] || 1;
219
+ return Number(cellNum);
220
+ },
221
+ getParentMV(){
222
+ this.$emit('on-parent-vm', (getParent)=>{
223
+ this.getParent = getParent;
224
+ this.parentStatus = true;
225
+ })
226
+ },
227
+ getList(){
228
+ let params = {keyword: this.keyword};
229
+ //设置城市
230
+ if(this.stateCity && this.stateCity.city_code) {
231
+ params['city_code'] = this.stateCity.city_code;
232
+ }
233
+
234
+ //设置经纬度
235
+ if(this.stateLocation &&
236
+ (this.stateLocation.latitude && this.stateLocation.longitude)
237
+ ){
238
+ params['latitude'] = this.stateLocation.latitude;
239
+ params['longitude'] = this.stateLocation.longitude;
240
+ }
241
+
242
+ this.$xdShowLoading({});
243
+ this.$emit('on-list', {
244
+ params: params,
245
+ cb:(list)=>{
246
+ this.list = (list || []).map(parent => {
247
+ parent.items = parent.items.map(item => {
248
+ item['key'] = item.product_id || item.resource_shop_id || item.cinema_id || item.film_id;
249
+ return item;
250
+ })
251
+ return parent;
252
+ });
253
+ this.$xdHideLoading();
254
+ }
255
+ })
256
+ },
257
+ switchMenu(item){
258
+ this.$emit('on-switch', {...item, value: item.tab});
259
+ },
260
+
261
+
262
+ //影片
263
+ handleFilmDetail(film){
264
+ this.getParent().handleFilmDetail(film, this.dataConfig)
265
+ },
266
+ handleBuy(film){
267
+ this.getParent().handleBuy(film, this.dataConfig)
268
+ },
269
+
270
+ //影院
271
+ handleSchedule(cinema){
272
+ this.getParent().handleSchedule(cinema, this.dataConfig)
273
+ },
274
+ handleCashierDetail(cinema){
275
+ this.getParent().handleCashierDetail(cinema, this.dataConfig)
276
+ },
277
+ handleCodeDetail(cinema){
278
+ this.getParent().handleCodeDetail(cinema, this.dataConfig)
279
+ },
280
+
281
+ //门店
282
+ handleShopJhd(shop){
283
+ this.getParent().handleShopJhd(shop, this.dataConfig)
284
+ },
285
+ handleShopDetail(shop){
286
+ this.getParent().handleShopDetail(shop, this.dataConfig)
287
+ },
288
+
289
+ //商品
290
+ handleProductDetail(product){
291
+ this.getParent().handleProductDetail(product, this.dataConfig)
292
+ },
293
+ }
294
+ }
295
+ </script>
296
+
297
+ <style lang="less" scoped>
298
+ .search_all_list{
299
+ .module_item{
300
+ background-color: #FFFFFF;
301
+ margin-bottom: 20rpx;
302
+ }
303
+ .module_title{
304
+ font-size: 28rpx;
305
+ color: #333333;
306
+ }
307
+ .module_cont{
308
+ padding: 20rpx 0;
309
+
310
+ &.product_wrap{
311
+ display: flex;
312
+ justify-content: space-between;
313
+ flex-wrap: wrap;
314
+ }
315
+
316
+ .module_cont_inner{
317
+ box-sizing: border-box;
318
+ }
319
+ }
320
+ .module_more{
321
+ display: flex;
322
+ justify-content: center;
323
+ align-items: center;
324
+ font-size: 26rpx;
325
+ color: #999999;
326
+ margin-top: 32rpx;
327
+ .more_inner{
328
+ display: flex;
329
+ justify-content: center;
330
+ align-items: center;
331
+ height: 70rpx;
332
+ width: 200rpx;
333
+ border-radius: 80rpx;
334
+ }
335
+ }
336
+ }
337
+ </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,