hs-admin-ui 16.2.1 → 16.2.2

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.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-DwHk0FdO.cjs"),e=require("vue"),n=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BFH3JULz.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:y}){const p=c,C=y,b=e.shallowRef(),l=e.reactive({loading:!1,preview:!1,index:0,headers:p.headers,fileList:[]}),m=e.computed(()=>l.fileList.map(s=>s.url));e.watch(()=>l.fileList.length,s=>{setTimeout(()=>{const d=document.querySelector(".upload-wrapper .el-upload--picture-card");d&&(d.style.display=s>=p.limit&&s>0?"none":"inline-flex")},100)},{immediate:!0});async function v(){if(n._.isEmpty(p.headers))return n.request({url:`${window.location.origin}/${p.proxy}/pub_token/mobile_attach_push`}).then(s=>{l.headers={Authorization:`Bearer ${s==null?void 0:s.access_token}`}})}function t(s){l.index=l.fileList.findIndex(d=>d.url===s.url),l.preview=!0}async function i(){l.loading=!0,b.value.submit()}function x(s,d,_){l.loading=!1,C("success",{result:s,file:d,files:_})}return(s,d)=>{const _=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:b,"file-list":l.fileList,"onUpdate:fileList":d[0]||(d[0]=V=>l.fileList=V),"list-type":"picture-card",accept:"image/*",name:"file",action:c.action,headers:l.headers,limit:c.limit,"auto-upload":!1,"on-preview":t,"before-upload":v,"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"])]),l.preview?(e.openBlock(),e.createBlock(_,{key:0,"url-list":m.value,"show-progress":"","initial-index":l.index,onClose:d[1]||(d[1]=V=>l.preview=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0),e.createVNode(e.unref(n.ElButton),{size:"large",type:"primary",onClick:i},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("上传",-1)])]),_:1})])),[[E,l.loading]])}}}),L=n._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:"请输入验证码"},w={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]},T={class:"member-register-page"},M={class:"page-header"},q={class:"page-subtitle"},F={class:"form-container"},P={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:y,isCountingDown:p,stopCountdown:C,sendSmsCode:b}=E(),l=e.ref(),m=e.ref(!1),v=c,t=e.reactive({name:"",gender:"男",phone:"",idCard:"",age:"",address:"",remark:"",captcha:""}),i=e.reactive({topCompanyId:"",companyId:"",companyName:"",defaultMemberType:""}),x=async()=>{if(!l.value)return!1;try{return await l.value.validate()}catch{return!1}},s=async()=>{if(!await x())return;m.value=!0;const a={vip_name:t.name,sex:t.gender,telephone:t.phone,identity_card:t.idCard,age:t.age,address:t.address,remark:t.remark,valid_code:t.captcha,vip_type:i.defaultMemberType,top_company_id:i.topCompanyId,company_id:i.companyId};try{await n.request$1.post(`${v.proxy}/pub/add_vip_info`,a),n.ElMessageBox.alert("注册成功!","提示",{closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!1,showConfirmButton:!1})}catch{}finally{m.value=!1}},d=async()=>{try{return(await n.request$1.get(`${v.proxy}/pub/get_list_vip_price_set?top_company_id=${i.topCompanyId}`)).data.id}catch{n.ElMessage.error("获取默认会员等级失败")}},_=async()=>{const o=n.getUrlParams();i.topCompanyId=o.top_company_id||"",i.companyId=o.company_id||"",i.companyName=o.company_name||"";const a=await d();i.defaultMemberType=a||""};function E(){const o=e.ref(0),a=e.ref(null),r=60,h=e.ref(!1),N=e.computed(()=>o.value>0?`${o.value}秒后重新发送`:"发送验证码"),k=()=>{o.value=r,h.value=!0,a.value=setInterval(()=>{o.value--,o.value<=0&&I()},1e3)},I=()=>{a.value&&(clearInterval(a.value),a.value=null),o.value=0,h.value=!1};return{countdownText:N,isCountingDown:h,stopCountdown:I,sendSmsCode:async()=>{if(h.value||!l.value)return;if(!await l.value.validateField("phone")){n.ElMessage.warning("请先输入正确的手机号");return}m.value=!0;try{await n.request$1.post(`${v.proxy}/pub/send_sms_vip_valid_code`,{telephone:t.phone,top_company_id:i.topCompanyId,company_id:i.companyId}),n.ElMessage.success("验证码发送成功"),k()}catch{}finally{m.value=!1}}}}function V(){if(t.idCard.length===18){const o=t.idCard.substring(6,14),a=parseInt(o.substring(0,4)),r=parseInt(o.substring(4,6)),h=parseInt(o.substring(6,8)),N=new Date().getFullYear()-a-(new Date().getMonth()+1<r||new Date().getMonth()+1===r&&new Date().getDate()<h?1:0);t.age=N.toString(),t.gender=Number(t.idCard.charAt(16))%2===0?"女":"男"}}return e.onMounted(()=>{_()}),e.onUnmounted(()=>{C()}),(o,a)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",M,[a[8]||(a[8]=e.createElementVNode("h1",{class:"page-title"},"会员信息登记",-1)),e.createElementVNode("p",q,[e.createVNode(e.unref(n.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.location_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(i.companyName),1)])]),e.createElementVNode("main",F,[e.createVNode(e.unref(u.ElScrollbar),{class:"form-scroll"},{default:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(e.unref(u.ElForm),{ref_key:"formRef",ref:l,model:t,rules:e.unref(B),"label-position":"left","label-width":"80px",class:"member-form"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElFormItem),{label:"姓名",prop:"name"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElInput),{modelValue:t.name,"onUpdate:modelValue":a[0]||(a[0]=r=>t.name=r),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(n.ElInput),{modelValue:t.phone,"onUpdate:modelValue":a[1]||(a[1]=r=>t.phone=r),type:"tel",placeholder:e.unref(g).phone,maxlength:e.unref(w).phone,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"身份证号",prop:"idCard"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElInput),{modelValue:t.idCard,"onUpdate:modelValue":a[2]||(a[2]=r=>t.idCard=r),onInput:V,placeholder:e.unref(g).idCard,maxlength:e.unref(w).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:t.gender,"onUpdate:modelValue":a[3]||(a[3]=r=>t.gender=r),class:"gender-radio-group"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),r=>(e.openBlock(),e.createBlock(e.unref(u.ElRadio),{key:r.value,value:r.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.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(n.ElInput),{type:"number",modelValue:t.age,"onUpdate:modelValue":a[4]||(a[4]=r=>t.age=r),placeholder:e.unref(g).age,maxlength:e.unref(w).age,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"地址",prop:"address"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElInput),{modelValue:t.address,"onUpdate:modelValue":a[5]||(a[5]=r=>t.address=r),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(n.ElInput),{modelValue:t.remark,"onUpdate:modelValue":a[6]||(a[6]=r=>t.remark=r),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(n.ElInput),{modelValue:t.captcha,"onUpdate:modelValue":a[7]||(a[7]=r=>t.captcha=r),placeholder:e.unref(g).captcha,maxlength:e.unref(w).captcha,clearable:"",class:"sms-code-input"},null,8,["modelValue","placeholder","maxlength"]),e.createVNode(e.unref(n.ElButton),{type:"primary",disabled:e.unref(p),loading:m.value,class:"sms-code-btn",onClick:e.unref(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1})]),_:1},8,["model","rules"]),e.createElementVNode("div",R,[e.createVNode(e.unref(n.ElButton),{type:"primary",round:"",class:"submit-btn",loading:m.value,onClick:s},{default:e.withCtx(()=>[...a[9]||(a[9]=[e.createTextVNode(" 提交 ",-1)])]),_:1},8,["loading"])])])]),_:1})])]))}}),H=n._export_sfc$1(A,[["__scopeId","data-v-7f1b1e2f"]]),j={Upload:L,MemberRegister:H};function z(c){for(const[y,p]of Object.entries(j))c.component(`H${y}`,p)}function G(c){c.directive("loading",n.ElLoading.directive),c.use(z)}exports.useHsAdminUi=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index-DwHk0FdO.cjs"),e=require("vue"),n=require("./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-BFH3JULz.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:y}){const p=c,C=y,b=e.shallowRef(),l=e.reactive({loading:!1,preview:!1,index:0,headers:p.headers,fileList:[]}),m=e.computed(()=>l.fileList.map(s=>s.url));e.watch(()=>l.fileList.length,s=>{setTimeout(()=>{const d=document.querySelector(".upload-wrapper .el-upload--picture-card");d&&(d.style.display=s>=p.limit&&s>0?"none":"inline-flex")},100)},{immediate:!0});async function v(){if(n._.isEmpty(p.headers))return n.request({url:`${window.location.origin}/${p.proxy}/pub_token/mobile_attach_push`}).then(s=>{l.headers={Authorization:`Bearer ${s==null?void 0:s.access_token}`}})}function t(s){l.index=l.fileList.findIndex(d=>d.url===s.url),l.preview=!0}async function i(){l.loading=!0,b.value.submit()}function x(s,d,_){l.loading=!1,C("success",{result:s,file:d,files:_})}return(s,d)=>{const _=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:b,"file-list":l.fileList,"onUpdate:fileList":d[0]||(d[0]=V=>l.fileList=V),"list-type":"picture-card",accept:"image/*",name:"file",action:c.action,headers:l.headers,limit:c.limit,"auto-upload":!1,"on-preview":t,"before-upload":v,"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"])]),l.preview?(e.openBlock(),e.createBlock(_,{key:0,"url-list":m.value,"show-progress":"","initial-index":l.index,onClose:d[1]||(d[1]=V=>l.preview=!1)},null,8,["url-list","initial-index"])):e.createCommentVNode("",!0),e.createVNode(e.unref(n.ElButton),{size:"large",type:"primary",onClick:i},{default:e.withCtx(()=>[...d[3]||(d[3]=[e.createTextVNode("上传",-1)])]),_:1})])),[[E,l.loading]])}}}),L=n._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:"请输入验证码"},w={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]},T={class:"member-register-page"},M={class:"page-header"},q={class:"page-subtitle"},F={class:"form-container"},P={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:y,isCountingDown:p,stopCountdown:C,sendSmsCode:b}=E(),l=e.ref(),m=e.ref(!1),v=c,t=e.reactive({name:"",gender:"男",phone:"",idCard:"",age:"",address:"",remark:"",captcha:""}),i=e.reactive({topCompanyId:"",companyId:"",companyName:"",defaultMemberType:""}),x=async()=>{if(!l.value)return!1;try{return await l.value.validate()}catch{return!1}},s=async()=>{if(!await x())return;m.value=!0;const a={vip_name:t.name,sex:t.gender,telephone:t.phone,identity_card:t.idCard,age:t.age,address:t.address,remark:t.remark,valid_code:t.captcha,vip_type:i.defaultMemberType,top_company_id:i.topCompanyId,company_id:i.companyId};try{await n.request$1.post(`${v.proxy}/pub/add_vip_info`,a),n.ElMessageBox.alert("注册成功!","提示",{closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!1,showConfirmButton:!1})}catch{}finally{m.value=!1}},d=async()=>{try{return(await n.request$1.get(`${v.proxy}/pub/get_list_vip_price_set?top_company_id=${i.topCompanyId}`)).data.id}catch{n.ElMessage.error("获取默认会员等级失败")}},_=async()=>{const o=n.getUrlParams();i.topCompanyId=o.top_company_id||"",i.companyId=o.company_id||"",i.companyName=o.company_name||"";const a=await d();i.defaultMemberType=a||""};function E(){const o=e.ref(0),a=e.ref(null),r=60,h=e.ref(!1),N=e.computed(()=>o.value>0?`${o.value}秒后重新发送`:"获取验证码"),k=()=>{o.value=r,h.value=!0,a.value=setInterval(()=>{o.value--,o.value<=0&&I()},1e3)},I=()=>{a.value&&(clearInterval(a.value),a.value=null),o.value=0,h.value=!1};return{countdownText:N,isCountingDown:h,stopCountdown:I,sendSmsCode:async()=>{if(h.value||!l.value)return;if(!await l.value.validateField("phone")){n.ElMessage.warning("请先输入正确的手机号");return}m.value=!0;try{await n.request$1.post(`${v.proxy}/pub/send_sms_vip_valid_code`,{telephone:t.phone,top_company_id:i.topCompanyId,company_id:i.companyId}),n.ElMessage.success("验证码发送成功"),k()}catch{}finally{m.value=!1}}}}function V(){if(t.idCard.length===18){const o=t.idCard.substring(6,14),a=parseInt(o.substring(0,4)),r=parseInt(o.substring(4,6)),h=parseInt(o.substring(6,8)),N=new Date().getFullYear()-a-(new Date().getMonth()+1<r||new Date().getMonth()+1===r&&new Date().getDate()<h?1:0);t.age=N.toString(),t.gender=Number(t.idCard.charAt(16))%2===0?"女":"男"}}return e.onMounted(()=>{_()}),e.onUnmounted(()=>{C()}),(o,a)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",M,[a[8]||(a[8]=e.createElementVNode("h1",{class:"page-title"},"会员信息登记",-1)),e.createElementVNode("p",q,[e.createVNode(e.unref(n.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(n.location_default))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(i.companyName),1)])]),e.createElementVNode("main",F,[e.createVNode(e.unref(u.ElScrollbar),{class:"form-scroll"},{default:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(e.unref(u.ElForm),{ref_key:"formRef",ref:l,model:t,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(n.ElInput),{modelValue:t.name,"onUpdate:modelValue":a[0]||(a[0]=r=>t.name=r),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(n.ElInput),{modelValue:t.phone,"onUpdate:modelValue":a[1]||(a[1]=r=>t.phone=r),type:"tel",placeholder:e.unref(g).phone,maxlength:e.unref(w).phone,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"身份证号",prop:"idCard"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElInput),{modelValue:t.idCard,"onUpdate:modelValue":a[2]||(a[2]=r=>t.idCard=r),onInput:V,placeholder:e.unref(g).idCard,maxlength:e.unref(w).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:t.gender,"onUpdate:modelValue":a[3]||(a[3]=r=>t.gender=r),class:"gender-radio-group"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),r=>(e.openBlock(),e.createBlock(e.unref(u.ElRadio),{key:r.value,value:r.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.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(n.ElInput),{type:"number",modelValue:t.age,"onUpdate:modelValue":a[4]||(a[4]=r=>t.age=r),placeholder:e.unref(g).age,maxlength:e.unref(w).age,clearable:""},null,8,["modelValue","placeholder","maxlength"])]),_:1}),e.createVNode(e.unref(u.ElFormItem),{label:"地址",prop:"address"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElInput),{modelValue:t.address,"onUpdate:modelValue":a[5]||(a[5]=r=>t.address=r),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(n.ElInput),{modelValue:t.remark,"onUpdate:modelValue":a[6]||(a[6]=r=>t.remark=r),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(n.ElInput),{modelValue:t.captcha,"onUpdate:modelValue":a[7]||(a[7]=r=>t.captcha=r),placeholder:e.unref(g).captcha,maxlength:e.unref(w).captcha,clearable:"",class:"sms-code-input"},null,8,["modelValue","placeholder","maxlength"]),e.createVNode(e.unref(n.ElButton),{type:"primary",disabled:e.unref(p),loading:m.value,class:"sms-code-btn",onClick:e.unref(b)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]),_:1},8,["disabled","loading","onClick"])])]),_:1})]),_:1},8,["model","rules"]),e.createElementVNode("div",R,[e.createVNode(e.unref(n.ElButton),{type:"primary",round:"",class:"submit-btn",loading:m.value,onClick:s},{default:e.withCtx(()=>[...a[9]||(a[9]=[e.createTextVNode(" 提交 ",-1)])]),_:1},8,["loading"])])])]),_:1})])]))}}),H=n._export_sfc$1(A,[["__scopeId","data-v-1499b897"]]),j={Upload:L,MemberRegister:H};function z(c){for(const[y,p]of Object.entries(j))c.component(`H${y}`,p)}function G(c){c.directive("loading",n.ElLoading.directive),c.use(z)}exports.useHsAdminUi=G;
package/dist/h5.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { h as z, g as G, E as Y, a as g, f as K, d as Q } from "./index-V-voJyGO.js";
1
+ import { h as z, g as G, E as Y, a as f, f as K, d as Q } from "./index-V-voJyGO.js";
2
2
  import { defineComponent as B, shallowRef as W, reactive as T, computed as F, watch as X, resolveComponent as J, resolveDirective as Z, withDirectives as ee, createElementBlock as R, 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
3
  import { bx as O, H as re, Q as se, a3 as H, E as de, bD as ie, aN as y, bE as M, aj as ue, K as pe, R as P, aP as ce } from "./bcVisual.vue_vue_type_style_index_0_scoped_cae31cec_lang-DJEsU-0Q.js";
4
- const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" }, ge = /* @__PURE__ */ B({
4
+ const me = { class: "upload-wrapper" }, ge = { class: "upload-wrapper-inner" }, fe = /* @__PURE__ */ B({
5
5
  __name: "Upload",
6
6
  props: {
7
7
  action: {
@@ -29,7 +29,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
29
29
  index: 0,
30
30
  headers: m.headers,
31
31
  fileList: []
32
- }), f = F(() => o.fileList.map((i) => i.url));
32
+ }), g = F(() => o.fileList.map((i) => i.url));
33
33
  X(
34
34
  () => o.fileList.length,
35
35
  (i) => {
@@ -64,7 +64,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
64
64
  return (i, s) => {
65
65
  const C = J("el-image-viewer"), U = Z("loading");
66
66
  return ee((V(), R("div", me, [
67
- p("div", fe, [
67
+ p("div", ge, [
68
68
  n(e(z), {
69
69
  ref_key: "uploadRef",
70
70
  ref: I,
@@ -111,7 +111,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
111
111
  ]),
112
112
  o.preview ? (V(), A(C, {
113
113
  key: 0,
114
- "url-list": f.value,
114
+ "url-list": g.value,
115
115
  "show-progress": "",
116
116
  "initial-index": o.index,
117
117
  onClose: s[1] || (s[1] = (E) => o.preview = !1)
@@ -131,7 +131,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
131
131
  ]);
132
132
  };
133
133
  }
134
- }), he = /* @__PURE__ */ H(ge, [["__scopeId", "data-v-e6f86e2e"]]), ye = [
134
+ }), he = /* @__PURE__ */ H(fe, [["__scopeId", "data-v-e6f86e2e"]]), ye = [
135
135
  { label: "男", value: "男" },
136
136
  { label: "女", value: "女" }
137
137
  ], h = {
@@ -204,7 +204,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
204
204
  }
205
205
  },
206
206
  setup(c) {
207
- const { countdownText: _, isCountingDown: m, stopCountdown: S, sendSmsCode: I } = U(), o = x(), f = x(!1), w = c, a = T({
207
+ const { countdownText: _, isCountingDown: m, stopCountdown: S, sendSmsCode: I } = U(), o = x(), g = x(!1), w = c, a = T({
208
208
  name: "",
209
209
  gender: "男",
210
210
  phone: "",
@@ -227,7 +227,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
227
227
  }
228
228
  }, i = async () => {
229
229
  if (!await D()) return;
230
- f.value = !0;
230
+ g.value = !0;
231
231
  const t = {
232
232
  vip_name: a.name,
233
233
  sex: a.gender,
@@ -254,7 +254,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
254
254
  });
255
255
  } catch {
256
256
  } finally {
257
- f.value = !1;
257
+ g.value = !1;
258
258
  }
259
259
  }, s = async () => {
260
260
  try {
@@ -269,7 +269,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
269
269
  u.defaultMemberType = t || "";
270
270
  };
271
271
  function U() {
272
- const r = x(0), t = x(null), l = 60, v = x(!1), $ = F(() => r.value > 0 ? `${r.value}秒后重新发送` : "发送验证码"), j = () => {
272
+ const r = x(0), t = x(null), l = 60, v = x(!1), $ = F(() => r.value > 0 ? `${r.value}秒后重新发送` : "获取验证码"), j = () => {
273
273
  r.value = l, v.value = !0, t.value = setInterval(() => {
274
274
  r.value--, r.value <= 0 && q();
275
275
  }, 1e3);
@@ -286,7 +286,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
286
286
  P.warning("请先输入正确的手机号");
287
287
  return;
288
288
  }
289
- f.value = !0;
289
+ g.value = !0;
290
290
  try {
291
291
  await M.post(`${w.proxy}/pub/send_sms_vip_valid_code`, {
292
292
  telephone: a.phone,
@@ -295,7 +295,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
295
295
  }), P.success("验证码发送成功"), j();
296
296
  } catch {
297
297
  } finally {
298
- f.value = !1;
298
+ g.value = !1;
299
299
  }
300
300
  }
301
301
  };
@@ -333,11 +333,11 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
333
333
  model: a,
334
334
  rules: e(be),
335
335
  "label-position": "left",
336
- "label-width": "80px",
336
+ "label-width": "70px",
337
337
  class: "member-form"
338
338
  }, {
339
339
  default: d(() => [
340
- n(e(g), {
340
+ n(e(f), {
341
341
  label: "姓名",
342
342
  prop: "name"
343
343
  }, {
@@ -351,7 +351,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
351
351
  ]),
352
352
  _: 1
353
353
  }),
354
- n(e(g), {
354
+ n(e(f), {
355
355
  label: "手机号",
356
356
  prop: "phone"
357
357
  }, {
@@ -367,7 +367,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
367
367
  ]),
368
368
  _: 1
369
369
  }),
370
- n(e(g), {
370
+ n(e(f), {
371
371
  label: "身份证号",
372
372
  prop: "idCard"
373
373
  }, {
@@ -383,7 +383,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
383
383
  ]),
384
384
  _: 1
385
385
  }),
386
- n(e(g), {
386
+ n(e(f), {
387
387
  label: "性别",
388
388
  prop: "gender"
389
389
  }, {
@@ -410,7 +410,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
410
410
  ]),
411
411
  _: 1
412
412
  }),
413
- n(e(g), {
413
+ n(e(f), {
414
414
  label: "年龄",
415
415
  prop: "age"
416
416
  }, {
@@ -426,7 +426,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
426
426
  ]),
427
427
  _: 1
428
428
  }),
429
- n(e(g), {
429
+ n(e(f), {
430
430
  label: "地址",
431
431
  prop: "address"
432
432
  }, {
@@ -440,7 +440,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
440
440
  ]),
441
441
  _: 1
442
442
  }),
443
- n(e(g), {
443
+ n(e(f), {
444
444
  label: "备注",
445
445
  prop: "remark"
446
446
  }, {
@@ -454,7 +454,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
454
454
  ]),
455
455
  _: 1
456
456
  }),
457
- n(e(g), {
457
+ n(e(f), {
458
458
  label: "验证码",
459
459
  prop: "captcha"
460
460
  }, {
@@ -471,7 +471,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
471
471
  n(e(O), {
472
472
  type: "primary",
473
473
  disabled: e(m),
474
- loading: f.value,
474
+ loading: g.value,
475
475
  class: "sms-code-btn",
476
476
  onClick: e(I)
477
477
  }, {
@@ -492,7 +492,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
492
492
  type: "primary",
493
493
  round: "",
494
494
  class: "submit-btn",
495
- loading: f.value,
495
+ loading: g.value,
496
496
  onClick: i
497
497
  }, {
498
498
  default: d(() => [...t[9] || (t[9] = [
@@ -508,7 +508,7 @@ const me = { class: "upload-wrapper" }, fe = { class: "upload-wrapper-inner" },
508
508
  ])
509
509
  ]));
510
510
  }
511
- }), ke = /* @__PURE__ */ H(Ee, [["__scopeId", "data-v-7f1b1e2f"]]), Le = {
511
+ }), ke = /* @__PURE__ */ H(Ee, [["__scopeId", "data-v-1499b897"]]), Le = {
512
512
  Upload: he,
513
513
  MemberRegister: ke
514
514
  };