Jelajahi Sumber

修改 又上角 logo

huangbin 4 tahun lalu
induk
melakukan
d34047d93b
3 mengubah file dengan 161 tambahan dan 236 penghapusan
  1. TEMPAT SAMPAH
      public/logoHead.png
  2. 93 121
      src/layout/components/header.vue
  3. 68 115
      src/views/account/login.vue

TEMPAT SAMPAH
public/logoHead.png


+ 93 - 121
src/layout/components/header.vue

@@ -1,34 +1,11 @@
 <template>
-
-  <!-- 风险管理 -->
-  <div v-if="isOemByEnum(OemType.manager)">
-    <img src="../../assets/images/logoHeader.png" />
-    <span>{{getCompanyName()}}</span>
-  </div>
-
-  <!-- 云融 -->
-  <div v-else-if="isOemByEnum(OemType.wrspot)">
-    <img src="../../assets/images/headLogo.jpg" />
-    <span>云融</span>
-  </div>
-  <!-- 天津麦顿 -->
-  <div v-else-if="isOemByEnum(OemType.tian_jing_mai_dun)">
-    <img src="../../assets/images/tian_jing_mai_dun.png" />
-    <span>天津麦顿</span>
-  </div>
-
-  <!-- 千海金 -->
-  <div v-else-if="isOemByEnum(OemType.qinghaijin)">
-    <img src="../../assets/images/qianhaijin_logo.jpg" />
-    <span>{{getCompanyName()}}</span>
+  <div>
+    <img src="../../../public/logoHead.png" />
+    <span>{{ getCompanyName() }}</span>
   </div>
 
-  <div v-else>
-    <img src="../../assets/images/logoHeader.png" />
-    <span>{{getCompanyName()}}</span>
-  </div>
   <div class="m-layout-header-right">
-    <div @click="openDrawer">
+    <div>
       <span>{{ getUserName() }},您好!</span>
     </div>
     <div class="relative">
@@ -37,49 +14,44 @@
                           placeholder="请输入代码/名称"
                           @pressEnter="search">
                           readonly
-            </a-input-search>-->
+      </a-input-search>-->
       <!-- <a-icon type="search" /> -->
     </div>
     <div v-if="isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)">
-      <a-popover trigger="click"
-                 placement="bottom"
-                 overlayClassName="friendPopover">
+      <a-popover trigger="click" placement="bottom" overlayClassName="friendPopover">
         <template #content>
           <Friend />
         </template>
         <span class="friendIcon">
-          <svg class="icon svg-icon"
-               aria-hidden="true">
+          <svg class="icon svg-icon" aria-hidden="true">
             <use xlink:href="#icon-pengyou1" />
           </svg>
         </span>
       </a-popover>
     </div>
     <div class="news-container">
-      <a-badge @click="openNotice"
-               :dot="getUnReadNoticeLength() > 0">
-        <svg class="icon svg-icon"
-             aria-hidden="true">
+      <a-badge @click="openNotice" :dot="getUnReadNoticeLength() > 0">
+        <svg class="icon svg-icon" aria-hidden="true">
           <use xlink:href="#icon-xiaoxi" />
         </svg>
       </a-badge>
     </div>
     <div>
-      <a-popover v-model:visible="visible"
-                 trigger="click"
-                 placement="bottomRight">
+      <a-popover v-model:visible="visible" trigger="click" placement="bottomRight">
         <template #content>
-          <div v-for="item in setMenu"
-               class="popItem"
-               @click="chooseSetMenu(item.path)"
-               :key="item.path">{{ item.name }}</div>
+          <div
+            v-for="item in setMenu"
+            class="popItem"
+            @click="chooseSetMenu(item.path)"
+            :key="item.path"
+          >{{ item.name }}</div>
         </template>
         <a-avatar :size="24">
           <template #icon>
             <SettingFilled />
             <!-- <svg class="icon svg-icon" aria-hidden="true">
                             <use xlink:href="#icon-yonghu1" />
-                        </svg>-->
+            </svg>-->
           </template>
         </a-avatar>
       </a-popover>
@@ -89,101 +61,101 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, provide } from 'vue';
-import { openModal } from '@/common/setup/modal/index';
-import { UserOutlined, SettingFilled } from '@ant-design/icons-vue';
-import Setting from '@/views/setting/index.vue';
-import { getUserName, getCompanyName } from '@/services/bus/user';
-import { logout } from '@/services/bus/login';
-import APP from '@/services';
-import Router from '@/router';
-import { handleNotice } from '@/views/setting/notice/setup';
 import { isOemByEnum, OemType } from '@/common/config/projectName';
 import { changeTheme, ThemeEnum } from '@/common/config/theme';
 import { initData } from '@/common/methods';
