林旭祥 1 mese fa
parent
commit
36c1edd1eb
5 ha cambiato i file con 203 aggiunte e 155 eliminazioni
  1. 22 0
      package-lock.json
  2. 2 0
      package.json
  3. 1 0
      src/types/declareModule.ts
  4. 108 102
      src/views/gesture/index.vue
  5. 70 53
      src/views/login/qrcode.vue

+ 22 - 0
package-lock.json

@@ -9,9 +9,11 @@
       "version": "0.0.0",
       "dependencies": {
         "@element-plus/icons-vue": "^2.3.1",
+        "@types/crypto-js": "^4.2.2",
         "@vueuse/core": "9.5.0",
         "animate.css": "^4.1.1",
         "axios": "^1.7.0",
+        "crypto-js": "^4.2.0",
         "dayjs": "^1.11.11",
         "echarts": "^5.5.0",
         "element-plus": "^2.7.3",
@@ -917,6 +919,11 @@
         "node": ">=10.13.0"
       }
     },
+    "node_modules/@types/crypto-js": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz",
+      "integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ=="
+    },
     "node_modules/@types/estree": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz",
@@ -2172,6 +2179,11 @@
         "node": ">= 8"
       }
     },
+    "node_modules/crypto-js": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+      "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+    },
     "node_modules/css-select": {
       "version": "4.3.0",
       "resolved": "https://registry.npmmirror.com/css-select/-/css-select-4.3.0.tgz",
@@ -8385,6 +8397,11 @@
       "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
       "dev": true
     },
+    "@types/crypto-js": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz",
+      "integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ=="
+    },
     "@types/estree": {
       "version": "1.0.5",
       "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz",
@@ -9281,6 +9298,11 @@
         "which": "^2.0.1"
       }
     },
