diff --git a/.npmrc b/.npmrc index 9291011..12f6b11 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,3 @@ -registry=https://registry.npmmirror.com +# registry=https://registry.npmmirror.com electron_mirror=https://npmmirror.com/mirrors/electron/ electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/ diff --git a/src/assets/images/rate/dy.png b/src/assets/images/rate/dy.png new file mode 100644 index 0000000..690bb4d Binary files /dev/null and b/src/assets/images/rate/dy.png differ diff --git a/src/assets/images/rate/fz.png b/src/assets/images/rate/fz.png new file mode 100644 index 0000000..6354894 Binary files /dev/null and b/src/assets/images/rate/fz.png differ diff --git a/src/assets/images/rate/mt.png b/src/assets/images/rate/mt.png new file mode 100644 index 0000000..4964150 Binary files /dev/null and b/src/assets/images/rate/mt.png differ diff --git a/src/assets/images/rate/qne.png b/src/assets/images/rate/qne.png new file mode 100644 index 0000000..6a9326f Binary files /dev/null and b/src/assets/images/rate/qne.png differ diff --git a/src/assets/images/rate/xc.png b/src/assets/images/rate/xc.png new file mode 100644 index 0000000..ac77021 Binary files /dev/null and b/src/assets/images/rate/xc.png differ diff --git a/src/renderer/constant/rate.ts b/src/renderer/constant/rate.ts new file mode 100644 index 0000000..c3522a6 --- /dev/null +++ b/src/renderer/constant/rate.ts @@ -0,0 +1,52 @@ +import xc from '@assets/images/rate/xc.png' +import qne from '@assets/images/rate/qne.png' +import fz from '@assets/images/rate/fz.png' +import mt from '@assets/images/rate/mt.png' +import dy from '@assets/images/rate/dy.png' + +// 菜单列表申明 +interface Item { + id: number + name: string + icon: any + total: number, + score: number +} + +export const channels: Item[] = [ + { + id: 1, + name: '携程', + icon: xc, + total: 110, + score: 4.5 + }, + { + id: 2, + name: '去哪儿', + icon: qne, + total: 100, + score: 4.5 + }, + { + id: 3, + name: '飞猪', + icon: fz, + total: 90, + score: 4.5 + }, + { + id: 4, + name: '美团', + icon: mt, + total: 80, + score: 4.5 + }, + { + id: 5, + name: '抖音', + icon: dy, + total: 70, + score: 4.5 + } +] \ No newline at end of file diff --git a/src/renderer/env.d.ts b/src/renderer/env.d.ts index 815034a..5eea330 100644 --- a/src/renderer/env.d.ts +++ b/src/renderer/env.d.ts @@ -1,3 +1,7 @@ declare module "@store/counter"; declare module "@utils/request"; -declare module "@constant/menus"; \ No newline at end of file +declare module "@assets/images/*"; +declare module "@constant/rate"; +declare module "@constant/menus"; +declare module "@remixicon/vue"; +declare module "vue-router"; \ No newline at end of file diff --git a/src/renderer/layout/index.vue b/src/renderer/layout/index.vue index 88bc12c..a9b72ae 100644 --- a/src/renderer/layout/index.vue +++ b/src/renderer/layout/index.vue @@ -1,6 +1,6 @@ - - + \ No newline at end of file diff --git a/src/renderer/router/index.ts b/src/renderer/router/index.ts index 80963bf..9eda7fc 100644 --- a/src/renderer/router/index.ts +++ b/src/renderer/router/index.ts @@ -36,15 +36,15 @@ const router = createRouter({ routes, }); -router.beforeEach((to, _from, next) => { +router.beforeEach((to: any, from: any, next: any) => { const token = localStorage.getItem("token"); if (to.meta && (to.meta as any).requiresAuth && !token) { next({ path: "/login" }); return; } - if (token && to.path !== "/home") { - next({ path: "/home" }); + if (token && to.path !== "/rate") { + next({ path: "/rate" }); return; } diff --git a/src/renderer/views/home/index.vue b/src/renderer/views/home/index.vue index 15222ea..3a4110b 100644 --- a/src/renderer/views/home/index.vue +++ b/src/renderer/views/home/index.vue @@ -1,6 +1,8 @@ diff --git a/src/renderer/views/rate/components/RatePanelSection/index.vue b/src/renderer/views/rate/components/RatePanelSection/index.vue new file mode 100644 index 0000000..e55a563 --- /dev/null +++ b/src/renderer/views/rate/components/RatePanelSection/index.vue @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/src/renderer/views/rate/components/RateTitleSection/index.vue b/src/renderer/views/rate/components/RateTitleSection/index.vue new file mode 100644 index 0000000..b21ba7e --- /dev/null +++ b/src/renderer/views/rate/components/RateTitleSection/index.vue @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/views/rate/index.vue b/src/renderer/views/rate/index.vue index 15222ea..5cd6fc3 100644 --- a/src/renderer/views/rate/index.vue +++ b/src/renderer/views/rate/index.vue @@ -1,16 +1,14 @@ -