hs-admin-ui 17.0.4 → 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,25 +1,20 @@
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({
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({
8
5
  __name: "Upload",
9
6
  props: {
10
7
  action: {
11
8
  type: String,
12
- required: true
9
+ required: !0
13
10
  },
14
11
  proxy: {
15
12
  type: String,
16
- required: true
13
+ required: !0
17
14
  },
18
15
  headers: {
19
16
  type: Object,
20
- default: () => {
21
- return {};
22
- }
17
+ default: () => ({})
23
18
  },
24
19
  limit: {
25
20
  type: Number,
@@ -27,83 +22,73 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
27
22
  }
28
23
  },
29
24
  emits: ["success"],
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,
25
+ setup(c, { emit: _ }) {
26
+ const m = c, L = _, I = J(), o = M({
27
+ loading: !1,
28
+ preview: !1,
37
29
  index: 0,
38
- headers: props.headers,
30
+ headers: m.headers,
39
31
  fileList: []
40
- });
41
- const fileList = computed(() => state.fileList.map((i) => i.url));
42
- watch(
43
- () => state.fileList.length,
44
- (val) => {
32
+ }), g = F(() => o.fileList.map((u) => u.url));
33
+ Q(
34
+ () => o.fileList.length,
35
+ (u) => {
45
36
  setTimeout(() => {
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
- }
37
+ const s = document.querySelector(".upload-wrapper .el-upload--picture-card");
38
+ s && (s.style.display = u >= m.limit && u > 0 ? "none" : "inline-flex");
50
39
  }, 100);
51
40
  },
52
41
  {
53
- immediate: true
42
+ immediate: !0
54
43
  }
55
44
  );
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
- });
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
+ });
65
54
  }
