jufubao-base 1.0.197-beta4 → 1.0.197-beta5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.197-beta4",
3
+ "version": "1.0.197-beta5",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -287,8 +287,10 @@
287
287
  <view v-for="(item,index) in cardList" :key="item.card_number">
288
288
  <xd-card-new
289
289
  :item="item"
290
+ :tabIndex="subTabIndex"
290
291
  :cardBgColor="cardBgColor"
291
292
  :cardFontColor="cardFontColor"
293
+ :mainColor="mainColor"
292
294
  @onLogin="handleBindLogin(item,item['entries'][0])"
293
295
  @onClick="toDetail(item)"
294
296
  ></xd-card-new>
@@ -58,6 +58,7 @@ module.exports = {
58
58
  "other_card_point": 0,
59
59
  "is_exchange": "N",
60
60
  "is_transfering":"N",
61
+ "is_login":'Y',
61
62
  "card_point_type": 1,
62
63
  "business_codes": ["cake"]
63
64
  }, {
@@ -11,7 +11,14 @@
11
11
  <view class="card-center">
12
12
  <view><text class="_b">{{item.card_point}}</text>{{item.unit}}</view>
13
13
  <view>
14
- <xd-button type="primary" size="small" @click.stop="doLogin">登录</xd-button>
14
+ <xd-button type="primary" size="small"
15
+ :style="{
16
+ backgroundColor: item['is_login'] === 'Y' ? alphaColor: mainColor,
17
+ }"
18
+ @click.stop="doLogin"
19
+ >
20
+ {{ tabIndex === 1 ? (item['is_login'] === 'Y' ? "已登录" : "登录") : "票券转换"}}
21
+ </xd-button>
15
22
  </view>
16
23
  </view>
17
24
  <view class="card-bottom">
@@ -23,6 +30,7 @@
23
30
 
24
31
  <script>
25
32
  import XdButton from "@/components/XdButton/XdButton.vue"
33
+ import Color from "color"
26
34
  export default {
27
35
  components: {
28
36
  XdButton,
@@ -39,15 +47,24 @@
39
47
  },
40
48
  cardFontColor: {
41
49
  type: String,
42
- }
50
+ },
51
+ loggedBgColor: {
52
+ type: String,
53
+ },
54
+ mainColor: {
55
+ type: String,
56
+ },
57
+ tabIndex: {
58
+ type: Number,
59
+ },
43
60
  },
44
61
  data(){
45
62
  return {
46
-
63
+ alphaColor: "",
47
64
  }
48
65
  },
49
66
  created(){
50
-
67
+ this.alphaColor = Color(this.mainColor).alpha(0.1).string();
51
68
  },
