mo 1 year ago
parent
commit
5d076fd7f4
1 changed files with 24 additions and 3 deletions
  1. 24 3
      src/views/login/index.tsx

+ 24 - 3
src/views/login/index.tsx

@@ -5,12 +5,13 @@ import loginRight from './images/loginright.png';
 import colLogo from './images/colLogo.png';
 import CodeLogin from './components/codeLogin';
 import PwdLogin from './components/pwdLogin';
-import { NTabs, NTabPane, useDialog, NModal, NButton, NSpace } from 'naive-ui';
+import { NTabs, NTabPane, useDialog, NModal, NButton, NSpace,NAlert, NImage } from 'naive-ui';
 import styles from './index.module.less';
 import ForgotPassword from './components/forgotPassword';
 import moveTop from './images/moveTopBg.png'
 import dingPng from './images/ding.png'
 import closeAble from './images/closeAble.png'
+import infoIcon from './images/infoIcon.png'
 import { state } from '/src/state';
 export default defineComponent({
   name: 'login-page',
@@ -85,11 +86,22 @@ export default defineComponent({
 
     onMounted(async () => {
       // const relatedApps = await navigator?.getInstalledRelatedApps();
-
-
       //
 
     })
+    const downChrome = ()=>{
+      const agent = navigator.userAgent.toLowerCase();
+      const isMac = function () { return /macintosh|mac os x/i.test(navigator.userAgent); }();
+      if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
+        window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup32.exe');
+      }
+      if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
+        window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/ChromeStandaloneSetup64.exe');
+      }
+      if (isMac) {
+        window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/googlechrome-mac.dmg');
+      }
+    }
 
     return () => (
       <div class={styles['view-account']}>
@@ -138,6 +150,15 @@ export default defineComponent({
               </NTabPane>
             </NTabs>
           )}
+
+
+         <div class={styles.alertWrap}>
+          <div class={styles.alertInfo}>
+            <NImage src={infoIcon} class={styles.infoIcon} previewDisabled></NImage>
+            为了您更好的上课体验,推荐使用Chrome浏览器
+          </div>
+          <div class={styles.down} onClick={downChrome}>立即下载</div>
+         </div>
         </div>
         <NModal
           v-model:show={showModalMask.value}