+    "crypto-js": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+      "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+    },
     "css-select": {
       "version": "4.3.0",
       "resolved": "https://registry.npmmirror.com/css-select/-/css-select-4.3.0.tgz",

+ 2 - 0
package.json

@@ -13,9 +13,11 @@
   },
   "dependencies": {
     "@element-plus/icons-vue": "^2.3.1",
+    "@types/crypto-js": "^4.2.2",
     "@vueuse/core": "9.5.0",
     "animate.css": "^4.1.1",
     "axios": "^1.7.0",
+    "crypto-js": "^4.2.0",
     "dayjs": "^1.11.11",
     "echarts": "^5.5.0",
     "element-plus": "^2.7.3",

+ 1 - 0
src/types/declareModule.ts

@@ -1,3 +1,4 @@
 declare module 'socket.io-client';
 declare module 'speak-tts';
 declare module 'qrcode';
+declare module 'crypto-js';

+ 108 - 102
src/views/gesture/index.vue

@@ -2,13 +2,20 @@
   <div class="gesture">
     <Header :showTool="true" @confirmExit="getLogout" :key="key"></Header>
     <div class="menu" v-if="projectList.length" :key="projectList.length">
-      <swiper :slides-per-view="5" :space-between="0" :loop="true" :observe-parents="true" :observer="true"
-        :centered-slides="true" :modules="[Navigation]"
-        @swiper="onSwiper">
+      <swiper
+        :slides-per-view="5"
+        :space-between="0"
+        :loop="true"
+        :observe-parents="true"
+        :observer="true"
+        :centered-slides="true"
+        :modules="[Navigation]"
+        @swiper="onSwiper"
+      >
         <swiper-slide v-for="(item, index) in projectList" :key="index" @click="getOption(item)">
           <div class="li">
             <div>
-              <div class="pic"><img :src="'static/images/train/' + item.key + '.png'"></div>
+              <div class="pic"><img :src="'static/images/train/' + item.key + '.png'" /></div>
               <div class="name">
                 {{ item.name }}
               </div>
@@ -17,9 +24,10 @@
         </swiper-slide>
       </swiper>
     </div>
-    <div class="erweima"> <img :src="erweima" />
+    <!-- <div class="erweima">
+      <img :src="erweima" />
       <span>扫码遥控</span>
-    </div>
+    </div> -->
     <OptionWindow ref="optionWindowRef" :projectList="projectList" />
   </div>
 </template>
@@ -28,7 +36,7 @@
 import { useWebSocket } from '@/utils/handWs';
 import { Swiper, SwiperSlide } from 'swiper/vue';
 import { Navigation } from 'swiper/modules';
-import QRCode from "qrcode";
+import QRCode from 'qrcode';
 import 'swiper/css';
 import 'swiper/scss/navigation';
 const { handWs, startDevice, startHand, stateHand } = useWebSocket();
@@ -43,22 +51,22 @@ const data = reactive<any>({
   device_info: {},
   erweima: '',
   sid: '',
-  key: 0,
+  key: 0
 });
 const { mySwiper, projectList, timerManager, device_info, erweima, sid, key } = toRefs(data);
 
 /**
  * 清空定时任务
-*/
+ */
 const getClearTimer = (data?: any) => {
   if (data) {
     //清除指定
-    clearInterval(timerManager.value[data])
+    clearInterval(timerManager.value[data]);
     timerManager.value[data] = null;
   } else {
     for (let key in timerManager.value) {
       if (timerManager.value.hasOwnProperty(key)) {
-        clearInterval(timerManager.value[key])
+        clearInterval(timerManager.value[key]);
         timerManager.value[key] = null;
       }
     }
@@ -67,23 +75,23 @@ const getClearTimer = (data?: any) => {
 
 /**
  * 初始化项目
-*/
+ */
 const getInitExam = () => {
   getExam();
   //定时刷新
   timerManager.value.exam = setInterval(() => {
     getExam();
-  }, 5000)
+  }, 5000);
 };
 
 /**
  * 获取项目
-*/
+ */
 const getExam = async () => {
   let myList = device_info.value?.project_list || [];
   let examList = myList.map((item: any) => {
     return item.exam_name;
-  })
+  });
   await proxy?.$http.train.projectList().then((res: any) => {
     projectList.value = proxy?.$utils.getProject(res.exams).filter((item: any) => {
       //只显示能开的
@@ -96,64 +104,64 @@ const getExam = async () => {
 
 /**
  * 获取实例
-*/
+ */
 const onSwiper = ($ev: any) => {
-  console.log("1111111", $ev)
+  console.log('1111111', $ev);
   mySwiper.value = $ev;
-  slidePrev()
+  slidePrev();
 };
 
 /**
  * 切换上一页
-*/
+ */
 const slidePrev = () => {
   mySwiper.value.slidePrev();
 };
 
 /**
  * 切换下一页
-*/
+ */
 const slideNext = () => {
   mySwiper.value.slideNext();
 };
 
 /**
  * 启动切换
-*/
+ */
 const slideChange = () => {
   // if (projectList.value.length <= 3) {
   //   slidePrev()
   // } else {
   //   slideNext();
   // }
-  slidePrev()
+  slidePrev();
 };
 
 /**
  * 进入项目
-*/
+ */
 const getOption = (data: any) => {
   confirm(data);
 };
 
 /**
  * 确定并进入
-*/
+ */
 const confirm = (myProject?: any) => {
   let project = myProject || projectList.value[mySwiper.value.realIndex];
-  console.log("projectList.value", projectList.value)
-  console.log("mySwiper.value", mySwiper.value)
-  console.log("mySwiper.value.realIndex", mySwiper.value.realIndex)
-  console.log("project", project)
+  console.log('projectList.value', projectList.value);
+  console.log('mySwiper.value', mySwiper.value);
+  console.log('mySwiper.value.realIndex', mySwiper.value.realIndex);
+  console.log('project', project);
   if (project == undefined) {
-    proxy?.$modal.msgError("获取不到项目信息");
+    proxy?.$modal.msgError('获取不到项目信息');
     return false;
   }
   let obj = device_info.value.project_list.find((item: any) => {
     return item.exam_name == project.key;
-  })
+  });
   if (obj == undefined) {
-    proxy?.$modal.msgError("该项目没有配置参数");
+    proxy?.$modal.msgError('该项目没有配置参数');
     return false;
   }
   let data = {
@@ -163,55 +171,59 @@ const confirm = (myProject?: any) => {
     ctrl: obj?.area_ctrl_id || '',
     time: obj?.test_time || '',
     music: obj?.music_info?.url || '',
-    handcontroller: device_info.value.handcontroller_id,
-  }
+    handcontroller: device_info.value.handcontroller_id
+  };
   optionWindowRef.value.getGesture(project, data);
 };
 
 /**
  * 退出
-*/
+ */
 const getLogout = async () => {
   if (import.meta.env.DEV) {
     proxy?.$modal.msgSuccess('测试环境免密退出');
-    await proxy?.$http.common.logout({}).then((res: any) => {
-    });
-    proxy?.$modal?.closeLoading()
+    await proxy?.$http.common.logout({}).then((res: any) => {});
+    proxy?.$modal?.closeLoading();
     //清空缓存
-    localStorage.clear();
+    //localStorage.clear();
+    localStorage.removeItem('token');
+    localStorage.removeItem('userInfo');
     //跳转
     router.push({ path: '/login/qrcode' });
   } else {
-    let myInfo: any = localStorage.getItem("userInfo");
+    let myInfo: any = localStorage.getItem('userInfo');
     let userInfo = JSON.parse(myInfo);
-    proxy?.$modal.prompt(`【${userInfo.login_name}】,请输入密码`, 'password').then((e: any) => {
-      // console.log("e", e)
-      if (e.action == 'confirm' && e.value) {
-        let params = {
-          password: e.value
-        };
-        proxy?.$http.common.checkPassword(params).then(async (res: any) => {
-          if (res.status === 200 || res.status === 1) {
-            await proxy?.$http.common.logout({}).then((res: any) => {
-            });
-            proxy?.$modal?.closeLoading()
-            //清空缓存
-            localStorage.clear();
-            //跳转
-            router.push({ path: '/login/qrcode' });
-          } else {
-            proxy?.$modal.msgError(res.message);
-          }
-        });
-      }
-    }).finally(() => {
-    });
+    proxy?.$modal
+      .prompt(`【${userInfo.login_name}】,请输入密码`, 'password')
+      .then((e: any) => {
+        // console.log("e", e)
+        if (e.action == 'confirm' && e.value) {
+          let params = {
+            password: e.value
+          };
+          proxy?.$http.common.checkPassword(params).then(async (res: any) => {
+            if (res.status === 200 || res.status === 1) {
+              await proxy?.$http.common.logout({}).then((res: any) => {});
+              proxy?.$modal?.closeLoading();
+              //清空缓存
+              // localStorage.clear();
+              localStorage.removeItem('token');
+              localStorage.removeItem('userInfo');
+              //跳转
+              router.push({ path: '/login/qrcode' });
+            } else {
+              proxy?.$modal.msgError(res.message);
+            }
+          });
+        }
+      })
+      .finally(() => {});
   }
 };
 
 /**
  * 提示语
-*/
+ */
 const getTips = () => {
   let myTime = 7000;
   let num = 0;
@@ -221,21 +233,21 @@ const getTips = () => {
         proxy?.$modal.msgWarning({
           message: `手向左滑切换项目`,
           duration: 5000
-        })
+        });
       } else {
         proxy?.$modal.msgWarning({
           message: `举左手进入测试`,
           duration: 5000
-        })
+        });
       }
-      num++
+      num++;
     }
