jufubao-base 1.0.290-beta3 → 1.0.290

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 (30) hide show
  1. package/package.json +1 -1
  2. package/src/components/CusCouponChose/CusCouponChose.vue +1027 -0
  3. package/src/components/CusCouponItem/CusCouponItem.vue +298 -0
  4. package/src/components/CusEnter/CusEnter.vue +360 -0
  5. package/src/components/CusPoster/CusPoster.vue +212 -0
  6. package/src/components/CusPoster/CusSwiperDot.vue +234 -0
  7. package/src/components/CusProduct/CusProduct.vue +372 -0
  8. package/src/components/CusShops/CusShops.vue +518 -0
  9. package/src/components/CusSwiperDot/CusSwiperDot.vue +234 -0
  10. package/src/components/CusTab/CusTab.vue +411 -0
  11. package/src/components/CusVideo/CusVideo.vue +170 -0
  12. package/src/components/JfbBaseFooter/Attr.js +10 -155
  13. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +98 -44
  14. package/src/components/JfbBaseFooter/XdFooterBar.vue +324 -0
  15. package/src/components/JfbBaseFooter/cusAttr/advanced.js +12 -0
  16. package/src/components/JfbBaseFooter/cusAttr/content.js +475 -0
  17. package/src/components/JfbBaseFooter/cusAttr/style.js +7 -0
  18. package/src/components/JfbBaseFooter/cusAttr/tools.js +17 -0
  19. package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +3 -15
  20. package/src/components/JfbBaseTfkSearch/Api.js +15 -0
  21. package/src/components/JfbBaseTfkSearch/CustomList.vue +10 -0
  22. package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +255 -7
  23. package/src/components/JfbBaseTfkSearch/XdQueryFilter.vue +347 -0
  24. package/src/components/JfbBaseTfkSearch/XdQuerySort.vue +192 -0
  25. package/src/components/JfbBaseTfkSearch/listMixins.js +8 -6
  26. package/src/components/JfbBaseUserInfo/Attr.js +12 -0
  27. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +8 -2
  28. package/src/mixins/componentsMixins.js +363 -55
  29. package/src/mixins/posterMixins.js +27 -199
  30. package/src/mixins/productCompMixins.js +252 -0
