perf: 将baseURL和全局环境代理删除,可直接在vite.config.ts编写,即方便又支持多个代理地址

This commit is contained in:
xiaoxian521
2022-11-10 11:47:07 +08:00
parent 731e9b2f57
commit 2bb433c3cd
14 changed files with 15 additions and 57 deletions

View File

@@ -67,7 +67,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
await formEl.validate((valid, fields) => {
if (valid) {
useUserStoreHook()
.loginByUsername({ username: ruleForm.username })
.loginByUsername({ username: ruleForm.username, password: "admin123" })
.then(res => {
if (res.success) {
// 获取后端路由

View File

@@ -30,7 +30,7 @@ const options = [
function onChange() {
useUserStoreHook()
.loginByUsername({ username: username.value })
.loginByUsername({ username: username.value, password: "admin123" })
.then(res => {
if (res.success) {
usePermissionStoreHook().clearAllCachePage();