jufubao-base 1.0.235 → 1.0.236-beta2

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.
@@ -13,12 +13,18 @@
13
13
  <view class="jfb-base-card-v3__edit-icon" @click="delEdit">删除</view>
14
14
  </view>
15
15
  <!-- #endif -->
16
- <view class="jfb-base-card-v3__body">
16
+ <view class="jfb-base-card-v3__body" :style="{
17
+ '--main-color': mainColor,
18
+ }">
17
19
  <view class="v3_title">选择登入票券</view>
18
20
  <view v-if="loadingCardList">
19
21
  <xd-card-v2-skeleton v-for="i in 3" :key="i"></xd-card-v2-skeleton>
20
22
  </view>
21
23
  <template v-else>
24
+ <view v-if="show_coupon_tab==='Y'" class="show_type_tab">
25
+ <view class="type_item" :class="{active: show_type==='normal'}" @click="switchShowType('normal')">已绑定票券</view>
26
+ <view class="type_item" :class="{active: show_type==='coupon'}" @click="switchShowType('coupon')">优惠券</view>
27
+ </view>
22
28
  <view class="card_list" v-if="cardList.length">
23
29
  <xd-card-v2
24
30
  v-for="(item, index) in cardList"
@@ -70,6 +76,9 @@
70
76
  ],
71
77
  data() {
72
78
  return {
79
+ options: {},
80
+ show_coupon_tab: "N",
81
+ show_type: "normal",
73
82
  cardList: [],
74
83
  inCallback: "",
75
84
  tabIndex: 1,
@@ -103,6 +112,7 @@
103
112
  },
104
113
  methods: {
105
114
  onJfbLoad(options) {
115
+ this.options = options;
106
116
  let { inCallback } = options;
107
117
  if(!inCallback) this.$storage.remove("inCallback"); //作为入口
108
118
  else {
@@ -118,10 +128,32 @@
118
128
  }
119
129
  this.inCallback = inCallback || this.settings.index;
120
130
 
131
+ this.getList();
132
+ },
133
+ /**
134
+ * @description 监听事件变化
135
+ * @param container {object} 业务组件对象自己
136
+ */
137
+ init(container) {
138
+ this.cardBindPath = getContainerPropsValue(container, "content.cardBindPath", {value: ""}).value;
139
+ this.changeUrl = getContainerPropsValue(container, "content.changeUrl", {value: ""}).value;
140
+ this.detailUrl = getContainerPropsValue(container, "content.detailUrl", {value: ""}).value;
141
+ this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
142
+ this.logged_name = getContainerPropsValue(container, "content.logged_name", "已登录");
143
+ this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
144
+ this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
145
+ this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
146
+ this.show_coupon_tab = getContainerPropsValue(container, "content.show_coupon_tab", "N");
147
+ },
148
+ getList(){
149
+ let options = this.options;
121
150
  let params = {is_all: 'Y'};
122
151
  if (options['jfb_business_code']) {
123
152
  params['card_business_code'] = options['jfb_business_code'];
124
153
  }
154
+ if(this.show_coupon_tab === 'Y'){
155
+ params.show_type = this.show_type;
156
+ }
125
157
 
126
158
  jfbRootExec("getListCardBind", {
127
159
  vm: this,
@@ -135,19 +167,8 @@
135
167
  }).filter((item) => item["is_valid"] === "Y");
136
168
  });
137
169
  },
