Kaynağa Gözat

天津麦顿 默认第一次就进入 商品掉期

huangbin 4 yıl önce
ebeveyn
işleme
9e6518c6d4

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

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.31.139:8080/cfg?key=test_139"
+    "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204"
 }

+ 15 - 16
src/layout/components/main.vue

@@ -1,21 +1,20 @@
 <template>
-    <div class="exposure">
-        <div class="first-menu">
-            <a-menu
-                class="a-menu_container"
-                theme="dark"
-                v-model:selectedKeys="selectedKey"
-                @click="selectMenu"
-                mode="horizontal"
-            >
-                <a-menu-item :key="String(index)" v-for="(item, index) in list">{{ item.title}}</a-menu-item>
-            </a-menu>
-            <div class="menu_right">
-                <!-- <slot></slot> -->
-            </div>
-        </div>
-        <router-view />
+  <div class="exposure">
+    <div class="first-menu">
+      <a-menu class="a-menu_container"
+              theme="dark"
+              v-model:selectedKeys="selectedKey"
+              @click="selectMenu"
+              mode="horizontal">
+        <a-menu-item :key="String(index)"
+                     v-for="(item, index) in list">{{ item.title}}</a-menu-item>
+      </a-menu>
+      <div class="menu_right">
+        <!-- <slot></slot> -->
+      </div>
     </div>
+    <router-view />
+  </div>
 </template>
 
 <script lang="ts">

+ 24 - 22
src/layout/components/menu.vue

@@ -1,26 +1,28 @@
 <template>
-    <a-menu
-        theme="dark"
-        mode="inline"
-        :class="['left-menu', isBottom ? 'left-menu_bottom' : 'left-menu_no_bottom']"
-        v-model:selectedKeys="selectedKeys"
-        v-model:openKeys="openKeys"
-        @click="menuClick"
-    >
-        <a-sub-menu v-for="item in filterMenu()" :key="item.code">
-            <template #title>
-                <span>
-                    <svg class="icon svg-icon" aria-hidden="true">
-                        <use :xlink:href="fontIcon(item.code)" />
-                    </svg>
-                    <span class="menu-item_title" v-show="!collapsed">{{ item.title }}</span>
-                </span>
-            </template>
-            <a-menu-item :key="subItem.code" v-for="subItem in item.children">
-                <span>{{ subItem.title }}</span>
-            </a-menu-item>
-        </a-sub-menu>
-    </a-menu>
+  <a-menu theme="dark"
+          mode="inline"
+          :class="['left-menu', isBottom ? 'left-menu_bottom' : 'left-menu_no_bottom']"
+          v-model:selectedKeys="selectedKeys"
+          v-model:openKeys="openKeys"
+          @click="menuClick">
+    <a-sub-menu v-for="item in filterMenu()"
+                :key="item.code">
+      <template #title>
+        <span>
+          <svg class="icon svg-icon"
+               aria-hidden="true">
+            <use :xlink:href="fontIcon(item.code)" />
+          </svg>
+          <span class="menu-item_title"
+                v-show="!collapsed">{{ item.title }}</span>
+        </span>
+      </template>
+      <a-menu-item :key="subItem.code"
+                   v-for="subItem in item.children">
+        <span>{{ subItem.title }}</span>
+      </a-menu-item>
+    </a-sub-menu>
+  </a-menu>
 </template>
 
 <script lang="ts">

+ 27 - 22
src/layout/components/top.vue

@@ -1,25 +1,24 @@
 <template>
-    <a-layout :class="['layout-top', isBottom ? 'layout-top-bottom' : 'layout-top-no-bottom']">
-        <a-layout-header class="m-layout-header">
-            <Header />
-        </a-layout-header>
-        <a-layout class="middleLayout">
-            <a-layout-sider
-                class="m-layout-left"
-                width="160"
-                v-model:collapsed="collapsed"
-                @collapse="collapse"
-                collapsible
-            >
-                <Menu @chooseMenu="chooseMenu" :collapsed="collapsed" />
-            </a-layout-sider>
-            <a-layout-content :style="{ background: '#0E0E0F', flex: 1, }">
-                <!-- <Drawer :title="'挂牌'" :visible="visible"></Drawer> -->
-                <!-- <Main /> -->
-                <router-view />
-            </a-layout-content>
-        </a-layout>
+  <a-layout :class="['layout-top', isBottom ? 'layout-top-bottom' : 'layout-top-no-bottom']">
+    <a-layout-header class="m-layout-header">
+      <Header />
+    </a-layout-header>
+    <a-layout class="middleLayout">
+      <a-layout-sider class="m-layout-left"
+                      width="160"
+                      v-model:collapsed="collapsed"
+                      @collapse="collapse"
+                      collapsible>
+        <Menu @chooseMenu="chooseMenu"
+              :collapsed="collapsed" />
+      </a-layout-sider>
+      <a-layout-content :style="{ background: '#0E0E0F', flex: 1, }">
+        <!-- <Drawer :title="'挂牌'" :visible="visible"></Drawer> -->
+        <!-- <Main /> -->
+        <router-view />
+      </a-layout-content>
     </a-layout>
+  </a-layout>
 </template>
 <script lang="ts">
 import { defineComponent, ref, provide } from 'vue';
@@ -33,6 +32,7 @@ import Menu from './menu.vue';
 import Main from './main.vue';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 import { getHasBottom } from '@/common/setup/order/orderData';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'layout-top',
@@ -71,9 +71,14 @@ export default defineComponent({
             if (temp === 'home') {
                 // 第一次进入项目
                 if (value?.children.length) {
+                    let tempIndex = 0;
+                    // 天津麦顿 第一次进入 默认是 订单交易 商品掉期
+                    if (isOemByEnum(OemType.tian_jing_mai_dun)) {
+                        tempIndex = 2;
+                    }
                     // 默认第一个tab页
-                    name = value.children[0].code;
-                    index.value = ['0'];
+                    name = value.children[tempIndex].code;
+                    index.value = [tempIndex.toString()];
                 } else {
                     router.push({ name: '404' });
                     return;

+ 2 - 0
src/services/bus/login.ts

@@ -14,8 +14,10 @@ import { loginAction } from '../socket/login/index';
 import { LoginResponse } from '../socket/login/interface/index';
 import { getMarketByTradeMode } from './market';
 
+
 export const logout = (): void => {
     // removeLoginData();
+    sessionStorageUtil.removeItem('transaction_swap')
     logoutResponse();
 };
 

+ 12 - 2
src/views/market/spot_trade/spot_trade_order_transaction/index.vue

@@ -9,10 +9,11 @@
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { defineComponent, ref } from 'vue';
 import ThridMenu from '@/common/components/thirdMenu/index.vue';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { handleMartketThirdRouter } from '@/common/setup/matket/router';
+import { sessionStorageUtil } from '@/utils/storage';
 
 export default defineComponent({
     name: EnumRouterName.spot_trade_order_transaction,
@@ -20,7 +21,16 @@ export default defineComponent({
         ThridMenu,
     },
     setup() {
-        return { ...handleMartketThirdRouter(EnumRouterName.spot_trade_order_transaction) };
+        const { index, tabList, changeTab } = handleMartketThirdRouter(EnumRouterName.spot_trade_order_transaction);
+
+        const swap = sessionStorageUtil.getItem('transaction_swap');
+        if (!swap) {
+            index.value = '2';
+            changeTab(0, { lable: '商品掉期', code: 'spot_trade_order_transaction_swap' });
+            sessionStorageUtil.setItem('transaction_swap', '2');
+        }
+
+        return { index, tabList, changeTab };
     },
 });
 </script>