"use strict";const e=require("../../../../common/vendor.js"),r=require("../../../index.js"),o=require("../../../validate/form.js"),i=require("../../../hooks/useModal.js"),s=require("../../../api/member/auth.js");if(require("../../../url/index.js"),require("../../../store/index.js"),require("../../../store/app.js"),require("../../../api/promotion/diy.js"),require("../../../request/index.js"),require("../../../config/index.js"),require("../../../platform/index.js"),require("../../../platform/provider/wechat/index.js"),require("../../../platform/provider/wechat/miniProgram.js"),require("../../../api/member/social.js"),require("../../../api/member/user.js"),require("../../../platform/provider/apple/index.js"),require("../../../platform/share.js"),require("../../../router/index.js"),require("../../../helper/throttle.js"),require("../../../platform/pay.js"),require("../../../helper/index.js"),require("../../../helper/test.js"),require("../../../helper/digit.js"),require("../../../api/pay/order.js"),require("../../../store/user.js"),require("../../../store/cart.js"),require("../../../api/trade/cart.js"),require("../../../api/pay/wallet.js"),require("../../../api/trade/order.js"),require("../../../api/promotion/coupon.js"),require("../../../store/sys.js"),require("../../../store/modal.js"),require("../../../config/zIndex.js"),require("../../../api/member/signin.js"),!Array){(e.resolveComponent("uni-easyinput")+e.resolveComponent("uni-forms-item")+e.resolveComponent("uni-forms"))()}Math||((()=>"../../../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"../../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.js")+(()=>"../../../../uni_modules/uni-forms/components/uni-forms/uni-forms.js"))();const a={__name:"account-login",props:{agreeStatus:{type:Boolean,default:!1}},emits:["onConfirm"],setup(a,{emit:u}){const n=e.ref(null),t=u,l=a,p=e.reactive({model:{username:"",password:""},rules:{username:o.username,password:o.password}});async function m(){if(!(await e.unref(n).validate().catch((e=>{console.log("error: ",e)}))))return;if(!l.agreeStatus)return t("onConfirm",!0),void r.sheep.$helper.toast("请勾选同意");const{code:o,data:a}=await s.AuthUtil.login(p.model);0===o&&i.closeAuthModal()}return(r,o)=>({a:e.o((e=>p.model.username=e)),b:e.p({placeholder:"请输入用户名",inputBorder:!1,modelValue:p.model.username}),c:e.p({name:"username",label:"用户名"}),d:e.o((e=>p.model.password=e)),e:e.p({type:"password",placeholder:"请输入密码",inputBorder:!1,modelValue:p.model.password}),f:e.p({name:"password",label:"密码"}),g:e.sr(n,"90a14fae-0",{k:"accountLoginRef"}),h:e.o((e=>p.model=e)),i:e.p({rules:p.rules,validateTrigger:"bind",labelWidth:"140",labelAlign:"center",modelValue:p.model}),j:e.o(m)})}},u=e._export_sfc(a,[["__scopeId","data-v-90a14fae"]]);wx.createComponent(u);
