jufubao-base 1.0.197-beta1 → 1.0.197-beta10

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 (39) hide show
  1. package/commands.js +1 -1
  2. package/package.json +1 -1
  3. package/src/ICONS.js +1128 -0
  4. package/src/components/JfbBaseAddress/Attr.js +109 -1
  5. package/src/components/JfbBaseAddress/JfbBaseAddress.vue +164 -80
  6. package/src/components/JfbBaseAddress/XdAddress.vue +12 -6
  7. package/src/components/JfbBaseAddress/XdTfkItem.vue +117 -0
  8. package/src/components/JfbBaseCardEntry/Attr.js +472 -443
  9. package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
  10. package/src/components/JfbBaseCardEntry/Mock.js +1 -0
  11. package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
  12. package/src/components/JfbBaseConDialog/JfbBaseConDialog.vue +41 -13
  13. package/src/components/JfbBaseFastLink/Attr.js +24 -8
  14. package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +37 -21
  15. package/src/components/JfbBaseFooter/Attr.js +141 -75
  16. package/src/components/JfbBaseFooter/JfbBaseFooter.vue +50 -15
  17. package/src/components/JfbBaseHeader/Attr.js +134 -51
  18. package/src/components/JfbBaseHeader/JfbBaseHeader.vue +110 -30
  19. package/src/components/JfbBaseHeaderElephant/Attr.js +496 -0
  20. package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +272 -15
  21. package/src/components/JfbBaseNotice/Attr.js +26 -0
  22. package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
  23. package/src/components/JfbBaseOrderDetail/Attr.js +147 -65
  24. package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +97 -47
  25. package/src/components/JfbBaseOrderList/Attr.js +59 -2
  26. package/src/components/JfbBaseOrderList/JfbBaseOrderList.vue +139 -92
  27. package/src/components/JfbBaseOrderList/Mock.js +3 -0
  28. package/src/components/JfbBaseOrderList/XdTfkOrderItem.vue +267 -0
  29. package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +27 -29
  30. package/src/components/JfbBasePosterBigSmall/getWidthHeight.js +13 -9
  31. package/src/components/JfbBaseUserCenter/Attr.js +297 -52
  32. package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +135 -44
  33. package/src/components/JfbBaseUserInfo/Attr.js +313 -37
  34. package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +173 -63
  35. package/src/components/JfbBaseUserOrder/Attr.js +332 -30
  36. package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +183 -55
  37. package/src/components/JfbBaseWallet/Attr.js +376 -8
  38. package/src/components/JfbBaseWallet/JfbBaseWallet.vue +185 -49
  39. package/src/mixins/componentsMixins.js +210 -35
@@ -46,6 +46,18 @@ export default {
46
46
  {label: "不显示", value: "N"}
47
47
  ]
48
48
  },
