import{s as e,g as r,a,r as s,o as t,c as o,i as n}from"./index-b1399800.js";import{o as c}from"./uni-app.es.6e445678.js";import{g as i}from"./getParams.10f08682.js";import{m as p}from"./api.a8ee9fc2.js";const u={__name:"index",setup(u){const d="https://chtech.ncjti.edu.cn/testingServertomcat/carbook/appopenid.action";c((()=>{m()}));const m=()=>{const r=i("card_number");if(r)e("bus_card_number",r),_();else{"weixin"===i("type")?jWeixin.miniProgram.reLaunch({url:"/pages/index/index"}):g()}},_=async()=>{const t=r("bus_card_number"),o=await p({url:"/appget_user.action",data:{card_number:t}});e("bus-userInfo",JSON.stringify(o.data)),"教师"===o.data.user_zz||"临时人员"===o.data.user_zz?a({url:"/pages/home/home"}):"车队长"===o.data.user_zz?s({url:"/pages/record/record"}):"司机"===o.data.user_zz?s({url:"/pages/recordDriver/recordDriver"}):s({url:"/pages/404/404"})},g=()=>{window.location.href=`https://open.wecard.qq.com/connect/oauth/authorize?app_key=4AA7B3944BDF3739&response_type=code&scope=snsapi_base&ocode=1015730314&redirect_uri=${d}&state=${d}`};return(e,r)=>{const a=n;return t(),o(a)}}};export{u as default};
