YY há 2 anos atrás
pai
commit
2ad5fe3979
5 ficheiros alterados com 30 adições e 24 exclusões
  1. BIN
      src/assets/banner.png
  2. BIN
      src/assets/logo.png
  3. BIN
      src/assets/top-1.png
  4. 20 13
      src/router/index.ts
  5. 10 11
      src/stores/counter.ts

BIN
src/assets/banner.png


BIN
src/assets/logo.png


BIN
src/assets/top-1.png


+ 20 - 13
src/router/index.ts

@@ -21,19 +21,26 @@ const router = createRouter({
       meta: { title: '中科在线(长春)' },
       component: () => import('@/views/homeIndex.vue')
     },
-    ...common,
-    // 直播大厅
-    ...live,
-    // 科技频道
-    ...channel,
-    // 科技超市
-    ...market,
-    // 交流合作
-    ...interflow,
-    // 创新服务
-    ...service,
-    // 科学普及
-    ...universal
+    {
+      path: '/homeIndex',
+      meta: { title: '中科在线(长春)' },
+      component: () => import('@common/src/components/web-frame/home.vue'),
+      children: [
+        ...common,
+        // 直播大厅
+        ...live,
+        // 科技频道
+        ...channel,
+        // 科技超市
+        ...market,
+        // 交流合作
+        ...interflow,
+        // 创新服务
+        ...service,
+        // 科学普及
+        ...universal
+      ]
+    }
   ]
 });
 router.beforeEach((to, from, next) => {

+ 10 - 11
src/stores/counter.ts

@@ -1,12 +1,11 @@
-import { ref, computed } from 'vue'
-import { defineStore } from 'pinia'
+import * as ustate from '@common/src/stores/user/state';
+import * as umutations from '@common/src/stores/user/mutations';
 
-export const useCounterStore = defineStore('counter', () => {
-  const count = ref(0)
-  const doubleCount = computed(() => count.value * 2)
-  function increment() {
-    count.value++
-  }
-
-  return { count, doubleCount, increment }
-})
+import { createStore } from 'vuex';
+const store = createStore({
+  state: { ...ustate },
+  mutations: { ...umutations },
+  actions: {},
+  modules: {}
+});
+export default store;