jufubao-base 1.0.56-beta2000 → 1.0.56-beta2002
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/JfbBaseCardMergeEntry/Api.js +61 -0
- package/src/components/JfbBaseCardMergeEntry/Attr.js +237 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntry.vue +330 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryLess.less +80 -0
- package/src/components/JfbBaseCardMergeEntry/JfbBaseCardMergeEntryMixin.js +30 -0
- package/src/components/JfbBaseCardMergeEntry/Mock.js +5 -0
- package/src/components/JfbBaseCardShiftEntry/Api.js +51 -0
- package/src/components/JfbBaseCardShiftEntry/Attr.js +235 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntry.vue +302 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryLess.less +80 -0
- package/src/components/JfbBaseCardShiftEntry/JfbBaseCardShiftEntryMixin.js +30 -0
- package/src/components/JfbBaseSuccess/JfbBaseSuccess.vue +75 -51
- package/src/components/JfbBaseSuccess/Mock.js +5 -0
package/package.json
CHANGED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description API模型
|
|
5
|
+
* 建议:Ffff=>模块 Xxxx=>自定义名字
|
|
6
|
+
* 获取单记录(getByIdFfffXxxx)
|
|
7
|
+
* 获取列表记录(getByListFfffXxxx)
|
|
8
|
+
* 添加列表记录(addFfffXxxxx)
|
|
9
|
+
* 删除列表记录(removeFfffXxxxx|deleteFfffXxxx)
|
|
10
|
+
* 更新列表记录(updateFfffXxxxx)
|
|
11
|
+
* @type {*[]}
|
|
12
|
+
*/
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mapFnName: 'fromCardListEntry',
|
|
16
|
+
title: '转出卡号列表',
|
|
17
|
+
path: '/card/v1/card-merge/list-card-merge',
|
|
18
|
+
isRule: false,
|
|
19
|
+
params: {},
|
|
20
|
+
isConsole: true,
|
|
21
|
+
disabled: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
mapFnName: 'toCardListEntry',
|
|
25
|
+
title: '转入卡号列表',
|
|
26
|
+
path: '/card/v1/card-merge/list-can-use-card-merge',
|
|
27
|
+
isRule: false,
|
|
28
|
+
params: {
|
|
29
|
+
card_number: ['来源卡', 'String', '必选'],
|
|
30
|
+
},
|
|
31
|
+
isConsole: true,
|
|
32
|
+
disabled: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
mapFnName: 'mergeCardEntry',
|
|
36
|
+
title: '合并卡',
|
|
37
|
+
path: '/card/v1/card-merge/merge-card',
|
|
38
|
+
isRule: false,
|
|
39
|
+
data: {
|
|
40
|
+
from_card_number: ['来源卡', 'String', '必选'],
|
|
41
|
+
to_card_number: ['转到卡', 'String', '必选']
|
|
42
|
+
},
|
|
43
|
+
isConsole: true,
|
|
44
|
+
disabled: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
mapFnName: 'getListBaseNewsContent',
|
|
48
|
+
title: '获取内容',
|
|
49
|
+
path: '/cms/v1/news-content',
|
|
50
|
+
isRule: false,
|
|
51
|
+
params: {
|
|
52
|
+
scene: ['使用场景', 'String', '选填'],
|
|
53
|
+
container_id: ['插件ID', 'String', '必填'],
|
|
54
|
+
page_id: ['页面ID', 'String', '必填'],
|
|
55
|
+
page_size: ['记录条数', 'Number', '必填', 1],
|
|
56
|
+
code: ['业务线id', 'String', '选填'],
|
|
57
|
+
},
|
|
58
|
+
isConsole: true,
|
|
59
|
+
disabled: true,
|
|
60
|
+
},
|
|
61
|
+
];
|
|
@@ -0,0 +1,237 @@
|
|
|
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-news',
|
|
13
|
+
valueKey: 'notice',
|
|
14
|
+
value: data.notice || null,
|
|
15
|
+
className: 'input70',
|
|
16
|
+
setting: {
|
|
17
|
+
config: {
|
|
18
|
+
sort: true,
|
|
19
|
+
maxlen: 100,
|
|
20
|
+
action: 'aliyun',
|
|
21
|
+
size: 5,
|
|
22
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
|
|
23
|
+
uploadType: 'aliyun',
|
|
24
|
+
type: ['jpg', 'png', 'jpeg']
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
handleCustom({action, data}) {
|
|
28
|
+
if (data && data.params) {
|
|
29
|
+
//当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
|
|
30
|
+
//data.params = Object.assign({}, data.params, {code: 'g_test_id'});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//获取返回参数(场景类型名称为必填)
|
|
34
|
+
let loading = XdBus.getParentApi('loading')({});
|
|
35
|
+
|
|
36
|
+
//获取显示内容
|
|
37
|
+
if (action === 'screen') {
|
|
38
|
+
XdBus.getParentApi('getOptionsSettingList')({setting_id: 'edtix_bucket_content_tip'})
|
|
39
|
+
.then(res => {
|
|
40
|
+
loading.close();
|
|
41
|
+
data.cb(res['list'])
|
|
42
|
+
})
|
|
43
|
+
.catch(error => {
|
|
44
|
+
console.error(error);
|
|
45
|
+
loading.close();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//获取返回参数(广告位高度必选项)
|
|
51
|
+
if (action === 'getNewsInfo') {
|
|
52
|
+
XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
|
|
53
|
+
.then(res => {
|
|
54
|
+
loading.close()
|
|
55
|
+
data.cb({list: res.list, selectId: res.selected})
|
|
56
|
+
})
|
|
57
|
+
.catch(error => {
|
|
58
|
+
loading.close()
|
|
59
|
+
console.error(error);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//获取产品业务线列表
|
|
64
|
+
if (action === 'namespace') {
|
|
65
|
+
XdBus.getParentApi('getOptionsNamespaces')({})
|
|
66
|
+
.then(res => {
|
|
67
|
+
loading.close()
|
|
68
|
+
data.cb(res['list'])
|
|
69
|
+
})
|
|
70
|
+
.catch(error => {
|
|
71
|
+
loading.close()
|
|
72
|
+
console.error(error);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//使用内容分类
|
|
77
|
+
if (action === 'cmsPublishEditxContent') {
|
|
78
|
+
XdBus.getParentApi('cmsPublishEditxContent')(data.params)
|
|
79
|
+
.then(res => {
|
|
80
|
+
console.log('cmsPublishEditxContent', res)
|
|
81
|
+
loading.close();
|
|
82
|
+
data.cb(res)
|
|
83
|
+
})
|
|
84
|
+
.catch(error => {
|
|
85
|
+
loading.close();
|
|
86
|
+
console.error(error);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//位置列表
|
|
91
|
+
if (action === 'getListPostion') {
|
|
92
|
+
XdBus.getParentApi('getListNewsPosition')(data.params)
|
|
93
|
+
.then(res => {
|
|
94
|
+
loading.close();
|
|
95
|
+
data.cb(res)
|
|
96
|
+
})
|
|
97
|
+
.catch(error => {
|
|
98
|
+
loading.close();
|
|
99
|
+
console.error(error);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//位置创建
|
|
104
|
+
if (action === 'addPostion') {
|
|
105
|
+
XdBus.getParentApi('addNewsPosition')(data.params)
|
|
106
|
+
.then(res => {
|
|
107
|
+
loading.close();
|
|
108
|
+
data.cb(true)
|
|
109
|
+
})
|
|
110
|
+
.catch(error => {
|
|
111
|
+
console.error(error);
|
|
112
|
+
loading.close();
|
|
113
|
+
data.cb(false)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
//位置编辑
|
|
118
|
+
if (action === 'editPostion') {
|
|
119
|
+
XdBus.getParentApi('updateNewsPosition')(data.params)
|
|
120
|
+
.then(res => {
|
|
121
|
+
loading.close();
|
|
122
|
+
data.cb(true)
|
|
123
|
+
})
|
|
124
|
+
.catch(error => {
|
|
125
|
+
console.error(error);
|
|
126
|
+
loading.close();
|
|
127
|
+
data.cb(false)
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//位置删除
|
|
132
|
+
if (action === 'deleltePostion') {
|
|
133
|
+
XdBus.getParentApi('deleteNewsPosition')(data.params)
|
|
134
|
+
.then(res => {
|
|
135
|
+
loading.close();
|
|
136
|
+
data.cb(true)
|
|
137
|
+
})
|
|
138
|
+
.catch(error => {
|
|
139
|
+
console.error(error);
|
|
140
|
+
loading.close();
|
|
141
|
+
data.cb(false)
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
//获取广告位内容列表
|
|
146
|
+
if (action === 'getListContent') {
|
|
147
|
+
XdBus.getParentApi('getListNewsContent')(data.params)
|
|
148
|
+
.then(res => {
|
|
149
|
+
loading.close();
|
|
150
|
+
data.cb(res)
|
|
151
|
+
})
|
|
152
|
+
.catch(error => {
|
|
153
|
+
loading.close();
|
|
154
|
+
console.error(error);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
//广告内容创建
|
|
159
|
+
if (action === 'addContent') {
|
|
160
|
+
XdBus.getParentApi('addNewsContent')(data.params)
|
|
161
|
+
.then(res => {
|
|
162
|
+
loading.close();
|
|
163
|
+
data.cb(true)
|
|
164
|
+
})
|
|
165
|
+
.catch(error => {
|
|
166
|
+
console.error(error);
|
|
167
|
+
loading.close();
|
|
168
|
+
data.cb(false)
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
//广告内容编辑
|
|
173
|
+
if (action === 'editContent') {
|
|
174
|
+
XdBus.getParentApi('updateNewsContent')(data.params)
|
|
175
|
+
.then(res => {
|
|
176
|
+
loading.close();
|
|
177
|
+
data.cb(true)
|
|
178
|
+
})
|
|
179
|
+
.catch(error => {
|
|
180
|
+
console.error(error);
|
|
181
|
+
loading.close();
|
|
182
|
+
data.cb(false)
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//广告内容删除
|
|
187
|
+
if (action === 'deleteContent') {
|
|
188
|
+
XdBus.getParentApi('deleteNewsContent')(data.params)
|
|
189
|
+
.then(res => {
|
|
190
|
+
loading.close();
|
|
191
|
+
data.cb(true)
|
|
192
|
+
})
|
|
193
|
+
.catch(error => {
|
|
194
|
+
console.error(error);
|
|
195
|
+
loading.close();
|
|
196
|
+
data.cb(false)
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//内容发布
|
|
201
|
+
if (action === 'publish') {
|
|
202
|
+
console.log('publish', data.params)
|
|
203
|
+
XdBus.getParentApi('cmsPublishContent')(data.params)
|
|
204
|
+
.then(res => {
|
|
205
|
+
loading.close();
|
|
206
|
+
data.cb(res)
|
|
207
|
+
})
|
|
208
|
+
.catch(error => {
|
|
209
|
+
loading.close();
|
|
210
|
+
console.error(error);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
//通知页面进行刷新
|
|
215
|
+
if (action === 'update') {
|
|
216
|
+
XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
|
|
217
|
+
loading.close()
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
inline: false,
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: '卡券主页:', //label
|
|
224
|
+
ele: 'xd-select-pages-path', //package 名称
|
|
225
|
+
valueKey: 'cardPath', //form[valueKey]
|
|
226
|
+
placeholder: '请选择卡券主页地址',
|
|
227
|
+
value: data.cardPath || null,
|
|
228
|
+
setting: {
|
|
229
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
230
|
+
},
|
|
231
|
+
inline: false,
|
|
232
|
+
},
|
|
233
|
+
].filter(i=>i)
|
|
234
|
+
},
|
|
235
|
+
advanced: [
|
|
236
|
+
],
|
|
237
|
+
};
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="jfb-base-card-merge-entry"
|
|
4
|
+
@click="handleEditxSelect"
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
|
+
>
|
|
7
|
+
<!--#ifdef H5-->
|
|
8
|
+
<view
|
|
9
|
+
class="jfb-base-card-merge-entry__edit"
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
|
+
v-if="isEditx && active"
|
|
12
|
+
>
|
|
13
|
+
<view class="jfb-base-card-merge-entry__edit-icon" @click="delEdit">删除</view>
|
|
14
|
+
</view>
|
|
15
|
+
<!-- #endif -->
|
|
16
|
+
<view class="jfb-base-card-merge-entry__body">
|
|
17
|
+
<xd-form
|
|
18
|
+
label-width="150"
|
|
19
|
+
label-align="left"
|
|
20
|
+
labelPosition="top"
|
|
21
|
+
content-align="left"
|
|
22
|
+
>
|
|
23
|
+
<xd-form-item label="转出的卡号(清零的):" content-align="left">
|
|
24
|
+
<view>
|
|
25
|
+
<xd-form-select
|
|
26
|
+
@change="handleChangeFrom"
|
|
27
|
+
placeholder="请选择"
|
|
28
|
+
:list="fromList"
|
|
29
|
+
v-model="mergeForm.from_card_number"
|
|
30
|
+
/>
|
|
31
|
+
</view>
|
|
32
|
+
</xd-form-item>
|
|
33
|
+
<xd-form-item :key="randomKey" label="转入的卡号(合并到的):" content-align="left">
|
|
34
|
+
<view>
|
|
35
|
+
<xd-form-select
|
|
36
|
+
@change="handleChangeTo"
|
|
37
|
+
placeholder="请选择"
|
|
38
|
+
:list="toList"
|
|
39
|
+
v-model="mergeForm.to_card_number"
|
|
40
|
+
/>
|
|
41
|
+
</view>
|
|
42
|
+
</xd-form-item>
|
|
43
|
+
<xd-form-item
|
|
44
|
+
label="验证码:"
|
|
45
|
+
content-align="left"
|
|
46
|
+
labelPosition="left"
|
|
47
|
+
labelAlign="left"
|
|
48
|
+
>
|
|
49
|
+
<view class="flex align-center">
|
|
50
|
+
<xd-form-input
|
|
51
|
+
placeholder="请输入验证码"
|
|
52
|
+
v-model="mergeForm.valid_code"
|
|
53
|
+
/>
|
|
54
|
+
<view
|
|
55
|
+
v-if="mergeForm.valid_token"
|
|
56
|
+
class="capture"
|
|
57
|
+
@click="switchValidToken"
|
|
58
|
+
>
|
|
59
|
+
<image
|
|
60
|
+
style="width: 100%; height: 100%"
|
|
61
|
+
:src="
|
|
62
|
+
validImageAPIUrl +
|
|
63
|
+
'?image_width=180&image_height=80&token=' +
|
|
64
|
+
mergeForm.valid_token
|
|
65
|
+
"
|
|
66
|
+
/>
|
|
67
|
+
</view>
|
|
68
|
+
</view>
|
|
69
|
+
</xd-form-item>
|
|
70
|
+
</xd-form>
|
|
71
|
+
<view class="jfb-base-card-merge-entry__body-btn">
|
|
72
|
+
<xd-button @click="handleToSubmit" width="90%" type="primary" >提交</xd-button>
|
|
73
|
+
</view>
|
|
74
|
+
</view>
|
|
75
|
+
<view class="xd-notice" :style="{ color: warningColor }" v-if="content">
|
|
76
|
+
<xd-content-xss v-html="content"></xd-content-xss>
|
|
77
|
+
</view>
|
|
78
|
+
<view
|
|
79
|
+
v-if="isPreview && statusContent === true && content === '' "
|
|
80
|
+
class="xd-notice"
|
|
81
|
+
:style="{ color: dangerColor,fontSize: 24 + 'rpx' }"
|
|
82
|
+
>温馨提示未配置数据,因此改模块在正式环境将不显示</view>
|
|
83
|
+
</view>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
88
|
+
import XdForm from "@/components/XdForm/XdForm";
|
|
89
|
+
import XdFormItem from "@/components/XdFormItem/XdFormItem";
|
|
90
|
+
import XdFormSelect from "@/components/XdFormSelect/XdFormSelect";
|
|
91
|
+
import XdFormInput from "@/components/XdFormInput/XdFormInput";
|
|
92
|
+
import XdButton from "@/components/XdButton/XdButton";
|
|
93
|
+
import XdContentXss from '@/components/XdContentXss/XdContentXss'
|
|
94
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
95
|
+
import JfbBaseCardMergeMixin from "./JfbBaseCardMergeMixin";
|
|
96
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
97
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
98
|
+
import { mapState } from "vuex";
|
|
99
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
100
|
+
|
|
101
|
+
const Color = require('color');
|
|
102
|
+
|
|
103
|
+
export default {
|
|
104
|
+
name: "JfbBaseCardMerge",
|
|
105
|
+
components: {
|
|
106
|
+
XdFontIcon,
|
|
107
|
+
XdFormSelect,
|
|
108
|
+
XdForm,
|
|
109
|
+
XdFormItem,
|
|
110
|
+
XdFormInput,
|
|
111
|
+
XdButton,
|
|
112
|
+
XdContentXss
|
|
113
|
+
},
|
|
114
|
+
mixins: [componentsMixins, extsMixins, JfbBaseCardMergeMixin],
|
|
115
|
+
data() {
|
|
116
|
+
return {
|
|
117
|
+
mergeForm: {},
|
|
118
|
+
|
|
119
|
+
fromList: [],
|
|
120
|
+
toList: [],
|
|
121
|
+
fromSelect: null,
|
|
122
|
+
toSelect: null,
|
|
123
|
+
randomKey: Date.now(),
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
content: "",
|
|
127
|
+
contentBackgroundColor: '',
|
|
128
|
+
|
|
129
|
+
selfMask: true,
|
|
130
|
+
cardPath: '', //卡券主页
|
|
131
|
+
|
|
132
|
+
//提示文案
|
|
133
|
+
isPreview: false,
|
|
134
|
+
statusContent: false,
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
computed: {
|
|
138
|
+
...mapState({
|
|
139
|
+
brandInfo: (state) => state.brandInfo,
|
|
140
|
+
}),
|
|
141
|
+
},
|
|
142
|
+
watch: {
|
|
143
|
+
container(value) {
|
|
144
|
+
this.init(value);
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
created() {
|
|
148
|
+
this.init(this.container);
|
|
149
|
+
this.isPreview = this.$configProject.isPreview;
|
|
150
|
+
this.switchValidToken();
|
|
151
|
+
this.validImageAPIUrl = this.brandInfo["api_host"] + "/common/v1/valid_code/image/show";
|
|
152
|
+
this.contentBackgroundColor = Color(this.warningColor).alpha(0.2).toString();
|
|
153
|
+
},
|
|
154
|
+
methods: {
|
|
155
|
+
onJfbLoad(options) {
|
|
156
|
+
this.getContent();
|
|
157
|
+
jfbRootExec("fromCardList", {
|
|
158
|
+
vm: this,
|
|
159
|
+
data: {},
|
|
160
|
+
})
|
|
161
|
+
.then((res) => {
|
|
162
|
+
this.fromList = res.list.map((item) => {
|
|
163
|
+
return {
|
|
164
|
+
label: item.card_number,
|
|
165
|
+
value: item.card_number,
|
|
166
|
+
card_point: item.card_point,
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
})
|
|
170
|
+
.catch((err) => {
|
|
171
|
+
console.log(err, "err");
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
getContent() {
|
|
175
|
+
jfbRootExec("getListBaseNewsContent", {
|
|
176
|
+
vm: this,
|
|
177
|
+
data: {
|
|
178
|
+
page_id: this.pageAttr["page_id"], //页面ID
|
|
179
|
+
container_id: this.containerId, //组件ID
|
|
180
|
+
page_size:1
|
|
181
|
+
},
|
|
182
|
+
})
|
|
183
|
+
.then((res) => {
|
|
184
|
+
this.content = res.list[0].content;
|
|
185
|
+
this.statusContent = true;
|
|
186
|
+
console.log(this.content, "this.content");
|
|
187
|
+
})
|
|
188
|
+
.catch((error) => {
|
|
189
|
+
console.error(error);
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* @description 监听事件变化
|
|
194
|
+
* @param container {object} 业务组件对象自己
|
|
195
|
+
*/
|
|
196
|
+
init(container) {
|
|
197
|
+
this.textColor = getContainerPropsValue(
|
|
198
|
+
container,
|
|
199
|
+
"content.textColor",
|
|
200
|
+
this.warningColor
|
|
201
|
+
);
|
|
202
|
+
this.cardPath = getContainerPropsValue(container, "content.cardPath", {value: ""}).value;
|
|
203
|
+
},
|
|
204
|
+
//刷新图片验证码
|
|
205
|
+
switchValidToken() {
|
|
206
|
+
let valid_token = this.$xdUniHelper.randomChar(20);
|
|
207
|
+
this.$set(this.mergeForm, "valid_token", valid_token);
|
|
208
|
+
},
|
|
209
|
+
handleToSubmit() {
|
|
210
|
+
if (!this.mergeForm.valid_code) {
|
|
211
|
+
uni.showToast({
|
|
212
|
+
title: "验证码不能为空!",
|
|
213
|
+
icon: "none",
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this.$xdConfirm({
|
|
218
|
+
title: "是否确认合并卡",
|
|
219
|
+
isHtml: true,
|
|
220
|
+
$vm: this,
|
|
221
|
+
content: `转出卡号:${
|
|
222
|
+
this.mergeForm.from_card_number
|
|
223
|
+
}(剩余点数:${this.$xdUniHelper.divisionFloatNumber(
|
|
224
|
+
this.fromSelect.card_point,
|
|
225
|
+
100
|
|
226
|
+
)});<br/>转入卡号:${
|
|
227
|
+
this.mergeForm.to_card_number
|
|
228
|
+
}(剩余点数:${this.$xdUniHelper.divisionFloatNumber(
|
|
229
|
+
this.toSelect.card_point,
|
|
230
|
+
100
|
|
231
|
+
)})`,
|
|
232
|
+
success: (action) => {
|
|
233
|
+
if (action.confirm) {
|
|
234
|
+
if(this.$configProject.isPreview) return;
|
|
235
|
+
jfbRootExec("mergeCard", {
|
|
236
|
+
vm: this,
|
|
237
|
+
data: {
|
|
238
|
+
from_card_number: this.mergeForm.from_card_number,
|
|
239
|
+
to_card_number: this.mergeForm.to_card_number,
|
|
240
|
+
valid_code: this.mergeForm.valid_code,
|
|
241
|
+
valid_token: this.mergeForm.valid_token
|
|
242
|
+
},
|
|
243
|
+
})
|
|
244
|
+
.then((res) => {
|
|
245
|
+
this.$xdAlert({
|
|
246
|
+
content: '合卡成功!'
|
|
247
|
+
})
|
|
248
|
+
this.$xdUniHelper.navigateTo({
|
|
249
|
+
url: this.cardPath
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
.catch((err) => {
|
|
253
|
+
console.log(err, "err");
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
},
|
|
259
|
+
handleChangeFrom(select) {
|
|
260
|
+
this.fromSelect = select.item;
|
|
261
|
+
jfbRootExec("toCardList", {
|
|
262
|
+
vm: this,
|
|
263
|
+
data: {
|
|
264
|
+
card_number: select.item.value,
|
|
265
|
+
},
|
|
266
|
+
})
|
|
267
|
+
.then((res) => {
|
|
268
|
+
this.mergeForm.to_card_number = ''
|
|
269
|
+
this.randomKey = Date.now()
|
|
270
|
+
this.toList = res.list.map((item) => {
|
|
271
|
+
return {
|
|
272
|
+
label: item.card_number,
|
|
273
|
+
value: item.card_number,
|
|
274
|
+
card_point: item.card_point,
|
|
275
|
+
};
|
|
276
|
+
});
|
|
277
|
+
})
|
|
278
|
+
.catch((err) => {
|
|
279
|
+
console.log(err, "err");
|
|
280
|
+
});
|
|
281
|
+
},
|
|
282
|
+
handleChangeTo(select) {
|
|
283
|
+
this.toSelect = select.item;
|
|
284
|
+
},
|
|
285
|
+
onJfbUpdate(data) {
|
|
286
|
+
this.getContent();
|
|
287
|
+
},
|
|
288
|
+
onJfbShow(options) {
|
|
289
|
+
this.onJfbLoad(options);
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
</script>
|
|
294
|
+
|
|
295
|
+
<style scoped lang="less">
|
|
296
|
+
@import "./JfbBaseCardMergeLess.less";
|
|
297
|
+
|
|
298
|
+
.xd-notice {
|
|
299
|
+
padding: unit(40, rpx);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/deep/ .is-required {
|
|
303
|
+
display: none;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/deep/ .uni-forms-item__label .label-text {
|
|
307
|
+
font-size: unit(28, rpx)
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.jfb-base-card-merge-entry {
|
|
311
|
+
&__body {
|
|
312
|
+
padding-top: unit(40,rpx);
|
|
313
|
+
.capture {
|
|
314
|
+
width: unit(160, rpx);
|
|
315
|
+
height: unit(70, rpx);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.flex {
|
|
319
|
+
display: flex;
|
|
320
|
+
}
|
|
321
|
+
.align-center {
|
|
322
|
+
align-items: center;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&-btn {
|
|
326
|
+
padding-bottom: unit(20, rpx);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
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-card-merge-entry {
|
|
16
|
+
border: 1px dashed rgba(0, 0, 0, 0);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
min-height: unit(100, rpx);
|
|
19
|
+
|
|
20
|
+
&__body{
|
|
21
|
+
position: relative;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
z-index: 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.editx {
|
|
27
|
+
position: relative;
|
|
28
|
+
border: 1px dashed blue;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
z-index: 3
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
border: 1px dashed blue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.noBorder {
|
|
39
|
+
border-color: rgba(0,0,0,0);
|
|
40
|
+
border-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
&__edit {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: unit(0, rpx);
|
|
48
|
+
top: unit(-52, rpx);
|
|
49
|
+
height: unit(50, rpx);
|
|
50
|
+
line-height: unit(50, rpx);
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
background: rgba(0, 0, 0, .6);
|
|
55
|
+
border-radius: unit(10, rpx);
|
|
56
|
+
box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
|
|
57
|
+
color: #fff;
|
|
58
|
+
font-size: unit(22, rpx);
|
|
59
|
+
|
|
60
|
+
&-icon{
|
|
61
|
+
padding: 0 unit(20, rpx);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.editx {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//end
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**notPreview**/
|
|
74
|
+
.jfb-base-card-merge-entry {
|
|
75
|
+
&:before {
|
|
76
|
+
content: " ";
|
|
77
|
+
display: table;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**endNotPreview**/
|