52
69
  methods: {
53
70
  doLogin(){
@@ -200,6 +200,14 @@ export default {
200
200
  classNmae: 'input80',
201
201
  groupKey:'style',
202
202
  },
203
+ {
204
+ label: "底部边框设置:",
205
+ ele: "xd-border",
206
+ valueKey: "bottomBorder",
207
+ value: data['bottomBorder'] || {},
208
+ className: 'input80',
209
+ groupKey: 'style',
210
+ },
203
211
  {
204
212
  ele: 'title',
205
213
  label: '定位功能样式设置',
@@ -266,7 +274,7 @@ export default {
266
274
  value: data['inputBackgroundColor'] || '',
267
275
  groupKey:'style',
268
276
  placeholder: '请选择背景颜色',
269
- classNmae: 'input80',
277
+ className: 'input80',
270
278
  },
271
279
  {
272
280
  label: '输入框文字颜色:',
@@ -275,64 +283,15 @@ export default {
275
283
  groupKey:'style',
276
284
  value: data['inputTextColor'] || '',
277
285
  placeholder: '请选择输入框文字颜色',
278
- classNmae: 'input80',
279
- },
280
- {
281
- ele: 'title',
282
- label: '投影设置',
283
- size: 'small',
284
- groupKey:'style',
285
- },
286
- {
287
- label: '是否有投影:',
288
- ele: 'xd-radio',
289
- valueKey: 'is_shadow',
290
- value: data['is_shadow'] || 'N',
291
- placeholder: '请选择是否投影',
292
- groupKey:'style',
293
- multiple: false,
294
- className: 'input80',
295
- list: [
296
- {label: '是', value: 'Y'},
297
- {label: '否', value: 'N'},
298
- ]
299
- },
300
- data['is_shadow'] === 'Y' && {
301
- label: '投影颜色:',
302
- ele: 'xd-color',
303
- valueKey: 'is_shadow_bg',
304
- value: data['is_shadow_bg'] || '',
305
- groupKey:'style',
306
- placeholder: '请选择投影颜色',
307
- classNmae: 'input80',
308
- },
309
- data['is_shadow'] === 'Y' && {
310
- label: '投影范围:',
311
- ele: 'xd-site-select-list',
312
- groupKey:'style',
313
- valueKey: 'is_shadow_w',
314
- value: data['is_shadow_w'] || '10',
315
- placeholder: '请选择投影范围',
316
- multiple: false,
317
286
  className: 'input80',
318
- handleCustom({action, data}) {
319
- XdBus.getParentApi('getOptionsSettingList')({
320
- setting_id: 'edtix_style_radius',
321
- key: Date.now()
322
- })
323
- .then(res => {
324
- data.cb(res.list)
325
- })
326
- .catch(error => {
327
- console.error(error);
328
- });
329
- },
330
287
  },
288
+
331
289
  {
332
290
  ele: 'title',
333
291
  label: '边框设置',
334
292
  size: 'small',
335
293
  groupKey:'style',
294
+ hidden: true,
336
295
  },
337
296
  {
338
297
  label: '是否有边框:',
@@ -346,7 +305,8 @@ export default {
346
305
  list: [
347
306
  {label: '是', value: 'Y'},
348
307
  {label: '否', value: 'N'},
349
- ]
308
+ ],
309
+ hidden: true,
350
310
  },
351
311
  data['is_border'] === 'Y' && {
352
312
  label: '边框颜色:',
@@ -356,6 +316,7 @@ export default {
356
316
  value: data['is_border_c'] || '',
357
317
  placeholder: '请选择边框颜色',
358
318
  classNmae: 'input80',
319
+ hidden: true,
359
320
  },
360
321
  data['is_border'] === 'Y' && {
361
322
  label: '边框大小:',
@@ -366,6 +327,7 @@ export default {
366
327
  value: data['is_border_w'] || '',
367
328
  placeholder: '请输入边框颜色',
368
329
  className: 'input80',
330
+ hidden: true,
369
331
  },
370
332
  {
371
333
  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'">
@@ -108,15 +107,6 @@
108
107
  mixins: [componentsMixins,extsMixins,JfbBaseHeaderMixin],
109
108
  computed:{
110
109
  ...mapState(['siteInfo']),
111
-
112
- boxShadow() {
113
- if (this.is_shadow === 'Y') return `0 0 ${this.is_shadow_w}rpx ${this.is_shadow_bg}`;
114
- else return '0 0 0 rgba(0,0,0,0)';
115
- },
116
- boxBorder() {
117
- if (this.is_border === 'Y') return `${this.is_border_w}rpx solid ${this.is_border_c}`;
118
- else return '0';
119
- },
120
110
  searchBtnStyle(){
121
111
  return {
122
112
  background: this.searchBtnBgColor,
@@ -131,6 +121,7 @@
131
121
  saveKey: 'xd_user_current_access_city', //用户选中城市存储key
132
122
  loaded: false,
133
123
  keyword: "",
124
+ isPreview: false,
134
125
 
135
126
  //面板
136
127
  showLocation: "",
@@ -157,12 +148,6 @@
157
148
  icon: '',
158
149
  iconColor: '',
159
150
 
160
- //投影
161
- is_shadow: 'Y',
162
- is_shadow_bg: 0,
163
- is_shadow_w: 0,
164
-
165
-
166
151
  //边框
167
152
  is_border: 'Y',
168
153
  is_border_w: 0,
@@ -182,6 +167,7 @@
182
167
  searchBtnTextColor: "",
183
168
  searchBtnRadius: 0,
184
169
  searchBoxRadius: 30,
170
+ bottomBorder: "",
185
171
  }
186
172
  },
187
173
  watch: {
@@ -192,6 +178,7 @@
192
178
  },
193
179
  created() {
194
180
  this.init(this.container);
181
+ this.isPreview = this.$configProject['isPreview'];
195
182
  },
196
183
  methods: {
197
184
  ...mapMutations(['setShowSwitchCity', 'setCityInfo']),
@@ -223,10 +210,6 @@
223
210
  this.locationIcon = getContainerPropsValue(container, "content.locationIcon", "icondizhitubiao")
224
211
  this.locationBackgroundColor = getContainerPropsValue(container, "content.locationBackgroundColor", "")
225
212
 
226
- this.is_shadow = getContainerPropsValue(container, 'content.is_shadow', 'N');
227
- this.is_shadow_bg = getContainerPropsValue(container, 'content.is_shadow_bg', '#fff');
228
- this.is_shadow_w = getContainerPropsValue(container, 'content.is_shadow_w', '10');
229
-
230
213
  this.is_border = getContainerPropsValue(container, 'content.is_border', 'N');
231
214
  this.is_border_c = getContainerPropsValue(container, 'content.is_border_c', '#fff');
232
215
  this.is_border_w = getContainerPropsValue(container, 'content.is_border_w', '2');
@@ -240,6 +223,12 @@
240
223
  this.searchBtnTextColor = getContainerPropsValue(container, 'content.searchBtnTextColor', "");
241
224
  this.searchBtnRadius = getContainerPropsValue(container, 'content.searchBtnRadius', 0);
242
225
  this.searchBoxRadius = getContainerPropsValue(container, 'content.searchBoxRadius', 30);
226
+ let bottomBorder = getContainerPropsValue(container, 'content.bottomBorder', "Y");
227
+ this.bottomBorder = this.getBorderCompatibleOldStyle(bottomBorder, {
228
+ type: this.is_border,
229
+ width: this.is_border_w,
230
+ color: this.is_border_c
231
+ })
243
232
 
244
233
  let name , logo, platform_logo;
245
234
  if (this.projectAttr['site_name']) name = this.projectAttr['site_name'];
@@ -249,8 +238,9 @@
249
238
  this.logo = platform_logo || logo || '//dummyimage.com/100x100';
250
239
  this.partnerName = name || '聚福宝福利';
251
240
 
252
-
253
-
241
+ if(this.isPreview){
242
+ document.querySelector('.xd-Layout__top').style.zIndex = 149099;
243
+ }
254
244
  },
255
245
  handleInput(e){
256
246
  this.keyword = e.detail.value;
@@ -403,9 +393,11 @@
403
393
  padding-left: 20rpx;
404
394
  }
405
395
  .search_placeholder{
396
+ flex: 1;
406
397
  width: 100%;
407
398
  text-align: left;
408
399
  font-size: unit(28, rpx);
400
+ padding-left: 20rpx;
409
401
  }
410
402
  }
411
403
  }
@@ -397,6 +397,14 @@ export default {
397
397
  groupKey:'content',
398
398
  hidden: data.showCategory !== "Y" || data.navExpand !== "Y"
399
399
  },
400
+ {
401
+ label: '单个导航字体颜色:',
402
+ ele: "xd-color",
403
+ valueKey: "navFontColor",
404
+ value: data.navFontColor,
405
+ groupKey:'content',
406
+ hidden: data.showCategory !== "Y" || data.navExpand !== "Y"
407
+ },
400
408
  {
401
409
  label: "导航横向间距:",
402
410
  ele: "el-input",
@@ -27,13 +27,13 @@
27
27
  >{{ site_name }}</view>
28
28
  </view>
29
29
  <view v-if="showCategory === 'Y'" class="box_r" @click="isExtendCate=!isExtendCate">
30
- <xd-font-icon :icon=" categoryIcon || 'iconfenlei1'"></xd-font-icon>
30
+ <xd-font-icon :icon=" categoryIcon || 'iconfenlei1'" :color="siteNameFont.color"></xd-font-icon>
31
31
  </view>
32
32
  </view>
33
33
  <view v-if="isExtendCate && showCategory==='Y'" class="cate_pop" :style="[catePopBoxStyle]">
34
34
  <view class="cate_list" :style="[cateListBoxStyle]">
35
35
  <view class="cate_item"
36
- v-for="item in cateList" :key="item"
36
+ v-for="(item, i) in cateList" :key="i"
37
37
  :style="[cateItemBoxStyle]"
38
38
  @click="handleClick(item)"
39
39
  >
@@ -46,6 +46,7 @@
46
46
  </view>
47
47
 
48
48
  </view>
49
+ <view v-if="isExtendCate && showCategory==='Y'" class="_modal"></view>
49
50
  </view>
50
51
  </view>
51
52
  </template>
@@ -89,6 +90,7 @@
89
90
  iconWidth: "",
90
91
  iconHeight: "",
91
92
  navBgColor: "",
93
+ navFontColor: "",
92
94
  navColumnGap: "",
93
95
  navRowGap: "",
94
96
  navExpand: "",
@@ -117,7 +119,8 @@
117
119
  },
118
120
  cateItemBoxStyle(){
119
121
  return {
120
- backgroundColor: this.navBgColor
122
+ backgroundColor: this.navBgColor,
123
+ color: this.navFontColor
121
124
  }
122
125
  },
123
126
  cateIconStyle(){
@@ -190,6 +193,7 @@
190
193
  this.iconWidth = getContainerPropsValue(container, 'content.iconWidth', 100);
191
194
  this.iconHeight = getContainerPropsValue(container, 'content.iconHeight', 100);
192
195
  this.navBgColor = getContainerPropsValue(container, 'content.navBgColor', '');
196
+ this.navFontColor = getContainerPropsValue(container, 'content.navFontColor', '');
193
197
  this.navColumnGap = getContainerPropsValue(container, 'content.navColumnGap', 10);
194
198
  this.navRowGap = getContainerPropsValue(container, 'content.navRowGap', 10);
195
199
  this.navExpand = getContainerPropsValue(container, 'content.navExpand', '');
@@ -205,8 +209,13 @@
205
209
 
206
210
  this.useNumber = this.navRow * this.navColumn;
207
211
  if(this.isPreview){
208
- if(!this.cateList.length) this.handleOne(this.getTestData());
212
+ this.handleOne(this.getTestData());
209
213
  this.isExtendCate = this.navExpand === 'Y' ? true : false;
214
+ if(this.isExtendCate){
215
+ document.querySelector('.xd-Layout__top').style.zIndex = 149099;
216
+ }else{
217
+ document.querySelector('.xd-Layout__top').style.zIndex = 1490;
218
+ }
210
219
  }
211
220
  },
212
221
  handleClick(item) {
@@ -378,8 +387,18 @@
378
387
 
379
388
  .jfb-base-header-elephant {
380
389
  &__body{
390
+ ._modal{
391
+ position: fixed;
392
+ top: 0;
393
+ left: 0;
394
+ width: 100vh;
395
+ height: 100vh;
396
+ background: rgba(0, 0, 0, .5);
397
+ z-index: 999;
398
+ }
381
399
  .box_wrap{
382
400
  position: relative;
401
+ z-index: 1000;
383
402
  .cate_pop{
384
403
  top: 100%;
385
404
  left: 0;
@@ -275,6 +275,32 @@ export default {
275
275
  { label: '否', value: 'N' },
276
276
  ]
277
277
  },
278
+ {
279
+ label: "按钮长度:",
280
+ ele: "el-input",
281
+ valueKey: "btnConfirmWidth",
282
+ value: data['btnConfirmWidth'] || '',
283
+ placeholder: '请输入按钮长度',
284
+ className: 'input60',
285
+ groupKey: "content",
286
+ },
287
+ {
288
+ label: "按钮背景颜色:",
289
+ ele: "xd-color",
290
+ valueKey: "btnConfirmBgColor",
291
+ groupKey:'content',
292
+ value: data['btnConfirmBgColor'] || '',
293
+ placeholder: '请选择按钮背景颜色',
294
+ groupKey: "content",
295
+ },
296
+ {
297
+ label: "按钮文字颜色:",
298
+ ele: "xd-color",
299
+ valueKey: "btnConfirmTextColor",
300
+ groupKey:'content',
301
+ value: data['btnConfirmTextColor'] || '',
302
+ placeholder: '请选择按钮文字颜色',
303
+ },
278
304
  {
279
305
  ele: 'title',
280
306
  label: '静态显示',
@@ -220,7 +220,11 @@
220
220
  backgroundColor: '',
221
221
  is_hide_dailog:'N',
222
222
 
223
- isMp:false
223
+ isMp:false,
224
+
225
+ btnConfirmWidth: "",
226
+ btnConfirmBgColor: "",
227
+ btnConfirmTextColor: "",
224
228
  }
225
229
  },
226
230
  watch: {
@@ -330,11 +334,16 @@
330
334
  this.scrollMargin = getContainerPropsValue(container, 'content.scrollMargin', {});
331
335
  this.radius = getContainerPropsValue(container, 'content.radius', 0);
332
336
  this.fontSize = Number(getContainerPropsValue(container, 'content.fontSize', '20'));
337
+ this.btnConfirmWidth = getContainerPropsValue(container, 'content.btnConfirmWidth', '');
338
+ this.btnConfirmBgColor = getContainerPropsValue(container, 'content.btnConfirmBgColor', '');
339
+ this.btnConfirmTextColor = getContainerPropsValue(container, 'content.btnConfirmTextColor', '');
333
340
  if (this.fontSize === 20) this.titleFontSize = 28;
334
341
  if (this.fontSize === 26) this.titleFontSize = 36;
335
342
  if (this.fontSize === 36) this.titleFontSize = 44;
336
343
  this.isTitle = getContainerPropsValue(container, 'content.isTitle', false);
337
344
 
345
+ console.log("this.btnConfirmTextColor", this.btnConfirmTextColor);
346
+
338
347
  if(this.style === '2') {
339
348
  this.num = getContainerPropsValue(container, 'content.num', 1);
340
349
  //#ifdef H5
@@ -358,6 +367,9 @@
358
367
  isHtml: true,
359
368
  zIndex: 2000,
360
369
  cancel: false,
370
+ btnConfirmWidth: this.btnConfirmWidth,
371
+ btnConfirmBgColor: this.btnConfirmBgColor,
372
+ btnConfirmTextColor: this.btnConfirmTextColor,
361
373
  });
362
374
  },
363
375
 
@@ -65,9 +65,6 @@ export default {
65
65
  action: 'aliyun',
66
66
  sort: true, //当上传图片列表时候,是否启用排序
67
67
  maxlen: 100, //当上传图片列表时候,最大数量数量
68
- rules: [
69
- { required: true, message: '请上传图片', trigger: ['blur', 'change'] },
70
- ]
71
68
  },
72
69
  {
73
70
  label: '内容背景颜色:',