jufubao-base 1.0.289-beta2 → 1.0.290-beta1

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 (28) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbBaseFooter/Attr.js +155 -10
  3. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +43 -96
  4. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +14 -2
  5. package/src/components/JfbBaseTfkSearch/Api.js +0 -15
  6. package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -10
  7. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +7 -247
  8. package/src/components/JfbBaseUserInfo/Attr.js +0 -12
  9. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -8
  10. package/src/mixins/componentsMixins.js +55 -363
  11. package/src/mixins/posterMixins.js +199 -27
  12. package/src/components/CusCouponChose/CusCouponChose.vue +0 -1027
  13. package/src/components/CusCouponItem/CusCouponItem.vue +0 -298
  14. package/src/components/CusEnter/CusEnter.vue +0 -360
  15. package/src/components/CusPoster/CusPoster.vue +0 -212
  16. package/src/components/CusPoster/CusSwiperDot.vue +0 -234
  17. package/src/components/CusProduct/CusProduct.vue +0 -372
  18. package/src/components/CusShops/CusShops.vue +0 -518
  19. package/src/components/CusSwiperDot/CusSwiperDot.vue +0 -234
  20. package/src/components/CusTab/CusTab.vue +0 -411
  21. package/src/components/CusVideo/CusVideo.vue +0 -170
  22. package/src/components/JfbBaseFooter/cusAttr/advanced.js +0 -12
  23. package/src/components/JfbBaseFooter/cusAttr/content.js +0 -447
  24. package/src/components/JfbBaseFooter/cusAttr/style.js +0 -7
  25. package/src/components/JfbBaseFooter/cusAttr/tools.js +0 -17
  26. package/src/components/JfbBaseTfkSearch/XdQueryFilter.vue +0 -354
  27. package/src/components/JfbBaseTfkSearch/XdQuerySort.vue +0 -192
  28. package/src/mixins/productCompMixins.js +0 -252
