diff --git a/admin-fe/src/components/modal/index.ts b/admin-fe/src/components/modal/index.ts new file mode 100644 index 0000000..d0115fb --- /dev/null +++ b/admin-fe/src/components/modal/index.ts @@ -0,0 +1,3 @@ +import Modal from './modal.vue'; + +export default Modal \ No newline at end of file diff --git a/admin-fe/src/components/modal/modal.vue b/admin-fe/src/components/modal/modal.vue new file mode 100644 index 0000000..73fe993 --- /dev/null +++ b/admin-fe/src/components/modal/modal.vue @@ -0,0 +1,66 @@ + + + + + \ No newline at end of file diff --git a/admin-fe/src/main.ts b/admin-fe/src/main.ts index 8f28e57..0eced11 100644 --- a/admin-fe/src/main.ts +++ b/admin-fe/src/main.ts @@ -5,6 +5,7 @@ import App from './App.vue' import router from './router' import {httpConfig} from "./util/http"; import './assets/app.css' +import PInput from "./components/input"; httpConfig.baseURL = "http://localhost:8080" @@ -12,5 +13,6 @@ const app = createApp(App) // 使用路由 app.use(router) app.use(createPinia()); +app.component('PInput',PInput) // 将应用实例挂载到 模板中 app.mount('#vue-root-app') \ No newline at end of file diff --git a/admin-fe/src/util/http.ts b/admin-fe/src/util/http.ts index f4cc384..88f6ea6 100644 --- a/admin-fe/src/util/http.ts +++ b/admin-fe/src/util/http.ts @@ -1,6 +1,5 @@ import {toast} from "../components/message"; import {useUserStore} from "../service/store"; -import {useRoute, useRouter} from "vue-router"; export type HttpMethod = 'get' | 'post' | 'delete' | 'put' @@ -77,7 +76,8 @@ class Http { for (const key in data) { params.push(`${key}=${data[key]}`); } - data = params.join('&') + data = null; + url += '?' + params.join('&') } } @@ -86,7 +86,6 @@ class Http { } const token = useUserStore().token(); if (token) headers.token = token - const r = useRoute(), router = useRouter(); fetch(httpConfig.baseURL + url, { method, body: data, @@ -100,9 +99,9 @@ class Http { // 需要统一处理数据 if (code === 403) { toast("登录凭证无效或者已过期") - if (r.fullPath != '/login') { - router.replace('/login'); - } + // if (r.fullPath != '/login') { + // router.replace('/login'); + // } return; } else if (err) { toast(httpConfig.globalErrorHandler[code]) @@ -114,7 +113,6 @@ class Http { resolve(res.data) }) .catch(() => { - }) }); } diff --git a/admin-fe/src/views/user/index.vue b/admin-fe/src/views/user/index.vue index 05e8de2..21eaa0d 100644 --- a/admin-fe/src/views/user/index.vue +++ b/admin-fe/src/views/user/index.vue @@ -24,17 +24,42 @@ {{ u.pointInfo?.totalPoint }} {{ u.firstLoginTime }} - 编辑 + 编辑 禁用 - 删除 + 删除 + +
+
+ 昵称 +

+ +

+
+
+ 省份 +

+ +

+
+
+ 城市 +

+ +

+
+ +
+