Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

xkwg 4 gadi atpakaļ
vecāks
revīzija
ad22c0327e

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.175:8080/cfg?key=test_175"
+    "apiUrl": "http://218.17.158.45:21001/cfg?key=test_175"
 }

+ 1 - 0
src/services/bus/index.ts

@@ -75,6 +75,7 @@ async function queryDependencies(): Promise<number> {
         const apiUrl = await getCommonApiUrl(config.data.apiUrl);
 
         if (apiUrl.data.code === 200) setServiceURL(apiUrl.data.data);
+
         // await APP.connectQuote();
         /** 数据返回 */
         return Promise.resolve(1);

+ 5 - 0
src/utils/request/serviceURL.ts

@@ -73,4 +73,9 @@ export const commonSearchUrl = (url: string): string => {
 export const setServiceURL = (config: URL): void => {
     console.log('URL', config);
     serviceURL = config;
+
+    // 外网环境(175),外包同事使用
+    serviceURL.goCommonSearchUrl = "http://218.17.158.45:21001/api"
+    serviceURL.quoteUrl = "ws://218.17.158.45:21004"
+    serviceURL.tradeUrl = "ws://218.17.158.45:21005"
 };

+ 8 - 19
src/views/business/purchase/index.vue

@@ -2,7 +2,7 @@
   <!-- 采购 -->
   <div class="purchase">
     <firstMenu :list="list"
-               :value="'value'"
+               :value="'title'"
                @selectMenu="selectMenu" />
     <router-view />
   </div>
@@ -11,23 +11,8 @@
 <script lang="ts">
 import { defineComponent } from 'vue';
 import firstMenu from '@/components/firstMenu/index.vue';
-import { useRouter } from 'vue-router';
-import { Purchase } from '@/enums/routerName';
-
-// 处理菜单
-function handleMenu() {
-    const router = useRouter();
-    const list = [
-        { key: Purchase.realTime, value: '实时敞口' },
-        { key: Purchase.spot, value: '现货头寸' },
-        { key: Purchase.forward, value: '期货头寸' },
-        { key: Purchase.history, value: '历史敞口' },
-    ];
-    function selectMenu(item: any) {
-        router.push({ name: item.key });
-    }
-    return { list, selectMenu };
-}
+import { handleRouterMenu } from '@/setup/router/index';
+import { initData } from '@/setup/methods/index';
 
 export default defineComponent({
     name: 'purchase',
@@ -35,7 +20,11 @@ export default defineComponent({
         firstMenu,
     },
     setup() {
-        const { list, selectMenu } = handleMenu();
+        const { list, selectMenu, getMenuList } = handleRouterMenu();
+        initData(() => {
+            getMenuList();
+            console.log('list', list);
+        });
         return { list, selectMenu };
     },
 });

+ 0 - 1
src/views/information/warehouse-info/index.vue

@@ -23,7 +23,6 @@ export default defineComponent({
         const { list, selectMenu, getMenuList } = handleRouterMenu();
         initData(() => {
             getMenuList();
-            console.log('list', list);
         });
         return { list, selectMenu };
     },