田源
2023-09-22 5f06c56fd6273a34a502ea730382296cf1c1707f
单点登录-解密插件js库
已修改4个文件
23 ■■■■ 文件已修改
Source/UBCS-WEB/package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/page/login/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/integration/systemInfo.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/package.json
@@ -15,7 +15,7 @@
    "axios": "^0.18.0",
    "babel-polyfill": "^6.26.0",
    "classlist-polyfill": "^1.2.0",
    "crypto-js": "^4.0.0",
    "crypto-js": "^4.1.1",
    "element-ui": "^2.15.6",
    "instead": "^1.0.3",
    "js-base64": "^2.5.1",
Source/UBCS-WEB/src/main.js
@@ -76,8 +76,8 @@
  i18n: (key, value) => i18n.t(key, value)
});
//复制插件
import VueClipboard from 'vue-clipboard2'
Vue.use( VueClipboard )
  import VueClipboard from 'vue-clipboard2'
  Vue.use( VueClipboard )
//时间插件
import moment from 'moment';
Vue.prototype.$moment = moment;
Source/UBCS-WEB/src/page/login/index.vue
@@ -43,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: {
@@ -71,6 +74,7 @@
    created() {
      this.handleLogin();
      this.getTime();
      this.getPassword()
    },
    mounted() {
    },
@@ -79,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());
Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -135,7 +135,8 @@
      },
    }
  },
  created() {
  },
  methods: {
    empower() {
      batchAddSave(this.checkAll.oid, this.checkAll.id, this.ParentList).then(res => {
@@ -179,7 +180,7 @@
          }
          console.log(this.ParentList);
        }
      }else {
      } else {
        this.ParentList = this.ParentList.filter(res => res.classifyId !== row.classifyId);
        console.log(this.ParentList);
      }