Files
bj_power/bj_power_wms_client/web/static/assets/Login-CiXa7TLP.js
T
SunYF 047cdd9870 chore: 批量更新前端静态资源与界面文案
1. 更新多个项目的index.html引入的资源hash文件名
2. 替换BOM页面标题为物料清单,同步路由菜单文案
3. 为多个select组件添加placeholder提示文案
4. 重构MES布局,移除侧边抽屉菜单,添加页面标题
5. 新增/替换部分静态资源文件,删除旧的冗余资源文件
2026-08-28 17:42:50 +08:00

2 lines
1.8 KiB
JavaScript

import{_ as v,c as V,a as s,w as a,r,u as k,b as h,o as x,d as u,e as q,f as E,s as R,E as B,g as C,h as c}from"./index-9NS-icag.js";import{r as N}from"./request-DS_8eNi1.js";const S={class:"login-page"},K={__name:"Login",setup(L){const f=k(),_=h(),d=c(),l=c(!1),o=C({username:"",password:""}),g={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]};async function p(){await d.value.validate(),l.value=!0;try{const t=await N.post("/auth/login",{username:o.username,password:o.password});if(!(t!=null&&t.token))throw new Error("登录响应缺少 token");R(t.token,t.user||{}),B.success("登录成功");const e=_.query.redirect;f.push(e&&typeof e=="string"?e:"/")}finally{l.value=!1}}return(t,e)=>{const m=r("el-input"),i=r("el-form-item"),w=r("el-button"),y=r("el-form"),b=r("el-card");return x(),V("div",S,[s(b,{class:"card"},{default:a(()=>[e[3]||(e[3]=u("div",{class:"head"},[u("h2",null,"北自所库房客户端"),u("p",null,"请使用 WMS 账号登录")],-1)),s(y,{ref_key:"formRef",ref:d,model:o,rules:g,"label-position":"top",onKeyup:q(p,["enter"])},{default:a(()=>[s(i,{label:"用户名",prop:"username"},{default:a(()=>[s(m,{modelValue:o.username,"onUpdate:modelValue":e[0]||(e[0]=n=>o.username=n),placeholder:"用户名",autofocus:""},null,8,["modelValue"])]),_:1}),s(i,{label:"密码",prop:"password"},{default:a(()=>[s(m,{modelValue:o.password,"onUpdate:modelValue":e[1]||(e[1]=n=>o.password=n),type:"password","show-password":"",placeholder:"密码"},null,8,["modelValue"])]),_:1}),s(w,{type:"primary",class:"btn",loading:l.value,onClick:p},{default:a(()=>[...e[2]||(e[2]=[E("登 录",-1)])]),_:1},8,["loading"])]),_:1},8,["model"])]),_:1})])}}},I=v(K,[["__scopeId","data-v-86cfca92"]]);export{I as default};