hs-admin-ui 17.0.3 → 17.0.5

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