jufubao-base 1.0.169-beta8 → 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 (36) 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/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +4 -2
  6. package/src/components/JfbBaseTfkCardBind/Api.js +30 -49
  7. package/src/components/JfbBaseTfkCardBind/Attr.js +38 -635
  8. package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +22 -589
  9. package/src/components/JfbBaseTfkCardBind/Mock.js +9 -19
  10. package/src/components/JfbBaseTfkCardDetail/Api.js +32 -19
  11. package/src/components/JfbBaseTfkCardDetail/Attr.js +33 -692
  12. package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +23 -630
  13. package/src/components/JfbBaseTfkCardDetail/Mock.js +11 -151
  14. package/src/components/JfbBaseTfkCardLogin/Api.js +34 -19
  15. package/src/components/JfbBaseTfkCardLogin/Attr.js +33 -885
  16. package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +16 -729
  17. package/src/components/JfbBaseTfkCardLogin/Mock.js +11 -721
  18. package/src/components/JfbBaseTfkSearch/Api.js +42 -11
  19. package/src/components/JfbBaseTfkSearch/Attr.js +33 -143
  20. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +23 -167
  21. package/src/components/JfbBaseTfkSearch/Mock.js +11 -90
  22. package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +0 -271
  23. package/src/components/JfbBaseTfkSearch/AllList.vue +0 -231
  24. package/src/components/JfbBaseTfkSearch/ContentCinema.vue +0 -157
  25. package/src/components/JfbBaseTfkSearch/ContentFilm.vue +0 -179
  26. package/src/components/JfbBaseTfkSearch/ContentProduct.vue +0 -308
  27. package/src/components/JfbBaseTfkSearch/ContentShop.vue +0 -184
  28. package/src/components/JfbBaseTfkSearch/CusAttr.js +0 -203
  29. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -382
  30. package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +0 -45
  31. package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +0 -109
  32. package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +0 -137
  33. package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +0 -81
  34. package/src/components/JfbBaseTfkSearch/handleKeyword.js +0 -24
  35. package/src/components/JfbBaseTfkSearch/listMixins.js +0 -147
  36. 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,382 +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