66
- function onPreview(uploadFile) {
67
- state.index = state.fileList.findIndex((i) => i.url === uploadFile.url);
68
- state.preview = true;
55
+ function t(u) {
56
+ o.index = o.fileList.findIndex((s) => s.url === u.url), o.preview = !0;
69
57
  }
70
- async function submitUpload() {
71
- state.loading = true;
72
- uploadRef.value.submit();
58
+ async function i() {
59
+ o.loading = !0, I.value.submit();
73
60
  }
74
- function onSuccess(result, file, files) {
75
- state.loading = false;
76
- emit("success", { result, file, files });
61
+ function D(u, s, C) {
62
+ o.loading = !1, L("success", { result: u, file: s, files: C });
77
63
  }
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), {
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), {
84
69
  ref_key: "uploadRef",
85
- ref: uploadRef,
86
- "file-list": state.fileList,
87
- "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),
88
73
  "list-type": "picture-card",
89
74
  accept: "image/*",
90
75
  name: "file",
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
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
98
83
  }, {
99
- default: withCtx(() => [..._cache[2] || (_cache[2] = [
100
- createElementVNode("svg", {
84
+ default: d(() => [...s[2] || (s[2] = [
85
+ p("svg", {
101
86
  width: "34",
102
87
  height: "34",
103
88
  viewBox: "0 0 100 100",
104
89
  xmlns: "http://www.w3.org/2000/svg"
105
90
  }, [
106
- createElementVNode("rect", {
91
+ p("rect", {
107
92
  x: "45",
108
93
  y: "20",
109
94
  width: "10",
@@ -111,7 +96,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
111
96
  rx: "2",
112
97
  fill: "#1677ff"
113
98
  }),
114
- createElementVNode("rect", {
99
+ p("rect", {
115
100
  x: "20",
116
101
  y: "45",
117
102
  width: "60",
@@ -124,37 +109,34 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
124
109
  _: 1
125
110
  }, 8, ["file-list", "action", "headers", "limit"])
126
111
  ]),
127
- state.preview ? (openBlock(), createBlock(_component_el_image_viewer, {
112
+ o.preview ? (V(), A(C, {
128
113
  key: 0,
129
- "url-list": fileList.value,
114
+ "url-list": g.value,
130
115
  "show-progress": "",
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), {
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), {
135
120
  size: "large",
136
121
  type: "primary",
137
- onClick: submitUpload
122
+ onClick: i
138
123
  }, {
139
- default: withCtx(() => [..._cache[3] || (_cache[3] = [
140
- createTextVNode("上传", -1)
124
+ default: d(() => [...s[3] || (s[3] = [
125
+ S("上传", -1)
141
126
  ])]),
142
127
  _: 1
143
128
  })
144
129
  ])), [
145
- [_directive_loading, state.loading]
130
+ [U, o.loading]
146
131
  ]);
147
132
  };
148
133
  }
149
- });
150
- const Upload = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e6f86e2e"]]);
151
- const GENDER_OPTIONS = [
134
+ }), he = /* @__PURE__ */ j(fe, [["__scopeId", "data-v-e6f86e2e"]]), ve = [
152
135
  { label: "男", value: "男" },
153
136
  { label: "女", value: "女" }
154
- ];
155
- const VALIDATION_RULES = {
137
+ ], h = {
156
138
  name: {
157
- required: true,
139
+ required: !0,
158
140
  message: "请输入姓名",
159
141
  trigger: "blur"
160
142
  },
@@ -165,7 +147,7 @@ const VALIDATION_RULES = {
165
147
  trigger: "blur"
166
148
  },
167
149
  phone: {
168
- required: true,
150
+ required: !0,
169
151
  message: "请输入手机号",
170
152
  trigger: "blur"
171
153
  },
@@ -185,7 +167,7 @@ const VALIDATION_RULES = {
185
167
  trigger: "blur"
186
168
  },
187
169
  captcha: {
188
- required: true,
170
+ required: !0,
189
171
  message: "请输入验证码",
190
172
  trigger: "blur"
191
173
  },
@@ -194,8 +176,7 @@ const VALIDATION_RULES = {
194
176
  message: "验证码为6位",
195
177
  trigger: "blur"
196
178
  }
197
- };
198
- const PLACEHOLDERS = {
179
+ }, y = {
199
180
  name: "请输入姓名",
200
181
  phone: "请输入手机号",
201
182
  idCard: "请输入身份证号",
@@ -203,41 +184,27 @@ const PLACEHOLDERS = {
203
184
  address: "请输入地址",
204
185
  remark: "请输入备注",
205
186
  captcha: "请输入验证码"
206
- };
207
- const FIELD_LIMITS = {
187
+ }, k = {
208
188
  phone: 11,
209
189
  idCard: 18,
210
190
  age: 3,
211
191
  captcha: 6
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({
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({
228
199
  __name: "MemberRegister",
229
200
  props: {
230
201
  proxy: {
231
202
  type: String,
232
- required: false
203
+ required: !1
233
204
  }
234
205
  },
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({
206
+ setup(c) {
207
+ const { countdownText: _, isCountingDown: m, stopCountdown: L, sendSmsCode: I } = U(), o = x(), g = x(!1), w = c, t = M({
241
208
  name: "",
242
209
  gender: "男",
243
210
  phone: "",
@@ -246,370 +213,314 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
246
213
  address: "",
247
214
  remark: "",
248
215
  captcha: ""
249
- });
250
- const companyInfo = reactive({
216
+ }), i = M({
251
217
  topCompanyId: "",
252
218
  companyId: "",
253
219
  companyName: "",
254
220
  defaultMemberType: "",
255
221
  discount: 0
256
- });
257
- const validateForm = async () => {
258
- if (!formRef.value) return false;
222
+ }), D = async () => {
223
+ if (!o.value) return !1;
259
224
  try {
260
- return await formRef.value.validate();
225
+ return await o.value.validate();
261
226
  } catch {
262
- return false;
227
+ return !1;
263
228
  }
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
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
282
245
  };
283
246
  try {
284
- await request$1.post(`${props.proxy}/pub/add_vip_info`, data);
285
- ElMessageBox.alert("注册成功!", "提示", {
286
- closeOnClickModal: false,
247
+ await P.post(`${w.proxy}/pub/add_vip_info`, a), ue.alert("注册成功!", "提示", {
248
+ closeOnClickModal: !1,
287
249
  // 禁止点击遮罩关闭
288
- closeOnPressEscape: false,
250
+ closeOnPressEscape: !1,
289
251
  // 禁止 ESC 关闭
290
- showClose: false,
252
+ showClose: !1,
291
253
  // 不显示右上角 ×
292
- showConfirmButton: false
254
+ showConfirmButton: !1
293
255
  // 不显示确认按钮
294
256
  });
295
- } catch (error) {
257
+ } catch {
296
258
  } finally {
297
- loading.value = false;
259
+ g.value = !1;
298
260
  }
299
- };
300
- const getVipPriceSet = async () => {
261
+ }, s = async () => {
301
262
  try {
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("获取默认会员等级失败");
263
+ return (await P.get(`${w.proxy}/pub/get_list_vip_price_set?top_company_id=${i.topCompanyId}`)).data;
264
+ } catch {
265
+ R.error("获取默认会员等级失败");
306
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;
307
272
  };
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
- }
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();
336
277
  }, 1e3);
337
- };
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;
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
- }
278
+ }, q = () => {
279
+ a.value && (clearInterval(a.value), a.value = null), r.value = 0, b.value = !1;
369
280
  };
370
281
  return {
371
- countdownText: countdownText2,
372
- isCountingDown: isCountingDown2,
373
- stopCountdown: stopCountdown2,
374
- 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
+ }
375
303
  };
376
304
  }
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 ? "女" : "男";
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 ? "女" : "男";
386
309
  }
387
310
  }
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"
477
- }, {
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))
491
- ]),
492
- _: 1
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)
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: ""
561
403
  }, {
562
- default: withCtx(() => [
563
- createTextVNode(toDisplayString(unref(countdownText)), 1)
404
+ default: d(() => [
405
+ S(N(l.label), 1)
564
406
  ]),
565
- _: 1
566
- }, 8, ["disabled", "loading", "onClick"])
567
- ])
568
- ]),
569
- _: 1
570
- })
571
- ]),
572
- _: 1
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
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"
581
462
  }, {
582
- default: withCtx(() => [..._cache[9] || (_cache[9] = [
583
- createTextVNode(" 提交 ", -1)
584
- ])]),
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
+ ]),
585
487
  _: 1
586
- }, 8, ["loading"])
587
- ])
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"])
588
505
  ])