+import { openModal } from '@/common/setup/modal/index';
+import Router from '@/router';
+import APP from '@/services';
+import { logout } from '@/services/bus/login';
+import { getCompanyName, getUserName } from '@/services/bus/user';
 import Friend from '@/views/setting/friends/index.vue';
+import Setting from '@/views/setting/index.vue';
+import { handleNotice } from '@/views/setting/notice/setup';
+import { SettingFilled, UserOutlined } from '@ant-design/icons-vue';
+import { defineComponent, provide, ref } from 'vue';
 
 // 设置
 const setFn = () => {
-    const visible = ref<boolean>(false);
-    const chooseSetupItem = ref<string>('');
-    provide('ControlModal', chooseSetupItem);
-    const setMenu = ref([{ name: '退出', path: 'logout' }]);
-    // const setMenu = [
-    //     // { name: '修改密码', path: 'password' },
-    //     // { name: '收货地址', path: 'addresss' },
-    //     // // {name: '发票', path: 'setup-password'},
-    //     // { name: '手机号码绑定/解绑', path: 'phone' },
-    //     // { name: '关于我们', path: 'aboutUs' },
-    //     { name: '白主题', path: ThemeEnum.light },
-    //     { name: '黑主题', path: ThemeEnum.dark },
-    //     { name: '退出', path: 'logout' },
-    // ];
-    initData(() => {
-        if (isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)) {
-            const theme = [
-                { name: '白主题', path: ThemeEnum.light },
-                { name: '黑主题', path: ThemeEnum.dark },
-            ];
-            setMenu.value = [...theme, ...setMenu.value];
-        }
-    });
-    const { openAction } = openModal('logout');
-    function chooseSetMenu(path: string) {
-        if (path === 'logout') {
-            logout();
-            APP.closeServer();
-            Router.replace('/login');
-        } else {
-            changeTheme(path as ThemeEnum);
-            // openAction();
-        }
-        visible.value = false;
+  const visible = ref<boolean>(false);
+  const chooseSetupItem = ref<string>('');
+  provide('ControlModal', chooseSetupItem);
+  const setMenu = ref([{ name: '退出', path: 'logout' }]);
+  // const setMenu = [
+  //     // { name: '修改密码', path: 'password' },
+  //     // { name: '收货地址', path: 'addresss' },
+  //     // // {name: '发票', path: 'setup-password'},
+  //     // { name: '手机号码绑定/解绑', path: 'phone' },
+  //     // { name: '关于我们', path: 'aboutUs' },
+  //     { name: '白主题', path: ThemeEnum.light },
+  //     { name: '黑主题', path: ThemeEnum.dark },
+  //     { name: '退出', path: 'logout' },
+  // ];
+  initData(() => {
+    if (isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)) {
+      const theme = [
+        { name: '白主题', path: ThemeEnum.light },
+        { name: '黑主题', path: ThemeEnum.dark },
+      ];
+      setMenu.value = [...theme, ...setMenu.value];
+    }
+  });
+  const { openAction } = openModal('logout');
+  function chooseSetMenu(path: string) {
+    if (path === 'logout') {
+      logout();
+      APP.closeServer();
+      Router.replace('/login');
+    } else {
+      changeTheme(path as ThemeEnum);
+      // openAction();
     }
+    visible.value = false;
+  }
 
