jufubao-base 1.0.184-beta2 → 1.0.185

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.
@@ -7,30 +7,6 @@ export default {
7
7
  style: [],
8
8
  content: (data) => {
9
9
  return [
10
- {
11
- label: '我的账户自定义名称:',
12
- ele: 'el-input',
13
- type: 'text',
14
- valueKey: 'accountName',
15
- groupKey:'content',
16
- value: data['accountName'] || '',
17
- placeholder: '请我的账户自定义名称',
18
- className: 'input80',
19
- rules: [
20
- {
21
- required: false,
22
- validator: (rule, value, callback) => {
23
- value = value.trim();
24
- if(value.length === 0) return callback()
25
- if (value.length < 2 || value.length > 6) callback('我的账户自定义名称长度为:2-6字符');
26
- else callback()
27
- },
28
- trigger: 'blur'
29
- }
30
- ],
31
- notice: '我的账户自定义名称设置,默认值:<span style="color:red">我的账户</span>,长度为:2-6字符',
32
- inline: false,
33
- },
34
10
  {
35
11
  label: '更改分类label(可排序):',
36
12
  ele: 'xd-set-sort-label',
@@ -57,26 +33,7 @@ export default {
57
33
  value: 'score',
58
34
  sort: 3
59
35
  },
60
- ],
61
- rules: [
62
- {
63
- required: false,
64
- validator: (rule, value, callback) => {
65
- let yes = [];
66
- if(value.length === 0) return callback()
67
- value.map(item=>{
68
- if(item.newLabel && (item.newLabel.length < 2 || item.newLabel.length > 4)) {
69
- yes.push(item.label)
70
- }
71
- });
72
- if (yes.length > 0) callback('分类名称长度为:2-4字符');
73
- else callback()
74
- },
75
- trigger: 'blur'
76
- }
77
- ],
78
- notice: '自定义分类名称长度为:2-4字符',
79
- inline: false,
36
+ ]
80
37
  },
81
38
  {
82
39
  label: '是否展示票券入口:',
@@ -89,6 +46,7 @@ export default {
89
46
  { "label": "否", "value": 'N' },
90
47
  ]
91
48
  },
49
+
92
50
  {
93
51
  label: '是否展示元宝入口:',
94
52
  ele: 'xd-radio',
@@ -122,302 +80,6 @@ export default {
122
80
  },
123
81
  inline: false,
124
82
  },
125
-
126
- //style
127
- {
128
- label: '行间距:',
129
- ele: 'el-input',
130
- type: 'number',
131
- valueKey: 'rowSpacing',
132
- groupKey:'style',
133
- value: data.rowSpacing|| '',
134
- placeholder: '请输入行间距',
135
- className: 'input60',
136
- inline: false,
137
- notice: '设置间距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">10</span>像素',
138
- },
139
- {
140
- label: '列间距:',
141
- ele: 'el-input',
142
- type: 'number',
143
- groupKey:'style',
144
- valueKey: 'columnSpacing',
145
- value: data['columnSpacing'] || '',
146
- notice: '列间距设置,单位:像素,默认值:<span style="color:red">20</span> px',
147
- inline: false,
148
- className: 'input60',
149
- },
150
- {
151
- ele: 'title',
152
- label: '轮廓设置',
153
- size: 'small',
154
- groupKey:'style',
155
- },
156
- {
157
- label: '外边距:',
158
- ele: 'xd-margin-padding',
159
- valueKey: 'bodyMargin',
160
- groupKey:'style',
161
- value: data['bodyMargin'] || null,
162
- setting: {
163
- type: 'margin',
164
- },
165
- placeholder: '请设置外边距',
166
- inline: false,
167
- notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
168
- },
169
- {
170
- label: '外填充:',
171
- ele: 'xd-margin-padding',
172
- valueKey: 'bodyPadding',
173
- groupKey:'style',
174
- value: data['bodyPadding'] || null,
175
- setting: {
176
- type: 'padding',
177
- },
178
- placeholder: '请设置外填充',
179
- inline: false,
180
- notice: '设置填充值,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
181
- },
182
- {
183
- label: '背景颜色:',
184
- ele: 'xd-color',
185
- valueKey: 'bodyBgColor',
186
- groupKey:'style',
187
- value: data['bodyBgColor'] || null,
188
- placeholder: '请选择背景颜色',
189
- classNmae: 'input80',
190
- },
191
- {
192
- label: '圆角设置:',
193
- ele: 'xd-site-select-list',
194
- valueKey: 'bodyRadius',
195
- groupKey:'style',
196
- value: data['bodyRadius'],
197
- placeholder: '请选择圆角设置',
198
- multiple: false,
199
- className: 'input80',
200
- handleCustom({action, data}) {
201
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
202
- .then(res => {
203
- data.cb(res.list)
204
- })
205
- .catch(error => {
206
- console.error(error);
207
- });
208
- },
209
- },
210
- {
211
- ele: 'title',
212
- label: '标题设置',
213
- size: 'small',
214
- groupKey:'style',
215
- },
216
- {
217
- label: "标题样式设置",
218
- ele: "xd-text-and-bgc",
219
- groupKey:'style',
220
- valueKey: 'titleStyle',
221
- value: data['titleStyle'] || null,
222
- setting: {
223
- fontSize: true,
224
- color: true,
225
- bgColor: false,
226
- weight: true,
227
- selected:false
228
- },
229
- handleCustom({action, data}) {
230
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
231
- .then(res => {
232
- data.cb(res.list)
233
- })
234
- .catch(error => {
235
- console.error(error);
236
- data.cb([])
237
- });
238
- },
239
- },
240
-
241
- {
242
- ele: 'title',
243
- label: '列表轮廓设置',
244
- size: 'small',
245
- groupKey:'style',
246
- },
247
- {
248
- label: '填充:',
249
- ele: 'xd-margin-padding',
250
- valueKey: 'contPadding',
251
- groupKey:'style',
252
- value: data['contPadding'] || null,
253
- setting: {
254
- type: 'padding',
255
- },
256
- placeholder: '请设置外填充',
257
- inline: false,
258
- notice: '设置填充值,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
259
- },
260
- {
261
- label: '背景颜色:',
262
- ele: 'xd-color',
263
- valueKey: 'contBgColor',
264
- groupKey:'style',
265
- value: data['contBgColor'] || null,
266
- placeholder: '请选择背景颜色',
267
- classNmae: 'input80',
268
- },
269
- {
270
- label: '圆角设置:',
271
- ele: 'xd-site-select-list',
272
- valueKey: 'contRadius',
273
- groupKey:'style',
274
- value: data['contRadius'],
275
- placeholder: '请选择圆角设置',
276
- multiple: false,
277
- className: 'input80',
278
- handleCustom({action, data}) {
279
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
280
- .then(res => {
281
- data.cb(res.list)
282
- })
283
- .catch(error => {
284
- console.error(error);
285
- });
286
- },
287
- },
288
- {
289
- label: '投影设置:',
290
- ele: 'xd-shadow',
291
- groupKey:'style',
292
- valueKey: 'contShadow',
293
- value: data['contShadow'] || '',
294
- setting: {
295
- selected: 'N'
296
- },
297
- handleCustom({action, data}) {
298
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
299
- .then(res => {
300
- data.cb(res.list)
301
- })
302
- .catch(error => {
303
- console.error(error);
304
- data.cb([])
305
- });
306
- },
307
- },
308
- {
309
- label: '边框设置:',
310
- ele: 'xd-border',
311
- groupKey:'style',
312
- valueKey: 'contBorder',
313
- value: data['contBorder'] || {},
314
- setting: {
315
- selected:'N'
316
- },
317
- },
318
-
319
- {
320
- ele: 'title',
321
- label: '列表样式设置',
322
- size: 'small',
323
- groupKey:'style',
324
- },
325
- {
326
- label: '填充:',
327
- ele: 'xd-margin-padding',
328
- valueKey: 'itemPadding',
329
- groupKey:'style',
330
- value: data['itemPadding'] || null,
331
- setting: {
332
- type: 'padding',
333
- },
334
- placeholder: '请设置外填充',
335
- inline: false,
336
- notice: '设置填充值,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">30px 30px 0 0</span>像素',
337
- },
338
- {
339
- label: "标题样式设置",
340
- ele: "xd-text-and-bgc",
341
- groupKey:'style',
342
- valueKey: 'itemStyle',
343
- value: data['itemStyle'] || null,
344
- setting: {
345
- fontSize: true,
346
- color: true,
347
- bgColor: false,
348
- weight: true,
349
- selected:false
350
- },
351
- handleCustom({action, data}) {
352
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_font_size'})
353
- .then(res => {
354
- data.cb(res.list)
355
- })
356
- .catch(error => {
357
- console.error(error);
358
- data.cb([])
359
- });
360
- },
361
- },
362
- {
363
- label: '背景颜色:',
364
- ele: 'xd-color',
365
- valueKey: 'itemBgColor',
366
- groupKey:'style',
367
- value: data['itemBgColor'] || null,
368
- placeholder: '请选择背景颜色',
369
- classNmae: 'input80',
370
- },
371
- {
372
- label: '圆角设置:',
373
- ele: 'xd-site-select-list',
374
- valueKey: 'itemRadius',
375
- groupKey:'style',
376
- value: data['itemRadius'],
377
- placeholder: '请选择圆角设置',
378
- multiple: false,
379
- className: 'input80',
380
- handleCustom({action, data}) {
381
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
382
- .then(res => {
383
- data.cb(res.list)
384
- })
385
- .catch(error => {
386
- console.error(error);
387
- });
388
- },
389
- },
390
- {
391
- label: '投影设置:',
392
- ele: 'xd-shadow',
393
- groupKey:'style',
394
- valueKey: 'itemShadow',
395
- value: data['itemShadow'] || '',
396
- setting: {
397
- selected: 'N'
398
- },
399
- handleCustom({action, data}) {
400
- XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_style_radius'})
401
- .then(res => {
402
- data.cb(res.list)
403
- })
404
- .catch(error => {
405
- console.error(error);
406
- data.cb([])
407
- });
408
- },
409
- },
410
- {
411
- label: '边框设置:',
412
- ele: 'xd-border',
413
- groupKey:'style',
414
- valueKey: 'itemBorder',
415
- value: data['itemBorder'] || {},
416
- setting: {
417
- selected:'N'
418
- },
419
- },
420
-
421
83
  {
422
84
  label: '票券跳转路径:',
423
85
  ele: 'xd-select-pages-path',
@@ -14,29 +14,21 @@
14
14
  </view>
15
15
  <!-- #endif -->
16
16
  <view class="jfb-base-wallet__body">
17
- <view class="x-line"></view>
18
17
  <template v-if="showContent">
19
- <view :style="[{
20
- margin:marginComp,
21
- padding:paddingComp,
22
- backgroundColor:bodyBgColor,
23
- borderRadius:bodyRadius+'rpx'
24
- }]">
25
- <view class="jfb-base-wallet__body-title" :style="[titleStyleComp]">{{accountName}}</view>
26
- <view class="jfb-base-wallet__body-type" :style="[contStyleComp]" v-if="showType.length > 0">
27
- <view
28
- :style="[itemStyleComp]"
29
- v-for="(item, index) in showType"
30
- @click="handleJumpTo(item)"
31
- :key="index"
32
- class="jfb-base-wallet__body-type-item"
33
- >
34
- <XdFontIcon :icon="item.icon"></XdFontIcon>
35
- <view>{{ item.label }}</view>
36
- </view>
18
+ <view class="jfb-base-wallet__body-title">我的账户</view>
19
+ <view class="jfb-base-wallet__body-type" v-if="showType.length > 0">
20
+ <view
21
+ :style="{marginRight: index === showType.length - 1 ? '0' : '36rpx',}"
22
+ v-for="(item, index) in showType"
23
+ @click="handleJumpTo(item)"
24
+ :key="index"
25
+ class="jfb-base-wallet__body-type-item"
26
+ >
27
+ <XdFontIcon :icon="item.icon"></XdFontIcon>
28
+ <view>{{ item.label }}</view>
37
29
  </view>
