"use strict";const e=require("../common/vendor.js");require("../common/libraries/request.js");const o=require("../common/store/useWeAppAuthStore.js");if(require("../common/store/useWorkStore.js"),require("../gen/Apis.js"),require("../common/libraries/setTabBar.js"),require("../common/libraries/apiLoading.js"),!Array){(e.resolveComponent("hs-all-page-bg")+e.resolveComponent("uni-icons")+e.resolveComponent("hs-button")+e.resolveComponent("hs-private-policy"))()}Math||((()=>"../components/hs-all-page-bg/hs-all-page-bg.js")+(()=>"../uni_modules/uni-icons/components/uni-icons/uni-icons.js")+(()=>"../components/hs-button/hs-button.js")+(()=>"../components/hs-private-policy/hs-private-policy.js"))();const n=e.defineComponent({__name:"login",setup(n){const s=e.ref({});e.ref("");const t=e.ref("");e.ref({username:"",password:""});const i=o.useWeAppAuthStore();let a=e.ref(!1);e.onLoad((e=>{t.value=null==e?void 0:e.source}));const r=()=>{"transfer"===t.value?e.index.switchTab({url:"/pages/index/index"}):e.index.navigateBack({delta:1})},u=async o=>{if(!a.value)return!1;e.index.showLoading({title:"正在登录...",mask:!0}),null==i||i.handleUserLogin({code:o.detail.code})},l=()=>!!a.value||(e.index.showToast({title:"请阅读并勾选隐私政策！",icon:"none"}),!1),p=()=>{e.index.showLoading({title:"加载中...",mask:!0}),e.index.downloadFile({url:"https://pay-test-1369486729.cos.ap-guangzhou.myqcloud.com/uploads/cs-test/01K44N70AAG2V678XATHQTH1RC.pdf",success:function(o){const n=o.tempFilePath;e.index.hideLoading(),e.index.openDocument({filePath:n,showMenu:!0})}})};return e.onShow((()=>{s.value=e.index.getMenuButtonBoundingClientRect()})),(o,n)=>({a:e.p({type:"left",size:"20"}),b:e.s(`height:${s.value.height}px;width:${s.value.height}px;`),c:e.o(r),d:e.s(`padding-top:${s.value.top}px;height:${s.value.height}px;line-height:${s.value.height}px;`),e:e.o(u),f:e.o(l),g:e.p({type:"primary",size:"lg",label:"快捷登录",openType:e.unref(a)?"getPhoneNumber":""}),h:e.o(p),i:e.o((o=>e.isRef(a)?a.value=o:a=o)),j:e.p({policyName:"《用户协议》",isAgree:e.unref(a)})})}});wx.createPage(n);