@@ -1,518 +0,0 @@
1
-
2
- <template>
3
- <view :style="[{'--main-color': mainColor,'--sub-main-color': subMainColor}]">
4
- <view class="shopping-ske" v-if="dataList ===null">null</view>
5
- <view
6
- class="shopping"
7
- v-else-if="dataList.length > 0"
8
- :style="[cusStyle['box']||{}]"
9
- >
10
- <view
11
- class="shopping-list"
12
- v-for="item in dataList"
13
- :key="item[compMK.id]"
14
- :style="[cusStyle['item']||{}]"
15
- @click="handleClick(item, 'handleToDetail', 'DL')"
16
- >
17
- <!--图片区域-->
18
- <view class="shopping-img" v-if="image" :style="[cusStyle['image']||{}]">
19
- <image v-if="item.errorStatus" :src="errorImage" :alt="item[compMK.name]"></image>
20
- <image v-else :src="item[compMK.image]" :alt="item[compMK.name]" mode="aspectFit" @error="handleError(item)"></image>
21
- </view>
22
- <!--图片区域-->
23
- <!--信息区域-->
24
- <view class="shopping-cont" :class="{noImage: !image}">
25
- <view class="shopping-cont-nameInfo">
26
- <view class="shopping-name">
27
- <view class="name" :style="[cusStyle['name']||{}]" v-html="item[compMK.name]"></view>
28
- <view
29
- class="distance"
30
- v-if="distance && distanceStyle === 'title' && item[compMK.distance]"
31
- v-html="item[compMK.distance]"
32
- :style="[cusStyle['distance']||{}]"
33
- ></view>
34
- <view class="priceAndDiscount" v-if="distanceStyle === 'button'">
35
- <view class="price" v-if="price && item[compMK.price]">
36
- <text>{{item[compMK.price]|filterPrice}}</text>
37
- <text>起</text>
38
- </view>
39
- <view class="discount" v-if="discount && item[compMK.discount]">
40
- <text>{{item[compMK.discount]|filterDiscount}}</text>
41
- <text>折</text>
42
- </view>
43
- </view>
44
- </view>
45
- <view class="shopping-info">
46
- <view
47
- class="shopping-address"
48
- :class="{one: tagPos === 'info'}"
49
- v-if="address"
50
- v-html="item[compMK.address]"
51
- ></view>
52
- <view class="tags-info" v-if="tagPos === 'info'">
53
- <view class="tags-info-tag">
54
- <xd-font-icon icon="iconduihuan" color="#43CF7C" size="28" style="margin-right: 8rpx;"></xd-font-icon>
55
- <text>支持到店使用</text>
56
- </view>
57
- </view>
58
- </view>
59
- </view>
60
- <view class="shopping-btn">
61
- <!--v3-->
62
- <view class="distance" v-if="distanceStyle === 'button' && item[compMK.distance]" >
63
- <xd-font-icon :style="[cusStyle['distance']||{}]" icon="icondizhi" size="26"></xd-font-icon>
64
- <text :style="[cusStyle['distance']||{}]" style="margin-left: 10rpx" v-html="item[compMK.distance]"></text>
65
- </view>
66
- <!--v3-->
67
- <!--v2-->
68
- <view v-if="tagPos === 'info'">
69
- <view class="priceAndDiscount">
70
- <view class="price" v-if="price && item[compMK.price]">
71
- <text>{{item[compMK.price]|filterPrice}}</text>
72
- <text>起</text>
73
- </view>
74
- <view class="discount" v-if="discount && item[compMK.discount]">
75
- <text>{{item[compMK.discount]|filterDiscount}}</text>
76
- <text>折</text>
77
- </view>
78
- </view>
79
- </view>
80
- <!--v2-->
81
- <!--v1-->
82
- <template v-if="tagPos === 'btn'">
83
- <view v-if="!isShowBtn" class="tags">
84
- <view :style="[compTagsStyle]" v-if="item[compMK.mode].includes('SELL')">支持核销</view>
85
- <view :style="[compTagsStyle]" v-if="item[compMK.mode].includes('SEAT')">在线选座</view>
86
- </view>
87
- <view class="priceAndDiscount">
88
- <view class="price" v-if="price && item[compMK.price]">
89
- <text>{{item[compMK.price]|filterPrice}}</text>
90
- <text>起</text>
91
- </view>
92
- <view class="discount" v-if="discount && item[compMK.discount]">
93
- <text>{{item[compMK.discount]|filterDiscount}}</text>
94
- <text>折</text>
95
- </view>
96
- </view>
97
- </template>
98
- <!--v1-->
99
- <!--按钮-->
100
- <view class="buttons" v-if="isShowBtn && isBtn">
101
- <!-- CV:店员核销(小蜜蜂);WB:用户扫水牌;CR:收银机;POS:POS机;JHD:聚好兑; QP:快捷支付;MC电影去购买-->
102
- <template v-if="item[compMK.mode].includes('SELL')">
103
- <view
104
- v-if="item[compMK.defType] === 'WB' && compEntry.scan === true"
105
- class="change_btn"
106
- @click.stop="handleClick(item, 'handleToScan', item[compMK.defType])"
107
- >{{ compNames.scan }}</view>
108
- <view
109
- v-else-if="item[compMK.defType] === 'QP' && compEntry.takeGoods === true"
110
- class="change_btn"
111
- @click.stop="handleClick(item,'handleToEasyPay',item[compMK.defType])"
112
- >{{ compNames.takeGoods }}</view>
113
- <view
114
- v-else-if="item[compMK.defType] === 'JHD' && compEntry.jhd === true"
115
- class="change_btn"
116
- @click.stop="handleClick(item,'handleToExchange',item[compMK.defType])"
117
- >{{ compNames.jhd }}</view>
118
- </template>
119
- <template v-if="item[compMK.mode].includes('SEAT') && compEntry.buyTicket === true">
120
- <view
121
- class="change_btn"
122
- @click.stop="handleClick(item,'toSchedulePath','SEAT')"
123
- >{{ compNames.buyTicket}}</view>
124
- </template>
125
- <template v-if="item[compMK.mode].includes('CODE') && compEntry.code === true">
126
- <view
127
- class="change_btn code"
128
- @click.stop="handleClick(item,'toCodePath','CODE')"
129
- >{{ compNames.code}}</view>
130
- </template>
131
- </view>
132
- <!--按钮-->
133
- </view>
134
- </view>
135
- <!--信息区域-->
136
- </view>
137
- </view>
138
- <view class="shopping-empty" v-else-if="dataList.length === 0"></view>
139
- </view>
140
-
141
- </template>
142
-
143
- <script>
144
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
145
- import Color from "color";
146
- let $vm = null;
147
-
148
- export default {
149
- name:'CusShops',
150
- components:{
151
- XdFontIcon
152
- },
153
- props:{
154
- list: {
155
- type: Array|null,
156
- default(){
157
- return []
158
- }
159
- },
160
- cusStyle:{
161
- type: Object,
162
- // image,item,box,name,distance
163
- default(){
164
- return {}
165
- }
166
- },
167
- layout:{
168
- type: String,
169
- required: true
170
- },
171
- content:{
172
- type: Array|null,
173
- default(){
174
- return ['image', 'address', 'distance', 'discount','price']
175
- }
176
- },
177
- isShowBtn:{
178
- type:Boolean,
179
- default: false,
180
- },
181
- mainColor:{
182
- type: String,
183
- required: true
184
- },
185
- subMainColor:{
186
- type: String,
187
- required: true
188
- },
189
- names:{
190
- type: Object,
191
- //jhd,scan,takeGoods,buyTicket,code
192
- default(){
193
- return {}
194
- }
195
- },
196
- mapKeys:{
197
- type:Object,
198
- default(){
199
- return {}
200
- }
201
- },
202
- entry:{
203
- type:Object,
204
- default(){
205
- return {}
206
- }
207
- }
208
- },
209
- data(){
210
- return {
211
- distanceStyle:'title',//title:标题后面 button: 操作按钮左侧
212
- tagPos: 'info', //info=>信息下方 btn: 操作按钮左侧
213
- errorImage:'https://img0.jufubao.cn/common/empty/shop.png?v1=1',
214
-
215
- //内容区状态
216
- image: false,
217
- address:true,
218
- distance: false,
219
- price: false,
220
- discount: false,
221
-
222
- //数据键值map关系
223
- defMapKeys:{
224
- id: 'resource_shop_id',
225
- name: 'resource_shop_name', //店铺名字
226
- distance: 'distance', //距离
227
- address:'address', //店铺地址
228
- image:'shop_icon', //店铺图片
229
- discount : 'discount_ratio', //折扣
230
- price:'price', //价格
231
- mode:'consume_mode',//标签类型[]
232
- defType:'default_consume_type',
233
- },
234
-
235
- //自定义名称
236
- defName:{
237
- jhd: "聚好兑", //聚好兑名称
238
- scan: "扫一扫", //扫一扫名称
239
- takeGoods: "展快捷码", //展快捷码名称
240
- buyTicket: "去购票", //去购票名称
241
- code:'电子码' //电子码名字
242
- },
243
-
244
- defEntry:{
245
- jhd: false, //聚好兑名称
246
- scan: false, //扫一扫名称
247
- takeGoods: false, //展快捷码名称
248
- buyTicket: false, //去购票名称
249
- code:false //电子码名字
250
- },
251
-
252
- //按钮功能
253
- buttons:[],
254
- }
255
- },
256
- computed:{
257
- dataList(){
258
- if(this.list === null) return null;
259
- else if(this.$xdUniHelper.checkVarType(this.list) === 'array'){
260
- return this.$xdUniHelper.cloneDeep(this.list);
261
- }
262
- return []
263
- },
264
-
265
- compTagsStyle(){
266
- let textColor = `rgba(${Color(this.mainColor).alpha(0.1).array().join(',')})`;
267
- return {
268
- backgroundColor: textColor,
269
- color: this.mainColor,
270
- }
271
- },
272
-
273
- compNames(){
274
- return Object.assign({}, this.defName,this.$xdUniHelper.cloneDeep(this.names) )
275
- },
276
- compMK(){
277
- return Object.assign({},this.defMapKeys,this.$xdUniHelper.cloneDeep(this.mapKeys))
278
- },
279
- compEntry(){
280
- return Object.assign({},this.defEntry,this.$xdUniHelper.cloneDeep(this.entry))
281
- },
282
- isBtn(){
283
- let flag = false;
284
- Object.keys(this.compEntry).map(key=>{
285
- if(this.compEntry[key] === true) flag = true;
286
- });
287
- return flag
288
- }
289
- },
290
- filters:{
291
- filterPrice(val){
292
- if(typeof val === 'string') val = Number(val)
293
- return $vm.$xdUniHelper.divisionFloatNumber(val,100);
294
- },
295
- filterDiscount(val){
296
- if(typeof val === 'string') val = Number(val)
297
- return $vm.$xdUniHelper.divisionFloatNumber(val,1000);
298
- },
299
- },
300
- watch:{
301
- layout(val){
302
- this.layoutParse(val)
303
- },
304
- content(val){
305
- this.contentParse(val)
306
- },
307
- },
308
- created() {
309
- $vm = this;
310
- this.layoutParse(this.layout);
311
- this.contentParse(this.content);
312
- },
313
- methods:{
314
- handleError(item){
315
- item.errorStatus = true;
316
- },
317
- layoutParse(value){
318
- let distanceStyle = 'title';
319
- let tagPos = '';
320
-
321
- //布局1
322
- if(['v1'].includes(value)) {
323
- tagPos = 'btn'
324
- }
325
-
326
- //布局2
327
- if(['v2'].includes(value)) {
328
- tagPos = 'info'
329
- }
330
-
331
- //电影模式
332
- if(['v3'].includes(value)) {
333
- distanceStyle = 'button';
334
- }
335
- this.tagPos = tagPos;
336
- this.distanceStyle = distanceStyle;
337
- },
338
- contentParse(value){
339
- this.image = value.includes('image')
340
- this.address = value.includes('address')
341
- this.distance = value.includes('distance')
342
- //价格和折扣只有在v1,v2线上
343
- this.price = value.includes('price')
344
- this.discount = value.includes('discount')
345
- },
346
-
347
- /**
348
- * @description 事件操作
349
- * @param item {Object} 数据对象
350
- * @param funcName {string} 操作方法名字
351
- * @param type {string} 类型
352
- */
353
- handleClick(item, funcName, type) {
354
- this.$emit('on-event', {item,funcName,type});
355
- }
356
- }
357
- }
358
-
359
- </script>
360
- <style scoped lang="less">
361
- .shopping {
362
- &-list {
363
- background-color: #fff;
364
- padding: 20rpx;
365
- margin-top: 20rpx;
366
- display: flex;
367
- justify-content: space-between;
368
- align-items: flex-start;
369
-
370
- &:first-child {
371
- margin-top: 0;
372
- }
373
- }
374
- &-img {
375
- width: 200rpx;
376
- height: 200rpx;
377
- margin-right: 20rpx;
378
- flex-shrink: 0;
379
-
380
- & > image {
381
- width: 200rpx;
382
- height: 200rpx;
383
- }
384
- }
385
-
386
- &-cont {
387
- flex: 1;
388
- display: flex;
389
- flex-wrap: wrap;
390
- align-content: space-between;
391
- min-height: 200rpx;
392
- justify-items: flex-end;
393
-
394
- &.noImage {
395
- min-height: 0;
396
-
397
- & .shopping-btn {
398
- margin-top: 32rpx;
399
- }
400
- }
401
-
402
- & > * {
403
- width: 100%;
404
- flex-shrink: 0;
405
- }
406
- }
407
-
408
- &-name {
409
- display: flex;
410
- justify-content: flex-start;
411
- align-items: center;
412
- & .name {
413
- font-size: 32rpx;
414
- font-weight: 400;
415
- line-height: 40rpx;
416
- .uni-cut(1,40);
417
- flex: 1;
418
- color: #333;
419
- }
420
-
421
- & .distance {
422
- margin-left: 20rpx;
423
- font-size: 24rpx;
424
- color: #999;
425
- }
426
- }
427
-
428
- &-info {
429
- & .tags-info {
430
- margin-top: 16rpx;
431
- &-tag {
432
- display: flex;
433
- justify-content: flex-start;
434
- align-items: center;
435
- font-size: 24rpx;
436
- color: #999;
437
- }
438
- }
439
- }
440
-
441
- &-address {
442
- margin-top: 16rpx;
443
- font-size: 24rpx;
444
- color: #999;
445
- line-height: 32rpx;
446
- .uni-max-cut(2,64);
447
-
448
- &.one {
449
- .uni-max-cut(1,32);
450
- }
451
- }
452
-
453
- &-btn {
454
- display: flex;
455
- justify-content: space-between;
456
- align-items: center;
457
- margin-top: 16rpx;
458
-
459
- & .distance {
460
- display: flex;
461
- justify-items: flex-start;
462
- flex-shrink: 0;
463
- font-size: 24rpx;
464
- color: #999;
465
- }
466
-
467
- & .tags {
468
- & > view {
469
- font-size: 24rpx;
470
- height: 42rpx;
471
- line-height: 42rpx;
472
- border-radius: 12rpx;
473
- padding: 0 16rpx;
474
- }
475
-
476
- }
477
-
478
- & .buttons {
479
- display: flex;
480
- justify-content: flex-end;
481
- align-items: center;
482
- & .change_btn{
483
- padding: 0 16rpx;
484
- height: 48rpx;
485
- line-height: 48rpx;
486
- border-radius: 24rpx;
487
- background-color: var(--main-color);
488
- font-size: 24rpx;
489
- flex-shrink: 0;
490
- color: #fff;
491
- & + .change_btn{
492
- margin-left: 10rpx;
493
- }
494
-
495
- &.code {
496
- background-color: var(--sub-main-color);
497
- }
498
- }
499
- }
500
- }
501
-
502
- & .priceAndDiscount{
503
- & > .price, & > .discount {
504
- font-size: 24rpx;
505
- & > text {
506
- &:first-child {
507
- color: rgb(255, 44, 24)
508
- }
509
- &:last-child {
510
- color: #999;
511
- margin-left: 4rpx;
512
- }
513
- }
514
-
515
- }
516
- }
517
- }
518
- </style>