38
- <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
39
30
  </view>
31
+ <view v-else class="jfb-base-wallet__body-type notice" :style="{backgroundColor:backgroundColor, color:warningColor}">我的账户无配置数据,在正式环境将不显示改模块</view>
40
32
  </template>
41
33
  </view>
42
34
  </view>
@@ -80,35 +72,6 @@ export default {
80
72
  isCard: "Y",
81
73
  isYuanbao: "Y",
82
74
  isIntegral: "Y",
83
- accountName:'我的账户',
84
-
85
- //标题
86
- titleStyle:{},
87
-
88
- //轮廓
89
- bodyRadius:'0',
90
- bodyMargin:{},
91
- bodyPadding:{},
92
- rowSpacing:10,
93
- columnSpacing:20,
94
- bodyBgColor:'rgba(0,0,0,0)',
95
-
96
- //content
97
- contPadding:{},
98
- contBgColor:'rgba(0,0,0,0)',
99
- contRadius:'10',
100
- contShadow:'0 0 0 rgba(0,0,0,0)',
101
- contBorder:{},
102
-
103
- //item
104
- itemPadding:{},
105
- itemBgColor:'rgba(0,0,0,0)',
106
- itemRadius:'10',
107
- itemShadow: '0 0 0 rgba(0,0,0,0)',
108
- itemBorder:{},
109
-
110
-
111
- //高级
112
75
  cardPath: "",
113
76
  yuanbaoPath: "",
114
77
  integralPath: "",
@@ -214,86 +177,7 @@ export default {
214
177
  showContent(){
215
178
  if(this.$configProject.isPreview) return true;
216
179
  return this.showType.length > 0;
217
- },
218
-
219
- titleStyleComp(){
220
- return {
221
- fontSize: this.titleStyle.fontSize || '28rpx',
222
- color: `${this.titleStyle.color || '#333'}`,
223
- fontWeight: `${this.titleStyle.fontWeight || 'normal'}`,
224
- marginBottom: `${this.rowSpacing}rpx`,
225
- }
226
- },
227
-
228
- marginComp() {
229
- let str = `${this.checkValue(this.bodyMargin.top, 0)}rpx`;
230
- str = `${str} ${this.checkValue(this.bodyMargin.right, 0)}rpx`;
231
- str = `${str} ${this.checkValue(this.bodyMargin.bottom, 0)}rpx`;
232
- str = `${str} ${this.checkValue(this.bodyMargin.left, 0)}rpx`;
233
- return str
234
- },
235
-
236
- paddingComp() {
237
- let str = `${this.checkValue(this.bodyPadding.top, 20)}rpx`;
238
- str = `${str} ${this.checkValue(this.bodyPadding.right, 20)}rpx`;
239
- str = `${str} ${this.checkValue(this.bodyPadding.bottom, 20)}rpx`;
240
- str = `${str} ${this.checkValue(this.bodyPadding.left, 20)}rpx`;
241
- return str
242
- },
243
-
244
- contStyleComp(){
245
- let str = `${this.checkValue(this.contPadding.top, 20)}rpx`;
246
- str = `${str} ${this.checkValue(this.contPadding.right, 20)}rpx`;
247
- str = `${str} ${this.checkValue(this.contPadding.bottom, 20)}rpx`;
248
- str = `${str} ${this.checkValue(this.contPadding.left, 20)}rpx`;
249
- let border = {
250
- borderWidth: '2rpx',
251
- borderStyle: 'solid',
252
- borderColor: '#eee',
253
- }
254
- if(this.contBorder && this.contBorder.type === 'Y') {
255
- let value = this.contBorder.value || {};
256
- if(value.color) border.borderColor = value.color;
257
- if(value.style) border.borderStyle = value.style;
258
- if(value.width) border.borderWidth = value.width + 'rpx';
259
- }
260
-
261
- return {
262
- padding: str,
263
- backgroundColor: this.contBgColor,
264
- borderRadius: this.contRadius + 'rpx',
265
- boxShadow: this.contShadow,
266
- ...border,
267
- }
268
- },
269
-
270
- itemStyleComp(){
271
- let str = `${this.checkValue(this.itemPadding.top, 30)}rpx`;
272
- str = `${str} ${this.checkValue(this.itemPadding.right, 0)}rpx`;
273
- str = `${str} ${this.checkValue(this.itemPadding.bottom, 30)}rpx`;
274
- str = `${str} ${this.checkValue(this.itemPadding.left, 0)}rpx`;
275
-
276
- let border = {
277
- borderWidth: '2rpx',
278
- borderStyle: 'solid',
279
- borderColor: '#eee',
280
- }
281
- if(this.itemBorder && this.itemBorder.type === 'Y') {
282
- let value = this.itemBorder.value || {};
283
- if(value.color) border.borderColor = value.color;
284
- if(value.style) border.borderStyle = value.style;
285
- if(value.width) border.borderWidth = value.width + 'rpx';
286
- }
287
-
288
- return {
289
- padding: str,
290
- backgroundColor: this.itemBgColor,
291
- borderRadius: this.itemRadius + 'rpx',
292
- marginRight: this.columnSpacing + 'rpx',
293
- boxShadow: this.itemShadow,
294
- ...border
295
- }
296
- },
180
+ }
297
181
  },
