jufubao-base 1.0.217 → 1.0.218-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.
- package/package.json +1 -1
- package/src/components/JfbBaseCard/Attr.js +35 -0
- package/src/components/JfbBaseCard/JfbBaseCard.vue +91 -17
- package/src/components/JfbBaseCardEntry/Attr.js +35 -0
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +23 -1
- package/src/components/JfbBaseCardV2/Attr.js +35 -0
- package/src/components/JfbBaseCardV2/JfbBaseCardV2.vue +95 -41
- package/src/components/JfbBaseCardV3/Attr.js +35 -0
- package/src/components/JfbBaseCardV3/JfbBaseCardV3.vue +23 -1
- package/src/components/JfbBaseHeader/Attr.js +70 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +61 -1
- package/src/components/JfbBaseNoticeDialog/Api.js +22 -0
- package/src/components/JfbBaseNoticeDialog/Attr.js +290 -0
- package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +284 -0
- package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogLess.less +79 -0
- package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialogMixin.js +30 -0
- package/src/components/JfbBaseNoticeDialog/Mock.js +5 -0
- package/src/components/JfbBaseTfkCardLogin/Attr.js +35 -0
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +21 -1
- package/src/components/JfbBaseUserCenter/Attr.js +35 -0
- package/src/components/JfbBaseUserCenter/JfbBaseUserCenter.vue +38 -16
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
@bindLogin="handleBindLogin(item)"
|
|
34
34
|
></xd-card-v2>
|
|
35
35
|
</view>
|
|
36
|
-
<view v-else class="empty_data"
|
|
36
|
+
<view v-else class="empty_data">暂时没有票券
|
|
37
|
+
<view v-if="isShowBuy==='Y'" class="buy_new" @click="toBuyNew" :style="{color: mainColor}"><view>{{buy_name}}</view> <xd-font-icon size="20" icon="iconxiangyou_xian"></xd-font-icon></view>
|
|
38
|
+
</view>
|
|
37
39
|
</template>
|
|
38
40
|
<view class="bottom_fix" :style="button_bottom">
|
|
39
41
|
<xd-button type="primary" @click="toBindCard">绑定新票券</xd-button>
|
|
@@ -79,6 +81,9 @@
|
|
|
79
81
|
loadingCardList: true,
|
|
80
82
|
|
|
81
83
|
inCallbackUrlOrg:'',//是否带有回调地址
|
|
84
|
+
buy_new_url: '',
|
|
85
|
+
isShowBuy: "",
|
|
86
|
+
buy_name: ""
|
|
82
87
|
}
|
|
83
88
|
},
|
|
84
89
|
watch: {
|
|
@@ -140,6 +145,9 @@
|
|
|
140
145
|
this.detailUrl = getContainerPropsValue(container, "content.detailUrl", {value: ""}).value;
|
|
141
146
|
this.login_name = getContainerPropsValue(container, "content.login_name", "登录");
|
|
142
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;
|
|
143
151
|
},
|
|
144
152
|
toBindCard(){
|
|
145
153
|
let path = this.getUrlCallback(this.cardBindPath)
|
|
@@ -150,6 +158,11 @@
|
|
|
150
158
|
toDetail(item) {
|
|
151
159
|
this.$xdUniHelper.navigateTo({url: `${this.detailUrl}?card_number=${item["card_number"]}`,}, false);
|
|
152
160
|
},
|
|
161
|
+
toBuyNew() {
|
|
162
|
+
this.$xdUniHelper.navigateTo({
|
|
163
|
+
url: `${this.buy_new_url}`,
|
|
164
|
+
});
|
|
165
|
+
},
|
|
153
166
|
/**
|
|
154
167
|
* @description 已绑定卡登录
|
|
155
168
|
* @param item
|
|
@@ -236,6 +249,15 @@
|
|
|
236
249
|
text-align: center;
|
|
237
250
|
font-size: 24rpx;
|
|
238
251
|
color: #999999;
|
|
252
|
+
display: flex;
|
|
253
|
+
justify-content: center;
|
|
254
|
+
.buy_new {
|
|
255
|
+
display: flex;
|
|
256
|
+
margin-left: 8rpx;
|
|
257
|
+
& > view:first-child {
|
|
258
|
+
margin-right: 8rpx;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
239
261
|
}
|
|
240
262
|
.bottom_fix{
|
|
241
263
|
position: fixed;
|
|
@@ -300,6 +300,62 @@ export default {
|
|
|
300
300
|
groupKey:'style',
|
|
301
301
|
hidden: true,
|
|
302
302
|
},
|
|
303
|
+
{
|
|
304
|
+
label: "是否展示快捷入口",
|
|
305
|
+
ele: "xd-radio",
|
|
306
|
+
valueKey: "showQuickEntry",
|
|
307
|
+
value: data.showQuickEntry || "N",
|
|
308
|
+
list: [
|
|
309
|
+
{label: "不显示", value: "N"},
|
|
310
|
+
{label: "显示", value: "Y"}
|
|
311
|
+
],
|
|
312
|
+
groupKey:'content',
|
|
313
|
+
},
|
|
314
|
+
data.showQuickEntry==='Y'&&{
|
|
315
|
+
label: "快捷入口类型",
|
|
316
|
+
ele: "xd-radio",
|
|
317
|
+
valueKey: "quickEntryType",
|
|
318
|
+
value: data.quickEntryType || "service",
|
|
319
|
+
list: [
|
|
320
|
+
{label: "联系客服", value: "service"},
|
|
321
|
+
],
|
|
322
|
+
notice:'<div style="color:red">客服功能仅在小程序下生效</div>',
|
|
323
|
+
groupKey:'content',
|
|
324
|
+
},
|
|
325
|
+
data.showQuickEntry==='Y'&&{
|
|
326
|
+
ele: 'title',
|
|
327
|
+
label: '快捷入口功能样式设置',
|
|
328
|
+
size: 'small',
|
|
329
|
+
groupKey:'style',
|
|
330
|
+
},
|
|
331
|
+
data.showQuickEntry==='Y'&&{
|
|
332
|
+
label: '文字颜色:',
|
|
333
|
+
ele: 'xd-color',
|
|
334
|
+
valueKey: 'quickTextColor',
|
|
335
|
+
value: data.quickTextColor || '',
|
|
336
|
+
placeholder: '请选择文字颜色',
|
|
337
|
+
classNmae: 'input80',
|
|
338
|
+
groupKey:'style',
|
|
339
|
+
},
|
|
340
|
+
data.showQuickEntry==='Y'&&{
|
|
341
|
+
label: 'ICON:',
|
|
342
|
+
ele: 'el-input',
|
|
343
|
+
type: 'text',
|
|
344
|
+
groupKey:'style',
|
|
345
|
+
valueKey: 'quickIcon',
|
|
346
|
+
value: data['quickIcon'] || '',
|
|
347
|
+
placeholder: '请输入快捷入口ICON',
|
|
348
|
+
className: 'input80',
|
|
349
|
+
},
|
|
350
|
+
data.showQuickEntry==='Y'&&{
|
|
351
|
+
label: '背景颜色:',
|
|
352
|
+
ele: 'xd-color',
|
|
353
|
+
groupKey:'style',
|
|
354
|
+
valueKey: 'quickBackgroundColor',
|
|
355
|
+
value: data.quickBackgroundColor || '',
|
|
356
|
+
placeholder: '请选择快捷入口背景颜色',
|
|
357
|
+
classNmae: 'input80',
|
|
358
|
+
},
|
|
303
359
|
{
|
|
304
360
|
label: '是否有边框:',
|
|
305
361
|
ele: 'xd-radio',
|
|
@@ -353,13 +409,26 @@ export default {
|
|
|
353
409
|
ele: 'xd-select-pages-path',
|
|
354
410
|
valueKey: 'choseCityPath',
|
|
355
411
|
groupKey:'advanced',
|
|
356
|
-
placeholder: '
|
|
412
|
+
placeholder: '选择城市选择链接',
|
|
357
413
|
value: data['choseCityPath'] || null,
|
|
358
414
|
setting: {
|
|
359
415
|
router: XdBus.getParentApi('getPagesTree'),
|
|
360
416
|
},
|
|
361
417
|
inline: false,
|
|
362
418
|
},
|
|
419
|
+
{
|
|
420
|
+
label: '快捷入口链接:',
|
|
421
|
+
ele: 'xd-select-pages-path',
|
|
422
|
+
valueKey: 'quickEntryPath',
|
|
423
|
+
groupKey:'advanced',
|
|
424
|
+
placeholder: '选择快捷入口链接',
|
|
425
|
+
value: data['quickEntryPath'] || null,
|
|
426
|
+
setting: {
|
|
427
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
428
|
+
},
|
|
429
|
+
notice:'<div><span style="color:red">客服类型</span>不需要配置</div>',
|
|
430
|
+
inline: false,
|
|
431
|
+
},
|
|
363
432
|
{
|
|
364
433
|
label: '',
|
|
365
434
|
ele: 'slot',
|
|
@@ -83,6 +83,27 @@
|
|
|
83
83
|
:style="[searchBtnStyle]"
|
|
84
84
|
@click="doSearch"
|
|
85
85
|
>{{searchBtnText || '搜索'}}</view>
|
|
86
|
+
<!-- 非预览情况下,H5隐藏客服功能 -->
|
|
87
|
+
<!--#ifdef H5-->
|
|
88
|
+
<view v-if="isPreview">
|
|
89
|
+
<view v-if="showQuickEntry==='Y'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
|
|
90
|
+
<xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
|
|
91
|
+
</view>
|
|
92
|
+
</view>
|
|
93
|
+
<view v-else>
|
|
94
|
+
<view v-if="showQuickEntry==='Y'&&quickEntryType!=='service'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
|
|
95
|
+
<xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
|
|
96
|
+
</view>
|
|
97
|
+
</view>
|
|
98
|
+
<!-- #endif -->
|
|
99
|
+
<!-- #ifdef MP-WEIXIN -->
|
|
100
|
+
<view v-if="showQuickEntry==='Y'&&quickEntryType!=='service'" @click="handleQuickEntry" :style="{backgroundColor:quickBackgroundColor}" class="quick">
|
|
101
|
+
<xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
|
|
102
|
+
</view>
|
|
103
|
+
<button v-if="showQuickEntry==='Y'&&quickEntryType==='service'" :style="{backgroundColor:quickBackgroundColor}" class="quick-button" open-type="contact">
|
|
104
|
+
<xd-font-icon size="32" :style="{color:quickTextColor||mainColor}" :icon="quickIcon"></xd-font-icon>
|
|
105
|
+
</button>
|
|
106
|
+
<!-- #endif -->
|
|
86
107
|
</view>
|
|
87
108
|
</view>
|
|
88
109
|
</view>
|
|
@@ -136,7 +157,12 @@
|
|
|
136
157
|
searchPagePath: "",
|
|
137
158
|
placeholder: "请输入关键词",
|
|
138
159
|
choseCityPath: "", //选择城市i
|
|
139
|
-
|
|
160
|
+
quickEntryPath: "", //快速入口
|
|
161
|
+
quickBackgroundColor: "",
|
|
162
|
+
quickTextColor: "",
|
|
163
|
+
quickIcon: "",
|
|
164
|
+
showQuickEntry: '',
|
|
165
|
+
quickEntryType: "",
|
|
140
166
|
|
|
141
167
|
//基础
|
|
142
168
|
textColor: '',
|
|
@@ -230,6 +256,14 @@
|
|
|
230
256
|
this.bottomBorder = this.getBorderCompatibleOldStyle(bottomBorder, {})
|
|
231
257
|
this.inputBorder = this.getXdBorder({}, getContainerPropsValue(container, 'content.inputBorder', {}))
|
|
232
258
|
|
|
259
|
+
//快捷入口
|
|
260
|
+
this.quickBackgroundColor = getContainerPropsValue(container, 'content.quickBackgroundColor', "#FFEDDB");
|
|
261
|
+
this.quickTextColor = getContainerPropsValue(container, 'content.quickTextColor', "");
|
|
262
|
+
this.quickIcon = getContainerPropsValue(container, 'content.quickIcon', "iconkefu");
|
|
263
|
+
this.showQuickEntry = getContainerPropsValue(container, 'content.showQuickEntry', "N");
|
|
264
|
+
this.quickEntryType = getContainerPropsValue(container, 'content.quickEntryType', "");
|
|
265
|
+
this.quickEntryPath = getContainerPropsValue(container, 'content.quickEntryPath', {value:""}).value;
|
|
266
|
+
|
|
233
267
|
let name , logo, platform_logo;
|
|
234
268
|
if (this.projectAttr['site_name']) name = this.projectAttr['site_name'];
|
|
235
269
|
if (this['siteInfo'] && this['siteInfo']['mapping'] && this['siteInfo']['mapping']['site_name']) name = this['siteInfo']['mapping']['site_name'];
|
|
@@ -284,6 +318,12 @@
|
|
|
284
318
|
},true)
|
|
285
319
|
},
|
|
286
320
|
|
|
321
|
+
handleQuickEntry() {
|
|
322
|
+
this.$xdUniHelper.navigateTo({
|
|
323
|
+
url: this.quickEntryPath
|
|
324
|
+
})
|
|
325
|
+
},
|
|
326
|
+
|
|
287
327
|
onJfbBack(options) {
|
|
288
328
|
if(getCurrentPages().length === 1 ) {
|
|
289
329
|
this.$xdUniHelper.redirectTo({
|
|
@@ -318,6 +358,26 @@
|
|
|
318
358
|
display: flex;
|
|
319
359
|
justify-content: space-between;
|
|
320
360
|
align-items: center;
|
|
361
|
+
.quick {
|
|
362
|
+
display: flex;
|
|
363
|
+
align-items: center;
|
|
364
|
+
justify-content: center;
|
|
365
|
+
padding: 12rpx 24rpx;
|
|
366
|
+
border-radius: 36rpx;
|
|
367
|
+
margin-left: 16rpx;
|
|
368
|
+
}
|
|
369
|
+
.quick-button {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
justify-content: center;
|
|
373
|
+
padding: 12rpx 24rpx;
|
|
374
|
+
border-radius: 36rpx;
|
|
375
|
+
margin-left: 16rpx;
|
|
376
|
+
line-height: inherit;
|
|
377
|
+
}
|
|
378
|
+
.quick-button::after{
|
|
379
|
+
border: none !important;
|
|
380
|
+
}
|
|
321
381
|
|
|
322
382
|
&-back {
|
|
323
383
|
padding-left: unit(20, rpx);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* @description 接口配置,
|
|
4
|
+
* 在设置方法名字当时候,别忘记加上【模块名字】:Notice
|
|
5
|
+
* @type {*[]}
|
|
6
|
+
*/
|
|
7
|
+
module.exports = [
|
|
8
|
+
{
|
|
9
|
+
mapFnName: 'getListNoticeDialogContent', //自定义方法名字(必选)
|
|
10
|
+
title: '获取内容',
|
|
11
|
+
path: '/cms/v1/news-content',
|
|
12
|
+
isRule: false,
|
|
13
|
+
params: {
|
|
14
|
+
scene: ['使用场景', 'String', '选填'],
|
|
15
|
+
container_id: ['插件ID', 'String', '必填'],
|
|
16
|
+
page_id: ['页面ID', 'String', '必填'],
|
|
17
|
+
page_size: ['记录条数', 'Number', '必填', '1'],
|
|
18
|
+
},
|
|
19
|
+
isConsole: true,
|
|
20
|
+
disabled: true,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
style: [],
|
|
8
|
+
content: (data) => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
label: '弹框内容设置:',
|
|
12
|
+
ele: 'xd-site-poster',
|
|
13
|
+
valueKey: 'background',
|
|
14
|
+
groupKey:'content',
|
|
15
|
+
className: 'input80',
|
|
16
|
+
value: data.background || {size:{"width":"730", "height":"730"}},
|
|
17
|
+
setting: {
|
|
18
|
+
count: 1,
|
|
19
|
+
scene: { label: '背景', value: 'normal'},
|
|
20
|
+
width: 730,
|
|
21
|
+
height: 730,
|
|
22
|
+
typeDisabled: true,
|
|
23
|
+
},
|
|
24
|
+
handleCustom({action, data}) {
|
|
25
|
+
//设置场景参数
|
|
26
|
+
if(data) {
|
|
27
|
+
data.params = Object.assign({}, {scene: 'normal'}, data.params || {})
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//获取显示内容
|
|
31
|
+
if (action === 'screenList') {
|
|
32
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'editx_base_ad_split_screen'})
|
|
33
|
+
.then(res => {
|
|
34
|
+
data.cb(res['list'])
|
|
35
|
+
})
|
|
36
|
+
.catch(error => {
|
|
37
|
+
console.error(error);
|
|
38
|
+
});
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//获取返回参数(广告位高度必选项)
|
|
43
|
+
if (action === 'getPosterInfo') {
|
|
44
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
45
|
+
.then(res => {
|
|
46
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
47
|
+
})
|
|
48
|
+
.catch(error => {
|
|
49
|
+
console.error(error);
|
|
50
|
+
});
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//使用内容分类
|
|
55
|
+
if (action === 'cmsPublishEditxContent') {
|
|
56
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
57
|
+
.then(res => {
|
|
58
|
+
data.cb(res)
|
|
59
|
+
})
|
|
60
|
+
.catch(error => {
|
|
61
|
+
console.error(error);
|
|
62
|
+
});
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
67
|
+
//位置列表
|
|
68
|
+
if (action === 'getListPostion') {
|
|
69
|
+
XdBus.getParentApi('getListPosterPosition')(data.params)
|
|
70
|
+
.then(res => {
|
|
71
|
+
loading.close();
|
|
72
|
+
data.cb(res)
|
|
73
|
+
})
|
|
74
|
+
.catch(error => {
|
|
75
|
+
loading.close();
|
|
76
|
+
console.error(error);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
//位置创建
|
|
81
|
+
if (action === 'addPostion') {
|
|
82
|
+
XdBus.getParentApi('addPosterPosition')(data.params)
|
|
83
|
+
.then(res => {
|
|
84
|
+
loading.close();
|
|
85
|
+
data.cb(true)
|
|
86
|
+
})
|
|
87
|
+
.catch(error => {
|
|
88
|
+
console.error(error);
|
|
89
|
+
loading.close();
|
|
90
|
+
data.cb(false)
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
//位置编辑
|
|
95
|
+
if (action === 'editPostion') {
|
|
96
|
+
XdBus.getParentApi('updatePosterPosition')(data.params)
|
|
97
|
+
.then(res => {
|
|
98
|
+
loading.close();
|
|
99
|
+
data.cb(true)
|
|
100
|
+
})
|
|
101
|
+
.catch(error => {
|
|
102
|
+
console.error(error);
|
|
103
|
+
loading.close();
|
|
104
|
+
data.cb(false)
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//位置删除
|
|
109
|
+
if (action === 'deleltePostion') {
|
|
110
|
+
XdBus.getParentApi('deletePosterPosition')(data.params)
|
|
111
|
+
.then(res => {
|
|
112
|
+
loading.close();
|
|
113
|
+
data.cb(true)
|
|
114
|
+
})
|
|
115
|
+
.catch(error => {
|
|
116
|
+
console.error(error);
|
|
117
|
+
loading.close();
|
|
118
|
+
data.cb(false)
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
//获取广告位内容列表
|
|
123
|
+
if (action === 'getListContent') {
|
|
124
|
+
XdBus.getParentApi('getListPosterContent')(data.params)
|
|
125
|
+
.then(res => {
|
|
126
|
+
loading.close();
|
|
127
|
+
data.cb(res)
|
|
128
|
+
})
|
|
129
|
+
.catch(error => {
|
|
130
|
+
loading.close();
|
|
131
|
+
console.error(error);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
//广告内容创建
|
|
136
|
+
if (action === 'addContent') {
|
|
137
|
+
XdBus.getParentApi('addPosterContent')(data.params)
|
|
138
|
+
.then(res => {
|
|
139
|
+
loading.close();
|
|
140
|
+
data.cb(true)
|
|
141
|
+
})
|
|
142
|
+
.catch(error => {
|
|
143
|
+
console.error(error);
|
|
144
|
+
loading.close();
|
|
145
|
+
data.cb(false)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
//广告内容编辑
|
|
150
|
+
if (action === 'editContent') {
|
|
151
|
+
XdBus.getParentApi('updatePosterContent')(data.params)
|
|
152
|
+
.then(res => {
|
|
153
|
+
loading.close();
|
|
154
|
+
data.cb(true)
|
|
155
|
+
})
|
|
156
|
+
.catch(error => {
|
|
157
|
+
console.error(error);
|
|
158
|
+
loading.close();
|
|
159
|
+
data.cb(false)
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
//广告内容删除
|
|
164
|
+
if (action === 'deleteContent') {
|
|
165
|
+
XdBus.getParentApi('deletePosterContent')(data.params)
|
|
166
|
+
.then(res => {
|
|
167
|
+
loading.close();
|
|
168
|
+
data.cb(true)
|
|
169
|
+
})
|
|
170
|
+
.catch(error => {
|
|
171
|
+
console.error(error);
|
|
172
|
+
loading.close();
|
|
173
|
+
data.cb(false)
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
//获取广告内容跳转地址类型
|
|
178
|
+
if (action === 'jumpPosterContentType') {
|
|
179
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: "cms_setting"})
|
|
180
|
+
.then(res => {
|
|
181
|
+
loading.close();
|
|
182
|
+
data.cb(res['redirect_type'])
|
|
183
|
+
})
|
|
184
|
+
.catch(error => {
|
|
185
|
+
loading.close();
|
|
186
|
+
console.error(error);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
//发布
|
|
191
|
+
if (action === 'publish') {
|
|
192
|
+
console.log('publish', data.params)
|
|
193
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
194
|
+
.then(res => {
|
|
195
|
+
loading.close();
|
|
196
|
+
data.cb(res)
|
|
197
|
+
})
|
|
198
|
+
.catch(error => {
|
|
199
|
+
loading.close();
|
|
200
|
+
console.error(error);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
//获取站内页面地址
|
|
205
|
+
if (action === 'router') {
|
|
206
|
+
loading.close()
|
|
207
|
+
return XdBus.getParentApi('getPagesTree');
|
|
208
|
+
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
//通知页面进行刷新
|
|
212
|
+
if(action === 'update') {
|
|
213
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
214
|
+
loading.close()
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
inline: false,
|
|
218
|
+
notice: '设置背景图片时候,建议上传图片尺寸大小为:<span style="color:red">730 * 730</span>像素',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: '使用数量:',
|
|
222
|
+
ele: 'el-input',
|
|
223
|
+
type: 'number',
|
|
224
|
+
valueKey: 'number',
|
|
225
|
+
groupKey:'content',
|
|
226
|
+
value: data.number || 1,
|
|
227
|
+
placeholder: '请输入使用数量',
|
|
228
|
+
className: 'input40',
|
|
229
|
+
unit: '张',
|
|
230
|
+
rules: [
|
|
231
|
+
{
|
|
232
|
+
required: true,
|
|
233
|
+
message: '请输入使用数量',
|
|
234
|
+
trigger: 'blur'
|
|
235
|
+
},
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
label: '弹框提示方式:',
|
|
240
|
+
ele: 'xd-radio',
|
|
241
|
+
valueKey: 'type',
|
|
242
|
+
groupKey:'content',
|
|
243
|
+
value: data['type'] || 'pop',
|
|
244
|
+
placeholder: '请选择弹框提示方式',
|
|
245
|
+
className: 'input60',
|
|
246
|
+
list: [
|
|
247
|
+
{ label: '弹框', value: 'pop' },
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: '是否隐藏弹框(仅预览模式生效):',
|
|
252
|
+
ele: 'xd-radio',
|
|
253
|
+
valueKey: 'is_hide_dailog',
|
|
254
|
+
groupKey:'content',
|
|
255
|
+
value: data['is_hide_dailog'] || 'N',
|
|
256
|
+
placeholder: '请选择是否隐藏弹框',
|
|
257
|
+
className: 'input60',
|
|
258
|
+
list: [
|
|
259
|
+
{ label: '是', value: 'Y' },
|
|
260
|
+
{ label: '否', value: 'N' },
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
label: '关闭按钮位置:',
|
|
265
|
+
ele: 'xd-radio',
|
|
266
|
+
valueKey: 'close_position',
|
|
267
|
+
groupKey:'content',
|
|
268
|
+
value: data['close_position'] || 'right',
|
|
269
|
+
placeholder: '请选择关闭按钮位置',
|
|
270
|
+
className: 'input60',
|
|
271
|
+
list: [
|
|
272
|
+
{ label: '右上角', value: 'right' },
|
|
273
|
+
{ label: '下居中', value: 'bottom' },
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
label: '弹窗间隔:',
|
|
278
|
+
ele: 'el-input',
|
|
279
|
+
type: 'text',
|
|
280
|
+
groupKey:'content',
|
|
281
|
+
valueKey: 'time',
|
|
282
|
+
value: data.time || '',
|
|
283
|
+
className: 'input80',
|
|
284
|
+
inline: false,
|
|
285
|
+
notice: '弹窗间隔,单位:小时。默认值:<span style="color: red">3</span>小时',
|
|
286
|
+
},
|
|
287
|
+
].filter(i=>i)
|
|
288
|
+
},
|
|
289
|
+
advanced: [],
|
|
290
|
+
};
|