-    return { visible, setMenu, chooseSetMenu };
+  return { visible, setMenu, chooseSetMenu };
 };
 
 // 搜索
 const onSearch = () => {
-    function search(value: string) {}
-    return { search };
+  function search(value: string) { }
+  return { search };
 };
 export default defineComponent({
-    components: {
-        UserOutlined,
-        Setting,
-        Friend,
-        SettingFilled,
-    },
-    props: {
-        collapsed: {
-            default: true,
-            type: Boolean,
-        },
-    },
-    setup() {
-        const { openAction: openNotice } = openModal('notice');
-        const { getUnReadNoticeLength } = handleNotice();
-        return {
-            openNotice,
-            getUserName,
-            getUnReadNoticeLength,
-            ...setFn(),
-            ...onSearch(),
-            isOemByEnum,
-            OemType,
-            getCompanyName,
-        };
+  components: {
+    UserOutlined,
+    Setting,
+    Friend,
+    SettingFilled,
+  },
+  props: {
+    collapsed: {
+      default: true,
+      type: Boolean,
     },
+  },
+  setup() {
+    const { openAction: openNotice } = openModal('notice');
+    const { getUnReadNoticeLength } = handleNotice();
+    return {
+      openNotice,
+      getUserName,
+      getUnReadNoticeLength,
+      ...setFn(),
+      ...onSearch(),
+      isOemByEnum,
+      OemType,
+      getCompanyName,
+    };
+  },
 });
 </script>
 <style lang="less">
 .friendIcon {
-    .icon {
-        font-size: 20px;
-        line-height: 32px;
-        margin: 6px 5px;
-    }
+  .icon {
+    font-size: 20px;
+    line-height: 32px;
+    margin: 6px 5px;
+  }
 }
 </style>

+ 68 - 115
src/views/account/login.vue

@@ -1,49 +1,42 @@
 <template>
-  <div class="login">
-    <a-row type="flex"
-           justify="center"
-           align="middle">
-      <a-col>
-        <div class="login-background"
-             id="img">
-          <!-- <div id="img"> -->
-          <!-- <img src="./logo.png"
-                        alt="" />-->
-          <!-- </div> -->
-        </div>
-        <div class="login-content">
-          <p>账号登录</p>
-          <a-form ref="formDom"
-                  :model="form"
-                  :rules="rules">
-            <a-form-item name="account">
-              <a-input placeholder="用户名/账号/手机号"
-                       v-model:value="form.account">
-                <template #prefix>
-                  <img src="@/assets/images/user.png"
-                       alt />
-                </template>
-              </a-input>
-            </a-form-item>
-            <a-form-item name="password"
-                         class="mb20">
-              <a-input @keyup.enter="loginAction"
-                       placeholder="请输入您的登录密码"
-                       type="password"
-                       v-model:value="form.password">
-                <template #prefix>
-                  <img src="@/assets/images/password.png"
-                       alt />
-                </template>
-              </a-input>
-            </a-form-item>
-            <a-form-item>
-              <div class="login-remember-password">
-                <a-checkbox v-model:checked="form.isRemember">记住账号</a-checkbox>
-                <!-- <router-link to="/resetPassword">忘记密码?</router-link> -->
-              </div>
-            </a-form-item>
-            <!-- <a-form-item>
+    <div class="login">
+        <a-row type="flex" justify="center" align="middle">
+            <a-col>
+                <div class="login-background" id="img">
+                    <!-- <div id="img"> -->
+                    <!-- <img src="./logo.png"
+                    alt="" />-->
+                    <!-- </div> -->
+                </div>
+                <div class="login-content">
+                    <p>账号登录</p>
+                    <a-form ref="formDom" :model="form" :rules="rules">
+                        <a-form-item name="account">
+                            <a-input placeholder="用户名/账号/手机号" v-model:value="form.account">
+                                <template #prefix>
+                                    <img src="@/assets/images/user.png" alt />
+                                </template>
+                            </a-input>
+                        </a-form-item>
+                        <a-form-item name="password" class="mb20">
+                            <a-input
+                                @keyup.enter="loginAction"
+                                placeholder="请输入您的登录密码"
+                                type="password"
+                                v-model:value="form.password"
+                            >
+                                <template #prefix>
+                                    <img src="@/assets/images/password.png" alt />
+                                </template>
+                            </a-input>
+                        </a-form-item>
+                        <a-form-item>
+                            <div class="login-remember-password">
+                                <a-checkbox v-model:checked="form.isRemember">记住账号</a-checkbox>
+                                <!-- <router-link to="/resetPassword">忘记密码?</router-link> -->
+                            </div>
+                        </a-form-item>
+                        <!-- <a-form-item>
               <div style="text-align:left">
                 <a-checkbox v-model:checked="form.isRead">
                   我已阅读并同意
@@ -51,32 +44,39 @@
                 <router-link to="/resetPassword">《用户协议》</router-link>
               </div>
                         </a-form-item>-->
-            <a-form-item class="mt20">
-              <a-button @click="loginAction"
-                        :loading="loading"
-                        :disabled="goHomeloading">登录</a-button>
-              <div class="register"
-                   v-if="isOpenUrl">还没有账号,<span @click="register">立即注册</span></div>
-            </a-form-item>
-          </a-form>
-        </div>
-      </a-col>
-    </a-row>
-  </div>
+                        <a-form-item class="mt20">
+                            <a-button
+                                @click="loginAction"
+                                :loading="loading"
+                                :disabled="goHomeloading"
+                            >登录</a-button>
+                            <div class="register">
+                                <a-checkbox v-model:checked="form.isRead">已阅读并同意</a-checkbox>
+                                <router-link to="/resetPassword">《用户协议》</router-link>
+                            </div>
+                            <div class="register" v-if="isOpenUrl">
+                                还没有账号,
+                                <span @click="register">立即注册</span>
+                            </div>
+                        </a-form-item>
+                    </a-form>
+                </div>
+            </a-col>
+        </a-row>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, reactive, ref, toRaw, onMounted, watchEffect, watch } from 'vue';
+import { setLoadComplete } from '@/common/methods';
 import { globalDataRefresh } from '@/services/bus/index';
 import { login } from '@/services/bus/login';
