diff --git a/src/App.vue b/src/App.vue index 61dc1be..d8656bc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,10 +3,6 @@ diff --git a/src/components/front/info-bottom.vue b/src/components/front/info-bottom.vue new file mode 100644 index 0000000..1692b4f --- /dev/null +++ b/src/components/front/info-bottom.vue @@ -0,0 +1,57 @@ + + + + + + + + {{ item.userName }} + + + {{item.createTime}} + + + + + {{ item.content }} + + + + + + + + + + + + diff --git a/src/components/front/info-top.vue b/src/components/front/info-top.vue new file mode 100644 index 0000000..f1987a5 --- /dev/null +++ b/src/components/front/info-top.vue @@ -0,0 +1,150 @@ + + + + + + + + + + {{state.info.title}} + + + {{state.info.introduction}} + + + + {{tag}} + + + + + + + 立即购买 + + + {{state.isFavorite?'已收藏':'收藏'}} + + + + + + + + + + + + + + + + + + + + + + + 确定 + + + + + + + + diff --git a/src/components/front/item.vue b/src/components/front/item.vue new file mode 100644 index 0000000..e583ec3 --- /dev/null +++ b/src/components/front/item.vue @@ -0,0 +1,99 @@ + + + + + + + + + + 澳大利亚原装进口自然馈赠Natures Gift 牛肉配方成犬粮 18kg + + + ¥998.00 + ¥1098.00 + + + + + + + + + + + + + + + + + diff --git a/src/components/front/item2.vue b/src/components/front/item2.vue new file mode 100644 index 0000000..a89768c --- /dev/null +++ b/src/components/front/item2.vue @@ -0,0 +1,71 @@ + + + + + + + + + + 澳大利亚原装进口自然馈赠Natures Gift 牛肉配方成犬粮 18kg + + + ¥998.00 + ¥1098.00 + + + + + + + + diff --git a/src/components/nav/Navigation1.vue b/src/components/nav/Navigation1.vue index e29f7eb..6f295de 100644 --- a/src/components/nav/Navigation1.vue +++ b/src/components/nav/Navigation1.vue @@ -12,8 +12,10 @@ router > {{ r.name }} + :index="r.path"> + {{ r.name }} @@ -42,8 +44,8 @@ import { getFrontList } from '~/utils/utils' import { useRouter } from 'vue-router' import { logoutFront } from '~/api/user/frontUserApi' - const router = useRouter() + const activeIndex = ref('1') const handleSelect = (key: string, keyPath: string[]) => { console.log(key, keyPath) @@ -59,16 +61,19 @@ const logout = () => { } diff --git a/src/layouts/front.vue b/src/layouts/front.vue index f3a6d2f..0ccbb12 100644 --- a/src/layouts/front.vue +++ b/src/layouts/front.vue @@ -6,8 +6,10 @@ - - + + + + @@ -19,6 +21,14 @@ diff --git a/src/main.ts b/src/main.ts index f0368dd..5bb6ef4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,14 +2,11 @@ import '@unocss/reset/tailwind-compat.css' // unocss reset import 'virtual:uno.css' import 'virtual:unocss-devtools' - // 你自定义的 css import './styles/main.css' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' - - import App from './App.vue' const app = createApp(App) for (const [key, component] of Object.entries(ElementPlusIconsVue)) { diff --git a/src/pages/front/index.vue b/src/pages/front/index.vue index 5f291c4..c0f01ff 100644 --- a/src/pages/front/index.vue +++ b/src/pages/front/index.vue @@ -1,8 +1,24 @@ -我是前台 + + + + + + + + + + + + + + + + +{ +"meta": { +"layout": "front" +} +} + diff --git a/src/pages/front/list/index.vue b/src/pages/front/list/index.vue new file mode 100644 index 0000000..bd9452a --- /dev/null +++ b/src/pages/front/list/index.vue @@ -0,0 +1,20 @@ + + + + + + + + + + +{ +"meta": { +"layout": "front" +} +} + diff --git a/src/pages/index.vue b/src/pages/index.vue new file mode 100644 index 0000000..aeaa333 --- /dev/null +++ b/src/pages/index.vue @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +{ +"meta": { +"layout": "front" +} +} + diff --git a/src/pages/login.vue b/src/pages/login.vue index 0ad6415..b8912df 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -42,7 +42,6 @@ import { useRouter } from 'vue-router' import { loginAdmin } from '~/api/user/adminUserApi' import { getUuid } from '~/utils/utils' import { loginFront } from '~/api/user/frontUserApi' - const router = useRouter() const state = reactive({ role: false, diff --git a/src/utils/utils.ts b/src/utils/utils.ts index ebfb10f..537e82a 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -9,8 +9,7 @@ export const getUuid = (): string => { }); }; - -export const getFrontList = () => { +export const getAdminList = () => { const routes = [ { "path": "/admin/", @@ -40,3 +39,19 @@ export const getFrontList = () => { ] return routes; } +export const getFrontList = () => { + const routes = [ + { + "path": "/front/", + "name": "首页", + "icon": "House", + }, + { + "path": "/front/list", + "name": "更多好物", + "icon": "House", + }, + + ] + return routes; +}