49
+ {
50
+ label: "定位样式",
51
+ ele: "xd-radio",
52
+ valueKey: "searchBoxPosition",
53
+ value: data.searchBoxPosition || "out",
54
+ list: [
55
+ {label: "搜索框外", value: "out"},
56
+ {label: "搜索框内", value: "in"}
57
+ ],
58
+ groupKey:'content',
59
+ hidden: data.showLocation !== 'Y'
60
+ },
49
61
  {
50
62
  label: "是否显示站点信息",
51
63
  ele: "xd-radio",
@@ -77,6 +89,108 @@ export default {
77
89
  value: data.placeholder || '',
78
90
  className: "input80"
79
91
  },
92
+ {
93
+ label: '搜索框圆角',
94
+ ele: 'xd-site-select-list',
95
+ valueKey: 'searchBoxRadius',
96
+ value: data.searchBoxRadius || 30,
97
+ groupKey:'content',
98
+ placeholder: '请选择内容圆角设置',
99
+ multiple: false,
100
+ className: 'input80',
101
+ handleCustom({ action, data }) {
102
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
103
+ .then(res => {
104
+ data.cb(res.list)
105
+ })
106
+ .catch(error => {
107
+ console.error(error);
108
+ });
109
+ },
110
+ },
111
+ {
112
+ label: "放大镜位置",
113
+ ele: "xd-radio",
114
+ valueKey: "searchIconPosition",
115
+ value: data.searchIconPosition || "right",
116
+ list: [
117
+ {label: "靠左", value: "left"},
118
+ {label: "靠右", value: "right"},
119
+ {label: "隐藏", value: "hidden"}
120
+ ],
121
+ groupKey:'content',
122
+ },
123
+ {
124
+ label: "右侧是否展示搜索",
125
+ ele: "xd-radio",
126
+ valueKey: "showSearchBtn",
127
+ value: data.showSearchBtn,
128
+ list: [
129
+ {label: "展示", value: "Y"},
130
+ {label: "隐藏", value: "N"}
131
+ ],
132
+ groupKey:'content',
133
+ },
134
+ {
135
+ label: "搜索位置",
136
+ ele: "xd-radio",
137
+ valueKey: "searchBtnPosition",
138
+ value: data.searchBtnPosition || "out",
139
+ list: [
140
+ {label: "搜索框内", value: "in"},
141
+ {label: "搜索框外", value: "out"}
142
+ ],
143
+ groupKey:'content',
144
+ hidden: data.showSearchBtn !== 'Y'
145
+ },
146
+ {
147
+ label: "右侧搜索按钮文案自定义",
148
+ ele: "el-input",
149
+ placeholder: '请输入搜索按钮文案',
150
+ valueKey: "searchBtnText",
151
+ groupKey:'content',
152
+ value: data.searchBtnText || '',
153
+ className: "input80",
154
+ hidden: data.showSearchBtn !== 'Y'
155
+ },
156
+ {
157
+ label: "搜索按钮背景颜色",
158
+ ele: "xd-color",
159
+ placeholder: '请输入搜索按钮背景颜色',
160
+ valueKey: "searchBtnBgColor",
161
+ groupKey:'content',
162
+ value: data.searchBtnBgColor || '',
163
+ hidden: data.showSearchBtn !== 'Y'
164
+ },
165
+ {
166
+ label: "搜索按钮文字颜色",
167
+ ele: "xd-color",
168
+ placeholder: '请输入搜索按钮文字颜色',
169
+ valueKey: "searchBtnTextColor",
170
+ groupKey:'content',
171
+ value: data.searchBtnTextColor || '',
172
+ hidden: data.showSearchBtn !== 'Y'
173
+ },
174
+ {
175
+ label: "搜索按钮圆角",
176
+ ele: 'xd-site-select-list',
177
+ valueKey: 'searchBtnRadius',
178
+ value: data.searchBtnRadius || 0,
179
+ groupKey:'content',
180
+ placeholder: '请选择内容圆角设置',
181
+ multiple: false,
182
+ className: 'input80',
183
+ handleCustom({ action, data }) {
184
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_style_radius' })
185
+ .then(res => {
186
+ data.cb(res.list)
187
+ })
188
+ .catch(error => {
189
+ console.error(error);
190
+ });
191
+ },
192
+ hidden: data.showSearchBtn !== 'Y'
193
+ },
80
194
  {
81
195
  label: '背景颜色:',
82
196
  ele: 'xd-color',
@@ -86,6 +200,14 @@ export default {
86
200
  classNmae: 'input80',
87
201
  groupKey:'style',
88
202
  },
203
+ {
204
+ label: "底部边框设置:",
205
+ ele: "xd-border",
206
+ valueKey: "bottomBorder",
207
+ value: data['bottomBorder'] || {},
208
+ className: 'input80',
209
+ groupKey: 'style',
210
+ },
89
211
  {
90
212
  ele: 'title',
91
213
  label: '定位功能样式设置',
@@ -152,7 +274,7 @@ export default {
152
274
  value: data['inputBackgroundColor'] || '',
153
275
  groupKey:'style',
154
276
  placeholder: '请选择背景颜色',
155
- classNmae: 'input80',
277
+ className: 'input80',
156
278
  },
157
279
  {
158
280
  label: '输入框文字颜色:',
@@ -161,64 +283,22 @@ export default {
161
283
  groupKey:'style',
162
284
  value: data['inputTextColor'] || '',
163
285
  placeholder: '请选择输入框文字颜色',
164
- classNmae: 'input80',
165
- },
166
- {
167
- ele: 'title',
168
- label: '投影设置',
169
- size: 'small',
170
- groupKey:'style',
171
- },
172
- {
173
- label: '是否有投影:',
174
- ele: 'xd-radio',
175
- valueKey: 'is_shadow',
176
- value: data['is_shadow'] || 'N',
177
- placeholder: '请选择是否投影',
178
- groupKey:'style',
179
- multiple: false,
180
286
  className: 'input80',
181
- list: [
182
- {label: '是', value: 'Y'},
183
- {label: '否', value: 'N'},
184
- ]
185
- },
186
- data['is_shadow'] === 'Y' && {
187
- label: '投影颜色:',
188
- ele: 'xd-color',
189
- valueKey: 'is_shadow_bg',
190
- value: data['is_shadow_bg'] || '',
191
- groupKey:'style',
192
- placeholder: '请选择投影颜色',
193
- classNmae: 'input80',
194
287
  },
195
- data['is_shadow'] === 'Y' && {
196
- label: '投影范围:',
197
- ele: 'xd-site-select-list',
198
- groupKey:'style',
199
- valueKey: 'is_shadow_w',
200
- value: data['is_shadow_w'] || '10',
201
- placeholder: '请选择投影范围',
202
- multiple: false,
288
+ {
289
+ label: "输入框边框设置:",
290
+ ele: "xd-border",
291
+ valueKey: "inputBorder",
292
+ value: data['inputBorder'] || {},
203
293
  className: 'input80',
204
- handleCustom({action, data}) {
205
- XdBus.getParentApi('getOptionsSettingList')({
206
- setting_id: 'edtix_style_radius',
207
- key: Date.now()
208
- })
209
- .then(res => {
210
- data.cb(res.list)
211
- })
212
- .catch(error => {
213
- console.error(error);
214
- });
215
- },
294
+ groupKey: 'style',
216
295
  },
217
296
  {
218
297
  ele: 'title',
219
298
  label: '边框设置',
220
299
  size: 'small',
221
300
  groupKey:'style',
301
+ hidden: true,
222
302
  },
223
303
  {
224
304
  label: '是否有边框:',
@@ -232,7 +312,8 @@ export default {
232
312
  list: [
233
313
  {label: '是', value: 'Y'},
234
314
  {label: '否', value: 'N'},
235
- ]
315
+ ],
316
+ hidden: true,
236
317
  },
237
318
  data['is_border'] === 'Y' && {
238
319
  label: '边框颜色:',
@@ -242,6 +323,7 @@ export default {
242
323
  value: data['is_border_c'] || '',
243
324
  placeholder: '请选择边框颜色',
244
325
  classNmae: 'input80',
326
+ hidden: true,
245
327
  },
246
328
  data['is_border'] === 'Y' && {
247
329
  label: '边框大小:',
@@ -252,6 +334,7 @@ export default {
252
334
  value: data['is_border_w'] || '',
253
335
  placeholder: '请输入边框颜色',
254
336
  className: 'input80',
337
+ hidden: true,
255
338
  },
256
339
  {
257
340
  label: '搜索页面链接:',
@@ -18,8 +18,7 @@
18
18
  class="header_wrap"
19
19
  :style="{
20
20
  background: backgroundColor,
21
- boxShadow,
22
- borderBottom:boxBorder
21
+ borderBottom: bottomBorder
23
22
  }"
24
23
  >
25
24
  <view class="header_wrap-back" @click="onJfbBack" v-if="showBack==='Y'">
@@ -31,7 +30,7 @@
31
30
  </view>
32
31
  <view v-if="showPartnerName==='Y'" class="name" :style="{color: textColor}">{{partnerName}}</view>
33
32
  </view>
34
- <view v-if="loaded && showLocation==='Y'" class="header_wrap-city">
33
+ <view v-if="loaded && showLocation==='Y' && searchBoxPosition==='out'" class="header_wrap-city">
35
34
  <xd-city-show-api
36
35
  @done="handleCityDone"
37
36
  @onChange="handleCityChange"
@@ -46,9 +45,22 @@
46
45
  @click="toSearch"
47
46
  :style="{
48
47
  background:inputBackgroundColor,
49
- color:inputTextColor
48
+ color:inputTextColor,
49
+ borderRadius: searchBoxRadius + 'rpx',
50
+ border: inputBorder
50
51
  }"
51
52
  >
53
+ <view v-if="loaded && showLocation==='Y' && searchBoxPosition==='in'" class="header-city-in" @click.stop>
54
+ <xd-city-show-api
55
+ @done="handleCityDone"
56
+ @onChange="handleCityChange"
57
+ :color="textColor"
58
+ :icon="locationIcon"
59
+ :bgColor="locationBackgroundColor"
60
+ :key="showLocationKey"
61
+ ></xd-city-show-api>
62
+ </view>
63
+ <xd-font-icon v-if="searchIconPosition==='left'" :icon="icon" :color="iconColor" size="32"/>
52
64
  <input
53
65
  v-if="useSearch==='Y'"
54
66
  :placeholder="placeholder"
@@ -59,8 +71,18 @@
59
71
  :placeholder-style="'color:' + inputTextColor"
60
72
  />
61
73
  <view v-else class="search_placeholder">{{placeholder}}</view>
62
- <xd-font-icon :icon="icon" :color="iconColor" size="32"/>
74
+ <xd-font-icon v-if="searchIconPosition==='right'" :icon="icon" :color="iconColor" size="32"/>
75
+ <view v-if="showSearchBtn==='Y' && searchBtnPosition==='in'"
76
+ class="search_btn_in"
77
+ :style="[searchBtnStyle]"
78
+ @click.stop="doSearch"
79
+ >{{searchBtnText || '搜索'}}</view>
63
80
  </view>
81
+ <view v-if="showSearchBtn==='Y' && searchBtnPosition==='out'"
82
+ style="margin-left: 4px;padding: 8rpx 32rpx;font-size: 28rpx;"
83
+ :style="[searchBtnStyle]"
84
+ @click="doSearch"
85
+ >{{searchBtnText || '搜索'}}</view>
64
86
  </view>
65
87
  </view>
66
88
  </view>
@@ -86,14 +108,12 @@
86
108
  mixins: [componentsMixins,extsMixins,JfbBaseHeaderMixin],
87
109
  computed:{
88
110
  ...mapState(['siteInfo']),
89
-
90
- boxShadow() {
91
- if (this.is_shadow === 'Y') return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
92
- else return '0 0 0 rgba(0,0,0,0)';
93
- },
94
- boxBorder() {
95
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
96
- else return '0';
111
+ searchBtnStyle(){
112
+ return {
113
+ background: this.searchBtnBgColor,
114
+ color: this.searchBtnTextColor,
115
+ borderRadius: this.searchBtnRadius + 'rpx'
116
+ }
97
117
  }
98
118
  },
99
119
  data() {
@@ -102,6 +122,7 @@
102
122
  saveKey: 'xd_user_current_access_city', //用户选中城市存储key
103
123
  loaded: false,
104
124
  keyword: "",
125
+ isPreview: false,
105
126
 
106
127
  //面板
107
128
  showLocation: "",
@@ -128,12 +149,6 @@
128
149
  icon: '',
129
150
  iconColor: '',
130
151
 
131
- //投影
132
- is_shadow: 'Y',
133
- is_shadow_bg: 0,
134
- is_shadow_w: 0,
135
-
136
-
137
152
  //边框
138
153
  is_border: 'Y',
139
154
  is_border_w: 0,
@@ -141,9 +156,20 @@
141
156
 
142
157
  //定位ICON
143
158
  locationIcon: "",
144
- locationBackgroundColor: ""
159
+ locationBackgroundColor: "",
145
160
 
146
161
  //
162
+ searchBoxPosition: "out",
163
+ searchIconPosition: "right",
164
+ showSearchBtn: "",
165
+ searchBtnPosition: "out",
166
+ searchBtnText: "",
167
+ searchBtnBgColor: "",
168
+ searchBtnTextColor: "",
169
+ searchBtnRadius: 0,
170
+ searchBoxRadius: 30,
171
+ bottomBorder: "",
172
+ inputBorder: "",
147
173
  }
148
174
  },
149
175
  watch: {
@@ -154,6 +180,7 @@
154
180
  },
155
181
  created() {
156
182
  this.init(this.container);
183
+ this.isPreview = this.$configProject['isPreview'];
157
184
  },
158
185
  methods: {
159
186
  ...mapMutations(['setShowSwitchCity', 'setCityInfo']),
@@ -185,15 +212,26 @@
185
212
  this.locationIcon = getContainerPropsValue(container, "content.locationIcon", "icondizhitubiao")
186
213
  this.locationBackgroundColor = getContainerPropsValue(container, "content.locationBackgroundColor", "")
187
214
 
188
- this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
189
- this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
190
- this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
191
-
192
215
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
193
216
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
194
217
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '2');
195
218
 
196
-
219
+ this.searchBoxPosition = getContainerPropsValue(container, 'content.searchBoxPosition', "out");
220
+ this.searchIconPosition = getContainerPropsValue(container, 'content.searchIconPosition', "right");
221
+ this.showSearchBtn = getContainerPropsValue(container, 'content.showSearchBtn', "");
222
+ this.searchBtnPosition = getContainerPropsValue(container, 'content.searchBtnPosition', "out");
223
+ this.searchBtnText = getContainerPropsValue(container, 'content.searchBtnText', "");
224
+ this.searchBtnBgColor = getContainerPropsValue(container, 'content.searchBtnBgColor', "");
225
+ this.searchBtnTextColor = getContainerPropsValue(container, 'content.searchBtnTextColor', "");
226
+ this.searchBtnRadius = getContainerPropsValue(container, 'content.searchBtnRadius', 100);
227
+ this.searchBoxRadius = getContainerPropsValue(container, 'content.searchBoxRadius', 30);
228
+ let bottomBorder = getContainerPropsValue(container, 'content.bottomBorder', "Y");
229
+ this.bottomBorder = this.getBorderCompatibleOldStyle(bottomBorder, {
230
+ type: this.is_border,
231
+ width: this.is_border_w,
232
+ color: this.is_border_c
233
+ })
234
+ this.inputBorder = this.getXdBorder({}, getContainerPropsValue(container, 'content.inputBorder', {}))
197
235
 
198
236
  let name , logo, platform_logo;
199
237
  if (this.projectAttr['site_name']) name = this.projectAttr['site_name'];
@@ -203,16 +241,28 @@
203
241
  this.logo = platform_logo || logo || '//dummyimage.com/100x100';
204
242
  this.partnerName = name || '聚福宝福利';
205
243
 
206
-
207
-
244
+ if(this.isPreview){
245
+ document.querySelector('.xd-Layout__top').style.zIndex = 149099;
246
+ }
208
247
  },
209
248
  handleInput(e){
210
249
  this.keyword = e.detail.value;
250
+ //如果有搜索按钮,则不自动执行搜索
251
+ if(this.showSearchBtn === 'Y') return;
211
252
  if(this.timer) clearTimeout(this.timer);
212
253
  this.timer = setTimeout(() => {
213
254
  jfbRootFnExec(this, 'onCustomEvent')("baseHeader@search", e.detail.value);
214
255
  }, 300)
215
256
  },
257
+ doSearch(){
258
+ if(this.useSearch === "N"){
259
+ this.$xdUniHelper.navigateTo({
260
+ url: this.searchPagePath
261
+ })
262
+ }else{
263
+ jfbRootFnExec(this, 'onCustomEvent')("baseHeader@search", this.keyword);
264
+ }
265
+ },
216
266
  toSearch(){
217
267
  if(this.useSearch === 'N'){
218
268
  this.$xdUniHelper.navigateTo({
@@ -317,19 +367,49 @@
317
367
  .search_wrap{
318
368
  margin-left: unit(20, rpx);
319
369
  flex: 1;
320
- padding: 12rpx 20rpx;
370
+ padding: 0rpx 20rpx;
371
+ height: 64rpx;
321
372
  border-radius: unit(50, rpx);
322
373
  display: flex;
323
374
  align-items: center;
375
+ .header-city-in{
376
+ position: relative;
377
+ padding-right: 28rpx;
378
+ margin-right: 20rpx;
379
+ &::before{
380
+ content: " ";
381
+ position: absolute;
382
+ width: 2rpx;
383
+ height: 100%;
384
+ background-color: #CCCCCC;
385
+ right: -0rpx;
386
+ top: 0rpx;
387
+ }
388
+ ::v-deep .xd-city{
389
+ padding: 0;
390
+ }
391
+ }
324
392
  .search_input{
325
393
  flex: 1;
326
- text-align: center;
394
+ text-align: left;
327
395
  font-size: unit(28,rpx);
396
+ padding-left: 20rpx;
328
397
  }
329
398
  .search_placeholder{
399
+ flex: 1;
330
400
  width: 100%;
331
- text-align: center;
401
+ text-align: left;
332
402
  font-size: unit(28, rpx);
403
+ padding-left: 20rpx;
404
+ }
405
+ .search_btn_in{
406
+ height: 48rpx;
407
+ display: flex;
408
+ align-items: center;
409
+ justify-content: center;
410
+ padding: 4rpx 32rpx;
411
+ font-size: 28rpx;
412
+ box-sizing: border-box;
333
413
  }
334
414
  }
335
415
  }