-import { useRouter } from 'vue-router';
-import { message } from 'ant-design-vue';
-import { localStorageUtil } from '@/utils/storage/index';
-import { initData, setLoadComplete } from '@/common/methods';
+import { isOpenUrl, serviceURL } from '@/services/request/serviceURL';
 import eventBus from '@/utils/eventBus/index';
-import { QWebChannel } from '@/utils/qt/qwebchannel.js';
+import { localStorageUtil } from '@/utils/storage/index';
+import { message } from 'ant-design-vue';
+import { defineComponent, onMounted, reactive, ref, toRaw } from 'vue';
+import { useRouter } from 'vue-router';
 import { qtAction } from './qt';
-import { serviceURL, isOpenUrl } from '@/services/request/serviceURL';
 
 interface Form {
     account: string;
@@ -99,55 +99,6 @@ function setRememberAccount(): void {
     }
 }
 
-// declare global {
-//     interface Window {
-//         qt: {
-//             webChannelTransport: {
-//                 send: (payload: any) => void;
-//                 onmessage: (payload: any) => void;
-//             };
-//         };
-//     }
-// }
-// function qtAction() {
-//     // 获取 与qt交互实例
-//     let qtWebChannel: any = null;
-//     const webChannelTransport = window.qt?.webChannelTransport;
-//     if (webChannelTransport) {
-//         new QWebChannel(webChannelTransport, (channel: any) => {
-//             // all published objects are available in channel.objects under
-//             // the identifier set in their attached WebChannel.id property
-//             qtWebChannel = channel.objects.bridge;
-//             console.log('qtWebChannel', qtWebChannel);
-//         });
-//     }
-
-//     function getQtInfo(): Promise<Uint8Array[]> {
-//         if (qtWebChannel) {
-//             return qtWebChannel.getSystemInfo().then((res: any) => {
-//                 return base64ToUint8Array(res);
-//             });
-//         } else {
-//             console.warn('qtWebChannel is null');
-//             return Promise.resolve([]);
-//         }
-//     }
-//     return { getQtInfo };
-// }
-
-// function base64ToUint8Array(base64String: string) {
-//     let padding = '='.repeat((4 - (base64String.length % 4)) % 4);
-//     let base64 = (base64String + padding).replace(/\-/g, '+').replace(/_/g, '/');
-
-//     let rawData = window.atob(base64);
-//     let outputArray = new Uint8Array(rawData.length);
-
-//     for (var i = 0; i < rawData.length; ++i) {
-//         outputArray[i] = rawData.charCodeAt(i);
-//     }
-//     return outputArray;
-// }
-
 export default defineComponent({
     name: 'login',
     components: {},
@@ -233,7 +184,8 @@ export default defineComponent({
 .login {
     width: 100%;
     height: 100%;
-    background: url(../../assets/images/loginBackground.png) no-repeat scroll 0 0;
+    background: url(../../assets/images/loginBackground.png) no-repeat scroll 0
+        0;
     background-size: 100% 100%;
 }
 .ant-row {
@@ -250,7 +202,8 @@ export default defineComponent({
 
 .login-background {
     width: 275px;
-    background: url('../../assets/images/logoBackground.png') no-repeat scroll 0 0;
+    background: url("../../assets/images/logoBackground.png") no-repeat scroll 0
+        0;
     background-size: cover;
     display: flex;
     align-items: center;