hs-admin-ui 16.3.5 → 16.3.8
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/{bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-Kw1ikpRm.cjs → bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BDGsoXRz.cjs} +43 -43
- package/dist/{bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BaDAE2N7.js → bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js} +1627 -1627
- package/dist/{components-DMi6I_ib.cjs → components-ERGTKcUy.cjs} +1 -1
- package/dist/{components-9csyCYFN.js → components-JyXWdstB.js} +1 -1
- package/dist/element-plus-ui.js +1 -1
- package/dist/element-plus-ui.mjs +5 -5
- package/dist/h5.js +1 -1
- package/dist/h5.mjs +2 -2
- package/dist/{index-CcsMo75C.cjs → index-BmG-cykr.cjs} +1 -1
- package/dist/{index--u_RqMa4.cjs → index-CXnSdJdR.cjs} +1 -1
- package/dist/{index-D4Se2ucQ.js → index-DA842K1J.js} +1 -1
- package/dist/{index-DRs4JAcv.js → index-DYo3kcce.js} +2 -2
- package/dist/{index-BIjdrLax.js → index-Dw7LG2cQ.js} +1 -1
- package/dist/{index-D-3jfV73.cjs → index-Gs0pjuJu.cjs} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +2717 -2701
- package/dist/style.css +1 -1
- package/dist/types/src/components/base/Input/src/Input.vue.d.ts +18 -9
- package/dist/types/src/components/base/index.d.ts +18 -7
- package/dist/types/src/components/business/bcContextBox/bcContextBox.vue.d.ts +1 -1
- package/dist/types/src/components/business/bcSystemAuth/store.d.ts +2 -0
- package/dist/types/src/components/business/bcSystemAuth/useAuth.d.ts +0 -1
- package/dist/types/src/components/business/bcSystemAuth/utils.d.ts +1 -0
- package/dist/types/src/components/business/bcTable/bcFormTable.vue.d.ts +9 -9
- package/dist/types/src/components/business/bcTable/utils/parseTable.d.ts +2 -0
- package/dist/types/src/components/business/bcTable/utils/type.d.ts +7 -2
- package/dist/types/src/components/business/bcTable/utils/useKeydownEvent.d.ts +21 -7
- package/dist/types/src/components/h5/MemberRegister/MemberRegister.vue.d.ts +11 -4
- package/dist/types/src/components/h5/MemberRegister/type.d.ts +1 -0
- package/dist/types/src/types/auth.d.ts +2 -2
- package/dist/types/src/utils/download.d.ts +3 -0
- package/dist/vxe-table-ui.js +1 -1
- package/dist/vxe-table-ui.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bw as ge, ed as i, ee as qi } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-
|
|
1
|
+
import { bw as ge, ed as i, ee as qi } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js";
|
|
2
2
|
import { watch as Dt, reactive as wl, nextTick as fe, h as g, defineComponent as Ko, ref as je, inject as Lo, createCommentVNode as lt, onMounted as Jl, onUnmounted as en, provide as Ql, TransitionGroup as Bn, computed as Pe, Teleport as Xi, onActivated as ic, onDeactivated as ac, onBeforeUnmount as cc, resolveComponent as dc } from "vue";
|
|
3
3
|
function vt(e) {
|
|
4
4
|
return e && e.enabled !== !1;
|
package/dist/element-plus-ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CXnSdJdR.cjs");const l=require("./index-BmG-cykr.cjs"),u=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BDGsoXRz.cjs");require("vue");const a=require("./index-Gs0pjuJu.cjs");function c(r,e){u.NEXT_NAME.value=e==null?void 0:e.NEXT_NAME,u.IS_DEV.value=e==null?void 0:e.IS_DEV,u.CurrentRoute.value=e==null?void 0:e.currentRoute,u.CurrentRouter.value=e==null?void 0:e.currentRouter,r.directive("loading",u.ElLoading.directive),r.use(l.install)}exports.ElMessage=u.HsMessage;exports.ElMessageBox=u.HsMessageBox;exports.ElNotification=u.HsNotification;exports.mathTool=u.mathTool;exports.Utils=a.index;exports.useHsAdminUi=c;
|
package/dist/element-plus-ui.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { q as a } from "./index-
|
|
3
|
-
import { aS as u, bp as l, bq as m, br as E, aQ as v } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-
|
|
4
|
-
import { W as x, bt as M, bu as R, bv as _ } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-
|
|
1
|
+
import "./index-DA842K1J.js";
|
|
2
|
+
import { q as a } from "./index-DYo3kcce.js";
|
|
3
|
+
import { aS as u, bp as l, bq as m, br as E, aQ as v } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js";
|
|
4
|
+
import { W as x, bt as M, bu as R, bv as _ } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js";
|
|
5
5
|
import "vue";
|
|
6
|
-
import { i as S } from "./index-
|
|
6
|
+
import { i as S } from "./index-Dw7LG2cQ.js";
|
|
7
7
|
function t(r, e) {
|
|
8
8
|
u.value = e == null ? void 0 : e.NEXT_NAME, l.value = e == null ? void 0 : e.IS_DEV, m.value = e == null ? void 0 : e.currentRoute, E.value = e == null ? void 0 : e.currentRouter, r.directive("loading", v.directive), r.use(a);
|
|
9
9
|
}
|
package/dist/h5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index--u_RqMa4.cjs"),e=require("vue"),r=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-Kw1ikpRm.cjs"),S={class:"upload-wrapper"},$={class:"upload-wrapper-inner"},D=e.defineComponent({__name:"Upload",props:{action:{type:String,required:!0},proxy:{type:String,required:!0},headers:{type:Object,default:()=>({})},limit:{type:Number,default:100}},emits:["success"],setup(c,{emit:v}){const p=c,C=v,V=e.shallowRef(),o=e.reactive({loading:!1,preview:!1,index:0,headers:p.headers,fileList:[]}),m=e.computed(()=>o.fileList.map(i=>i.url));e.watch(()=>o.fileList.length,i=>{setTimeout(()=>{const d=document.querySelector(".upload-wrapper .el-upload--picture-card");d&&(d.style.display=i>=p.limit&&i>0?"none":"inline-flex")},100)},{immediate:!0});async function _(){if(r._.isEmpty(p.headers))return r.request({url:`${window.location.origin}/${p.proxy}/pub_token/mobile_attach_push`}).then(i=>{o.headers={Authorization:`Bearer ${i==null?void 0:i.access_token}`}})}function a(i){o.index=o.fileList.findIndex(d=>d.url===i.url),o.preview=!0}async function s(){o.loading=!0,V.value.submit()}function x(i,d,y){o.loading=!1,C("success",{result:i,file:d,files:y})}return(i,d)=>{const y=e.resolveComponent("el-image-viewer"),E=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",$,[e.createVNode(e.unref(u.ElUpload),{ref_key:"uploadRef",ref:V,"file-list":o.fileList,"onUpdate:fileList":d[0]||(d[0]=w=>o.fileList=w),"list-type":"picture-card",accept:"image/*",name:"file",action:c.action,headers:o.headers,limit:c.limit,"auto-upload":!1,"on-preview":a,"before-upload":_,"on-success":x},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createElementVNode("svg",{width:"34",height:"34",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{x:"45",y:"20",width:"10",height:"60",rx:"2",fill:"#1677ff"}),e.createElementVNode("rect",{x:"20",y:"45",width:"60",height:"10",rx:"2",fill:"#1677ff"})],-1)])]),_:1},8,["file-list","action","headers","limit"])]),o.preview?(e.openBlock(),e.createBlock(y,{key:0,"url-list":m.value,"show-progress":"","initial-index":o.index,onClose:d[1]||(d[1]=w=>o.preview=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0),e.createVNode(e.unref(r.ElButton),{size:"large",type:"primary",onClick:s},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("上传",-1)])]),_:1})])),[[E,o.loading]])}}}),L=r._export_sfc$1(D,[["__scopeId","data-v-e6f86e2e"]]),U=[{label:"男",value:"男"},{label:"女",value:"女"}],f={name:{required:!0,message:"请输入姓名",trigger:"blur"},nameLength:{min:2,max:20,message:"姓名长度在2到20个字符",trigger:"blur"},phone:{required:!0,message:"请输入手机号",trigger:"blur"},phonePattern:{pattern:/^1[3-9]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"},idCardPattern:{pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,message:"请输入正确的身份证号",trigger:"blur"},agePattern:{pattern:/^(1[0-4][0-9]|[1-9]?[0-9]|150)$/,message:"请输入正确的年龄",trigger:"blur"},captcha:{required:!0,message:"请输入验证码",trigger:"blur"},captchaLength:{len:6,message:"验证码为6位",trigger:"blur"}},g={name:"请输入姓名",phone:"请输入手机号",idCard:"请输入身份证号",age:"请输入年龄",address:"请输入地址",remark:"请输入备注",captcha:"请输入验证码"},b={phone:11,idCard:18,age:3,captcha:6},B={name:[f.name,f.nameLength],phone:[f.phone,f.phonePattern],idCard:[f.idCardPattern],age:[f.agePattern],captcha:[f.captcha,f.captchaLength]},q={class:"member-register-page"},F={class:"page-header"},P={class:"page-subtitle"},T={class:"form-container"},M={class:"form-content"},O={class:"sms-code-wrapper"},R={class:"submit-area"},A=e.defineComponent({__name:"MemberRegister",props:{proxy:{type:String,required:!1}},setup(c){const{countdownText:v,isCountingDown:p,stopCountdown:C,sendSmsCode:V}=E(),o=e.ref(),m=e.ref(!1),_=c,a=e.reactive({name:"",gender:"男",phone:"",idCard:"",age:"",address:"",remark:"",captcha:""}),s=e.reactive({topCompanyId:"",companyId:"",companyName:"",defaultMemberType:"",discount:0}),x=async()=>{if(!o.value)return!1;try{return await o.value.validate()}catch{return!1}},i=async()=>{if(!await x())return;m.value=!0;const t={vip_name:a.name,sex:a.gender,telephone:a.phone,identity_card:a.idCard,age:a.age,address:a.address,remark:a.remark,valid_code:a.captcha,vip_type:s.defaultMemberType,top_company_id:s.topCompanyId,company_id:s.companyId,discount:s.discount};try{await r.request$1.post(`${_.proxy}/pub/add_vip_info`,t),r.ElMessageBox.alert("注册成功!","提示",{closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!1,showConfirmButton:!1})}catch{}finally{m.value=!1}},d=async()=>{try{return(await r.request$1.get(`${_.proxy}/pub/get_list_vip_price_set?top_company_id=${s.topCompanyId}`)).data}catch{r.ElMessage.error("获取默认会员等级失败")}},y=async()=>{const l=r.getUrlParams();s.topCompanyId=l.top_company_id||"",s.companyId=l.company_id||"",s.companyName=l.company_name||"";const t=await d();s.defaultMemberType=(t==null?void 0:t.id)||"",s.discount=(t==null?void 0:t.discount)||0};function E(){const l=e.ref(0),t=e.ref(null),n=60,h=e.ref(!1),N=e.computed(()=>l.value>0?`${l.value}秒后重新发送`:"获取验证码"),k=()=>{l.value=n,h.value=!0,t.value=setInterval(()=>{l.value--,l.value<=0&&I()},1e3)},I=()=>{t.value&&(clearInterval(t.value),t.value=null),l.value=0,h.value=!1};return{countdownText:N,isCountingDown:h,stopCountdown:I,sendSmsCode:async()=>{if(h.value||!o.value)return;if(!await o.value.validateField("phone")){r.ElMessage.warning("请先输入正确的手机号");return}m.value=!0;try{await r.request$1.post(`${_.proxy}/pub/send_sms_vip_valid_code`,{telephone:a.phone,top_company_id:s.topCompanyId,company_id:s.companyId}),r.ElMessage.success("验证码发送成功"),k()}catch{}finally{m.value=!1}}}}function w(){if(a.idCard.length===18){const l=a.idCard.substring(6,14),t=parseInt(l.substring(0,4)),n=parseInt(l.substring(4,6)),h=parseInt(l.substring(6,8)),N=new Date().getFullYear()-t-(new Date().getMonth()+1<n||new Date().getMonth()+1===n&&new Date().getDate()<h?1:0);a.age=N.toString(),a.gender=Number(a.idCard.charAt(16))%2===0?"女":"男"}}return e.onMounted(()=>{y()}),e.onUnmounted(()=>{C()}),(l,t)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",F,[t[8]||(t[8]=e.createElementVNode("h1",{class:"page-title"},"会员信息登记",-1)),e.createElementVNode("p",P,[e.createVNode(e.unref(r.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.location_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(s.companyName),1)])]),e.createElementVNode("main",T,[e.createVNode(e.unref(u.ElScrollbar),{class:"form-scroll"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(u.ElForm),{ref_key:"formRef",ref:o,model:a,rules:e.unref(B),"label-position":"left","label-width":"70px",class:"member-form"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElFormItem),{label:"姓名",prop:"name"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.name,"onUpdate:modelValue":t[0]||(t[0]=n=>a.name=n),placeholder:e.unref(g).name,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.phone,"onUpdate:modelValue":t[1]||(t[1]=n=>a.phone=n),type:"tel",placeholder:e.unref(g).phone,maxlength:e.unref(b).phone,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"身份证号",prop:"idCard"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.idCard,"onUpdate:modelValue":t[2]||(t[2]=n=>a.idCard=n),onInput:w,placeholder:e.unref(g).idCard,maxlength:e.unref(b).idCard,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"性别",prop:"gender"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElRadioGroup),{modelValue:a.gender,"onUpdate:modelValue":t[3]||(t[3]=n=>a.gender=n),class:"gender-radio-group"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createBlock(e.unref(u.ElRadio),{key:n.value,value:n.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"年龄",prop:"age"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{type:"number",modelValue:a.age,"onUpdate:modelValue":t[4]||(t[4]=n=>a.age=n),placeholder:e.unref(g).age,maxlength:e.unref(b).age,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"地址",prop:"address"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.address,"onUpdate:modelValue":t[5]||(t[5]=n=>a.address=n),placeholder:e.unref(g).address,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"备注",prop:"remark"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.remark,"onUpdate:modelValue":t[6]||(t[6]=n=>a.remark=n),placeholder:e.unref(g).remark,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"验证码",prop:"captcha"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(e.unref(r.ElInput),{modelValue:a.captcha,"onUpdate:modelValue":t[7]||(t[7]=n=>a.captcha=n),placeholder:e.unref(g).captcha,maxlength:e.unref(b).captcha,clearable:"",class:"sms-code-input"},null,8,["modelValue","placeholder","maxlength"]),e.createVNode(e.unref(r.ElButton),{type:"primary",disabled:e.unref(p),loading:m.value,class:"sms-code-btn",onClick:e.unref(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1})]),_:1},8,["model","rules"]),e.createElementVNode("div",R,[e.createVNode(e.unref(r.ElButton),{type:"primary",round:"",class:"submit-btn",loading:m.value,onClick:i},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" 提交 ",-1)])]),_:1},8,["loading"])])])]),_:1})])]))}}),H=r._export_sfc$1(A,[["__scopeId","data-v-992af5c2"]]),j={Upload:L,MemberRegister:H};function z(c){for(const[v,p]of Object.entries(j))c.component(`H${v}`,p)}function G(c){c.directive("loading",r.ElLoading.directive),c.use(z)}exports.useHsAdminUi=G;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-CXnSdJdR.cjs"),e=require("vue"),r=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BDGsoXRz.cjs"),S={class:"upload-wrapper"},$={class:"upload-wrapper-inner"},D=e.defineComponent({__name:"Upload",props:{action:{type:String,required:!0},proxy:{type:String,required:!0},headers:{type:Object,default:()=>({})},limit:{type:Number,default:100}},emits:["success"],setup(c,{emit:v}){const p=c,C=v,V=e.shallowRef(),o=e.reactive({loading:!1,preview:!1,index:0,headers:p.headers,fileList:[]}),m=e.computed(()=>o.fileList.map(i=>i.url));e.watch(()=>o.fileList.length,i=>{setTimeout(()=>{const d=document.querySelector(".upload-wrapper .el-upload--picture-card");d&&(d.style.display=i>=p.limit&&i>0?"none":"inline-flex")},100)},{immediate:!0});async function _(){if(r._.isEmpty(p.headers))return r.request({url:`${window.location.origin}/${p.proxy}/pub_token/mobile_attach_push`}).then(i=>{o.headers={Authorization:`Bearer ${i==null?void 0:i.access_token}`}})}function a(i){o.index=o.fileList.findIndex(d=>d.url===i.url),o.preview=!0}async function s(){o.loading=!0,V.value.submit()}function x(i,d,y){o.loading=!1,C("success",{result:i,file:d,files:y})}return(i,d)=>{const y=e.resolveComponent("el-image-viewer"),E=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",$,[e.createVNode(e.unref(u.ElUpload),{ref_key:"uploadRef",ref:V,"file-list":o.fileList,"onUpdate:fileList":d[0]||(d[0]=w=>o.fileList=w),"list-type":"picture-card",accept:"image/*",name:"file",action:c.action,headers:o.headers,limit:c.limit,"auto-upload":!1,"on-preview":a,"before-upload":_,"on-success":x},{default:e.withCtx(()=>[...d[2]||(d[2]=[e.createElementVNode("svg",{width:"34",height:"34",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{x:"45",y:"20",width:"10",height:"60",rx:"2",fill:"#1677ff"}),e.createElementVNode("rect",{x:"20",y:"45",width:"60",height:"10",rx:"2",fill:"#1677ff"})],-1)])]),_:1},8,["file-list","action","headers","limit"])]),o.preview?(e.openBlock(),e.createBlock(y,{key:0,"url-list":m.value,"show-progress":"","initial-index":o.index,onClose:d[1]||(d[1]=w=>o.preview=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0),e.createVNode(e.unref(r.ElButton),{size:"large",type:"primary",onClick:s},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("上传",-1)])]),_:1})])),[[E,o.loading]])}}}),L=r._export_sfc$1(D,[["__scopeId","data-v-e6f86e2e"]]),U=[{label:"男",value:"男"},{label:"女",value:"女"}],f={name:{required:!0,message:"请输入姓名",trigger:"blur"},nameLength:{min:2,max:20,message:"姓名长度在2到20个字符",trigger:"blur"},phone:{required:!0,message:"请输入手机号",trigger:"blur"},phonePattern:{pattern:/^1[3-9]\d{9}$/,message:"请输入正确的手机号",trigger:"blur"},idCardPattern:{pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,message:"请输入正确的身份证号",trigger:"blur"},agePattern:{pattern:/^(1[0-4][0-9]|[1-9]?[0-9]|150)$/,message:"请输入正确的年龄",trigger:"blur"},captcha:{required:!0,message:"请输入验证码",trigger:"blur"},captchaLength:{len:6,message:"验证码为6位",trigger:"blur"}},g={name:"请输入姓名",phone:"请输入手机号",idCard:"请输入身份证号",age:"请输入年龄",address:"请输入地址",remark:"请输入备注",captcha:"请输入验证码"},b={phone:11,idCard:18,age:3,captcha:6},B={name:[f.name,f.nameLength],phone:[f.phone,f.phonePattern],idCard:[f.idCardPattern],age:[f.agePattern],captcha:[f.captcha,f.captchaLength]},q={class:"member-register-page"},F={class:"page-header"},P={class:"page-subtitle"},T={class:"form-container"},M={class:"form-content"},O={class:"sms-code-wrapper"},R={class:"submit-area"},A=e.defineComponent({__name:"MemberRegister",props:{proxy:{type:String,required:!1}},setup(c){const{countdownText:v,isCountingDown:p,stopCountdown:C,sendSmsCode:V}=E(),o=e.ref(),m=e.ref(!1),_=c,a=e.reactive({name:"",gender:"男",phone:"",idCard:"",age:"",address:"",remark:"",captcha:""}),s=e.reactive({topCompanyId:"",companyId:"",companyName:"",defaultMemberType:"",discount:0}),x=async()=>{if(!o.value)return!1;try{return await o.value.validate()}catch{return!1}},i=async()=>{if(!await x())return;m.value=!0;const t={vip_name:a.name,sex:a.gender,telephone:a.phone,identity_card:a.idCard,age:a.age,address:a.address,remark:a.remark,valid_code:a.captcha,vip_type:s.defaultMemberType,top_company_id:s.topCompanyId,company_id:s.companyId,discount:s.discount};try{await r.request$1.post(`${_.proxy}/pub/add_vip_info`,t),r.ElMessageBox.alert("注册成功!","提示",{closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!1,showConfirmButton:!1})}catch{}finally{m.value=!1}},d=async()=>{try{return(await r.request$1.get(`${_.proxy}/pub/get_list_vip_price_set?top_company_id=${s.topCompanyId}`)).data}catch{r.ElMessage.error("获取默认会员等级失败")}},y=async()=>{const l=r.getUrlParams();s.topCompanyId=l.top_company_id||"",s.companyId=l.company_id||"",s.companyName=l.company_name||"";const t=await d();s.defaultMemberType=(t==null?void 0:t.id)||"",s.discount=(t==null?void 0:t.discount)||0};function E(){const l=e.ref(0),t=e.ref(null),n=60,h=e.ref(!1),N=e.computed(()=>l.value>0?`${l.value}秒后重新发送`:"获取验证码"),k=()=>{l.value=n,h.value=!0,t.value=setInterval(()=>{l.value--,l.value<=0&&I()},1e3)},I=()=>{t.value&&(clearInterval(t.value),t.value=null),l.value=0,h.value=!1};return{countdownText:N,isCountingDown:h,stopCountdown:I,sendSmsCode:async()=>{if(h.value||!o.value)return;if(!await o.value.validateField("phone")){r.ElMessage.warning("请先输入正确的手机号");return}m.value=!0;try{await r.request$1.post(`${_.proxy}/pub/send_sms_vip_valid_code`,{telephone:a.phone,top_company_id:s.topCompanyId,company_id:s.companyId}),r.ElMessage.success("验证码发送成功"),k()}catch{}finally{m.value=!1}}}}function w(){if(a.idCard.length===18){const l=a.idCard.substring(6,14),t=parseInt(l.substring(0,4)),n=parseInt(l.substring(4,6)),h=parseInt(l.substring(6,8)),N=new Date().getFullYear()-t-(new Date().getMonth()+1<n||new Date().getMonth()+1===n&&new Date().getDate()<h?1:0);a.age=N.toString(),a.gender=Number(a.idCard.charAt(16))%2===0?"女":"男"}}return e.onMounted(()=>{y()}),e.onUnmounted(()=>{C()}),(l,t)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",F,[t[8]||(t[8]=e.createElementVNode("h1",{class:"page-title"},"会员信息登记",-1)),e.createElementVNode("p",P,[e.createVNode(e.unref(r.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.location_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(s.companyName),1)])]),e.createElementVNode("main",T,[e.createVNode(e.unref(u.ElScrollbar),{class:"form-scroll"},{default:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(u.ElForm),{ref_key:"formRef",ref:o,model:a,rules:e.unref(B),"label-position":"left","label-width":"70px",class:"member-form"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElFormItem),{label:"姓名",prop:"name"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.name,"onUpdate:modelValue":t[0]||(t[0]=n=>a.name=n),placeholder:e.unref(g).name,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"手机号",prop:"phone"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.phone,"onUpdate:modelValue":t[1]||(t[1]=n=>a.phone=n),type:"tel",placeholder:e.unref(g).phone,maxlength:e.unref(b).phone,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"身份证号",prop:"idCard"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.idCard,"onUpdate:modelValue":t[2]||(t[2]=n=>a.idCard=n),onInput:w,placeholder:e.unref(g).idCard,maxlength:e.unref(b).idCard,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"性别",prop:"gender"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElRadioGroup),{modelValue:a.gender,"onUpdate:modelValue":t[3]||(t[3]=n=>a.gender=n),class:"gender-radio-group"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createBlock(e.unref(u.ElRadio),{key:n.value,value:n.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"年龄",prop:"age"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{type:"number",modelValue:a.age,"onUpdate:modelValue":t[4]||(t[4]=n=>a.age=n),placeholder:e.unref(g).age,maxlength:e.unref(b).age,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"地址",prop:"address"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.address,"onUpdate:modelValue":t[5]||(t[5]=n=>a.address=n),placeholder:e.unref(g).address,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"备注",prop:"remark"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElInput),{modelValue:a.remark,"onUpdate:modelValue":t[6]||(t[6]=n=>a.remark=n),placeholder:e.unref(g).remark,clearable:""},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"验证码",prop:"captcha"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(e.unref(r.ElInput),{modelValue:a.captcha,"onUpdate:modelValue":t[7]||(t[7]=n=>a.captcha=n),placeholder:e.unref(g).captcha,maxlength:e.unref(b).captcha,clearable:"",class:"sms-code-input"},null,8,["modelValue","placeholder","maxlength"]),e.createVNode(e.unref(r.ElButton),{type:"primary",disabled:e.unref(p),loading:m.value,class:"sms-code-btn",onClick:e.unref(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1})]),_:1},8,["model","rules"]),e.createElementVNode("div",R,[e.createVNode(e.unref(r.ElButton),{type:"primary",round:"",class:"submit-btn",loading:m.value,onClick:i},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" 提交 ",-1)])]),_:1},8,["loading"])])])]),_:1})])]))}}),H=r._export_sfc$1(A,[["__scopeId","data-v-992af5c2"]]),j={Upload:L,MemberRegister:H};function z(c){for(const[v,p]of Object.entries(j))c.component(`H${v}`,p)}function G(c){c.directive("loading",r.ElLoading.directive),c.use(z)}exports.useHsAdminUi=G;
|
package/dist/h5.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as z, g as G, E as Q, a as f, f as Y, d as K } from "./index-
|
|
1
|
+
import { h as z, g as G, E as Q, a as f, f as Y, d as K } from "./index-DA842K1J.js";
|
|
2
2
|
import { defineComponent as B, shallowRef as W, reactive as O, computed as F, watch as X, resolveComponent as J, resolveDirective as Z, withDirectives as ee, createElementBlock as M, openBlock as V, createElementVNode as p, createBlock as A, createCommentVNode as ae, createVNode as n, unref as e, withCtx as d, createTextVNode as L, ref as x, onMounted as te, onUnmounted as le, toDisplayString as N, Fragment as ne, renderList as oe } from "vue";
|
|
3
|
-
import { by as T, H as re, Q as se, a3 as H, E as de, bE as ie, aO as v, bF as P, aj as ue, K as pe, R, aQ as ce } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-
|
|
3
|
+
import { by as T, H as re, Q as se, a3 as H, E as de, bE as ie, aO as v, bF as P, aj as ue, K as pe, R, aQ as ce } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DVwBTR_W.js";
|
|
4
4
|
const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" }, fe = /* @__PURE__ */ B({
|
|
5
5
|
__name: "Upload",
|
|
6
6
|
props: {
|