jufubao-base 1.0.169-beta9 → 1.0.169

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 (37) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseLogin/Attr.js +510 -1147
  3. package/src/components/JfbBaseLogin/JfbBaseLogin.vue +63 -364
  4. package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
  5. package/src/components/JfbBaseTfkCardBind/Api.js +30 -49
  6. package/src/components/JfbBaseTfkCardBind/Attr.js +38 -635
  7. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +22 -589
  8. package/src/components/JfbBaseTfkCardBind/Mock.js +9 -19
  9. package/src/components/JfbBaseTfkCardDetail/Api.js +32 -19
  10. package/src/components/JfbBaseTfkCardDetail/Attr.js +33 -692
  11. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +23 -630
  12. package/src/components/JfbBaseTfkCardDetail/Mock.js +11 -151
  13. package/src/components/JfbBaseTfkCardLogin/Api.js +34 -19
  14. package/src/components/JfbBaseTfkCardLogin/Attr.js +33 -885
  15. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +16 -729
  16. package/src/components/JfbBaseTfkCardLogin/Mock.js +11 -721
  17. package/src/components/JfbBaseTfkSearch/Api.js +42 -11
  18. package/src/components/JfbBaseTfkSearch/Attr.js +33 -143
  19. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +22 -171
  20. package/src/components/JfbBaseTfkSearch/Mock.js +11 -90
  21. package/src/mixins/colorCardMixins.js +9 -71
  22. package/src/mixins/componentsMixins.js +23 -346
  23. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +0 -271
  24. package/src/components/JfbBaseTfkSearch/AllList.vue +0 -231
  25. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +0 -157
  26. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +0 -179
  27. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +0 -308
  28. package/src/components/JfbBaseTfkSearch/ContentShop.vue +0 -184
  29. package/src/components/JfbBaseTfkSearch/CusAttr.js +0 -203
  30. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -401
  31. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +0 -45
  32. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +0 -109
  33. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +0 -246
  34. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +0 -81
  35. package/src/components/JfbBaseTfkSearch/handleKeyword.js +0 -24
  36. package/src/components/JfbBaseTfkSearch/listMixins.js +0 -151
  37. package/src/components/JfbBaseTfkSearch/search.js +0 -293