@@ -0,0 +1,192 @@
1
+ <template>
2
+ <view class="xd-query-sort" :style="[boxStyleComp]">
3
+ <view
4
+ v-for="item in sortList"
5
+ :key="item.key"
6
+ class="cell_wrap"
7
+ :style="[{borderBottom:lineBorder}]"
8
+ >
9
+ <view class="cell_label">{{item.label}}</view>
10
+ <view class="sub_value" v-if="item.children && item.children.length">
11
+ <view
12
+ class="sub_tag"
13
+ :class="{active: (item.checked && sub.value === item.value)}"
14
+ v-for="sub in item.children" :key="sub.value"
15
+ @click="handleSubClick(item, sub.value)"
16
+ :style="[(item.checked && sub.value === item.value)?labelActColor:labelColor]"
17
+ >{{sub.label}}</view>
18
+ </view>
19
+ <view v-else :key="renderRadio">
20
+ <xd-radio
21
+ @change="e => handleChange(e, item)"
22
+ size="mini"
23
+ :value="item.checked"
24
+ :color="labelActColor.color"
25
+ ></xd-radio>
26
+ </view>
27
+ </view>
28
+ </view>
29
+ </template>
30
+
31
+ <script>
32
+ import XdRadio from "@/components/XdRadio/XdRadio"
33
+ import Color from "color"
34
+
35
+ export default {
36
+ components: {
37
+ XdRadio
38
+ },
39
+ props: {
40
+ list: {
41
+ type: Array,
42
+ default: () => {
43
+ return [
44
+ {
45
+ label: "综合",
46
+ key: "default",
47
+ value: "default"
48
+ },
49
+ {
50
+ label: "销量",
51
+ key: "sale_num",
52
+ children: [
53
+ {label: "由高到低", value: 'sale_num_desc'},
54
+ {label: "由低到高", value: 'sale_num_asc'}
55
+ ]
56
+ },
57
+ {
58
+ label: "价格",
59
+ key: "price",
60
+ children: [
61
+ {label: "由高到低", value: 'price_desc'},
62
+ {label: "由低到高", value: 'price_asc'}
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ },
68
+ sort: {
69
+ type: String,
70
+ default: "default"
71
+ },
72
+ filterStyle:{
73
+ type: Object,
74
+ default(){
75
+ return {}
76
+ }
77
+ }
78
+ },
79
+ watch: {
80
+ sortList(n){
81
+ this.renderRadio = Date.now();
82
+ let cur = this.sortList.find(item => item.checked);
83
+ if(cur) this.$emit("onConfirm", cur)
84
+ }
85
+ },
86
+ computed:{
87
+ lineBorder(){
88
+ if(['rgba(255, 255, 255, 1)','#fff','#ffffff','#FFF', '#FFFFFF'].includes(this.filterStyle.filterListColor)) {
89
+ return '1px solid #F5F5F5';
90
+ }
91
+ return `1px solid ${Color(this.filterStyle.filterListColor).lighten(.2).hex().toString()}`
92
+ },
93
+ labelColor(){
94
+ return {
95
+ color: this.filterStyle.filterFontStyle.color,
96
+ borderColor: Color(this.filterStyle.filterFontStyle.color).alpha(0.2).toString(),
97
+ backgroundColor: this.filterStyle.filterFontStyle.backgroundColor,
98
+ }
99
+ },
100
+ labelActColor(){
101
+ return {
102
+ color: this.filterStyle.filterActFontStyle.color,
103
+ borderColor: this.filterStyle.filterActFontStyle.color,
104
+ backgroundColor: this.filterStyle.filterActFontStyle.backgroundColor,
105
+ }
106
+ },
107
+ boxStyleComp(){
108
+ return {
109
+ backgroundColor: this.filterStyle.filterListColor,
110
+ }
111
+ },
112
+ },
113
+ data(){
114
+ return {
115
+ sortList: [],
116
+ renderRadio: "renderRadio"
117
+ }
118
+ },
119
+ created(){
120
+ this.sortList = this.list.map(item => {
121
+ if(this.sort.startsWith(item.key)) {
122
+ item.checked = true;
123
+ item.value = this.sort;
124
+ }else{
125
+ item.value = "";
126
+ item.checked = false;
127
+ }
128
+ return item;
129
+ });
130
+
131
+ },
132
+ methods: {
133
+ handleSubClick(item, value){
134
+ this.sortList = this.sortList.map(tt => {
135
+ tt['checked'] = false;
136
+ if(tt.key == item.key){
137
+ tt.value = value;
138
+ tt['checked'] = true;
139
+ }
140
+ return tt;
141
+ })
142
+ },
143
+ handleChange(flat, item){
144
+ if(flat) {
145
+ this.sortList = this.sortList.map(tt => {
146
+ tt['checked'] = false;
147
+ if(tt.key == item.key){
148
+ tt['checked'] = true;
149
+ tt['value'] = tt.key;
150
+ }
151
+ return tt;
152
+ })
153
+ }
154
+ }
155
+ }
156
+ }
157
+ </script>
158
+
159
+ <style lang="less" scoped>
160
+ .xd-query-sort{
161
+ box-shadow: 20rpx 20rpx 20rpx 0 rgba(0,0,0, .29);
162
+ }
163
+ .cell_wrap{
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: space-between;
167
+ border-bottom: 1px solid #F5F5F5;
168
+ padding: 20rpx 48rpx 20rpx 88rpx;
169
+ .cell_label{
170
+ font-size: 28rpx;
171
+ color: #333333;
172
+ }
173
+ .sub_value{
174
+ display: flex;
175
+ .sub_tag{
176
+ font-size: 24rpx;
177
+ color: #AAAAAA;
178
+ border: 1px solid #F2F2F2;
179
+ line-height: 60rpx;
180
+ width: 160rpx;
181
+ text-align: center;
182
+ border-radius: 80rpx;
183
+ margin-left: 24rpx;
184
+
185
+ &.active{
186
+ color: #A5D63F;
187
+ border-color: #A5D63F;
188
+ }
189
+ }
190
+ }
191
+ }
192
+ </style>
@@ -51,18 +51,20 @@ export default {
51
51
  brandColor,imgRradius,contMargin,contRradius,contShadow,contBorder,contBgColor,contObjBorder,contBorderWidth}
52
52
  },
53
53
 
54
- filtersResData(res){
55
- let list = res.list.filter(item=>{
54
+ filtersResData(res) {
55
+ let list = res.list.filter(item => {
56
56
  return item.items.length > 0
57
57
  });
58
- if(res.list.length === list.length) return res;
59
- let tabs = list.map(item=>{
58
+ if (res.list.length === list.length) { return res; }
59
+ let tabs = list.map(item => {
60
+ let tab = res.tabs.find(Titem => Titem.value === item.tab)
60
61
  return {
61
62
  label: item.name,
62
- value: item.tab
63
+ value: item.tab,
64
+ ...tab
63
65
  }
64
66
  });
65
- return {...res, list, tabs}
67
+ return { ...res, list, tabs }
66
68
  },
67
69
 
68
70
 
@@ -696,6 +696,18 @@ export default {
696
696
  },
697
697
  inline: false,
698
698
  },
699
+ data['is_plus_site'] === 'Y' && {
700
+ label: '已省金额路径:',
701
+ ele: 'xd-select-pages-path',
702
+ valueKey: 'savePath',
703
+ groupKey: 'advanced',
704
+ placeholder: '请选择已省金额路径',
705
+ value: data['savePath'] || null,
706
+ setting: {
707
+ router: XdBus.getParentApi('getPagesTree'),
708
+ },
709
+ inline: false,
710
+ },
699
711
  {
700
712
  label: '',
701
713
  ele: 'slot',
@@ -25,7 +25,7 @@
25
25
  <view v-else>普通用户</view>
26
26
  </view>
27
27
  <view>
28
- <view v-if="is_vip==='Y'">
28
+ <view @click="handleToSave" v-if="is_vip==='Y'">
29
29
  <text style="color:#D19E6B;">已省</text><text style="color: #FEE9CC;">¥{{ $xdUniHelper.divisionFloatNumber(save_amount, 100) }}</text>
30
30
  </view>
31
31
  <!-- <view v-else>
@@ -316,6 +316,7 @@
316
316
  plusPageBgImg: "",
317
317
  normalBgImg: "",
318
318
  normalPageBgImg: "",
319
+ savePath: ''
319
320
  }
320
321
  },
321
322
  watch: {
@@ -462,7 +463,7 @@
462
463
  this.profilePath = getContainerPropsValue(container, 'content.profilePath', { value: "" }).value;
463
464
  this.plusNickStyle = getContainerPropsValue(container, 'content.plusNickStyle', {});
464
465
  this.normalNickStyle = getContainerPropsValue(container, 'content.normalNickStyle', {});
465
-
466
+ this.savePath = getContainerPropsValue(container, 'content.savePath', { value: "" }).value;
466
467
  if(this.is_plus_site === 'Y'){
467
468
  let bg = this.is_vip === 'Y' ? this.plusPageBgImg : this.normalPageBgImg;
468
469
  if(this.$configProject['isPreview']){
@@ -504,6 +505,11 @@
504
505
  url: this.codePath
505
506
  })
506
507
  },
508
+ handleToSave() {
509
+ this.$xdUniHelper.navigateTo({
510
+ url: this.savePath
511
+ })
512
+ },
507
513
  onJfbShow(options) {
508
514
  this.onJfbLoad(options);
509
515
  },