138
- /**
139
- * @description 监听事件变化
140
- * @param container {object} 业务组件对象自己
141
- */
142
- init(container) {
143
- this.cardBindPath = getContainerPropsValue(container, "content.cardBindPath", {value: ""}).value;
144
- this.changeUrl = getContainerPropsValue(container, "content.changeUrl", {value: ""}).value;
145
- this.detailUrl = getContainerPropsValue(container, "content.detailUrl", {value: ""}).value;
146
- this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
147
- this.logged_name = getContainerPropsValue(container, "content.logged_name", "已登录");
148
- this.isShowBuy = getContainerPropsValue(container, "content.isShowBuy", "N");
149
- this.buy_name = getContainerPropsValue(container, "content.buy_name", "购买新卡");
150
- this.buy_new_url = getContainerPropsValue(container,"content.buy_new_url",{value: ""}).value;
170
+ switchShowType(type){
171
+ this.show_type = type;
151
172
  },
152
173
  toBindCard(){
153
174
  let path = this.getUrlCallback(this.cardBindPath)
@@ -231,6 +252,25 @@
231
252
  .jfb-base-card-v3 {
232
253
  &__body{
233
254
  padding: 0 24rpx;
255
+ .show_type_tab{
256
+ display: flex;
257
+ align-items: center;
258
+ margin-bottom: 24rpx;
259
+ .type_item{
260
+ padding: unit(5, rpx) unit(22, rpx);
261
+ text-align: center;
262
+ line-height: unit(60, rpx);
263
+ border-radius: unit(60, rpx);
264
+ color: #B8B7BE;
265
+ & + .type_item{
266
+ margin-left: unit(30, rpx);
267
+ }
268
+ &.active{
269
+ background-color: var(--main-color);
270
+ color: #FFFFFF;
271
+ }
272
+ }
273
+ }
234
274
  .v3_title{
235
275
  padding: 16rpx 40rpx;
236
276
  border-radius: 40rpx;
@@ -11,5 +11,5 @@ module.exports = {
11
11
  "street_name": "崇文街道"
12
12
  },
13
13
  "request_id": "6777935abebcfb20"
14
- }
14
+ }
15
15
  }
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Header
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: "getCityInfoByLocation",
10
+ title: '根据经纬度获取城市信息',
11
+ path: "/common/v1/region/city/get-code-by-geo",
12
+ isRule: false,
13
+ params: {
14
+ latitude: ['latitude', 'Number', true],
15
+ longitude: ['longitude', 'Number', true]
16
+ },
17
+ isConsole: true,
18
+ disabled: true
19
+ },
20
+ {
21
+ mapFnName: "getLoadingCityBaseHeaderByLocationLv4",
22
+ title: '根据经纬度获取城市信息',
23
+ path: "/common/v1/region/city/get-trans-lv4-by-geo",
24
+ isRule: false,
25
+ params: {
26
+ latitude: ['latitude', 'Number', true],
27
+ longitude: ['longitude', 'Number', true]
28
+ },
29
+ isConsole: true,
30
+ disabled: true
31
+ }
32
+ ];
@@ -0,0 +1,453 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * @description 当表单组件中有联动操作时候,使用方法进行返回
5
+ */
6
+ export default {
7
+ style: [],
8
+ content: (data) => {
9
+ return [
10
+ {
11
+ label: '',
12
+ ele: 'slot',
13
+ slot: 'is_reference_title',
14
+ groupKey:'advanced',
15
+ },
16
+ {
17
+ label: "搜索框是否可用于搜索",
18
+ ele: "xd-radio",
19
+ valueKey: "useSearch",
20
+ value: data.useSearch || "Y",
21
+ groupKey:'content',
22
+ list: [
23
+ {label: "用于搜索", value: "Y"},
24
+ {label: "用于跳转搜索页", value: "N"}
25
+ ]
26
+ },
27
+ {
28
+ label: "是否显示返回箭头",
29
+ ele: "xd-radio",
30
+ valueKey: "showBack",
31
+ groupKey:'content',
32
+ value: data.showBack || "Y",
33
+ list: [
34
+ {label: "显示", value: "Y"},
35
+ {label: "不显示", value: "N"}
36
+ ]
37
+ },
38
+ {
39
+ label: "是否显示当前定位",
40
+ ele: "xd-radio",
41
+ valueKey: "showLocation",
42
+ value: data.showLocation || "N",
43
+ groupKey:'content',
44
+ list: [
45
+ {label: "显示", value: "Y"},
46
+ {label: "不显示", value: "N"}
47
+ ]
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
+ },
61
+ // {
62
+ // label: "是否显示站点信息",
63
+ // ele: "xd-radio",
64
+ // valueKey: "showPartner",
65
+ // value: data.showPartner || "N",
66
+ // groupKey:'content',
67
+ // list: [
68
+ // {label: "显示", value: "Y"},
69
+ // {label: "不显示", value: "N"}
70
+ // ],
71
+ // },
72
+ {
73
+ label: "是否显示站点名称",
74
+ ele: "xd-radio",
75
+ valueKey: "showPartnerName",
76
+ groupKey:'content',
77
+ value: data.showPartnerName || "N",
78
+ list: [
79
+ {label: "显示", value: "Y"},
80
+ {label: "不显示", value: "N"}
81
+ ],
82
+ },
83
+ {
84
+ label: "搜索框提示文案",
85
+ ele: "el-input",
86
+ placeholder: '请输入搜索框提示文案',
87
+ valueKey: "placeholder",
88
+ groupKey:'content',
89
+ value: data.placeholder || '',
90
+ className: "input80"
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
+ },
194
+ {
195
+ label: '背景颜色:',
196
+ ele: 'xd-color',
197
+ valueKey: 'backgroundColor',
198
+ value: data.backgroundColor || '',
199
+ placeholder: '请选择背景颜色',
200
+ classNmae: 'input80',
201
+ groupKey:'style',
202
+ },
203
+ {
204
+ label: "底部边框设置:",
205
+ ele: "xd-border",
206
+ valueKey: "bottomBorder",
207
+ value: data['bottomBorder'] || {},
208
+ className: 'input80',
209
+ groupKey: 'style',
210
+ },
211
+ {
212
+ label: "站点信息展示位置:",
213
+ ele: "xd-radio",
214
+ valueKey: "sitePosition",
215
+ value: data.sitePosition || "flex-start",
216
+ list: [
217
+ {label: "靠左", value: "flex-start"},
218
+ {label: "居中", value: "center"},
219
+ {label: "靠右", value: "flex-end"}
220
+ ],
221
+ groupKey:'style',
222
+ },
223
+ {
224
+ ele: 'title',
225
+ label: '定位功能样式设置',
226
+ size: 'small',
227
+ groupKey:'style',
228
+ },
229
+ {
230
+ label: '文字颜色:',
231
+ ele: 'xd-color',
232
+ valueKey: 'textColor',
233
+ value: data.textColor || '',
234
+ placeholder: '请选择文字颜色',
235
+ classNmae: 'input80',
236
+ groupKey:'style',
237
+ },
238
+ data.showLocation==='Y'&&{
239
+ label: 'ICON:',
240
+ ele: 'el-input',
241
+ type: 'text',
242
+ groupKey:'style',
243
+ valueKey: 'locationIcon',
244
+ value: data['locationIcon'] || '',
245
+ placeholder: '请输入定位ICON',
246
+ className: 'input80',
247
+ },
248
+ data.showLocation==='Y'&&{
249
+ label: '背景颜色:',
250
+ ele: 'xd-color',
251
+ groupKey:'style',
252
+ valueKey: 'locationBackgroundColor',
253
+ value: data.locationBackgroundColor || '',
254
+ placeholder: '请选择定位背景颜色',
255
+ classNmae: 'input80',
256
+ },
257
+ {
258
+ ele: 'title',
259
+ label: '搜索框样式设置',
260
+ size: 'small',
261
+ groupKey:'style',
262
+ },
263
+ {
264
+ label: 'ICON:',
265
+ ele: 'el-input',
266
+ type: 'text',
267
+ valueKey: 'icon',
268
+ groupKey:'style',
269
+ value: data['icon'] || '',
270
+ placeholder: '请输入ICON',
271
+ className: 'input80',
272
+ },
273
+ {
274
+ label: 'ICON颜色:',
275
+ ele: 'xd-color',
276
+ valueKey: 'iconColor',
277
+ value: data.iconColor || '',
278
+ groupKey:'style',
279
+ placeholder: '请选择ICON颜色',
280
+ classNmae: 'input80',
281
+ },
282
+ {
283
+ label: '背景颜色:',
284
+ ele: 'xd-color',
285
+ valueKey: 'inputBackgroundColor',
286
+ value: data['inputBackgroundColor'] || '',
287
+ groupKey:'style',
288
+ placeholder: '请选择背景颜色',
289
+ className: 'input80',
290
+ },
291
+ {
292
+ label: '输入框文字颜色:',
293
+ ele: 'xd-color',
294
+ valueKey: 'inputTextColor',
295
+ groupKey:'style',
296
+ value: data['inputTextColor'] || '',
297
+ placeholder: '请选择输入框文字颜色',
298
+ className: 'input80',
299
+ },
300
+ {
301
+ label: "输入框边框设置:",
302
+ ele: "xd-border",
303
+ valueKey: "inputBorder",
304
+ value: data['inputBorder'] || {},
305
+ className: 'input80',
306
+ groupKey: 'style',
307
+ },
308
+ {
309
+ ele: 'title',
310
+ label: '边框设置',
311
+ size: 'small',
312
+ groupKey:'style',
313
+ hidden: true,
314
+ },
315
+ {
316
+ label: "是否展示快捷入口",
317
+ ele: "xd-radio",
318
+ valueKey: "showQuickEntry",
319
+ value: data.showQuickEntry || "N",
320
+ list: [
321
+ {label: "不显示", value: "N"},
322
+ {label: "显示", value: "Y"}
323
+ ],
324
+ groupKey:'content',
325
+ },
326
+ data.showQuickEntry==='Y'&&{
327
+ label: "快捷入口类型",
328
+ ele: "xd-radio",
329
+ valueKey: "quickEntryType",
330
+ value: data.quickEntryType || "service",
331
+ list: [
332
+ {label: "联系客服", value: "service"},
333
+ ],
334
+ notice:'<div style="color:red">客服功能仅在小程序下生效</div>',
335
+ groupKey:'content',
336
+ },
337
+ data.showQuickEntry==='Y'&&{
338
+ ele: 'title',
339
+ label: '快捷入口功能样式设置',
340
+ size: 'small',
341
+ groupKey:'style',
342
+ },
343
+ data.showQuickEntry==='Y'&&{
344
+ label: '文字颜色:',
345
+ ele: 'xd-color',
346
+ valueKey: 'quickTextColor',
347
+ value: data.quickTextColor || '',
348
+ placeholder: '请选择文字颜色',
349
+ classNmae: 'input80',
350
+ groupKey:'style',
351
+ },
352
+ data.showQuickEntry==='Y'&&{
353
+ label: 'ICON:',
354
+ ele: 'el-input',
355
+ type: 'text',
356
+ groupKey:'style',
357
+ valueKey: 'quickIcon',
358
+ value: data['quickIcon'] || '',
359
+ placeholder: '请输入快捷入口ICON',
360
+ className: 'input80',
361
+ },
362
+ data.showQuickEntry==='Y'&&{
363
+ label: '背景颜色:',
364
+ ele: 'xd-color',
365
+ groupKey:'style',
366
+ valueKey: 'quickBackgroundColor',
367
+ value: data.quickBackgroundColor || '',
368
+ placeholder: '请选择快捷入口背景颜色',
369
+ classNmae: 'input80',
370
+ },
371
+ {
372
+ label: '是否有边框:',
373
+ ele: 'xd-radio',
374
+ valueKey: 'is_border',
375
+ groupKey:'style',
376
+ value: data['is_border'] || 'N',
377
+ placeholder: '请选择是否有边框',
378
+ multiple: false,
379
+ className: 'input80',
380
+ list: [
381
+ {label: '是', value: 'Y'},
382
+ {label: '否', value: 'N'},
383
+ ],
384
+ hidden: true,
385
+ },
386
+ data['is_border'] === 'Y' && {
387
+ label: '边框颜色:',
388
+ ele: 'xd-color',
389
+ valueKey: 'is_border_c',
390
+ groupKey:'style',
391
+ value: data['is_border_c'] || '',
392
+ placeholder: '请选择边框颜色',
393
+ classNmae: 'input80',
394
+ hidden: true,
395
+ },
396
+ data['is_border'] === 'Y' && {
397
+ label: '边框大小:',
398
+ ele: 'el-input',
399
+ type: 'number',
400
+ groupKey:'style',
401
+ valueKey: 'is_border_w',
402
+ value: data['is_border_w'] || '',
403
+ placeholder: '请输入边框颜色',
404
+ className: 'input80',
405
+ hidden: true,
406
+ },
407
+ {
408
+ label: '搜索页面链接:',
409
+ ele: 'xd-select-pages-path',
410
+ valueKey: 'searchPagePath',
411
+ value: data['searchPagePath'] || {},
412
+ setting: {
413
+ router: XdBus.getParentApi('getPagesTree')
414
+ },
415
+ groupKey:'advanced',
416
+ inline:false,
417
+ notice:'搜索框“<span style="color:red">用于跳转搜索页</span>”时候生效',
418
+ },
419
+ {
420
+ label: '城市选择链接:',
421
+ ele: 'xd-select-pages-path',
422
+ valueKey: 'choseCityPath',
423
+ groupKey:'advanced',
424
+ placeholder: '选择城市选择链接',
425
+ value: data['choseCityPath'] || null,
426
+ setting: {
427
+ router: XdBus.getParentApi('getPagesTree'),
428
+ },
429
+ inline: false,
430
+ },
431
+ {
432
+ label: '快捷入口链接:',
433
+ ele: 'xd-select-pages-path',
434
+ valueKey: 'quickEntryPath',
435
+ groupKey:'advanced',
436
+ placeholder: '选择快捷入口链接',
437
+ value: data['quickEntryPath'] || null,
438
+ setting: {
439
+ router: XdBus.getParentApi('getPagesTree'),
440
+ },
441
+ notice:'<div><span style="color:red">客服类型</span>不需要配置</div>',
442
+ inline: false,
443
+ },
444
+ {
445
+ label: '',
446
+ ele: 'slot',
447
+ slot: 'is_reference',
448
+ groupKey:'advanced',
449
+ },
450
+ ].filter(i=>i)
451
+ },
452
+ advanced: [],
453
+ };