田源
2023-09-22 5f06c56fd6273a34a502ea730382296cf1c1707f
Source/UBCS-WEB/src/page/login/index.vue
@@ -12,10 +12,6 @@
        <div style="font-size: 15px">
          <el-image src="/img/pageLogo.jpeg"   style="width: 360px; height: 280px"></el-image>
        </div>
<!--        <div style="font-size: 15px" class="image-container">-->
<!--          <el-image class="background-image" src="/img/pageLogo.jpeg"  ></el-image>-->
<!--        </div>-->
      <!--<img class="img" src="/img/logo.png" alt="">-->
      </div>
      <div class="login-border">
        <div class="login-main">
@@ -25,12 +21,12 @@
          </h4>
          <userLogin v-if="activeName==='user'"></userLogin>
          <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
          <div class="login-menu">
            <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>
            <!--<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
            <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>
            <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a>
          </div>
<!--          <div class="login-menu">-->
<!--            <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>-->
<!--            <a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
<!--            <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>-->
<!--            <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a>-->
<!--          </div>-->
        </div>
      </div>
@@ -47,6 +43,9 @@
  import topColor from "@/page/index/top/top-color";
  import {getQueryString, getTopUrl} from "@/util/util";
  import "@/styles/login.scss";
  //解密js库
  import CryptoJS from 'crypto-js';
  import AES from 'crypto-js/aes';
  export default {
    name: "login",
    components: {
@@ -75,6 +74,7 @@
    created() {
      this.handleLogin();
      this.getTime();
      this.getPassword()
    },
    mounted() {
    },
@@ -83,6 +83,14 @@
    },
    props: [],
    methods: {
      getPassword(){
        const plaintext = 'Hello, World!';
        const key = 'This is a secret key';
        const encrypted = AES.encrypt(plaintext, key).toString();
        console.log('加密后的数据:', encrypted);
        const decrypted = AES.decrypt(encrypted, key).toString(CryptoJS.enc.Utf8);
        console.log('解密后的数据:', decrypted);
      },
      getTime() {
        setInterval(() => {
          this.time = dateFormat(new Date());