diff --git a/.env b/.env index da5b2cc..0f0928f 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ VITE_ENABLE_MOCK=false VITE_API_PREFIX=/api -VITE_PROXY_ENDPOINT=http://localhost:8000 +VITE_PROXY_ENDPOINT=https://bright.yilibili.com/api diff --git a/.env.development b/.env.development index 92b86ee..9817c86 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -VITE_ENABLE_MOCK=true +VITE_ENABLE_MOCK=false diff --git a/index.html b/index.html index 0cea6cc..d4b4ce4 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Yili Admin + 布兰德后台管理
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bcd8208..a26db71 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -557,46 +557,55 @@ packages: resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.22.4': resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.22.4': resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.22.4': resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.22.4': resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.22.4': resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.22.4': resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.22.4': resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.22.4': resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} diff --git a/src/api/carousal.ts b/src/api/carousal.ts new file mode 100644 index 0000000..09f3ca6 --- /dev/null +++ b/src/api/carousal.ts @@ -0,0 +1,30 @@ +import httpClient from './httpClient' +import type { CreateCarousalsRequest, GetCarousalsRequest } from '@/model/carousals' +import type { UnwrapNestedRefs } from 'vue' + +export const createCarousal = (createCarousalsRequest: UnwrapNestedRefs<{ size: number; page: number }> & {}) => { + return httpClient.post('/carousals', createCarousalsRequest) +} + +export const getCarousalList = (getCarousalsRequest:GetCarousalsRequest) => { + return httpClient.get('/carousals',getCarousalsRequest) +} +export const getCarousalItem = (id:string) => { + return httpClient.get(`/carousals/${id}`) +} + +export const updateCarousalItem = (id:number,updateCarousalsRequest: CreateCarousalsRequest) => { + return httpClient.put(`/carousals/${id}`,updateCarousalsRequest) +} + +export const deleteCarousal = (id:number) => { + return httpClient.delete(`/carousals/${id}`) +} + +export const activeCarousal = (id:number) => { + return httpClient.put(`/carousals/${id}/active`) +} + +export const inactiveCarousal = (id:number) => { + return httpClient.put(`/carousals/${id}/inactive`) +} \ No newline at end of file diff --git a/src/layouts/components/AppLogo.vue b/src/layouts/components/AppLogo.vue index 1a39a53..b8cb384 100644 --- a/src/layouts/components/AppLogo.vue +++ b/src/layouts/components/AppLogo.vue @@ -1,14 +1,10 @@ - + - + diff --git a/src/layouts/components/Header.vue b/src/layouts/components/Header.vue index 668297a..46a901f 100644 --- a/src/layouts/components/Header.vue +++ b/src/layouts/components/Header.vue @@ -1,25 +1,11 @@ - + diff --git a/src/layouts/components/UserArea.vue b/src/layouts/components/UserArea.vue index 857ab9c..75352cf 100644 --- a/src/layouts/components/UserArea.vue +++ b/src/layouts/components/UserArea.vue @@ -1,9 +1,10 @@ diff --git a/src/pages/carousal/index.vue b/src/pages/carousal/index.vue new file mode 100644 index 0000000..e3dc60b --- /dev/null +++ b/src/pages/carousal/index.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/pages/common/login.vue b/src/pages/common/login.vue index 04e42d2..5932965 100644 --- a/src/pages/common/login.vue +++ b/src/pages/common/login.vue @@ -1,6 +1,5 @@ -
- 记住账号 - 忘记密码? -
{{ loading ? '登录中' : '登录' }} - diff --git a/src/router/index.ts b/src/router/index.ts index ddbf593..59dc447 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -14,6 +14,15 @@ export const asyncRoutes: RouteRecordRaw[] = [ icon: 'system-3' } }, + { + name: 'carousal', + path: 'carousal', + component: () => import('@/pages/carousal/index.vue'), + meta: { + title: '轮播图管理', + icon: 'system-3' + } + }, ] const router = createRouter({ @@ -24,7 +33,7 @@ const router = createRouter({ component: Layout, path: '/', redirect: { - name: 'dashboard' + name: 'classify' }, children: asyncRoutes }, @@ -36,13 +45,13 @@ const router = createRouter({ ] }) -router.beforeEach((to, from, next) => { - if (to.name !== 'login') { - const appStore = useAppStore() - appStore.isLogin ? next() : next({ name: 'login' }) - return - } - next() -}) +// router.beforeEach((to, from, next) => { +// if (to.name !== 'login') { +// const appStore = useAppStore() +// appStore.isLogin ? next() : next({ name: 'login' }) +// return +// } +// next() +// }) export default router