298
182
  created() {
299
183
  this.backgroundColor = Color(this.warningColor).alpha(0.2).toString();
@@ -312,41 +196,34 @@ export default {
312
196
  init(container) {
313
197
  this.newLabel = getContainerPropsValue(container, "content.newLabel", []);
314
198
  this.isCard = getContainerPropsValue(container, "content.isCard", "Y");
315
- this.isYuanbao = getContainerPropsValue(container, "content.isYuanbao", "Y");
316
- this.isIntegral = getContainerPropsValue(container, "content.isIntegral", "Y");
317
- this.accountName = getContainerPropsValue(container, "content.accountName", "我的账户");
318
- this.rowSpacing = Number(getContainerPropsValue(container, "content.rowSpacing", 10));
319
- this.columnSpacing = Number(getContainerPropsValue(container, "content.columnSpacing", 20));
320
- this.bodyBgColor = getContainerPropsValue(container, "content.bodyBgColor", 'rgba(0,0,0,0)');
321
- this.bodyPadding = getContainerPropsValue(container, "content.bodyPadding", {});
322
- this.bodyMargin = getContainerPropsValue(container, "content.bodyMargin", {});
323
- this.bodyRadius = getContainerPropsValue(container, "content.bodyRadius", '0');
324
-
325
- //标题
326
- this.titleStyle = getContainerPropsValue(container, 'content.titleStyle', {});
327
-
328
- //content
329
- this.contPadding = getContainerPropsValue(container, "content.contPadding", {});
330
- this.contBgColor = getContainerPropsValue(container, "content.contBgColor", 'rgba(0,0,0,0)');
331
- this.contRadius = getContainerPropsValue(container, "content.contRadius", '10');
332
- this.contBorder = getContainerPropsValue(container, "content.contBorder", {});
333
- this.contShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.contShadow', {}))
334
-
335
-
336
- //item
337
- this.itemPadding = getContainerPropsValue(container, 'content.itemPadding', {});
338
- this.itemBgColor = getContainerPropsValue(container, 'content.itemBgColor', 'rgba(0,0,0,0)');
339
- this.itemRadius = getContainerPropsValue(container, 'content.itemRadius', '10');
340
- this.itemShadow = this.getXdShadow({width:20, color:'rgba(0,0,0,.3)'},getContainerPropsValue(container, 'content.itemShadow', {}))
341
- this.itemBorder = getContainerPropsValue(container, "content.itemBorder", {});
342
-
343
- //高级
344
- this.cardPath = getContainerPropsValue(container, "content.cardPath", {value: "",}).value;
345
- this.yuanbaoPath = getContainerPropsValue(container, "content.yuanbaoPath", { value: "" }).value;
346
- this.integralPath = getContainerPropsValue(container, "content.integralPath", { value: "" }).value;
199
+ this.isYuanbao = getContainerPropsValue(
200
+ container,
201
+ "content.isYuanbao",
202
+ "Y"
203
+ );
204
+ this.isIntegral = getContainerPropsValue(
205
+ container,
206
+ "content.isIntegral",
207
+ "Y"
208
+ );
209
+ this.cardPath = getContainerPropsValue(container, "content.cardPath", {
210
+ value: "",
211
+ }).value;
212
+
213
+ this.yuanbaoPath = getContainerPropsValue(
214
+ container,
215
+ "content.yuanbaoPath",
216
+ { value: "" }
217
+ ).value;
218
+
219
+ this.integralPath = getContainerPropsValue(
220
+ container,
221
+ "content.integralPath",
222
+ { value: "" }
223
+ ).value;
347
224
  },
348
225
  handleJumpTo(item) {
349
- if(this.$configProject.isPreview) return;
226
+ console.log(item, "ppppp");
350
227
  switch (item.value) {
351
228
  case "card":
352
229
  this.$xdUniHelper.navigateTo({
@@ -380,20 +257,22 @@ export default {
380
257
  .jfb-base-wallet {
381
258
  &__body {
382
259
  &-title {
383
- min-height: 64rpx;
384
- line-height: 64rpx;
260
+ padding: 20rpx;
385
261
  }
386
262
  &-type {
387
263
  display: flex;
388
264
  border-radius: 20rpx;
389
265
  background: rgba(255, 255, 255, 1);
390
266
  border: 1rpx solid rgba(238, 238, 238, 1);
267
+ padding: 32rpx 48rpx 32rpx 48rpx;
268
+ margin: 0 20rpx 0;
391
269
 
392
270
  &.notice {
393
271
  font-size: 26rpx;
394
272
  }
395
273
 
396
274
  &-item {
275
+ color: #999999;
397
276
  flex: 1;
398
277
  display: flex;
399
278
  flex-direction: column;
@@ -401,9 +280,12 @@ export default {
401
280
  justify-content: center;
402
281
  font-size: 24rpx;
403
282
  border: 2rpx solid #eeeeee;
404
-
405
- &:last-child{
406
- margin-right: 0!important;
283
+ border-radius: 16rpx;
284
+ background: #ffffff;
285
+ padding: 16rpx 0;
286
+ margin-right: 36rpx;
287
+ & > view:nth-child(2) {
288
+ margin-top: 12rpx;
407
289
  }
408
290
  }
409
291
  }