hs-admin-ui 17.0.2 → 17.0.4
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/dist/business-BjiJZ1r_.js +25132 -0
- package/dist/element-plus-ui.mjs +19 -12
- package/dist/h5.mjs +442 -354
- package/dist/index-CriCbWfy.js +1691 -0
- package/dist/index.mjs +436 -351
- package/dist/lodash-D9wEYdiM.js +7396 -0
- package/dist/style.css +1894 -1
- package/dist/trtc-sdk-v5-6h0y3EaH.js +13358 -0
- package/dist/vendor-DgfWUdiw.js +154250 -0
- package/dist/vxe-table-ui.mjs +21 -14
- package/package.json +1 -1
- package/dist/business-BHAErSNU.js +0 -20298
- package/dist/index-pd_Zrkqr.js +0 -1277
- package/dist/lodash-FlWkeY7g.js +0 -5045
- package/dist/trtc-sdk-v5-CYnjBKGd.js +0 -13452
- package/dist/vendor-BCnlL5Mb.js +0 -105153
package/dist/h5.mjs
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { bp as
|
|
2
|
-
import { defineComponent
|
|
3
|
-
import { _
|
|
4
|
-
import { Z as
|
|
5
|
-
const
|
|
1
|
+
import { bp as ElUpload, a3 as ElButton, aA as ElIcon, bx as location_default, aY as ElScrollbar, ax as ElForm, ay as ElFormItem, H as ElInput, aU as ElRadioGroup, aS as ElRadio, a as ElMessageBox, E as ElMessage, I as ElLoading } from "./vendor-DgfWUdiw.js";
|
|
2
|
+
import { defineComponent, shallowRef, reactive, computed, watch, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createVNode, unref, withCtx, createTextVNode, ref, onMounted, onUnmounted, toDisplayString, Fragment, renderList } from "vue";
|
|
3
|
+
import { _ } from "./lodash-D9wEYdiM.js";
|
|
4
|
+
import { Z as request, _ as _export_sfc, $ as request$1, a0 as getUrlParams } from "./business-BjiJZ1r_.js";
|
|
5
|
+
const _hoisted_1$1 = { class: "upload-wrapper" };
|
|
6
|
+
const _hoisted_2$1 = { class: "upload-wrapper-inner" };
|
|
7
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
6
8
|
__name: "Upload",
|
|
7
9
|
props: {
|
|
8
10
|
action: {
|
|
9
11
|
type: String,
|
|
10
|
-
required:
|
|
12
|
+
required: true
|
|
11
13
|
},
|
|
12
14
|
proxy: {
|
|
13
15
|
type: String,
|
|
14
|
-
required:
|
|
16
|
+
required: true
|
|
15
17
|
},
|
|
16
18
|
headers: {
|
|
17
19
|
type: Object,
|
|
18
|
-
default: () =>
|
|
20
|
+
default: () => {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
19
23
|
},
|
|
20
24
|
limit: {
|
|
21
25
|
type: Number,
|
|
@@ -23,73 +27,83 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
emits: ["success"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
setup(__props, { emit: __emit }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const emit = __emit;
|
|
33
|
+
const uploadRef = shallowRef();
|
|
34
|
+
const state = reactive({
|
|
35
|
+
loading: false,
|
|
36
|
+
preview: false,
|
|
30
37
|
index: 0,
|
|
31
|
-
headers:
|
|
38
|
+
headers: props.headers,
|
|
32
39
|
fileList: []
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
40
|
+
});
|
|
41
|
+
const fileList = computed(() => state.fileList.map((i) => i.url));
|
|
42
|
+
watch(
|
|
43
|
+
() => state.fileList.length,
|
|
44
|
+
(val) => {
|
|
37
45
|
setTimeout(() => {
|
|
38
|
-
const
|
|
39
|
-
|
|
46
|
+
const el = document.querySelector(`.upload-wrapper .el-upload--picture-card`);
|
|
47
|
+
if (el) {
|
|
48
|
+
el.style.display = val >= props.limit && val > 0 ? "none" : "inline-flex";
|
|
49
|
+
}
|
|
40
50
|
}, 100);
|
|
41
51
|
},
|
|
42
52
|
{
|
|
43
|
-
immediate:
|
|
53
|
+
immediate: true
|
|
44
54
|
}
|
|
45
55
|
);
|
|
46
|
-
async function
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
async function beforeUpload() {
|
|
57
|
+
if (!_.isEmpty(props.headers)) return;
|
|
58
|
+
return request({
|
|
59
|
+
url: `${window.location.origin}/${props.proxy}/pub_token/mobile_attach_push`
|
|
60
|
+
}).then((res) => {
|
|
61
|
+
state.headers = {
|
|
62
|
+
Authorization: `Bearer ${res == null ? void 0 : res.access_token}`
|
|
63
|
+
};
|
|
64
|
+
});
|
|
55
65
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
66
|
+
function onPreview(uploadFile) {
|
|
67
|
+
state.index = state.fileList.findIndex((i) => i.url === uploadFile.url);
|
|
68
|
+
state.preview = true;
|
|
58
69
|
}
|
|
59
|
-
async function
|
|
60
|
-
|
|
70
|
+
async function submitUpload() {
|
|
71
|
+
state.loading = true;
|
|
72
|
+
uploadRef.value.submit();
|
|
61
73
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
74
|
+
function onSuccess(result, file, files) {
|
|
75
|
+
state.loading = false;
|
|
76
|
+
emit("success", { result, file, files });
|
|
64
77
|
}
|
|
65
|
-
return (
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
const _component_el_image_viewer = resolveComponent("el-image-viewer");
|
|
80
|
+
const _directive_loading = resolveDirective("loading");
|
|
81
|
+
return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
82
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
83
|
+
createVNode(unref(ElUpload), {
|
|
70
84
|
ref_key: "uploadRef",
|
|
71
|
-
ref:
|
|
72
|
-
"file-list":
|
|
73
|
-
"onUpdate:fileList":
|
|
85
|
+
ref: uploadRef,
|
|
86
|
+
"file-list": state.fileList,
|
|
87
|
+
"onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => state.fileList = $event),
|
|
74
88
|
"list-type": "picture-card",
|
|
75
89
|
accept: "image/*",
|
|
76
90
|
name: "file",
|
|
77
|
-
action:
|
|
78
|
-
headers:
|
|
79
|
-
limit:
|
|
80
|
-
"auto-upload":
|
|
81
|
-
"on-preview":
|
|
82
|
-
"before-upload":
|
|
83
|
-
"on-success":
|
|
91
|
+
action: __props.action,
|
|
92
|
+
headers: state.headers,
|
|
93
|
+
limit: __props.limit,
|
|
94
|
+
"auto-upload": false,
|
|
95
|
+
"on-preview": onPreview,
|
|
96
|
+
"before-upload": beforeUpload,
|
|
97
|
+
"on-success": onSuccess
|
|
84
98
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
|
|
99
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
100
|
+
createElementVNode("svg", {
|
|
87
101
|
width: "34",
|
|
88
102
|
height: "34",
|
|
89
103
|
viewBox: "0 0 100 100",
|
|
90
104
|
xmlns: "http://www.w3.org/2000/svg"
|
|
91
105
|
}, [
|
|
92
|
-
|
|
106
|
+
createElementVNode("rect", {
|
|
93
107
|
x: "45",
|
|
94
108
|
y: "20",
|
|
95
109
|
width: "10",
|
|
@@ -97,7 +111,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
97
111
|
rx: "2",
|
|
98
112
|
fill: "#1677ff"
|
|
99
113
|
}),
|
|
100
|
-
|
|
114
|
+
createElementVNode("rect", {
|
|
101
115
|
x: "20",
|
|
102
116
|
y: "45",
|
|
103
117
|
width: "60",
|
|
@@ -110,34 +124,37 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
110
124
|
_: 1
|
|
111
125
|
}, 8, ["file-list", "action", "headers", "limit"])
|
|
112
126
|
]),
|
|
113
|
-
|
|
127
|
+
state.preview ? (openBlock(), createBlock(_component_el_image_viewer, {
|
|
114
128
|
key: 0,
|
|
115
|
-
"url-list":
|
|
129
|
+
"url-list": fileList.value,
|
|
116
130
|
"show-progress": "",
|
|
117
|
-
"initial-index":
|
|
118
|
-
onClose:
|
|
119
|
-
}, null, 8, ["url-list", "initial-index"])) :
|
|
120
|
-
|
|
131
|
+
"initial-index": state.index,
|
|
132
|
+
onClose: _cache[1] || (_cache[1] = ($event) => state.preview = false)
|
|
133
|
+
}, null, 8, ["url-list", "initial-index"])) : createCommentVNode("", true),
|
|
134
|
+
createVNode(unref(ElButton), {
|
|
121
135
|
size: "large",
|
|
122
136
|
type: "primary",
|
|
123
|
-
onClick:
|
|
137
|
+
onClick: submitUpload
|
|
124
138
|
}, {
|
|
125
|
-
default:
|
|
126
|
-
|
|
139
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
140
|
+
createTextVNode("上传", -1)
|
|
127
141
|
])]),
|
|
128
142
|
_: 1
|
|
129
143
|
})
|
|
130
144
|
])), [
|
|
131
|
-
[
|
|
145
|
+
[_directive_loading, state.loading]
|
|
132
146
|
]);
|
|
133
147
|
};
|
|
134
148
|
}
|
|
135
|
-
})
|
|
149
|
+
});
|
|
150
|
+
const Upload = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e6f86e2e"]]);
|
|
151
|
+
const GENDER_OPTIONS = [
|
|
136
152
|
{ label: "男", value: "男" },
|
|
137
153
|
{ label: "女", value: "女" }
|
|
138
|
-
]
|
|
154
|
+
];
|
|
155
|
+
const VALIDATION_RULES = {
|
|
139
156
|
name: {
|
|
140
|
-
required:
|
|
157
|
+
required: true,
|
|
141
158
|
message: "请输入姓名",
|
|
142
159
|
trigger: "blur"
|
|
143
160
|
},
|
|
@@ -148,7 +165,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
148
165
|
trigger: "blur"
|
|
149
166
|
},
|
|
150
167
|
phone: {
|
|
151
|
-
required:
|
|
168
|
+
required: true,
|
|
152
169
|
message: "请输入手机号",
|
|
153
170
|
trigger: "blur"
|
|
154
171
|
},
|
|
@@ -168,7 +185,7 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
168
185
|
trigger: "blur"
|
|
169
186
|
},
|
|
170
187
|
captcha: {
|
|
171
|
-
required:
|
|
188
|
+
required: true,
|
|
172
189
|
message: "请输入验证码",
|
|
173
190
|
trigger: "blur"
|
|
174
191
|
},
|
|
@@ -177,7 +194,8 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
177
194
|
message: "验证码为6位",
|
|
178
195
|
trigger: "blur"
|
|
179
196
|
}
|
|
180
|
-
}
|
|
197
|
+
};
|
|
198
|
+
const PLACEHOLDERS = {
|
|
181
199
|
name: "请输入姓名",
|
|
182
200
|
phone: "请输入手机号",
|
|
183
201
|
idCard: "请输入身份证号",
|
|
@@ -185,27 +203,41 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
185
203
|
address: "请输入地址",
|
|
186
204
|
remark: "请输入备注",
|
|
187
205
|
captcha: "请输入验证码"
|
|
188
|
-
}
|
|
206
|
+
};
|
|
207
|
+
const FIELD_LIMITS = {
|
|
189
208
|
phone: 11,
|
|
190
209
|
idCard: 18,
|
|
191
210
|
age: 3,
|
|
192
211
|
captcha: 6
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
212
|
+
};
|
|
213
|
+
const rules = {
|
|
214
|
+
name: [VALIDATION_RULES.name, VALIDATION_RULES.nameLength],
|
|
215
|
+
phone: [VALIDATION_RULES.phone, VALIDATION_RULES.phonePattern],
|
|
216
|
+
idCard: [VALIDATION_RULES.idCardPattern],
|
|
217
|
+
age: [VALIDATION_RULES.agePattern],
|
|
218
|
+
captcha: [VALIDATION_RULES.captcha, VALIDATION_RULES.captchaLength]
|
|
219
|
+
};
|
|
220
|
+
const _hoisted_1 = { class: "member-register-page" };
|
|
221
|
+
const _hoisted_2 = { class: "page-header" };
|
|
222
|
+
const _hoisted_3 = { class: "page-subtitle" };
|
|
223
|
+
const _hoisted_4 = { class: "form-container" };
|
|
224
|
+
const _hoisted_5 = { class: "form-content" };
|
|
225
|
+
const _hoisted_6 = { class: "sms-code-wrapper" };
|
|
226
|
+
const _hoisted_7 = { class: "submit-area" };
|
|
227
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
200
228
|
__name: "MemberRegister",
|
|
201
229
|
props: {
|
|
202
230
|
proxy: {
|
|
203
231
|
type: String,
|
|
204
|
-
required:
|
|
232
|
+
required: false
|
|
205
233
|
}
|
|
206
234
|
},
|
|
207
|
-
setup(
|
|
208
|
-
const { countdownText
|
|
235
|
+
setup(__props) {
|
|
236
|
+
const { countdownText, isCountingDown, stopCountdown, sendSmsCode } = useSmsCode();
|
|
237
|
+
const formRef = ref();
|
|
238
|
+
const loading = ref(false);
|
|
239
|
+
const props = __props;
|
|
240
|
+
const form = reactive({
|
|
209
241
|
name: "",
|
|
210
242
|
gender: "男",
|
|
211
243
|
phone: "",
|
|
@@ -214,314 +246,370 @@ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" },
|
|
|
214
246
|
address: "",
|
|
215
247
|
remark: "",
|
|
216
248
|
captcha: ""
|
|
217
|
-
})
|
|
249
|
+
});
|
|
250
|
+
const companyInfo = reactive({
|
|
218
251
|
topCompanyId: "",
|
|
219
252
|
companyId: "",
|
|
220
253
|
companyName: "",
|
|
221
254
|
defaultMemberType: "",
|
|
222
255
|
discount: 0
|
|
223
|
-
})
|
|
224
|
-
|
|
256
|
+
});
|
|
257
|
+
const validateForm = async () => {
|
|
258
|
+
if (!formRef.value) return false;
|
|
225
259
|
try {
|
|
226
|
-
return await
|
|
260
|
+
return await formRef.value.validate();
|
|
227
261
|
} catch {
|
|
228
|
-
return
|
|
262
|
+
return false;
|
|
229
263
|
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
264
|
+
};
|
|
265
|
+
const handleSubmit = async () => {
|
|
266
|
+
const isValid = await validateForm();
|
|
267
|
+
if (!isValid) return;
|
|
268
|
+
loading.value = true;
|
|
269
|
+
const data = {
|
|
270
|
+
vip_name: form.name,
|
|
271
|
+
sex: form.gender,
|
|
272
|
+
telephone: form.phone,
|
|
273
|
+
identity_card: form.idCard,
|
|
274
|
+
age: form.age,
|
|
275
|
+
address: form.address,
|
|
276
|
+
remark: form.remark,
|
|
277
|
+
valid_code: form.captcha,
|
|
278
|
+
vip_type: companyInfo.defaultMemberType,
|
|
279
|
+
top_company_id: companyInfo.topCompanyId,
|
|
280
|
+
company_id: companyInfo.companyId,
|
|
281
|
+
discount: companyInfo.discount
|
|
246
282
|
};
|
|
247
283
|
try {
|
|
248
|
-
await
|
|
249
|
-
|
|
284
|
+
await request$1.post(`${props.proxy}/pub/add_vip_info`, data);
|
|
285
|
+
ElMessageBox.alert("注册成功!", "提示", {
|
|
286
|
+
closeOnClickModal: false,
|
|
250
287
|
// 禁止点击遮罩关闭
|
|
251
|
-
closeOnPressEscape:
|
|
288
|
+
closeOnPressEscape: false,
|
|
252
289
|
// 禁止 ESC 关闭
|
|
253
|
-
showClose:
|
|
290
|
+
showClose: false,
|
|
254
291
|
// 不显示右上角 ×
|
|
255
|
-
showConfirmButton:
|
|
292
|
+
showConfirmButton: false
|
|
256
293
|
// 不显示确认按钮
|
|
257
294
|
});
|
|
258
|
-
} catch {
|
|
295
|
+
} catch (error) {
|
|
259
296
|
} finally {
|
|
260
|
-
|
|
297
|
+
loading.value = false;
|
|
261
298
|
}
|
|
262
|
-
}
|
|
299
|
+
};
|
|
300
|
+
const getVipPriceSet = async () => {
|
|
263
301
|
try {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
302
|
+
const response = await request$1.get(`${props.proxy}/pub/get_list_vip_price_set?top_company_id=${companyInfo.topCompanyId}`);
|
|
303
|
+
return response.data;
|
|
304
|
+
} catch (error) {
|
|
305
|
+
ElMessage.error("获取默认会员等级失败");
|
|
267
306
|
}
|
|
268
|
-
}, C = async () => {
|
|
269
|
-
const r = ce();
|
|
270
|
-
i.topCompanyId = r.top_company_id || "", i.companyId = r.company_id || "", i.companyName = r.company_name || "";
|
|
271
|
-
const a = await s();
|
|
272
|
-
i.defaultMemberType = (a == null ? void 0 : a.id) || "", i.discount = (a == null ? void 0 : a.discount) || 0;
|
|
273
307
|
};
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
308
|
+
const dataLoad = async () => {
|
|
309
|
+
const urlParams = getUrlParams();
|
|
310
|
+
companyInfo.topCompanyId = urlParams["top_company_id"] || "";
|
|
311
|
+
companyInfo.companyId = urlParams["company_id"] || "";
|
|
312
|
+
companyInfo.companyName = urlParams["company_name"] || "";
|
|
313
|
+
const defaultMemberType = await getVipPriceSet();
|
|
314
|
+
companyInfo.defaultMemberType = (defaultMemberType == null ? void 0 : defaultMemberType.id) || "";
|
|
315
|
+
companyInfo.discount = (defaultMemberType == null ? void 0 : defaultMemberType.discount) || 0;
|
|
316
|
+
};
|
|
317
|
+
function useSmsCode() {
|
|
318
|
+
const countdown = ref(0);
|
|
319
|
+
const countdownTimer = ref(null);
|
|
320
|
+
const COUNTDOWN_SECONDS = 60;
|
|
321
|
+
const isCountingDown2 = ref(false);
|
|
322
|
+
const countdownText2 = computed(() => {
|
|
323
|
+
if (countdown.value > 0) {
|
|
324
|
+
return `${countdown.value}秒后重新发送`;
|
|
325
|
+
}
|
|
326
|
+
return "获取验证码";
|
|
327
|
+
});
|
|
328
|
+
const startCountdown = () => {
|
|
329
|
+
countdown.value = COUNTDOWN_SECONDS;
|
|
330
|
+
isCountingDown2.value = true;
|
|
331
|
+
countdownTimer.value = setInterval(() => {
|
|
332
|
+
countdown.value--;
|
|
333
|
+
if (countdown.value <= 0) {
|
|
334
|
+
stopCountdown2();
|
|
335
|
+
}
|
|
278
336
|
}, 1e3);
|
|
279
|
-
}, q = () => {
|
|
280
|
-
a.value && (clearInterval(a.value), a.value = null), r.value = 0, _.value = !1;
|
|
281
337
|
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
try {
|
|
294
|
-
await R.post(`${w.proxy}/pub/send_sms_vip_valid_code`, {
|
|
295
|
-
telephone: t.phone,
|
|
296
|
-
top_company_id: i.topCompanyId,
|
|
297
|
-
company_id: i.companyId
|
|
298
|
-
}), N.success("验证码发送成功"), j();
|
|
299
|
-
} catch {
|
|
300
|
-
} finally {
|
|
301
|
-
g.value = !1;
|
|
302
|
-
}
|
|
338
|
+
const stopCountdown2 = () => {
|
|
339
|
+
if (countdownTimer.value) {
|
|
340
|
+
clearInterval(countdownTimer.value);
|
|
341
|
+
countdownTimer.value = null;
|
|
342
|
+
}
|
|
343
|
+
countdown.value = 0;
|
|
344
|
+
isCountingDown2.value = false;
|
|
345
|
+
};
|
|
346
|
+
const sendSmsCode2 = async () => {
|
|
347
|
+
if (isCountingDown2.value) {
|
|
348
|
+
return;
|
|
303
349
|
}
|
|
350
|
+
if (!formRef.value) return;
|
|
351
|
+
const isValid = await formRef.value.validateField("phone");
|
|
352
|
+
if (!isValid) {
|
|
353
|
+
ElMessage.warning("请先输入正确的手机号");
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
loading.value = true;
|
|
357
|
+
try {
|
|
358
|
+
await request$1.post(`${props.proxy}/pub/send_sms_vip_valid_code`, {
|
|
359
|
+
telephone: form.phone,
|
|
360
|
+
top_company_id: companyInfo.topCompanyId,
|
|
361
|
+
company_id: companyInfo.companyId
|
|
362
|
+
});
|
|
363
|
+
ElMessage.success("验证码发送成功");
|
|
364
|
+
startCountdown();
|
|
365
|
+
} catch (error) {
|
|
366
|
+
} finally {
|
|
367
|
+
loading.value = false;
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
return {
|
|
371
|
+
countdownText: countdownText2,
|
|
372
|
+
isCountingDown: isCountingDown2,
|
|
373
|
+
stopCountdown: stopCountdown2,
|
|
374
|
+
sendSmsCode: sendSmsCode2
|
|
304
375
|
};
|
|
305
376
|
}
|
|
306
|
-
function
|
|
307
|
-
if (
|
|
308
|
-
const
|
|
309
|
-
|
|
377
|
+
function handleIdCardInputEnd() {
|
|
378
|
+
if (form.idCard.length === 18) {
|
|
379
|
+
const birthDate = form.idCard.substring(6, 14);
|
|
380
|
+
const birthYear = parseInt(birthDate.substring(0, 4));
|
|
381
|
+
const birthMonth = parseInt(birthDate.substring(4, 6));
|
|
382
|
+
const birthDay = parseInt(birthDate.substring(6, 8));
|
|
383
|
+
const age = (/* @__PURE__ */ new Date()).getFullYear() - birthYear - ((/* @__PURE__ */ new Date()).getMonth() + 1 < birthMonth || (/* @__PURE__ */ new Date()).getMonth() + 1 === birthMonth && (/* @__PURE__ */ new Date()).getDate() < birthDay ? 1 : 0);
|
|
384
|
+
form.age = age.toString();
|
|
385
|
+
form.gender = Number(form.idCard.charAt(16)) % 2 === 0 ? "女" : "男";
|
|
310
386
|
}
|
|
311
387
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
})
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
key: l.value,
|
|
402
|
-
value: l.value,
|
|
403
|
-
border: ""
|
|
404
|
-
}, {
|
|
405
|
-
default: d(() => [
|
|
406
|
-
S(P(l.label), 1)
|
|
407
|
-
]),
|
|
408
|
-
_: 2
|
|
409
|
-
}, 1032, ["value"]))), 128))
|
|
410
|
-
]),
|
|
411
|
-
_: 1
|
|
412
|
-
}, 8, ["modelValue"])
|
|
413
|
-
]),
|
|
414
|
-
_: 1
|
|
415
|
-
}),
|
|
416
|
-
n(e(f), {
|
|
417
|
-
label: "年龄",
|
|
418
|
-
prop: "age"
|
|
419
|
-
}, {
|
|
420
|
-
default: d(() => [
|
|
421
|
-
n(e(v), {
|
|
422
|
-
type: "number",
|
|
423
|
-
modelValue: t.age,
|
|
424
|
-
"onUpdate:modelValue": a[4] || (a[4] = (l) => t.age = l),
|
|
425
|
-
placeholder: e(y).age,
|
|
426
|
-
maxlength: e(k).age,
|
|
427
|
-
clearable: ""
|
|
428
|
-
}, null, 8, ["modelValue", "placeholder", "maxlength"])
|
|
429
|
-
]),
|
|
430
|
-
_: 1
|
|
431
|
-
}),
|
|
432
|
-
n(e(f), {
|
|
433
|
-
label: "地址",
|
|
434
|
-
prop: "address"
|
|
435
|
-
}, {
|
|
436
|
-
default: d(() => [
|
|
437
|
-
n(e(v), {
|
|
438
|
-
modelValue: t.address,
|
|
439
|
-
"onUpdate:modelValue": a[5] || (a[5] = (l) => t.address = l),
|
|
440
|
-
placeholder: e(y).address,
|
|
441
|
-
clearable: ""
|
|
442
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
443
|
-
]),
|
|
444
|
-
_: 1
|
|
445
|
-
}),
|
|
446
|
-
n(e(f), {
|
|
447
|
-
label: "备注",
|
|
448
|
-
prop: "remark"
|
|
449
|
-
}, {
|
|
450
|
-
default: d(() => [
|
|
451
|
-
n(e(v), {
|
|
452
|
-
modelValue: t.remark,
|
|
453
|
-
"onUpdate:modelValue": a[6] || (a[6] = (l) => t.remark = l),
|
|
454
|
-
placeholder: e(y).remark,
|
|
455
|
-
clearable: ""
|
|
456
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
}),
|
|
460
|
-
n(e(f), {
|
|
461
|
-
label: "验证码",
|
|
462
|
-
prop: "captcha"
|
|
463
|
-
}, {
|
|
464
|
-
default: d(() => [
|
|
465
|
-
p("div", Ve, [
|
|
466
|
-
n(e(v), {
|
|
467
|
-
modelValue: t.captcha,
|
|
468
|
-
"onUpdate:modelValue": a[7] || (a[7] = (l) => t.captcha = l),
|
|
469
|
-
placeholder: e(y).captcha,
|
|
470
|
-
maxlength: e(k).captcha,
|
|
471
|
-
clearable: "",
|
|
472
|
-
class: "sms-code-input"
|
|
473
|
-
}, null, 8, ["modelValue", "placeholder", "maxlength"]),
|
|
474
|
-
n(e(O), {
|
|
475
|
-
type: "primary",
|
|
476
|
-
disabled: e(m),
|
|
477
|
-
loading: g.value,
|
|
478
|
-
class: "sms-code-btn",
|
|
479
|
-
onClick: e(I)
|
|
388
|
+
onMounted(() => {
|
|
389
|
+
dataLoad();
|
|
390
|
+
});
|
|
391
|
+
onUnmounted(() => {
|
|
392
|
+
stopCountdown();
|
|
393
|
+
});
|
|
394
|
+
return (_ctx, _cache) => {
|
|
395
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
396
|
+
createElementVNode("header", _hoisted_2, [
|
|
397
|
+
_cache[8] || (_cache[8] = createElementVNode("h1", { class: "page-title" }, "会员信息登记", -1)),
|
|
398
|
+
createElementVNode("p", _hoisted_3, [
|
|
399
|
+
createVNode(unref(ElIcon), null, {
|
|
400
|
+
default: withCtx(() => [
|
|
401
|
+
createVNode(unref(location_default))
|
|
402
|
+
]),
|
|
403
|
+
_: 1
|
|
404
|
+
}),
|
|
405
|
+
createElementVNode("span", null, toDisplayString(companyInfo.companyName), 1)
|
|
406
|
+
])
|
|
407
|
+
]),
|
|
408
|
+
createElementVNode("main", _hoisted_4, [
|
|
409
|
+
createVNode(unref(ElScrollbar), { class: "form-scroll" }, {
|
|
410
|
+
default: withCtx(() => [
|
|
411
|
+
createElementVNode("div", _hoisted_5, [
|
|
412
|
+
createVNode(unref(ElForm), {
|
|
413
|
+
ref_key: "formRef",
|
|
414
|
+
ref: formRef,
|
|
415
|
+
model: form,
|
|
416
|
+
rules: unref(rules),
|
|
417
|
+
"label-position": "left",
|
|
418
|
+
"label-width": "70px",
|
|
419
|
+
class: "member-form"
|
|
420
|
+
}, {
|
|
421
|
+
default: withCtx(() => [
|
|
422
|
+
createVNode(unref(ElFormItem), {
|
|
423
|
+
label: "姓名",
|
|
424
|
+
prop: "name"
|
|
425
|
+
}, {
|
|
426
|
+
default: withCtx(() => [
|
|
427
|
+
createVNode(unref(ElInput), {
|
|
428
|
+
modelValue: form.name,
|
|
429
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.name = $event),
|
|
430
|
+
placeholder: unref(PLACEHOLDERS).name,
|
|
431
|
+
clearable: ""
|
|
432
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
433
|
+
]),
|
|
434
|
+
_: 1
|
|
435
|
+
}),
|
|
436
|
+
createVNode(unref(ElFormItem), {
|
|
437
|
+
label: "手机号",
|
|
438
|
+
prop: "phone"
|
|
439
|
+
}, {
|
|
440
|
+
default: withCtx(() => [
|
|
441
|
+
createVNode(unref(ElInput), {
|
|
442
|
+
modelValue: form.phone,
|
|
443
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.phone = $event),
|
|
444
|
+
type: "tel",
|
|
445
|
+
placeholder: unref(PLACEHOLDERS).phone,
|
|
446
|
+
maxlength: unref(FIELD_LIMITS).phone,
|
|
447
|
+
clearable: ""
|
|
448
|
+
}, null, 8, ["modelValue", "placeholder", "maxlength"])
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
}),
|
|
452
|
+
createVNode(unref(ElFormItem), {
|
|
453
|
+
label: "身份证号",
|
|
454
|
+
prop: "idCard"
|
|
455
|
+
}, {
|
|
456
|
+
default: withCtx(() => [
|
|
457
|
+
createVNode(unref(ElInput), {
|
|
458
|
+
modelValue: form.idCard,
|
|
459
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.idCard = $event),
|
|
460
|
+
onInput: handleIdCardInputEnd,
|
|
461
|
+
placeholder: unref(PLACEHOLDERS).idCard,
|
|
462
|
+
maxlength: unref(FIELD_LIMITS).idCard,
|
|
463
|
+
clearable: ""
|
|
464
|
+
}, null, 8, ["modelValue", "placeholder", "maxlength"])
|
|
465
|
+
]),
|
|
466
|
+
_: 1
|
|
467
|
+
}),
|
|
468
|
+
createVNode(unref(ElFormItem), {
|
|
469
|
+
label: "性别",
|
|
470
|
+
prop: "gender"
|
|
471
|
+
}, {
|
|
472
|
+
default: withCtx(() => [
|
|
473
|
+
createVNode(unref(ElRadioGroup), {
|
|
474
|
+
modelValue: form.gender,
|
|
475
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form.gender = $event),
|
|
476
|
+
class: "gender-radio-group"
|
|
480
477
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
|
|
478
|
+
default: withCtx(() => [
|
|
479
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(GENDER_OPTIONS), (option) => {
|
|
480
|
+
return openBlock(), createBlock(unref(ElRadio), {
|
|
481
|
+
key: option.value,
|
|
482
|
+
value: option.value,
|
|
483
|
+
border: ""
|
|
484
|
+
}, {
|
|
485
|
+
default: withCtx(() => [
|
|
486
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
487
|
+
]),
|
|
488
|
+
_: 2
|
|
489
|
+
}, 1032, ["value"]);
|
|
490
|
+
}), 128))
|
|
483
491
|
]),
|
|
484
492
|
_: 1
|
|
485
|
-
}, 8, ["
|
|
486
|
-
])
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
493
|
+
}, 8, ["modelValue"])
|
|
494
|
+
]),
|
|
495
|
+
_: 1
|
|
496
|
+
}),
|
|
497
|
+
createVNode(unref(ElFormItem), {
|
|
498
|
+
label: "年龄",
|
|
499
|
+
prop: "age"
|
|
500
|
+
}, {
|
|
501
|
+
default: withCtx(() => [
|
|
502
|
+
createVNode(unref(ElInput), {
|
|
503
|
+
type: "number",
|
|
504
|
+
modelValue: form.age,
|
|
505
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => form.age = $event),
|
|
506
|
+
placeholder: unref(PLACEHOLDERS).age,
|
|
507
|
+
maxlength: unref(FIELD_LIMITS).age,
|
|
508
|
+
clearable: ""
|
|
509
|
+
}, null, 8, ["modelValue", "placeholder", "maxlength"])
|
|
510
|
+
]),
|
|
511
|
+
_: 1
|
|
512
|
+
}),
|
|
513
|
+
createVNode(unref(ElFormItem), {
|
|
514
|
+
label: "地址",
|
|
515
|
+
prop: "address"
|
|
516
|
+
}, {
|
|
517
|
+
default: withCtx(() => [
|
|
518
|
+
createVNode(unref(ElInput), {
|
|
519
|
+
modelValue: form.address,
|
|
520
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form.address = $event),
|
|
521
|
+
placeholder: unref(PLACEHOLDERS).address,
|
|
522
|
+
clearable: ""
|
|
523
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
524
|
+
]),
|
|
525
|
+
_: 1
|
|
526
|
+
}),
|
|
527
|
+
createVNode(unref(ElFormItem), {
|
|
528
|
+
label: "备注",
|
|
529
|
+
prop: "remark"
|
|
530
|
+
}, {
|
|
531
|
+
default: withCtx(() => [
|
|
532
|
+
createVNode(unref(ElInput), {
|
|
533
|
+
modelValue: form.remark,
|
|
534
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form.remark = $event),
|
|
535
|
+
placeholder: unref(PLACEHOLDERS).remark,
|
|
536
|
+
clearable: ""
|
|
537
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
}),
|
|
541
|
+
createVNode(unref(ElFormItem), {
|
|
542
|
+
label: "验证码",
|
|
543
|
+
prop: "captcha"
|
|
544
|
+
}, {
|
|
545
|
+
default: withCtx(() => [
|
|
546
|
+
createElementVNode("div", _hoisted_6, [
|
|
547
|
+
createVNode(unref(ElInput), {
|
|
548
|
+
modelValue: form.captcha,
|
|
549
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => form.captcha = $event),
|
|
550
|
+
placeholder: unref(PLACEHOLDERS).captcha,
|
|
551
|
+
maxlength: unref(FIELD_LIMITS).captcha,
|
|
552
|
+
clearable: "",
|
|
553
|
+
class: "sms-code-input"
|
|
554
|
+
}, null, 8, ["modelValue", "placeholder", "maxlength"]),
|
|
555
|
+
createVNode(unref(ElButton), {
|
|
556
|
+
type: "primary",
|
|
557
|
+
disabled: unref(isCountingDown),
|
|
558
|
+
loading: loading.value,
|
|
559
|
+
class: "sms-code-btn",
|
|
560
|
+
onClick: unref(sendSmsCode)
|
|
561
|
+
}, {
|
|
562
|
+
default: withCtx(() => [
|
|
563
|
+
createTextVNode(toDisplayString(unref(countdownText)), 1)
|
|
564
|
+
]),
|
|
565
|
+
_: 1
|
|
566
|
+
}, 8, ["disabled", "loading", "onClick"])
|
|
567
|
+
])
|
|
568
|
+
]),
|
|
569
|
+
_: 1
|
|
570
|
+
})
|
|
571
|
+
]),
|
|
504
572
|
_: 1
|
|
505
|
-
}, 8, ["
|
|
573
|
+
}, 8, ["model", "rules"]),
|
|
574
|
+
createElementVNode("div", _hoisted_7, [
|
|
575
|
+
createVNode(unref(ElButton), {
|
|
576
|
+
type: "primary",
|
|
577
|
+
round: "",
|
|
578
|
+
class: "submit-btn",
|
|
579
|
+
loading: loading.value,
|
|
580
|
+
onClick: handleSubmit
|
|
581
|
+
}, {
|
|
582
|
+
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
583
|
+
createTextVNode(" 提交 ", -1)
|
|
584
|
+
])]),
|
|
585
|
+
_: 1
|
|
586
|
+
}, 8, ["loading"])
|
|
587
|
+
])
|
|
506
588
|
])
|
|
507
|
-
])
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
])
|
|
512
|
-
|
|
589
|
+
]),
|
|
590
|
+
_: 1
|
|
591
|
+
})
|
|
592
|
+
])
|
|
593
|
+
]);
|
|
594
|
+
};
|
|
513
595
|
}
|
|
514
|
-
})
|
|
515
|
-
|
|
516
|
-
|
|
596
|
+
});
|
|
597
|
+
const MemberRegister = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-992af5c2"]]);
|
|
598
|
+
const H5Components = {
|
|
599
|
+
Upload,
|
|
600
|
+
MemberRegister
|
|
517
601
|
};
|
|
518
|
-
function
|
|
519
|
-
for (const [
|
|
520
|
-
|
|
602
|
+
function installBusiness(app) {
|
|
603
|
+
for (const [key, component] of Object.entries(H5Components)) {
|
|
604
|
+
app.component(`H${key}`, component);
|
|
605
|
+
}
|
|
521
606
|
}
|
|
522
|
-
function
|
|
523
|
-
|
|
607
|
+
function useHsAdminUi(app) {
|
|
608
|
+
if (!_.has(app, "_context.directives.loading")) {
|
|
609
|
+
app.directive("loading", ElLoading.directive);
|
|
610
|
+
}
|
|
611
|
+
app.use(installBusiness);
|
|
524
612
|
}
|
|
525
613
|
export {
|
|
526
|
-
|
|
614
|
+
useHsAdminUi
|
|
527
615
|
};
|