index-legacy-a4536623.js 5.5 KB

1
  1. !function(){function e(e,t,o,n,a,l,r){try{var s=e[l](r),u=s.value}catch(d){return void o(d)}s.done?t(u):Promise.resolve(u).then(n,a)}System.register(["./utils-legacy-695aa193.js","./index-legacy-a21eebb7.js","./index-legacy-2d0f40c5.js"],(function(t,o){"use strict";var n,a,l,r,s,u,d,i,m,c,_,p,f,g,w,h;return{setters:[e=>{n=e.F,a=e.C,l=e.B,r=e.P,s=e.M,u=e.c,d=e.s,i=e.r},e=>{m=e.d,c=e.r,_=e.f,p=e.c,f=e.a,g=e.F,w=e.n},e=>{h=e.S}],execute:function(){var o=document.createElement("style");o.textContent="._fieldGroup_1gsmw_1{padding:0 .64rem}._fieldGroup_1gsmw_1 .van-field{margin-bottom:.26667rem;border-radius:.18667rem;padding:.29333rem .34667rem;font-size:.37333rem!important}._fieldGroup_1gsmw_1 .van-field__control{font-size:.37333rem}._fieldGroup_1gsmw_1 .van-field__control::-moz-placeholder{color:#aaa}._fieldGroup_1gsmw_1 .van-field__control::placeholder{color:#aaa}._fieldGroup_1gsmw_1 .van-cell__right-icon{color:#d8d8d8}._fieldGroup_1gsmw_1 ._smsField_1gsmw_19{padding-right:0}._fieldGroup_1gsmw_1 ._smsField_1gsmw_19 ._sendCms_1gsmw_22{color:#fe2451;font-size:.37333rem;width:3.2rem;display:inline-block;text-align:center;border-left:.02667rem solid #E5E5E5}._fieldGroup_1gsmw_1 ._smsField_1gsmw_19 .van-count-down{font-size:.37333rem;width:3.2rem;text-align:center;border-left:.02667rem solid #E5E5E5}._fieldGroup_1gsmw_1 ._btnSubmit_1gsmw_36{width:7.62667rem;margin:.61333rem auto 0;height:1.01333rem;font-size:.42667rem;font-weight:600;color:#131415;border:none;padding:0}._fieldTenant_1gsmw_46 .van-field{border:.02667rem solid #F7DFE7}._fieldTenant_1gsmw_46 ._btnSubmit_1gsmw_36{background:linear-gradient(to right,#FF75A6,#FF3C81);color:#fff}._fieldClassroom_1gsmw_53 .van-field{border:.02667rem solid #DFEDF7}._fieldClassroom_1gsmw_53 ._smsField_1gsmw_19 ._sendCms_1gsmw_22{color:#1cacf1}._fieldClassroom_1gsmw_53 ._btnSubmit_1gsmw_36{background:linear-gradient(to right,#19ADFF,#1BD2FF);color:#fff}._fieldTechnology_1gsmw_63 .van-field{border:.02667rem solid #DFEDF7}._fieldTechnology_1gsmw_63 ._smsField_1gsmw_19 ._sendCms_1gsmw_22{color:#1cacf1}._fieldTechnology_1gsmw_63 ._btnSubmit_1gsmw_36{background:linear-gradient(to right,#0E88A1,#03C3B9);color:#fff}\n",document.head.appendChild(o);t("T",m({name:"the-submit",props:{type:{type:String,"default":""}},setup(t){const o=c(),m=_({typeStatus:!1,countDownTime:6e4,countDownStatus:!0,imgCodeStatus:!1,cooperateTenantName:null,cooperateTenantNature:null,cooperateTenantNatureTxt:null,contacts:null,phone:null,code:null}),T=()=>{m.countDownStatus=!1,w((()=>{o.value.start()}))},b=()=>{if(!u(m.phone))return d("请输入正确的手机号码");m.imgCodeStatus=!0},y=()=>{m.countDownStatus=!0,o.value.reset()},S=function(){var t,o=(t=function*(){try{if(!m.cooperateTenantNature)return d("请选择机构性质");if(!m.cooperateTenantName)return d("请填写机构名称");if(!m.contacts)return d("请填写联系人");if(!m.phone)return d("请输入联系电话");if(!u(m.phone))return d("请输入正确的手机号码");if(!m.code)return d("请输入验证码");yield i.post("/api-website/open/cooperateTenant/save",{data:{cooperateTenantName:m.cooperateTenantName,cooperateTenantNature:m.cooperateTenantNature,contacts:m.contacts,phone:m.phone,code:m.code}}),setTimeout((()=>{d("信息提交成功,我们会尽快与您联系"),m.cooperateTenantName=null,m.cooperateTenantNature=null,m.cooperateTenantNatureTxt=null,m.contacts=null,m.phone=null,m.code=null}),100)}catch(e){}},function(){var o=this,n=arguments;return new Promise((function(a,l){var r=t.apply(o,n);function s(t){e(r,a,l,s,u,"next",t)}function u(t){e(r,a,l,s,u,"throw",t)}s(undefined)}))});return function(){return o.apply(this,arguments)}}();return()=>p(g,null,[p("div",{"class":["_fieldGroup_1gsmw_1","tenant"===t.type&&"_fieldTenant_1gsmw_46","classroom"===t.type&&"_fieldClassroom_1gsmw_53","technology"===t.type&&"_fieldTechnology_1gsmw_63"]},[p(n,{readonly:!0,isLink:!0,arrowDirection:"down",placeholder:"机构性质",border:!1,autocomplete:"off",modelValue:m.cooperateTenantNatureTxt,onClick:()=>m.typeStatus=!0},null),p(n,{type:"text",border:!1,placeholder:"机构名称",autocomplete:"off",maxlength:20,modelValue:m.cooperateTenantName,"onUpdate:modelValue":e=>m.cooperateTenantName=e},null),p(n,{type:"text",border:!1,placeholder:"联系人",autocomplete:"off",maxlength:20,modelValue:m.contacts,"onUpdate:modelValue":e=>m.contacts=e},null),p(n,{type:"number",maxlength:11,border:!1,placeholder:"联系电话",autocomplete:"off",modelValue:m.phone,"onUpdate:modelValue":e=>m.phone=e},null),p(n,{"class":"_smsField_1gsmw_19",type:"number",maxlength:6,border:!1,placeholder:"短信验证码",autocomplete:"off",modelValue:m.code,"onUpdate:modelValue":e=>m.code=e},{button:()=>m.countDownStatus?p("span",{"class":"_sendCms_1gsmw_22",onClick:b},[f("发送验证码")]):p(a,{ref:e=>o.value=e,"auto-start":!1,time:m.countDownTime,onFinish:y,format:"ss秒"},null)}),p(l,{block:!0,round:!0,"class":"_btnSubmit_1gsmw_36",onClick:S},{"default":()=>[f("确认提交")]}),p(h,{show:m.typeStatus,"onUpdate:show":e=>m.typeStatus=e,position:"bottom",round:!0},{"default":()=>[p(r,{columns:[{text:"中小学学校",value:"PRIMARY_AND_SECONDARY_SCHOOLS"},{text:"教培机构",value:"EDUCATIONAL_INSTITUTIONS"},{text:"音乐达人",value:"PLAYERS"},{text:"代理商",value:"AGENT"}],showToolbar:!0,onCancel:()=>m.typeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];m.cooperateTenantNature=t.value,m.cooperateTenantNatureTxt=t.text,m.typeStatus=!1}},null)]})]),m.imgCodeStatus?p(s,{value:m.imgCodeStatus,"onUpdate:value":e=>m.imgCodeStatus=e,phone:m.phone,onClose:()=>{m.imgCodeStatus=!1},onSendCode:T},null):null])}}))}}}))}();