Преглед изворни кода

fix(bugs): 修改bug和新增登陆页面需求

tangning пре 3 година
родитељ
комит
0149700a87

+ 1 - 1
src/components/Application/src/AppLogo.vue

@@ -4,7 +4,7 @@
 -->
 <template>
   <div class="anticon" :class="getAppLogoClass" @click="goHome">
-    <!-- <img src="../../../assets/images/logo.png" /> -->
+    <img src="../../../assets/images/header.jpg" />
     <div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
       {{ title }}
     </div>

+ 2 - 1
src/locales/lang/ja/routes/devices.ts

@@ -48,7 +48,8 @@ export default {
   addeduser: '追加されたアカウントの数',
   subNum: '機器数量',
   deviceCode: 'デバイスIDが重複しています。再入力してください',
-
+  searchName: 'キーワード',
+  searchNamePlaceholder: 'デバイスID、メールボックス、SNコード',
   // normalSales: '正常销售',
   // normalSales: '正常销售',
 };

+ 2 - 0
src/locales/lang/zh-CN/routes/devices.ts

@@ -49,6 +49,8 @@ export default {
   num: '设备数量',
   subNum: '可添加员工数',
   deviceCode: '设备ID重复,请重新输入',
+  searchName: '关键词',
+  searchNamePlaceholder: '设备ID,邮箱,SN码',
   // normalSales: '正常销售',
   // normalSales: '正常销售',
 };

+ 19 - 0
src/store/modules/locale.ts

@@ -14,6 +14,11 @@ const lsLocaleSetting = (ls.get(LOCALE_KEY) || localeSetting) as LocaleSetting;
 interface LocaleState {
   localInfo: LocaleSetting;
 }
+interface appItem {
+  name: string;
+  icon: string;
+  url: string;
+}
 
 export const useLocaleStore = defineStore({
   id: 'app-locale',
@@ -27,6 +32,20 @@ export const useLocaleStore = defineStore({
     getLocale(): LocaleType {
       return this.localInfo?.locale ?? 'zh_CN';
     },
+    getAppList(): appItem[] {
+      return [
+        {
+          name: 'IOS版',
+          url: 'https://oss.4dkankan.jp/img/static/ios.png',
+          icon: 'uil:apple',
+        },
+        {
+          name: 'Android版',
+          url: 'https://oss.4dkankan.jp/img/static/android.png',
+          icon: 'uil:android',
+        },
+      ];
+    },
   },
   actions: {
     /**

+ 4 - 1
src/views/devices/list.vue

@@ -127,9 +127,12 @@
         schemas: [
           {
             field: 'searchKey',
-            label: t('sys.login.email'),
+            label: t('routes.devices.searchName'),
             labelWidth: 120,
             component: 'Input',
+            componentProps: {
+              placeholder: t('routes.devices.searchNamePlaceholder'),
+            },
             colProps: {
               span: 12,
             },

+ 35 - 1
src/views/sys/login/Login.vue

@@ -27,6 +27,15 @@
             <div class="mt-5 font-normal text-white text-md dark:text-gray-500 -enter-x">
               {{ t('sys.login.signInDesc') }}
             </div>
+            <div class="appcode">
+              <div v-for="item in getAppList" :key="item.name">
+                <img :src="item.url" alt="" />
+                <div class="title">
+                  <Icon :icon="item.icon" />
+                  {{ item.name }}
+                </div>
+              </div>
+            </div>
           </div>
         </div>
         <div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12">
@@ -58,6 +67,7 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useDesign } from '/@/hooks/web/useDesign';
   import { useLocaleStore } from '/@/store/modules/locale';
+  import Icon from '/@/components/Icon/src/Icon.vue';
 
   defineProps({
     sessionTimeout: {
@@ -71,6 +81,10 @@
   const localeStore = useLocaleStore();
   const showLocale = localeStore.getShowPicker;
   const title = computed(() => globSetting?.title ?? '');
+  const { getAppList } = localeStore;
+  defineExpose({
+    getAppList,
+  });
 </script>
 <style lang="less">
   @prefix-cls: ~'@{namespace}-login';
@@ -155,6 +169,27 @@
     }
 
     .container {
+      .my-auto {
+        .appcode {
+          margin-top: 1.25rem;
+          width: 325px;
+          display: flex;
+          justify-content: space-around;
+          img {
+            width: 120px;
+            padding: 2px;
+            background: #fff;
+          }
+          .title {
+            text-align: center;
+            margin-top: 10px;
+            background: rgb(130, 166, 230);
+            padding: 5px;
+            border-radius: 3px;
+            color: #fff;
+          }
+        }
+      }
       .@{logo-prefix-cls} {
         display: flex;
         width: 60%;
@@ -164,7 +199,6 @@
           font-size: 24px;
           color: #fff;
         }
-
         img {
           width: 48px;
         }