"use strict";const o=require("../../common/libraries/apiLoading.js"),e=require("../../common/libraries/day.js"),i=require("../../common/libraries/naviHelper.js"),l=require("../../gen/Apis.js"),d=require("./model.js"),a=i=>{o.getApiLoading(l.Apis.Visitor.VisitorApplies.Show,i).then((o=>{var i,l,a,s,n,r;d.useModel.showData.value=null==o?void 0:o.data,(null==(l=null==(i=null==o?void 0:o.data)?void 0:i.renovation_workers)?void 0:l.length)&&(d.useModel.userInfo.value=null==(s=null==(a=null==o?void 0:o.data)?void 0:a.renovation_workers)?void 0:s[0]),(null==(n=null==o?void 0:o.data)?void 0:n.code_expired_at)&&(d.useModel.isExpired.value=e.isDatePassed(null==(r=null==o?void 0:o.data)?void 0:r.code_expired_at)),console.log(o)}))},s={getShow:a,handleSubmit(e){var s,n,r;o.getApiLoading(l.Apis.Visitor.VisitorApplies.Scan,{code:null==(r=null==(n=null==(s=d.useModel)?void 0:s.showData)?void 0:n.value)?void 0:r.visitor_code,scan_type:e}).then((o=>{i.showToast("操作成功！",(()=>{var o,e,i;a({id:null==(i=null==(e=null==(o=d.useModel)?void 0:o.showData)?void 0:e.value)?void 0:i.id})})),console.log(o)}))}};exports.method=s;
