diff --git a/build/info.ts b/build/info.ts index 209476d..17e5f53 100644 --- a/build/info.ts +++ b/build/info.ts @@ -17,15 +17,7 @@ export function viteBuildInfo(): Plugin { outDir = resolvedConfig.build?.outDir ?? "dist"; }, buildStart() { - console.log( - bold( - green( - `👏欢迎使用${blue( - "[tp-admin]" - )},如果您感觉不错,记得点击后面链接给个star哦💖 https://github.com/pure-admin/vue-pure-admin` - ) - ) - ); + console.log(bold(green(`👏欢迎使用${blue("[tp-admin]")}`))); if (config.command === "build") { startTime = dayjs(new Date()); } diff --git a/public/favicon.ico b/public/favicon.ico index bef93d4..286f155 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/logo.svg b/public/logo.svg index bc26056..0eaa8c8 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -1 +1,94 @@ - \ No newline at end of file + + + + diff --git a/public/serverConfig.json b/public/serverConfig.json index 0416e1f..aec550f 100644 --- a/public/serverConfig.json +++ b/public/serverConfig.json @@ -19,5 +19,5 @@ "CachingAsyncRoutes": false, "TooltipEffect": "light", "ResponsiveStorageNameSpace": "responsive-", - "AdminHostUrl": "http://192.168.10.13:8000/api/" + "AdminHostUrl": "http://192.168.10.81:8848/" } diff --git a/src/api/user.ts b/src/api/user.ts index ca90302..af7cfff 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -1,5 +1,5 @@ import { http } from "@/utils/http"; -import {getConfig} from "@/config"; +// import { getConfig } from "@/config"; export type UserResult = { success: boolean; @@ -32,16 +32,16 @@ export type RefreshTokenResult = { }; /** 登录 */ -// export const getLogin = (data?: object) => { -// return http.request("post", "/login", { data }); -// }; - export const getLogin = (data?: object) => { - const AdminHostUrl = getConfig().AdminHostUrl; - const url = AdminHostUrl + "login" - return http.request("post", url, { data }); + return http.request("post", "/login", { data }); }; +// export const getLogin = (data?: object) => { +// const AdminHostUrl = getConfig().AdminHostUrl; +// const url = AdminHostUrl + "login"; +// return http.request("post", url, { data }); +// }; + /** 刷新token */ export const refreshTokenApi = (data?: object) => { return http.request("post", "/refreshToken", { data }); diff --git a/src/router/modules/system.ts b/src/router/modules/system.ts index cec6b91..ec52c67 100644 --- a/src/router/modules/system.ts +++ b/src/router/modules/system.ts @@ -10,16 +10,16 @@ export default { { path: "/system/user/index", name: "users", - // component: () => import("@/views/system/user/index.vue"), - component: () => import("@/views/common/common.vue"), + component: () => import("@/views/system/user/index.vue"), + // component: () => import("@/views/common/common.vue"), meta: { title: "用户" } }, { - path: "/system/roles", + path: "/system/roles/index", name: "roles", - component: () => import("@/views/common/common.vue"), + component: () => import("@/views/system/roles/index.vue"), meta: { title: "角色" } diff --git a/src/style/login.css b/src/style/login.css index 781826c..7f86094 100644 --- a/src/style/login.css +++ b/src/style/login.css @@ -10,7 +10,9 @@ width: 100vw; height: 100vh; display: grid; - grid-template-columns: repeat(2, 1fr); + /* grid-template-columns: repeat(2, 1fr); */ + align-items: center; + justify-content: center; grid-gap: 18rem; padding: 0 2rem; } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 0ec8680..449069c 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -8,9 +8,9 @@ import type { FormInstance } from "element-plus"; import { useLayout } from "@/layout/hooks/useLayout"; import { useUserStoreHook } from "@/store/modules/user"; import { initRouter, getTopMenu } from "@/router/utils"; -import { bg, avatar, illustration } from "./utils/static"; +import { avatar } from "./utils/static"; import { useRenderIcon } from "@/components/ReIcon/src/hooks"; -import { ref, reactive, toRaw, onMounted, onBeforeUnmount } from "vue"; +import { ref, reactive, onMounted, onBeforeUnmount } from "vue"; import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange"; import dayIcon from "@/assets/svg/day.svg?component"; @@ -43,7 +43,10 @@ const onLogin = async (formEl: FormInstance | undefined) => { await formEl.validate((valid, fields) => { if (valid) { useUserStoreHook() - .loginByUsername({ username: ruleForm.username, password: ruleForm.password }) + .loginByUsername({ + username: ruleForm.username, + password: ruleForm.password + }) .then(res => { if (res.success) { // 获取后端路由 @@ -81,7 +84,7 @@ onBeforeUnmount(() => {