589
- ]),
590
- _: 1
591
- })
592
- ])
593
- ]);
594
- };
506
+ ])
507
+ ]),
508
+ _: 1
509
+ })
510
+ ])
511
+ ]));
595
512
  }
596
- });
597
- const MemberRegister = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-992af5c2"]]);
598
- const H5Components = {
599
- Upload,
600
- MemberRegister
513
+ }), ke = /* @__PURE__ */ j(Ee, [["__scopeId", "data-v-992af5c2"]]), Se = {
514
+ Upload: he,
515
+ MemberRegister: ke
601
516
  };
602
- function installBusiness(app) {
603
- for (const [key, component] of Object.entries(H5Components)) {
604
- app.component(`H${key}`, component);
605
- }
517
+ function Le(c) {
518
+ for (const [_, m] of Object.entries(Se))
519
+ c.component(`H${_}`, m);
606
520
  }
607
- function useHsAdminUi(app) {
608
- if (!_.has(app, "_context.directives.loading")) {
609
- app.directive("loading", ElLoading.directive);
610
- }
611
- app.use(installBusiness);
521
+ function Me(c) {
522
+ H.has(c, "_context.directives.loading") || c.directive("loading", ce.directive), c.use(Le);
612
523
  }
613
524
  export {
614
- useHsAdminUi
525
+ Me as useHsAdminUi
615
526
  };