@@ -1,203 +0,0 @@
1
- 'use strict';
2
- export default (data)=>{
3
- return [
4
- {
5
- ele: 'title',
6
- label: '商品搜索相关设置',
7
- size: 'small',
8
- groupKey:'content',
9
- },
10
- {
11
- label: '是否展示品牌:',
12
- ele: 'xd-radio',
13
- valueKey: 'is_show_brand',
14
- value: data['is_show_brand'] || 'N',
15
- placeholder: '请选择是否展示品牌',
16
- multiple: false,
17
- className: 'input80',
18
- groupKey:'content',
19
- list: [
20
- {label: '是', value: 'Y'},
21
- {label: '否', value: 'N'},
22
- ]
23
- },
24
- {
25
- label: "可否直接加入购物车",
26
- ele: "xd-radio",
27
- valueKey: "isAddCart",
28
- groupKey:'content',
29
- value: data['isAddCart'] || 'Y',
30
- list: [
31
- {label: "是", value: 'Y'},
32
- {label: "否", value: 'N'}
33
- ]
34
- },
35
- {
36
- label: '是否显示价格:',
37
- ele: 'xd-radio',
38
- groupKey:'content',
39
- valueKey: 'isPrice',
40
- value: data['isPrice'] || 'Y',
41
- placeholder: '请选择是否显示价格',
42
- multiple: false,
43
- className: 'input80',
44
- list: [
45
- {label: '是', value: 'Y'},
46
- {label: '否', value: 'N'},
47
- ]
48
- },
49
- data['isPrice']==='Y'&&{
50
- label: '是否展示原价:',
51
- ele: 'xd-radio',
52
- groupKey:'content',
53
- valueKey: 'isShowDiscount',
54
- value: data['isShowDiscount'] || "Y",
55
- rules: [
56
- {required: true, message: '请选择', trigger: ['blur', 'change']}
57
- ],
58
- list: [
59
- {"label": "显示", "value": "Y"},
60
- {"label": "隐藏", "value": "N"},
61
- ]
62
- },
63
- data['isShowDiscount']==='Y'&&{
64
- label: '市场价减去售价大于多少展示:',
65
- ele: 'el-input',
66
- type: 'number',
67
- valueKey: 'differ',
68
- value: data['differ'] || '',
69
- groupKey:'content',
70
- placeholder: '价差',
71
- className: 'input80',
72
- },
73
- data['isPrice']==='Y'&&{
74
- label: '是否标明活动价:',
75
- ele: 'xd-radio',
76
- valueKey: 'showActivityPrice',
77
- value: data['showActivityPrice'] || 'N',
78
- placeholder: '请选择是否标明活动价',
79
- groupKey:'content',
80
- multiple: false,
81
- className: 'input80',
82
- list: [
83
- {label: '是', value: 'Y'},
84
- {label: '否', value: 'N'},
85
- ]
86
- },
87
- {
88
- label: '是否显示标签:',
89
- ele: 'xd-radio',
90
- valueKey: "isShowTag",
91
- value: data['isShowTag'] || 'N',
92
- groupKey:'content',
93
- list: [
94
- {label: '是', value: 'Y'},
95
- {label: '否', value: 'N'},
96
- ]
97
- },
98
-
99
- {
100
- ele: 'title',
101
- label: '列表样式设置',
102
- size: 'small',
103
- groupKey:'style',
104
- },
105
- {
106
- label: '填充设置:',
107
- ele: 'xd-margin-padding',
108
- groupKey:'style',
109
- valueKey: 'contMargin',
110
- value: data['contMargin'] || null,
111
- setting: {
112
- type: 'margin',
113
- },
114
- inline: false,
115
- notice: '填充设置,单位:<span style="color: red">像素</span>。默认值:<span style="color: red">20</span> 像素',
116
- },
117
- {
118
- label: '背景颜色:',
119
- ele: 'xd-color',
120
- valueKey: 'contBgColor',
121
- value: data['contBgColor'] || '',
122
- placeholder: '请选择背景颜色',
123
- classNmae: 'input80',
124
- groupKey:'style',
125
- inline: false,
126
- notice:'背景颜色值建议使用相对浅色系色值',
127
- },
128
- {
129
- label: '当前投影设置:',
130
- ele: 'xd-shadow',
131
- groupKey:'style',
132
- valueKey: 'contShadow',
133
- value: data['contShadow'] || '',
134
- setting: {
135
- selected: 'N',
136
- },
137
- handleCustom({action, data}) {
138
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
139
- .then(res => {
140
- data.cb(res.list)
141
- })
142
- .catch(error => {
143
- console.error(error);
144
- data.cb([])
145
- });
146
- },
147
- },
148
- {
149
- label: '当前边框设置:',
150
- ele: 'xd-border',
151
- groupKey:'style',
152
- valueKey: 'contBorder',
153
- value: data['contBorder'] || '',
154
- setting: {
155
- selected:'N'
156
- },
157
- },
158
- {
159
- label: '圆角设置:',
160
- ele: 'xd-site-select-list',
161
- valueKey: 'contRradius',
162
- value: data['contRradius'] || '10',
163
- groupKey:'style',
164
- placeholder: '请选择内容圆角设置',
165
- multiple: false,
166
- className: 'input80',
167
- handleCustom({action, data}) {
168
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
169
- .then(res => {
170
- data.cb(res.list)
171
- })
172
- .catch(error => {
173
- console.error(error);
174
- });
175
- },
176
- },
177
- {
178
- ele: 'title',
179
- label: '图片样式设置',
180
- size: 'small',
181
- groupKey:'style',
182
- },
183
- {
184
- label: '圆角设置:',
185
- ele: 'xd-site-select-list',
186
- valueKey: 'imgRradius',
187
- value: data['imgRradius'] || '10',
188
- groupKey:'style',
189
- placeholder: '请选择内容圆角设置',
190
- multiple: false,
191
- className: 'input80',
192
- handleCustom({action, data}) {
193
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
194
- .then(res => {
195
- data.cb(res.list)
196
- })
197
- .catch(error => {
198
- console.error(error);
199
- });
200
- },
201
- },
202
- ]
203
- }
@@ -1,401 +0,0 @@
1
- <template>
2
- <view class="custom-list">
3
- <view v-if="dataList === null">
4
- <view :class="{productBoxCell2: type_other === 2 }">
5
- <view
6
- v-for="item in skeletonCount"
7
- class="skeleton-wrap"
8
- :class="{productItemCell2: type_other === 2 }"
9
- :key="item"
10
- :style="{
11
- marginBottom:$parentVm.outSpacing + 'rpx',
12
- padding:contMarginComp,
13
- borderRadius:$parentVm.contRradius+ 'rpx',
14
- boxShadow:'0 0 10rpx rgba(0,0,0,0.1)',
15
- width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
16
- }"
17
- >
18
- <skeleton-product
19
- :cell="type_other"
20
- v-if="$parentVm.productConfig !== null && type_code === 'product'"
21
- :product-config="$parentVm.productConfig"
22
- :out-spacing="$parentVm.outSpacing"
23
- :height="outItemProduct"
24
- ></skeleton-product>
25
- <skeleton-shop v-if="type_code === 'shop'" :out-spacing="$parentVm.outSpacing"></skeleton-shop>
26
- <skeleton-film v-if="type_code === 'film'" :out-spacing="$parentVm.outSpacing"></skeleton-film>
27
- <skeleton-cinema v-if="type_code === 'cinema'"></skeleton-cinema>
28
- </view>
29
- </view>
30
- </view>
31
- <view class="custom-list-data" v-else>
32
- <template v-if="type_other !== 2">
33
- <view
34
- v-for="item in dataList"
35
- :key="item.id"
36
- :style="{
37
- marginBottom:$parentVm.outSpacing + 'rpx',
38
- padding:contMarginComp,
39
- borderRadius:$parentVm.contRradius+ 'rpx',
40
- border: $parentVm.contBorder,
41
- boxShadow:$parentVm.contShadow,
42
- width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
43
- height: heightRpx,
44
- backgroundColor: $parentVm.contBgColor
45
- }">
46
- <content-film
47
- type="hot"
48
- v-if="type_code === 'film'"
49
- style="width: 100%; height: 100%"
50
- :keyword="keyword"
51
- :item="item"
52
- :out-spacing="$parentVm.outSpacing"
53
- :color="$parentVm.mainColor"
54
- :border-radius="$parentVm.imgRradius"
55
- @on-film-detail="(film_id)=>{$parentVm.handleFilmDetail(film_id, dataConfig)}"
56
- @on-buy="(film_id)=>{$parentVm.handleBuy(film_id, dataConfig)}"
57
- ></content-film>
58
- <content-cinema
59
- v-if="type_code === 'cinema'"
60
- style="width: 100%;height: 100%"
61
- type="list"
62
- :keyword="keyword"
63
- :item="item"
64
- :out-spacing="$parentVm.outSpacing"
65
- :color="{SEAT:$parentVm.mainColor,CODE:$parentVm.subMainColor,SELL:$parentVm.successColor}"
66
- :border-radius="$parentVm.imgRradius"
67
- @on-schedule="(cinema)=>{$parentVm.handleSchedule(cinema,dataConfig)}"
68
- @on-cashier-detail="(cinema)=>{$parentVm.handleCashierDetail(cinema,dataConfig)}"
69
- @on-code-detail="(cinema)=>{$parentVm.handleCodeDetail(cinema,dataConfig)}"
70
- ></content-cinema>
71
- <content-shop
72
- v-if="type_code === 'shop'"
73
- style="width: 100%; height: 100%"
74
- :keyword="keyword"
75
- :out-spacing="$parentVm.outSpacing"
76
- :item="item"
77
- :color="$parentVm.mainColor"
78
- :border-radius="$parentVm.imgRradius"
79
- :is-echange="'Y' || $parentVm.isShowExchange"
80
- @on-shop-jhd="(shop)=>{$parentVm.handleShopJhd(shop,dataConfig)}"
81
- @on-shop-detail="(shop)=>{$parentVm.handleShopDetail(shop,dataConfig)}"
82
- ></content-shop>
83
- <content-product
84
- v-if="$parentVm.productConfig !== null && type_code === 'product'"
85
- style="width: 100%; height: 100%"
86
- :product-config="$parentVm.productConfig"
87
- :out-spacing="$parentVm.outSpacing"
88
- :item="item"
89
- :height="outItemProduct"
90
- :color="$parentVm.mainColor"
91
- :border-radius="$parentVm.imgRradius"
92
- :cell="type_other"
93
- @on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
94
- ></content-product>
95
- </view>
96
- </template>
97
- <view v-else class="productBox2">
98
- <view v-for="(value, listKey) in productTowList" :key="listKey">
99
- <view
100
- v-if="productTowList[listKey] !== null"
101
- v-for="item in productTowList[listKey]"
102
- :key="item.id"
103
- :style="{
104
- marginBottom:$parentVm.outSpacing + 'rpx',
105
- padding:contMarginComp,
106
- borderRadius:$parentVm.contRradius+ 'rpx',
107
- border: $parentVm.contBorder,
108
- boxShadow:$parentVm.contShadow,
109
- width: (type_code === 'product' && type_other === 2) ? (outItemProduct + 'rpx'): 'auto',
110
- height: heightRpx,
111
- backgroundColor: $parentVm.contBgColor
112
- }"
113
- >
114
- <content-product
115
- v-if="$parentVm.productConfig !== null"
116
- style="width: 100%; height: 100%"
117
- :product-config="$parentVm.productConfig"
118
- :out-spacing="$parentVm.outSpacing"
119
- :item="item"
120
- :height="outItemProduct"
121
- :color="$parentVm.mainColor"
122
- :border-radius="$parentVm.imgRradius"
123
- :cell="type_other"
124
- @on-product-detail="(product)=>{$parentVm.handleProductDetail(product,dataConfig)}"
125
- ></content-product>
126
- </view>
127
- </view>
128
- </view>
129
-
130
- </view>
131
- </view>
132
- </template>
133
-
134
- <script>
135
- import {mapState} from "vuex";
136
- import SkeletonFilm from "./SkeletonFilm.vue";
137
- import SkeletonCinema from "./SkeletonCinema.vue";
138
- import SkeletonShop from "./SkeletonShop.vue";
139
- import SkeletonProduct from "./SkeletonProduct.vue";
140
- import ContentFilm from "./ContentFilm.vue";
141
- import ContentCinema from "./ContentCinema.vue";
142
- import ContentShop from "./ContentShop.vue";
143
- import ContentProduct from "./ContentProduct.vue";
144
-
145
- export default {
146
- name: "CustomList",
147
- components: {
148
- ContentProduct,
149
- SkeletonProduct,
150
- SkeletonCinema,
151
- SkeletonFilm,
152
- SkeletonShop,
153
- ContentFilm,
154
- ContentCinema,
155
- ContentShop,
156
- },
157
- props:{
158
- keyword:{
159
- type:String,
160
- default:'',
161
- },
162
- tabId:{
163
- type:String,
164
- required:true
165
- }
166
- },
167
-
168
- computed:{
169
- ...mapState({
170
- stateCity: state => state.cityLocation.city,
171
- stateLocation: (state) => state.cityLocation.location || {},
172
- }),
173
- getParams(){
174
- let params = {
175
- search_range: this.search_range,
176
- page_token: this.page_token,
177
- page_size: this.page_size,
178
- };
179
-
180
- //关键字
181
- if(this.keyword) params['keyword'] = this.keyword;
182
-
183
- //设置城市
184
- if(this.stateCity && this.stateCity.city_code) {
185
- params['city_code'] = this.stateCity.city_code;
186
- }
187
-
188
- //设置经纬度
189
- if(this.stateLocation &&
190
- (this.stateLocation.latitude && this.stateLocation.longitude)
191
- ){
192
- params['latitude'] = this.stateLocation.latitude;
193
- params['longitude'] = this.stateLocation.longitude;
194
- }
195
-
196
- return params
197
- },
198
- contMarginComp(){
199
- let str = `${this.$parentVm.checkValue(this.$parentVm.contMargin.top, 20)}rpx`;
200
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20)}rpx`;
201
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.bottom, 20)}rpx`;
202
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20)}rpx`;
203
- return str
204
- },
205
- outItemProduct(){
206
- //获取每列元素最大宽度
207
- let num = (750 - 3 * Number(this.$parentVm.outSpacing))/2;
208
- num = num - this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20) - this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20);
209
- return num - this.$parentVm.contBorderWidth * 2
210
- },
211
- heightRpx(){
212
- let h = 'auto'
213
- if(this.type_code === 'film') h = '240rpx'
214
- if(this.type_code === 'cinema') h = 'auto';
215
- if(this.type_code === 'shop') h = '200rpx';
216
- return h;
217
- }
218
- },
219
- data(){
220
- return {
221
- $parentVm:null,
222
- parentStatus: false,
223
- skeletonCount: 6,
224
- hasNoData: false,
225
-
226
- page_token:'1',
227
- page_size: 20,
228
-
229
- //参数
230
- type_code:'',
231
- search_range:'',
232
- type_other:null,
233
- is_open_city:'N',
234
-
235
-
236
- //列表数据
237
- dataList: null,
238
- timer:null,
239
- dataConfig: null,
240
-
241
-
242
- //商品两列功能
243
- productTowList:{
244
- left:null,
245
- right:null,
246
- },
247
- }
248
- },
249
-
250
- watch:{
251
- keyword(){
252
- if(this.timer) {
253
- clearTimeout(this.timer);
254
- this.timer = null;
255
- }
256
- this.timer = setTimeout(()=>{
257
- this.onCusReloadList();
258
- },500)
259
- },
260
- tabId(){
261
- this.parseTab()
262
- this.onCusReloadList();
263
- },
264
-
265
- stateCity(n, o){
266
- if(n && JSON.stringify(n) !== JSON.stringify(o)){
267
- this.onCusReloadList()
268
- }
269
- },
270
- },
271
-
272
- created() {
273
- this.getParentMV();
274
- this.parseTab();
275
- this.onCusReloadList();
276
- },
277
-
278
- methods:{
279
-
280
- parseTab(){
281
- let tabs = this.tabId.split('@');
282
- this.type_code = tabs[1];
283
- this.search_range = tabs[0]
284
- this.is_open_city = tabs[2];
285
- if(this.type_code === 'product'){
286
- this.type_other = Number(tabs[3]);
287
- if(this.type_other === 2) this.skeletonCount = 12
288
- else this.skeletonCount = 6
289
- }
290
- else {
291
- this.skeletonCount = 6;
292
- this.type_other = null
293
- }
294
- },
295
-
296
- handleClear(){
297
- this.is_open_city = 'N';
298
- this.dataConfig = null;
299
- this.page_token = '1';
300
- this.dataList = null;
301
- this.productTowList = {
302
- left:null,
303
- right:null,
304
- }
305
- },
306
-
307
- getParentMV(){
308
- this.$emit('on-parent-vm', ($vm)=>{
309
- this.$parentVm = $vm;
310
- this.parentStatus = true;
311
- })
312
- },
313
-
314
- onCusReachBottom(){
315
- if(!this.page_token) return false;
316
- this.getList();
317
- },
318
-
319
- //重新加载数据
320
- onCusReloadList(params ={}){
321
- this.handleClear();
322
- this.getList();
323
- },
324
-
325
-
326
- getList(){
327
- //无关键字不搜索
328
- if(this.keyword === '') {
329
- return;
330
- }
331
- //this.$xdShowLoading({});
332
- this.$emit('on-list', {
333
- params:this.getParams,
334
- cb:(res)=>{
335
-
336
- //无数据处理
337
- if(res === null){
338
- this.hasNoData = true;
339
- this.dataList = [];
340
- this.page_token = ''
341
- this.$xdHideLoading();
342
- return
343
- }
344
-
345
- //正常数据处理
346
- this.dataConfig = res;
347
-
348
- //整理为统一ID
349
- res.items = res.items.map((item,index)=>{
350
- if(!item.id){
351
- item.id = item.product_id || item.resource_shop_id || item.cinema_id
352
- }
353
- //item.list_title = `${index} - ${ item.list_title}`
354
- return item;
355
- })
356
-
357
- //商品模式并且为两列功能
358
- if(this.type_code === 'product' && this.type_other === 2){
359
- let right = [], left=[];
360
- res.items.map((item,index) =>{
361
- item.testiIndex = index
362
- if(index%2===0) left.push(item);
363
- else right.push(item);
364
- })
365
- this.productTowList = {
366
- left:(this.productTowList.left ||[]).concat(left),
367
- right:(this.productTowList.right ||[]).concat(right)
368
- };
369
- }
370
- this.dataList = (this.dataList||[]).concat(res.items);
371
- this.page_token = res.next_page_token
372
- this.hasNoData = false;
373
- this.$xdHideLoading();
374
- }
375
- })
376
- }
377
- }
378
- }
379
- </script>
380
-
381
-
382
-
383
- <style scoped lang="less">
384
- .productBoxCell2 {
385
- display: flex;
386
- justify-content: space-between;
387
- align-items: center;
388
- flex-flow: wrap;
389
- }
390
- .productItemCell2 {
391
-
392
- }
393
-
394
- .productBox2 {
395
- display: flex;
396
- justify-content: space-between;
397
- align-items: flex-start;
398
- flex-flow: wrap;
399
- }
400
-
401
- </style>
@@ -1,45 +0,0 @@
1
- <template>
2
- <view class="skeleton-wrap-item">
3
- <view class="title skeleton-item"></view>
4
- <view class="address skeleton-item"></view>
5
- <view class="bottom">
6
- <view class="local skeleton-item"></view>
7
- <view class="btn skeleton-item"></view>
8
- </view>
9
- </view>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- name: "SkeletonCinema"
15
- }
16
- </script>
17
-
18
- <style scoped lang="less">
19
- .skeleton-wrap-item {
20
- height: 200rpx;
21
- display: block;
22
-
23
- & > .title {
24
- .skeleton-item(100%, 60rpx);
25
- margin-bottom: 20rpx;
26
- }
27
- & > .address {
28
- .skeleton-item(100%, 40rpx);
29
- margin-bottom: 20rpx;
30
- }
31
- & > .bottom {
32
- display: flex;
33
- justify-content: space-between;
34
- align-items: center;
35
-
36
- & > .local {
37
- .skeleton-item(120rpx, 30rpx);
38
- }
39
- & > .btn {
40
- .skeleton-item(150rpx, 60rpx);
41
- }
42
- }
43
- }
44
- </style>
45
-