jufubao-base 1.0.240 → 1.0.242-beta1
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/JfbBaseBalance/Api.js +46 -0
- package/src/components/JfbBaseBalance/Attr.js +316 -0
- package/src/components/JfbBaseBalance/JfbBaseBalance.vue +336 -0
- package/src/components/JfbBaseBalance/JfbBaseBalanceLess.less +79 -0
- package/src/components/JfbBaseBalance/JfbBaseBalanceMixin.js +30 -0
- package/src/components/JfbBaseBalance/Mock.js +9 -0
- package/src/components/JfbBaseCodeOpenVip/Api.js +35 -0
- package/src/components/JfbBaseCodeOpenVip/Attr.js +281 -0
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVip.vue +251 -0
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipLess.less +79 -0
- package/src/components/JfbBaseCodeOpenVip/JfbBaseCodeOpenVipMixin.js +30 -0
- package/src/components/JfbBaseCodeOpenVip/Mock.js +13 -0
- package/src/components/JfbBaseConsumpCode/Api.js +133 -0
- package/src/components/JfbBaseConsumpCode/Attr.js +61 -0
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCode.vue +1048 -0
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeLess.less +79 -0
- package/src/components/JfbBaseConsumpCode/JfbBaseConsumpCodeMixin.js +30 -0
- package/src/components/JfbBaseConsumpCode/Mock.js +22 -0
- package/src/components/JfbBaseFastLink/Attr.js +12 -1
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +66 -0
- package/src/components/JfbBaseHeader/Attr.js +82 -0
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +47 -1
- package/src/components/JfbBaseHeaderColumn/Attr.js +82 -0
- package/src/components/JfbBaseHeaderColumn/JfbBaseHeaderColumn.vue +48 -2
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +14 -3
- package/src/components/JfbBaseNoticeDialog/Api.js +1 -1
- package/src/components/JfbBaseNoticeDialog/Attr.js +26 -0
- package/src/components/JfbBaseNoticeDialog/JfbBaseNoticeDialog.vue +28 -9
- package/src/components/JfbBaseNoticeGroup/Api.js +23 -0
- package/src/components/JfbBaseNoticeGroup/Attr.js +237 -0
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroup.vue +174 -0
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupLess.less +79 -0
- package/src/components/JfbBaseNoticeGroup/JfbBaseNoticeGroupMixin.js +30 -0
- package/src/components/JfbBaseNoticeGroup/Mock.js +13 -0
- package/src/components/JfbBaseOpenVip/Api.js +39 -0
- package/src/components/JfbBaseOpenVip/Attr.js +331 -0
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVip.vue +457 -0
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVipLess.less +79 -0
- package/src/components/JfbBaseOpenVip/JfbBaseOpenVipMixin.js +30 -0
- package/src/components/JfbBaseOpenVip/Mock.js +7 -0
- package/src/components/JfbBaseOpenVip/XdVipList.vue +131 -0
- package/src/components/JfbBaseOpenVipCard/Api.js +58 -0
- package/src/components/JfbBaseOpenVipCard/Attr.js +48 -0
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCard.vue +111 -0
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardLess.less +79 -0
- package/src/components/JfbBaseOpenVipCard/JfbBaseOpenVipCardMixin.js +30 -0
- package/src/components/JfbBaseOpenVipCard/Mock.js +13 -0
- package/src/components/JfbBaseOpenVipDetail/Api.js +35 -0
- package/src/components/JfbBaseOpenVipDetail/Attr.js +37 -0
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetail.vue +234 -0
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailLess.less +79 -0
- package/src/components/JfbBaseOpenVipDetail/JfbBaseOpenVipDetailMixin.js +30 -0
- package/src/components/JfbBaseOpenVipDetail/Mock.js +15 -0
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +176 -18
- package/src/components/JfbBasePay/Attr.js +52 -0
- package/src/components/JfbBasePay/JfbBasePay.vue +30 -6
- package/src/components/JfbBasePay/Mock.js +0 -9
- package/src/components/JfbBasePersonalData/Api.js +26 -0
- package/src/components/JfbBasePersonalData/Attr.js +13 -0
- package/src/components/JfbBasePersonalData/JfbBasePersonalData.vue +200 -0
- package/src/components/JfbBasePersonalData/JfbBasePersonalDataLess.less +79 -0
- package/src/components/JfbBasePersonalData/JfbBasePersonalDataMixin.js +30 -0
- package/src/components/JfbBasePersonalData/Mock.js +13 -0
- package/src/components/JfbBasePhoneLogin/JfbBasePhoneLogin.vue +11 -1
- package/src/components/JfbBasePointsCard/Api.js +18 -0
- package/src/components/JfbBasePointsCard/Attr.js +187 -0
- package/src/components/JfbBasePointsCard/JfbBasePointsCard.vue +212 -0
- package/src/components/JfbBasePointsCard/JfbBasePointsCardLess.less +79 -0
- package/src/components/JfbBasePointsCard/JfbBasePointsCardMixin.js +30 -0
- package/src/components/JfbBasePointsCard/Mock.js +5 -0
- package/src/components/JfbBasePointsDetail/Api.js +48 -0
- package/src/components/JfbBasePointsDetail/Attr.js +305 -0
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetail.vue +267 -0
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetailLess.less +79 -0
- package/src/components/JfbBasePointsDetail/JfbBasePointsDetailMixin.js +30 -0
- package/src/components/JfbBasePointsDetail/Mock.js +6 -0
- package/src/components/JfbBasePoster/Attr.js +1 -1
- package/src/components/JfbBasePosterBigSmall/JfbBasePosterBigSmall.vue +2 -2
- package/src/components/JfbBasePosterGroup/Api.js +22 -0
- package/src/components/JfbBasePosterGroup/Attr.js +156 -0
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroup.vue +268 -0
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroupLess.less +79 -0
- package/src/components/JfbBasePosterGroup/JfbBasePosterGroupMixin.js +30 -0
- package/src/components/JfbBasePosterGroup/Mock.js +13 -0
- package/src/components/JfbBaseSavingDetail/Api.js +41 -0
- package/src/components/JfbBaseSavingDetail/Attr.js +70 -0
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +710 -0
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailLess.less +79 -0
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetailMixin.js +30 -0
- package/src/components/JfbBaseSavingDetail/Mock.js +10 -0
- package/src/components/JfbBaseSavingDetail/components/echarts.min.js +26 -0
- package/src/components/JfbBaseSavingDetail/components/echarts.vue +254 -0
- package/src/components/JfbBaseSavingDetail/components/wx-canvas.js +105 -0
- package/src/components/JfbBaseShare/Api.js +20 -0
- package/src/components/JfbBaseShare/Attr.js +59 -0
- package/src/components/JfbBaseShare/JfbBaseShare.vue +276 -0
- package/src/components/JfbBaseShare/JfbBaseShareLess.less +79 -0
- package/src/components/JfbBaseShare/JfbBaseShareMixin.js +30 -0
- package/src/components/JfbBaseShare/Mock.js +16 -0
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +8 -3
- package/src/components/JfbBaseTfkSearch/ContentProduct.vue +12 -22
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +12 -1
- package/src/components/JfbBaseTfkSearch/Mock.js +51 -3
- package/src/components/JfbBaseTfkSearch/listMixins.js +2 -1
- package/src/components/JfbBaseUserInfo/Attr.js +175 -11
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +337 -115
- package/src/components/JfbBaseUserOrder/Attr.js +16 -0
- package/src/components/JfbBaseUserOrder/JfbBaseUserOrder.vue +11 -2
- package/src/components/JfbBaseWithDrawAgain/Api.js +41 -0
- package/src/components/JfbBaseWithDrawAgain/Attr.js +92 -0
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgain.vue +354 -0
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainLess.less +79 -0
- package/src/components/JfbBaseWithDrawAgain/JfbBaseWithDrawAgainMixin.js +30 -0
- package/src/components/JfbBaseWithDrawAgain/Mock.js +10 -0
- package/src/components/JfbBaseWithDrawRecord/Api.js +19 -0
- package/src/components/JfbBaseWithDrawRecord/Attr.js +79 -0
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecord.vue +233 -0
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordLess.less +79 -0
- package/src/components/JfbBaseWithDrawRecord/JfbBaseWithDrawRecordMixin.js +30 -0
- package/src/components/JfbBaseWithDrawRecord/Mock.js +7 -0
- package/src/components/JfbBaseWithdraw/Api.js +48 -0
- package/src/components/JfbBaseWithdraw/Attr.js +328 -0
- package/src/components/JfbBaseWithdraw/JfbBaseWithdraw.vue +272 -0
- package/src/components/JfbBaseWithdraw/JfbBaseWithdrawLess.less +79 -0
- package/src/components/JfbBaseWithdraw/JfbBaseWithdrawMixin.js +30 -0
- package/src/components/JfbBaseWithdraw/Mock.js +7 -0
- package/src/components/JfbBaseWxAuthorize/JfbBaseWxAuthorize.vue +10 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
+
*/
|
|
6
|
+
export default {
|
|
7
|
+
style: [],
|
|
8
|
+
content: (data) => {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
label: '外边距:',
|
|
12
|
+
ele: 'xd-margin-padding',
|
|
13
|
+
valueKey: 'bodyMargin',
|
|
14
|
+
groupKey: 'style',
|
|
15
|
+
value: data['bodyMargin'] || null,
|
|
16
|
+
setting: {
|
|
17
|
+
type: 'margin',
|
|
18
|
+
},
|
|
19
|
+
placeholder: '请设置外边距',
|
|
20
|
+
inline: false,
|
|
21
|
+
notice: '设置外边距,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">0</span>像素',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '外填充:',
|
|
25
|
+
ele: 'xd-margin-padding',
|
|
26
|
+
valueKey: 'bodyPadding',
|
|
27
|
+
groupKey: 'style',
|
|
28
|
+
value: data['bodyPadding'] || null,
|
|
29
|
+
setting: {
|
|
30
|
+
type: 'padding',
|
|
31
|
+
},
|
|
32
|
+
placeholder: '请设置外填充',
|
|
33
|
+
inline: false,
|
|
34
|
+
notice: '设置填充值,<span style="color: red">单位:像素</span>。默认值:<span style="color: red">20</span>像素',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: '圆角设置:',
|
|
38
|
+
ele: 'xd-site-select-list',
|
|
39
|
+
valueKey: 'radius',
|
|
40
|
+
value: data['radius'] || '20',
|
|
41
|
+
labelInline: true,
|
|
42
|
+
groupKey: 'style',
|
|
43
|
+
placeholder: '请选择圆角设置',
|
|
44
|
+
multiple: false,
|
|
45
|
+
className: 'input60',
|
|
46
|
+
handleCustom({ action, data }) {
|
|
47
|
+
XdBus.getParentApi('getOptionsSettingList')({
|
|
48
|
+
setting_id: 'edtix_style_radius',
|
|
49
|
+
key: Date.now()
|
|
50
|
+
})
|
|
51
|
+
.then(res => {
|
|
52
|
+
data.cb(res.list)
|
|
53
|
+
})
|
|
54
|
+
.catch(error => {
|
|
55
|
+
console.error(error);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "边框设置:",
|
|
61
|
+
ele: "xd-border",
|
|
62
|
+
valueKey: "bodyBorder",
|
|
63
|
+
value: data['bodyBorder'] || { type: 'Y', value: { color: '#eee', style: "solid", width: '1' } },
|
|
64
|
+
className: 'input80',
|
|
65
|
+
groupKey: 'style',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: '背景颜色:',
|
|
69
|
+
ele: 'xd-color',
|
|
70
|
+
valueKey: 'bgColor',
|
|
71
|
+
groupKey: 'style',
|
|
72
|
+
value: data['bgColor'] || null,
|
|
73
|
+
placeholder: '请选择背景颜色',
|
|
74
|
+
labelInline: true,
|
|
75
|
+
classNmae: 'input80',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: '公告内容:',
|
|
79
|
+
ele: 'xd-site-news',
|
|
80
|
+
valueKey: 'notice',
|
|
81
|
+
groupKey: 'content',
|
|
82
|
+
value: data.notice || null,
|
|
83
|
+
className: 'input70',
|
|
84
|
+
setting: {
|
|
85
|
+
config: {
|
|
86
|
+
sort: true,
|
|
87
|
+
maxlen: 100,
|
|
88
|
+
action: 'aliyun',
|
|
89
|
+
size: 5,
|
|
90
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
91
|
+
uploadType: 'aliyun',
|
|
92
|
+
type: ['jpg', 'png', 'jpeg']
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
handleCustom({ action, data }) {
|
|
96
|
+
if (data && data.params) {
|
|
97
|
+
//当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
|
|
98
|
+
//data.params = Object.assign({}, data.params, {code: 'g_test_id'});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
//获取返回参数(场景类型名称为必填)
|
|
102
|
+
//获取返回参数(场景类型名称为必填)
|
|
103
|
+
let loading = { close() { } }
|
|
104
|
+
|
|
105
|
+
//获取显示内容
|
|
106
|
+
if (action === 'screen') {
|
|
107
|
+
XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_bucket_content_tip' })
|
|
108
|
+
.then(res => {
|
|
109
|
+
loading.close();
|
|
110
|
+
data.cb(res['list'])
|
|
111
|
+
})
|
|
112
|
+
.catch(error => {
|
|
113
|
+
console.error(error);
|
|
114
|
+
loading.close();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//获取返回参数(广告位高度必选项)
|
|
120
|
+
if (action === 'getNewsInfo') {
|
|
121
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
122
|
+
.then(res => {
|
|
123
|
+
loading.close()
|
|
124
|
+
data.cb({ list: res.list, selectId: res.selected })
|
|
125
|
+
})
|
|
126
|
+
.catch(error => {
|
|
127
|
+
loading.close()
|
|
128
|
+
console.error(error);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//获取产品业务线列表
|
|
133
|
+
if (action === 'namespace') {
|
|
134
|
+
XdBus.getParentApi('getOptionsNamespaces')({})
|
|
135
|
+
.then(res => {
|
|
136
|
+
loading.close()
|
|
137
|
+
data.cb(res['list'])
|
|
138
|
+
})
|
|
139
|
+
.catch(error => {
|
|
140
|
+
loading.close()
|
|
141
|
+
console.error(error);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
//使用内容分类
|
|
146
|
+
if (action === 'cmsPublishEditxContent') {
|
|
147
|
+
loading = XdBus.getParentApi('loading')({});
|
|
148
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
149
|
+
.then(res => {
|
|
150
|
+
console.log('cmsPublishEditxContent', res)
|
|
151
|
+
loading.close();
|
|
152
|
+
data.cb(res)
|
|
153
|
+
})
|
|
154
|
+
.catch(error => {
|
|
155
|
+
loading.close();
|
|
156
|
+
console.error(error);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//位置列表
|
|
161
|
+
if (action === 'getListPostion') {
|
|
162
|
+
loading = XdBus.getParentApi('loading')({});
|
|
163
|
+
XdBus.getParentApi('getListNewsPosition')(data.params)
|
|
164
|
+
.then(res => {
|
|
165
|
+
loading.close();
|
|
166
|
+
data.cb(res)
|
|
167
|
+
})
|
|
168
|
+
.catch(error => {
|
|
169
|
+
loading.close();
|
|
170
|
+
console.error(error);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
//位置创建
|
|
175
|
+
if (action === 'addPostion') {
|
|
176
|
+
loading = XdBus.getParentApi('loading')({});
|
|
177
|
+
XdBus.getParentApi('addNewsPosition')(data.params)
|
|
178
|
+
.then(res => {
|
|
179
|
+
loading.close();
|
|
180
|
+
data.cb(true)
|
|
181
|
+
})
|
|
182
|
+
.catch(error => {
|
|
183
|
+
console.error(error);
|
|
184
|
+
loading.close();
|
|
185
|
+
data.cb(false)
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//位置编辑
|
|
190
|
+
if (action === 'editPostion') {
|
|
191
|
+
loading = XdBus.getParentApi('loading')({});
|
|
192
|
+
XdBus.getParentApi('updateNewsPosition')(data.params)
|
|
193
|
+
.then(res => {
|
|
194
|
+
loading.close();
|
|
195
|
+
data.cb(true)
|
|
196
|
+
})
|
|
197
|
+
.catch(error => {
|
|
198
|
+
console.error(error);
|
|
199
|
+
loading.close();
|
|
200
|
+
data.cb(false)
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
//位置删除
|
|
205
|
+
if (action === 'deleltePostion') {
|
|
206
|
+
loading = XdBus.getParentApi('loading')({});
|
|
207
|
+
XdBus.getParentApi('deleteNewsPosition')(data.params)
|
|
208
|
+
.then(res => {
|
|
209
|
+
loading.close();
|
|
210
|
+
data.cb(true)
|
|
211
|
+
})
|
|
212
|
+
.catch(error => {
|
|
213
|
+
console.error(error);
|
|
214
|
+
loading.close();
|
|
215
|
+
data.cb(false)
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
//获取广告位内容列表
|
|
220
|
+
if (action === 'getListContent') {
|
|
221
|
+
loading = XdBus.getParentApi('loading')({});
|
|
222
|
+
XdBus.getParentApi('getListNewsContent')(data.params)
|
|
223
|
+
.then(res => {
|
|
224
|
+
loading.close();
|
|
225
|
+
data.cb(res)
|
|
226
|
+
})
|
|
227
|
+
.catch(error => {
|
|
228
|
+
loading.close();
|
|
229
|
+
console.error(error);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
//广告内容创建
|
|
234
|
+
if (action === 'addContent') {
|
|
235
|
+
loading = XdBus.getParentApi('loading')({});
|
|
236
|
+
XdBus.getParentApi('addNewsContent')(data.params)
|
|
237
|
+
.then(res => {
|
|
238
|
+
loading.close();
|
|
239
|
+
data.cb(true)
|
|
240
|
+
})
|
|
241
|
+
.catch(error => {
|
|
242
|
+
console.error(error);
|
|
243
|
+
loading.close();
|
|
244
|
+
data.cb(false)
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
//广告内容编辑
|
|
249
|
+
if (action === 'editContent') {
|
|
250
|
+
loading = XdBus.getParentApi('loading')({});
|
|
251
|
+
XdBus.getParentApi('updateNewsContent')(data.params)
|
|
252
|
+
.then(res => {
|
|
253
|
+
loading.close();
|
|
254
|
+
data.cb(true)
|
|
255
|
+
})
|
|
256
|
+
.catch(error => {
|
|
257
|
+
console.error(error);
|
|
258
|
+
loading.close();
|
|
259
|
+
data.cb(false)
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
//广告内容删除
|
|
264
|
+
if (action === 'deleteContent') {
|
|
265
|
+
loading = XdBus.getParentApi('loading')({});
|
|
266
|
+
XdBus.getParentApi('deleteNewsContent')(data.params)
|
|
267
|
+
.then(res => {
|
|
268
|
+
loading.close();
|
|
269
|
+
data.cb(true)
|
|
270
|
+
})
|
|
271
|
+
.catch(error => {
|
|
272
|
+
console.error(error);
|
|
273
|
+
loading.close();
|
|
274
|
+
data.cb(false)
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
//内容发布
|
|
279
|
+
if (action === 'publish') {
|
|
280
|
+
loading = XdBus.getParentApi('loading')({});
|
|
281
|
+
console.log('publish', data.params)
|
|
282
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
283
|
+
.then(res => {
|
|
284
|
+
loading.close();
|
|
285
|
+
data.cb(res)
|
|
286
|
+
})
|
|
287
|
+
.catch(error => {
|
|
288
|
+
loading.close();
|
|
289
|
+
console.error(error);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
//通知页面进行刷新
|
|
294
|
+
if (action === 'update') {
|
|
295
|
+
loading = XdBus.getParentApi('loading')({});
|
|
296
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
297
|
+
loading.close()
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
label: '提现记录路径:',
|
|
303
|
+
ele: 'xd-select-pages-path',
|
|
304
|
+
valueKey: 'withDrawRecordPath',
|
|
305
|
+
groupKey: 'advanced',
|
|
306
|
+
placeholder: '请选择提现记录路径',
|
|
307
|
+
value: data['withDrawRecordPath'] || {},
|
|
308
|
+
setting: {
|
|
309
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
310
|
+
},
|
|
311
|
+
inline: false,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
label: '提现路径:',
|
|
315
|
+
ele: 'xd-select-pages-path',
|
|
316
|
+
valueKey: 'withDrawPath',
|
|
317
|
+
groupKey: 'advanced',
|
|
318
|
+
placeholder: '请选择提现路径',
|
|
319
|
+
value: data['withDrawPath'] || {},
|
|
320
|
+
setting: {
|
|
321
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
322
|
+
},
|
|
323
|
+
inline: false,
|
|
324
|
+
},
|
|
325
|
+
].filter(i => i)
|
|
326
|
+
},
|
|
327
|
+
advanced: [],
|
|
328
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="jfb-base-withdraw" @click="handleEditxSelect" :class="{ editx : isEditx && active }">
|
|
3
|
+
<!--#ifdef H5-->
|
|
4
|
+
<view class="jfb-base-withdraw__edit" :class="{ editx : isEditx && active }" v-if="isEditx && active">
|
|
5
|
+
<view class="jfb-base-withdraw__edit-icon" @click="delEdit">删除</view>
|
|
6
|
+
</view>
|
|
7
|
+
<!-- #endif -->
|
|
8
|
+
<view class="jfb-base-withdraw__body" :style="{minHeight: layoutInfo.bodyMinHeight}">
|
|
9
|
+
<view :style="[bodyStyleComp]">
|
|
10
|
+
<view class="jfb-base-withdraw__body-title">
|
|
11
|
+
<view>提现金额</view>
|
|
12
|
+
<view @click="handleAllWithDraw">全部提现</view>
|
|
13
|
+
</view>
|
|
14
|
+
<input :focus="inputfocus" @input="handleAmountChange" class="jfb-base-withdraw__body-amount" v-model="amount"></input>
|
|
15
|
+
<view class="jfb-base-withdraw__body-balance">可提现余额¥{{getAmout(balance)}}</view>
|
|
16
|
+
</view>
|
|
17
|
+
<view v-if="notice" :style="[bodyStyleComp]">
|
|
18
|
+
<XdContentXss :html="notice"></XdContentXss>
|
|
19
|
+
</view>
|
|
20
|
+
<view class="fixe_bottom" :style="prod_bottom">
|
|
21
|
+
<XdButton v-if="amount>0&&amount<=getAmout(balance)" fontSize="32" type="primary" @click="handleWithDraw">提现</XdButton>
|
|
22
|
+
<XdButton v-else disabled fontSize="32" type="primary">提现</XdButton>
|
|
23
|
+
<view @click="handleToWithDrawRecord">提现记录</view>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
31
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
32
|
+
import XdContentXss from '@/components/XdContentXss/XdContentXss';
|
|
33
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
34
|
+
import JfbBaseWithdrawMixin from "./JfbBaseWithdrawMixin";
|
|
35
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
36
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
37
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
38
|
+
export default {
|
|
39
|
+
name: "JfbBaseWithdraw",
|
|
40
|
+
components: {
|
|
41
|
+
XdFontIcon,
|
|
42
|
+
XdButton,
|
|
43
|
+
XdContentXss,
|
|
44
|
+
},
|
|
45
|
+
mixins: [
|
|
46
|
+
componentsMixins, extsMixins, JfbBaseWithdrawMixin
|
|
47
|
+
],
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
radius: 0,
|
|
51
|
+
margin: {},
|
|
52
|
+
padding: {},
|
|
53
|
+
bgColor: '',
|
|
54
|
+
bodyBorder: {},
|
|
55
|
+
notice: '',
|
|
56
|
+
withDrawRecordPath: '',
|
|
57
|
+
withDrawPath: '',
|
|
58
|
+
balance: 0,
|
|
59
|
+
amount: '',
|
|
60
|
+
showSuccess: false,
|
|
61
|
+
method: '',
|
|
62
|
+
wallet_type: '',
|
|
63
|
+
inputfocus: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
computed: {
|
|
67
|
+
bodyStyleComp() {
|
|
68
|
+
return {
|
|
69
|
+
borderRadius: `${this.radius}rpx`,
|
|
70
|
+
margin: this.getMarginAndPadding(this.margin, 20),
|
|
71
|
+
padding: this.getMarginAndPadding(this.padding, 40),
|
|
72
|
+
background: this.bgColor,
|
|
73
|
+
border: this.bodyBorder,
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
prod_bottom() {
|
|
77
|
+
return this.fixedStyle({ height: 0, zIndex: 111, paddingBottom: 70 });
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
watch: {
|
|
81
|
+
container(value, oldValue) {
|
|
82
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
83
|
+
if (this.$configProject['isPreview']) this.init(value)
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
created() {
|
|
87
|
+
this.init(this.container);
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
onJfbLoad(options) {
|
|
91
|
+
this.method = options.method
|
|
92
|
+
this.wallet_type = options.wallet_type
|
|
93
|
+
this.getContent()
|
|
94
|
+
this.getDetail()
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* @description 监听事件变化
|
|
98
|
+
* @param container {object} 业务组件对象自己
|
|
99
|
+
*/
|
|
100
|
+
init(container) {
|
|
101
|
+
this.radius = getContainerPropsValue(container, 'content.radius', 20);
|
|
102
|
+
this.margin = getContainerPropsValue(container, 'content.bodyMargin', {});
|
|
103
|
+
this.padding = getContainerPropsValue(container, 'content.bodyPadding', {});
|
|
104
|
+
this.bgColor = getContainerPropsValue(container, 'content.bgColor', '#fff');
|
|
105
|
+
this.bodyBorder = this.getXdBorder({}, getContainerPropsValue(container, 'content.bodyBorder', {}))
|
|
106
|
+
this.withDrawRecordPath = getContainerPropsValue(container, 'content.withDrawRecordPath', { value: '' }).value;
|
|
107
|
+
this.withDrawPath = getContainerPropsValue(container, 'content.withDrawPath', { value: '' }).value;
|
|
108
|
+
},
|
|
109
|
+
getAmout(amount) {
|
|
110
|
+
return this.$xdUniHelper.divisionFloatNumber(amount, 100)
|
|
111
|
+
},
|
|
112
|
+
getDetail() {
|
|
113
|
+
jfbRootExec("getWithDrawDetail", {
|
|
114
|
+
vm: this,
|
|
115
|
+
data: {
|
|
116
|
+
method: this.method
|
|
117
|
+
},
|
|
118
|
+
}).then(res => {
|
|
119
|
+
this.balance = res.wallet_list.find(item => item.wallet_type === this.wallet_type).amount
|
|
120
|
+
}).catch(err => {
|
|
121
|
+
console.log(err, 'err');
|
|
122
|
+
|
|
123
|
+
})
|
|
124
|
+
},
|
|
125
|
+
getContent() {
|
|
126
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
127
|
+
vm: this,
|
|
128
|
+
data: {
|
|
129
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
130
|
+
container_id: this.containerId, //组件ID
|
|
131
|
+
limit: 1,
|
|
132
|
+
},
|
|
133
|
+
})
|
|
134
|
+
.then((res) => {
|
|
135
|
+
if (res.list.length > 0) {
|
|
136
|
+
if (res.list && res.list.length > 0) {
|
|
137
|
+
this.notice = res.list[0].content;
|
|
138
|
+
}
|
|
139
|
+
this.noticeStatus = true;
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
.catch((error) => {
|
|
143
|
+
console.error(error);
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
handleAllWithDraw() {
|
|
147
|
+
this.amount = this.getAmout(this.balance);
|
|
148
|
+
},
|
|
149
|
+
handleWithDraw() {
|
|
150
|
+
console.log(this.projectAttr, 'this.projectAttr');
|
|
151
|
+
jfbRootExec("createWithdraw", {
|
|
152
|
+
vm: this,
|
|
153
|
+
data: {
|
|
154
|
+
wallet_type: this.wallet_type,
|
|
155
|
+
total_amount: this.amount * 100,
|
|
156
|
+
login_providers: this.projectAttr.login_providers.join(),
|
|
157
|
+
pay_channel_providers: this.projectAttr.pay_channels.join(),
|
|
158
|
+
//#ifdef MP-WEIXIN
|
|
159
|
+
'x-jfb-platform': 'MP-WEIXIN',
|
|
160
|
+
//#endif
|
|
161
|
+
//#ifdef H5
|
|
162
|
+
'x-jfb-platform': 'H5'
|
|
163
|
+
//#endif
|
|
164
|
+
},
|
|
165
|
+
}).then(res => {
|
|
166
|
+
this.$xdUniHelper.navigateTo({ url: `${this.withDrawPath}?order_id=${res.order_id}` })
|
|
167
|
+
})
|
|
168
|
+
},
|
|
169
|
+
handleToWithDrawRecord() {
|
|
170
|
+
this.$xdUniHelper.navigateTo({ url: this.withDrawRecordPath })
|
|
171
|
+
},
|
|
172
|
+
handleWithDrawSuccess() {
|
|
173
|
+
this.showSuccess = false;
|
|
174
|
+
},
|
|
175
|
+
handleAmountChange(e) {
|
|
176
|
+
this.$nextTick(() => {
|
|
177
|
+
if(e.detail.value>this.getAmout(this.balance)) {
|
|
178
|
+
uni.showToast(
|
|
179
|
+
{
|
|
180
|
+
title: '输入金额超过可提现余额',
|
|
181
|
+
icon: 'none'
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
},
|
|
187
|
+
onJfbScroll(options) {
|
|
188
|
+
console.log('event.onJfbScroll', options)
|
|
189
|
+
},
|
|
190
|
+
onJfbReachBottom(options) {
|
|
191
|
+
console.log('event.onJfbReachBottom', options)
|
|
192
|
+
},
|
|
193
|
+
onJfbShow(options) {
|
|
194
|
+
console.log('event.onJfbShow', options)
|
|
195
|
+
this.inputfocus = true
|
|
196
|
+
this.method = options.method
|
|
197
|
+
this.wallet_type = options.wallet_type
|
|
198
|
+
this.getContent()
|
|
199
|
+
this.getDetail()
|
|
200
|
+
},
|
|
201
|
+
onJfbHide(options) {
|
|
202
|
+
this.inputfocus = false
|
|
203
|
+
console.log('event.onJfbHide', options)
|
|
204
|
+
},
|
|
205
|
+
onJfbBack(options) {
|
|
206
|
+
console.log('event.onJfbBack', options)
|
|
207
|
+
},
|
|
208
|
+
onJfbUpdate(...data) {
|
|
209
|
+
console.log('event.onJfbUpdate', data)
|
|
210
|
+
},
|
|
211
|
+
onJfbCustomEvent(options) {
|
|
212
|
+
console.log('event.onJfbReachBottom', options)
|
|
213
|
+
},
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
</script>
|
|
218
|
+
|
|
219
|
+
<style scoped lang="less">
|
|
220
|
+
@import "./JfbBaseWithdrawLess.less";
|
|
221
|
+
|
|
222
|
+
.jfb-base-withdraw {
|
|
223
|
+
&__body {
|
|
224
|
+
&-title {
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
227
|
+
justify-content: space-between;
|
|
228
|
+
font-size: 24rpx;
|
|
229
|
+
|
|
230
|
+
&>view:first-child {
|
|
231
|
+
color: #999999;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&>view:last-child {
|
|
235
|
+
color: #666666;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&-amount {
|
|
240
|
+
color: #333;
|
|
241
|
+
font-size: 64rpx;
|
|
242
|
+
line-height: 64rpx;
|
|
243
|
+
height: 70rpx;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
margin: 20rpx 0;
|
|
246
|
+
border-bottom: 0.5px solid #EEEEEE;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&-balance {
|
|
250
|
+
font-size: 28rpx;
|
|
251
|
+
color: #999999;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.fixe_bottom {
|
|
255
|
+
position: fixed;
|
|
256
|
+
left: 0;
|
|
257
|
+
right: 0;
|
|
258
|
+
bottom: 0;
|
|
259
|
+
z-index: 999;
|
|
260
|
+
background: #fff;
|
|
261
|
+
padding: unit(48, rpx) unit(70, rpx);
|
|
262
|
+
|
|
263
|
+
&>view {
|
|
264
|
+
text-align: center;
|
|
265
|
+
font-size: 28rpx;
|
|
266
|
+
color: #999;
|
|
267
|
+
margin-top: 48rpx;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc 获取绝对路径完整地址
|
|
3
|
+
* @param @path
|
|
4
|
+
**/
|
|
5
|
+
//例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
|
|
6
|
+
@basePath: 'business/';
|
|
7
|
+
@doMain: '//sandbox-img.jufubao.cn/';
|
|
8
|
+
|
|
9
|
+
.getBusinessImageUrl(@path, @size: 'size8') {
|
|
10
|
+
@url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
|
|
11
|
+
background-image: url(@url);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//start
|
|
15
|
+
.jfb-base-withdraw {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&__body{
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
z-index: 2
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.editx,&.editx:hover {
|
|
25
|
+
position: relative;
|
|
26
|
+
min-height: unit(100, rpx);
|
|
27
|
+
z-index: 3;
|
|
28
|
+
&::after {
|
|
29
|
+
border: 2rpx dashed blue;
|
|
30
|
+
content: " ";
|
|
31
|
+
position: absolute;
|
|
32
|
+
top:0;
|
|
33
|
+
left:0;
|
|
34
|
+
bottom:0;
|
|
35
|
+
right:0;
|
|
36
|
+
z-index: 4;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
&__edit {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
position: absolute;
|
|
46
|
+
right: unit(0, rpx);
|
|
47
|
+
top: unit(-52, rpx);
|
|
48
|
+
height: unit(50, rpx);
|
|
49
|
+
line-height: unit(50, rpx);
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
background: rgba(0, 0, 0, .6);
|
|
54
|
+
border-radius: unit(10, rpx);
|
|
55
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
56
|
+
color: #fff;
|
|
57
|
+
font-size: unit(22, rpx);
|
|
58
|
+
|
|
59
|
+
&-icon{
|
|
60
|
+
padding: 0 unit(20, rpx);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.editx {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//end
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**notPreview**/
|
|
73
|
+
.jfb-base-withdraw {
|
|
74
|
+
//&:before {
|
|
75
|
+
//content: " ";
|
|
76
|
+
//display: table;
|
|
77
|
+
//}
|
|
78
|
+
}
|
|
79
|
+
/**endNotPreview**/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
//@AttrImport
|
|
5
|
+
import Attr from "./Attr";
|
|
6
|
+
//@EndAttrImport
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
//#ifdef H5
|
|
13
|
+
|
|
14
|
+
//@AttrData
|
|
15
|
+
Attr:{}, //对外开发编辑属性
|
|
16
|
+
//@EndAttrData
|
|
17
|
+
|
|
18
|
+
// #endif
|
|
19
|
+
cssRoot: 'jfb-base-withdraw'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
created() {
|
|
23
|
+
|
|
24
|
+
//@AttrDataCreated
|
|
25
|
+
this.Attr = this.$xdUniHelper.customClone(Attr);
|
|
26
|
+
//@EndAttrDataCreated
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
}
|