-  }, myTime)
+  }, myTime);
 };
 
 /**
  * 获取个人信息
-*/
+ */
 const getUserInfo = () => {
   let params = {};
   proxy?.$http.common.getUserInfo(params).then((res: any) => {
@@ -243,26 +255,25 @@ const getUserInfo = () => {
     if (res.data.length) {
       let myData = res.data[0];
       let info = JSON.stringify(myData);
-      localStorage.setItem("userInfo", info);
+      localStorage.setItem('userInfo', info);
       //修改收藏夹图标
       proxy?.$utils.setFavicon(myData?.logo_url);
-      key.value = key.value + 1//更新头部LOGO
+      key.value = key.value + 1; //更新头部LOGO
     }
   });
 };
 
 /**
  * 获取设备项目
-*/
+ */
 const getDevice = async () => {
-  let deviceid = localStorage.getItem("deviceid") || '';
+  let deviceid = localStorage.getItem('deviceid') || '';
   if (deviceid) {
-    startDevice({ deviceid: deviceid })
+    startDevice({ deviceid: deviceid });
   } else {
     proxy?.$modal.msgError(`缺少设备信息请重新登录!`);
-    await proxy?.$http.common.logout({}).then((res: any) => {
-    });
-    proxy?.$modal?.closeLoading()
+    await proxy?.$http.common.logout({}).then((res: any) => {});
+    proxy?.$modal?.closeLoading();
     //清空缓存
     localStorage.clear();
     //跳转
@@ -272,27 +283,24 @@ const getDevice = async () => {
 
 /**
  * 获取二维码
-*/
+ */
 const getErweima = () => {
-  let deviceid = localStorage.getItem("deviceid") || '';
-  QRCode.toDataURL(
-    `${location.origin}/#/login/mobile?sid=${sid}&deviceid=${deviceid}`
-  )
-    .then((res: any) => {
-      erweima.value = res;
-    })
-}
+  let deviceid = localStorage.getItem('deviceid') || '';
+  QRCode.toDataURL(`${location.origin}/#/login/mobile?sid=${sid}&deviceid=${deviceid}`).then((res: any) => {
+    erweima.value = res;
+  });
+};
 
 onBeforeMount(() => {
   //加载设备WS
   handWs((e: any) => {
-    if(router.currentRoute.value.path != '/gesture'){
+    if (router.currentRoute.value.path != '/gesture') {
       return false;
     }
     // console.log("eeeee", e)
     if (e?.wksid) {
       //获取设备项目
-      getDevice()
+      getDevice();
     }
     //接收设备信息
     if (e?.device_info) {
@@ -307,7 +315,7 @@ onBeforeMount(() => {
       startHand(handcontroller_id);
     }
     //左滑动
-    if (e?.data?.result == "next_item") {
+    if (e?.data?.result == 'next_item') {
       // proxy?.$modal.msgSuccess('手势指令:左滑动');
       // if (projectList.value.length == 0) {
       //   return false;
@@ -315,32 +323,31 @@ onBeforeMount(() => {
       // slideChange();
     }
     //举左手
-    if (e?.data?.result == "left_hand") {
+    if (e?.data?.result == 'left_hand') {
       // proxy?.$modal.msgSuccess('手势指令:举左手');
       // confirm();
     }
     //退出
-    if (e?.data?.result == "exit") {
+    if (e?.data?.result == 'exit') {
       // proxy?.$modal.msgSuccess('手势指令:交叉手');
     }
     //刷新
-    if (e?.data?.result == "refresh") {
-      window.location.reload()
+    if (e?.data?.result == 'refresh') {
+      window.location.reload();
     }
   });
-})
+});
 onMounted(() => {
   getUserInfo();
   //登录码
   getErweima();
   //提示语
   // getTips();
-
-})
+});
 onBeforeUnmount(() => {
   getClearTimer();
   ElMessage.closeAll();
-})
+});
 </script>
 
 <style lang="scss" scoped>
@@ -367,24 +374,23 @@ $waiPadding: 6.51rem;
     display: flex;
     justify-content: center;
     align-items: center;
-    background: radial-gradient(96% 96% at 2% 32%, #FFFFFF 0%, #FCFDFD 54%, #E1E4E7 100%);
+    background: radial-gradient(96% 96% at 2% 32%, #ffffff 0%, #fcfdfd 54%, #e1e4e7 100%);
     cursor: pointer;
 
     .name {
       width: 100%;
       font-size: 2.48rem;
-      color: #1A293A;
+      color: #1a293a;
       padding: 0.5rem 0;
       text-align: center;
     }
 
-
     .pic {
       width: 11.36vw;
       height: 11.36vw;
       border-radius: 50%;
-      background: radial-gradient(78% 78% at 53% 50%, #07121A 0%, #2A4256 49%, #5180A9 100%);
-      box-shadow: 0px 0px 2px 2px #FFFFFF;
+      background: radial-gradient(78% 78% at 53% 50%, #07121a 0%, #2a4256 49%, #5180a9 100%);
+      box-shadow: 0px 0px 2px 2px #ffffff;
       margin-bottom: 2vh;
       overflow: hidden;
       display: flex;
@@ -423,7 +429,7 @@ $waiPadding: 6.51rem;
     transform: scale(1);
 
     .li {
-      background: radial-gradient(167% 126% at 97% 6%, #35FFC6 0%, #00FFE8 100%);
+      background: radial-gradient(167% 126% at 97% 6%, #35ffc6 0%, #00ffe8 100%);
     }
   }
 }
@@ -440,7 +446,7 @@ $waiPadding: 6.51rem;
 
   span {
     display: block;
-    color: #FFFFFF;
+    color: #ffffff;
     font-size: 1rem;
     padding-top: 3px;
   }

+ 70 - 53
src/views/login/qrcode.vue

@@ -21,8 +21,7 @@
                 <input class="login-input" type="text" placeholder="请输入帐号" v-model.trim="loginForm.username" />
               </div>
               <div class="login-item">
-                <input class="login-input" type="password" autocomplete="off" placeholder="请输入密码"
-                  v-model.trim="loginForm.password" />
+                <input class="login-input" type="password" autocomplete="off" placeholder="请输入密码" v-model.trim="loginForm.password" />
               </div>
               <div @click="getLogin" class="login-btn">
                 <el-icon class="is-loading" v-if="loading">
@@ -40,7 +39,8 @@
 
 <script setup name="QrcodeLogin" lang="ts">
 import { useWebSocket } from '@/utils/handWs';
-import QRCode from "qrcode";
+import QRCode from 'qrcode';
+import CryptoJS from 'crypto-js';
 const { handWs, startLogin } = useWebSocket();
 const { proxy } = getCurrentInstance() as any;
 const router = useRouter();
@@ -49,7 +49,7 @@ const route = useRoute();
 const data = reactive<any>({
   erweima: '',
   sid: '',
-  listenWs: false,//是否监听手势
+  listenWs: false, //是否监听手势
   loginForm: {
     deviceid: '',
     username: '',
@@ -57,19 +57,19 @@ const data = reactive<any>({
   },
   loading: false,
   key: 0,
-  type: 1,
+  type: 1
 });
 const { erweima, sid, listenWs, loginForm, loading, key, type } = toRefs(data);
 
 /**
  * 手势
-*/
+ */
 const getHandWs = () => {
   //加载手势WS
   handWs((e: any) => {
     //发送设备
     if (e?.wksid) {
-      console.log("e.wksid", e.wksid)
+      console.log('e.wksid', e.wksid);
       listenWs.value = true;
       sid.value = e.wksid;
       //登录码
@@ -82,7 +82,7 @@ const getHandWs = () => {
     }
     //接收百度语音token
     if (e?.bdapi_token) {
-      console.log("e.bdapi_token", e.bdapi_token)
+      // console.log("e.bdapi_token", e.bdapi_token)
       let tok = e.bdapi_token;
       localStorage.setItem('tok', tok);
     }
@@ -90,26 +90,23 @@ const getHandWs = () => {
     if (e?.data?.token) {
       //保存token
       let token = e.data.token;
-      localStorage.setItem("token", token);
+      localStorage.setItem('token', token);
       let deviceid = e?.data?.deviceid;
-      localStorage.setItem("deviceid", deviceid);
+      localStorage.setItem('deviceid', deviceid);
       //刷新
-      window.location.reload()
+      window.location.reload();
     }
   });
 };
 
 /**
  * 获取二维码
-*/
+ */
 const getErweima = () => {
-  QRCode.toDataURL(
-    `${location.origin}/#/login/mobile?sid=${sid.value}`
-  )
-    .then((res: any) => {
-      erweima.value = res;
-    })
-}
+  QRCode.toDataURL(`${location.origin}/#/login/mobile?sid=${sid.value}`).then((res: any) => {
+    erweima.value = res;
+  });
+};
 
 // 登录
 const getLogin = () => {
@@ -117,7 +114,7 @@ const getLogin = () => {
   let username = loginForm.value.username;
   let password = loginForm.value.password;
   if (!deviceid || !username || !password) {
-    proxy?.$modal.msgWarning("请填写完整信息!");
+    proxy?.$modal.msgWarning('请填写完整信息!');
     return false;
   }
   loading.value = true;
@@ -126,62 +123,82 @@ const getLogin = () => {
     sid: sid.value,
     deviceid,
     username,
-    password,
+    password
   };
-  proxy?.$http.common.qrlogin(params).then((res: any) => {
-    if (res.access_token) {
-    }
-  }).catch(() => {
-    key.value++;
-  }).finally(() => {
-    proxy?.$modal?.closeLoading();
-    loading.value = false;
-  });
+  proxy?.$http.common
+    .qrlogin(params)
+    .then((res: any) => {
+      if (res.access_token) {
+        let passwordStr = CryptoJS.AES.encrypt(password, 'trops').toString();
+        localStorage.setItem('deviceid', deviceid);
+        localStorage.setItem('username', username);
+        localStorage.setItem('password', passwordStr);
+      }
+    })
+    .catch(() => {
+      key.value++;
+    })
+    .finally(() => {
+      proxy?.$modal?.closeLoading();
+      loading.value = false;
+    });
 };
 
 /**
  * 切换登录类型
-*/
+ */
 const changeType = (data: Number) => {
-  type.value = data
+  type.value = data;
   if (type.value == 2 && sid.value == undefined && !sid.value) {
-    proxy?.$modal.msgError("缺少SID,重新获取!");
+    proxy?.$modal.msgError('缺少SID,重新获取!');
     //刷新
-    window.location.reload()
+    window.location.reload();
   }
-}
+};
 
 /**
  * 跳转手机登录页
-*/
+ */
 const getMobile = () => {
   let routeUrl: any = router.resolve({ path: '/login/mobile', query: { sid: sid.value } });
   window.open(routeUrl.href, '_blank');
-}
+};
 
 onMounted(() => {
-  let token = localStorage.getItem("token");
-  let deviceid = localStorage.getItem("deviceid");
+  let token = localStorage.getItem('token');
+  let deviceid = localStorage.getItem('deviceid');
+  let username = localStorage.getItem('username');
+  let password = localStorage.getItem('password');
+  if (deviceid) {
+    loginForm.value.deviceid = deviceid;
+  }
+  if (username) {
+    loginForm.value.username = username;
+  }
+  if (password) {
+    let myPassword = CryptoJS.AES.decrypt(password, 'trops').toString(CryptoJS.enc.Utf8);
+    loginForm.value.password = myPassword;
+  }
   if (token && deviceid) {
     //跳转
     router.push({ path: '/gesture' });
   } else {
     getHandWs();
   }
-})
+});
 
 onBeforeUnmount(() => {
   listenWs.value = false;
-})
+});
 
 onMounted(() => {
   //测试环境默认密码
   if (import.meta.env.DEV) {
-    loginForm.value.deviceid = '25821975';
-    loginForm.value.username = 'manage1';
-    loginForm.value.password = 'trops@2022';
+    // loginForm.value.deviceid = '25821975';
+    // loginForm.value.username = 'manage1';
+    // loginForm.value.password = 'trops@2022';
   }
-})
+});
 </script>
 
 <style lang="scss" scoped>
@@ -204,7 +221,7 @@ onMounted(() => {
     }
 
     .qrcodeLogin-box {
-      background: linear-gradient(41deg, #1D2F3D -83%, #304453 95%);
+      background: linear-gradient(41deg, #1d2f3d -83%, #304453 95%);
       box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.2);
       border-radius: 1.6rem;
 
@@ -223,8 +240,8 @@ onMounted(() => {
         }
 
         .current {
-          color: #14F287;
-          border-bottom: 1px solid #14F287;
+          color: #14f287;
+          border-bottom: 1px solid #14f287;
         }
       }
 
@@ -273,14 +290,13 @@ onMounted(() => {
               text-align: center;
               font-size: 1.65rem;
               opacity: 1;
-              background: #EAEAEA;
+              background: #eaeaea;
               box-sizing: border-box;
-              border: 1px solid #FFFFFF;
+              border: 1px solid #ffffff;
               box-shadow: inset 0px 0px 10px 1px rgba(78, 78, 78, 0.5899);
             }
           }
 
-
           .login-btn {
             width: 100%;
             height: 3.59rem;
@@ -289,7 +305,7 @@ onMounted(() => {
             font-size: 2rem;
             opacity: 1;
             text-align: center;
-            background: radial-gradient(141% 126% at 5% 93%, #8EFFA9 0%, #07FFE7 100%);
+            background: radial-gradient(141% 126% at 5% 93%, #8effa9 0%, #07ffe7 100%);
             box-shadow: inset 0px 1px 0px 2px rgba(255, 255, 255, 0.3);
             cursor: pointer;
             display: flex;
@@ -304,4 +320,5 @@ onMounted(() => {
       }
     }
   }
-}</style>
+}
+</style>