- ></skeleton-product>
24
- <skeleton-shop v-if="type_code === 'shop'" :out-spacing="$parentVm.outSpacing"></skeleton-shop>
25
- <skeleton-film v-if="type_code === 'film'" :out-spacing="$parentVm.outSpacing"></skeleton-film>
26
- <skeleton-cinema v-if="type_code === 'cinema'"></skeleton-cinema>
27
- </view>
28
- </view>
29
- </view>
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>
129
- </view>
130
- </template>
131
-
132
- <script>
133
- import {mapState} from "vuex";
134
- import SkeletonFilm from "./SkeletonFilm.vue";
135
- import SkeletonCinema from "./SkeletonCinema.vue";
136
- import SkeletonShop from "./SkeletonShop.vue";
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";
142
-
143
- export default {
144
- name: "CustomList",
145
- components: {
146
- ContentProduct,
147
- SkeletonProduct,
148
- SkeletonCinema,
149
- SkeletonFilm,
150
- SkeletonShop,
151
- ContentFilm,
152
- ContentCinema,
153
- ContentShop,
154
- },
155
- props:{
156
- keyword:{
157
- type:String,
158
- default:'',
159
- },
160
- tabId:{
161
- type:String,
162
- required:true
163
- }
164
- },
165
-
166
- computed:{
167
- ...mapState({
168
- stateCity: state => state.cityLocation.city,
169
- stateLocation: (state) => state.cityLocation.location || {},
170
- }),
171
- getParams(){
172
- let params = {
173
- search_range: this.search_range,
174
- page_token: this.page_token,
175
- page_size: this.page_size,
176
- };
177
-
178
- //关键字
179
- if(this.keyword) params['keyword'] = this.keyword;
180
-
181
- //设置城市
182
- if(this.stateCity && this.stateCity.city_code) {
183
- params['city_code'] = this.stateCity.city_code;
184
- }
185
-
186
- //设置经纬度
187
- if(this.stateLocation &&
188
- (this.stateLocation.latitude && this.stateLocation.longitude)
189
- ){
190
- params['latitude'] = this.stateLocation.latitude;
191
- params['longitude'] = this.stateLocation.longitude;
192
- }
193
-
194
- return params
195
- },
196
- contMarginComp(){
197
- let str = `${this.$parentVm.checkValue(this.$parentVm.contMargin.top, 20)}rpx`;
198
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20)}rpx`;
199
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.bottom, 20)}rpx`;
200
- str = `${str} ${this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20)}rpx`;
201
- return str
202
- },
203
- outItemProduct(){
204
- //获取每列元素最大宽度
205
- let num = (750 - 3 * Number(this.$parentVm.outSpacing))/2;
206
- num = num - this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20) - this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20);
207
- return num - this.$parentVm.contBorderWidth * 2
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
- }
216
- },
217
- data(){
218
- return {
219
- $parentVm:null,
220
- parentStatus: false,
221
- skeletonCount: 6,
222
-
223
- page_token:'1',
224
- page_size: 20,
225
-
226
- //参数
227
- type_code:'',
228
- search_range:'',
229
- type_other:null,
230
- is_open_city:'N',
231
-
232
-
233
- //列表数据
234
- dataList: null,
235
- timer:null,
236
- dataConfig: null,
237
-
238
-
239
- //商品两列功能
240
- productTowList:{
241
- left:null,
242
- right:null,
243
- },
244
- }
245
- },
246
-
247
- watch:{
248
- keyword(){
249
- if(this.timer) {
250
- clearTimeout(this.timer);
251
- this.timer = null;
252
- }
253
- this.timer = setTimeout(()=>{
254
- this.onCusReloadList();
255
- },500)
256
- },
257
- tabId(){
258
- this.parseTab()
259
- this.onCusReloadList();
260
- },
261
-
262
- stateCity(n, o){
263
- if(n && JSON.stringify(n) !== JSON.stringify(o)){
264
- this.onCusReloadList()
265
- }
266
- },
267
- },
268
-
269
- created() {
270
- this.getParentMV();
271
- this.parseTab();
272
- this.onCusReloadList();
273
- },
274
-
275
- methods:{
276
-
277
- parseTab(){
278
- let tabs = this.tabId.split('@');
279
- this.type_code = tabs[1];
280
- this.search_range = tabs[0]
281
- this.is_open_city = tabs[2];
282
- if(this.type_code === 'product'){
283
- this.type_other = Number(tabs[3]);
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
290
- }
291
- },
292
-
293
- handleClear(){
294
- this.is_open_city = 'N';
295
- this.dataConfig = null;
296
- this.page_token = '1';
297
- this.dataList = null;
298
- this.productTowList = {
299
- left:null,
300
- right:null,
301
- }
302
- },
303
-
304
- getParentMV(){
305
- this.$emit('on-parent-vm', ($vm)=>{
306
- this.$parentVm = $vm;
307
- this.parentStatus = true;
308
- })
309
- },
310
-
311
- onCusReachBottom(){
312
- if(!this.page_token) return false;
313
- this.getList();
314
- },
315
-
316
- //重新加载数据
317
- onCusReloadList(params ={}){
318
- this.handleClear();
319
- this.getList();
320
- },
321
-
322
-
323
- getList(){
324
- this.$xdShowLoading({});
325
- this.$emit('on-list', {
326
- params:this.getParams,
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
354
- this.$xdHideLoading();
355
- }
356
- })
357
- }
358
- }
359
- }
360
- </script>
361
-
362
-
363
-
364
- <style scoped lang="less">
365
- .productBoxCell2 {
366
- display: flex;
367
- justify-content: space-between;
368
- align-items: center;
369
- flex-flow: wrap;
370
- }
371
- .productItemCell2 {
372
-
373
- }
374
-
375
- .productBox2 {
376
- display: flex;
377
- justify-content: space-between;
378
- align-items: flex-start;
379
- flex-flow: wrap;
380
- }
381
-
382
- </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
-