Ver código fonte

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v 5 anos atrás
pai
commit
d9a762d165

+ 15 - 0
src/utils/crypto-js.js

@@ -0,0 +1,15 @@
+import CryptoJS from 'crypto-js' // 引用AES源码js
+
+const key = CryptoJS.enc.Utf8.parse('1234123412ABCDEF') // 十六位十六进制数作为密钥
+// const iv = CryptoJS.enc.Utf8.parse('ABCDEF1234123412') // 十六位十六进制数作为密钥偏移量
+// 加密方法
+export function Encrypt() {
+  const token = '1234123412ABCDEF' + '.' + new Date().getTime()
+  const srcs = CryptoJS.enc.Utf8.parse(token)
+  const encrypted = CryptoJS.AES.encrypt(srcs, key, {
+    // iv: iv,
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  })
+  return encrypted.ciphertext.toString().toUpperCase()
+}

+ 2 - 0
src/utils/request.js

@@ -3,6 +3,7 @@ import { Message } from 'element-ui'
 // import store from '@/store'
 // import { getToken } from '@/utils/auth'
 import { loginUrl } from '@/apiConfig/requestIP.js'
+import { Encrypt } from '@/utils/crypto-js.js'
 
 // create an axios instance
 const service = axios.create({
@@ -25,6 +26,7 @@ service.interceptors.request.use(
     //   // please modify it according to the actual situation
     //   config.headers['X-Token'] = getToken()
     // }
+    config.headers['secret'] = Encrypt()
     return config
   },
   error => {

+ 2 - 2
src/views/projectManage/bugList/bugindex.vue

@@ -6,7 +6,7 @@
           <el-col :span="24" class="Layout">
             <div class="titFont Layout">
               <span
-                style="margin-left: 15px; width: 100px;  font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;"
+                style="width: 100px;  font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;"
               >缺陷</span>
             </div>
             <el-button
@@ -18,7 +18,7 @@
           <el-col :span="24">
             <el-divider style="color: #EEF0F5;" />
           </el-col>
-          <el-col :span="24" class="Layout" style="padding: 0% 0.5% 1% 1.5%;">
+          <el-col :span="24" class="Layout" style="padding: 0 0 1% 0">
             <el-form :model="formInline" class="flex_start" style="width: 100%;">
               <div class="Layout">
                 <div class="queryName">缺陷ID</div>

+ 3 - 3
src/views/projectManage/projectList/projectIndex.vue

@@ -2,14 +2,14 @@
   <div class="Parent1" style="background-color:#F2F3F6;min-height:calc(100vh - 80px);padding:1% 0">
     <div class="stylus-head">
       <div class="stylus-title">
-        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;margin-left: 1%;">项目</span>
+        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;">项目</span>
         <div>
           <el-button type="primary" size="mini" @click="home_created_project">新建项目</el-button>
         </div>
       </div>
       <el-divider style="color: #EEF0F5;" />
       <div class="Layout">
-        <div style="margin-left:1%;">
+        <div>
           <el-form :model="form_all" class="Layout">
             <div class="Layout">
               <div class="queryName">项目ID</div>
@@ -566,7 +566,7 @@ export default {
     // color #409EFF !important
     background #EDF6FF
   .stylus-head >>> .el-divider--horizontal
-    margin 10px
+    margin 10px 0
   .stylus-head >>> .el-form-item
     margin-bottom 0
   .stylus-head

+ 3 - 3
src/views/projectManage/requirement/list/index.vue

@@ -2,12 +2,12 @@
   <div class="sos" style="background-color:#F2F3F6;min-height:calc(100vh - 80px);padding:1% 0">
     <div class="stylus-head">
       <div class="stylus-title">
-        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;margin-left: 1%;">需求</span>
+        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;">需求</span>
         <el-button type="primary" size="mini" @click="createDialogVisible = true">新建需求</el-button>
       </div>
       <el-divider style="color: #EEF0F5;" />
       <div class="Layout">
-        <div style="margin: 0px 1% 0 1%; width: 100%;">
+        <div>
           <el-form :model="searchForm" class="flex_start">
             <div class="Layout">
               <div class="queryName">需求ID</div>
@@ -383,7 +383,7 @@ export default {
   .stylus-content >>> .el-table .el-table__body tr:hover td
     background #EDF6FF
   .stylus-head >>> .el-divider--horizontal
-    margin 10px
+    margin 10px 0
   .stylus-head >>> .el-form-item
     margin-bottom 0
   .stylus-head

+ 3 - 3
src/views/projectManage/taskList/taskIndex.vue

@@ -2,7 +2,7 @@
   <div class="bgborder" style="background-color:#F2F3F6;min-height:calc(100vh - 80px);padding:1% 0">
     <div class="stylus-head">
       <div class="stylus-title">
-        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;margin-left: 1%;">任务</span>
+        <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;">任务</span>
         <div>
           <el-button
             type="primary"
@@ -13,7 +13,7 @@
       </div>
       <el-divider style="color: #EEF0F5;" />
       <div class="Layout">
-        <div style="margin:0 1% 0 1%;">
+        <div>
           <el-form :model="form_task" class="flex_start">
             <div class="Layout">
               <div class="queryName">任务ID</div>
@@ -455,7 +455,7 @@ export default {
     // color #409EFF !important
     background #EDF6FF
   .stylus-head >>> .el-divider--horizontal
-    margin 10px
+    margin 10px 0
   .stylus-head >>> .el-form-item
     margin-bottom 0
   .stylus-head

+ 3 - 3
src/views/projectManage/version/list/index.vue

@@ -1,12 +1,12 @@
 <template>
   <el-container class="version_list">
     <div style="width:100%;height:100%;padding-top:1px;background-color: #F2F3F6;">
-      <el-main class="layout_header" style="padding: 1% 2%">
+      <el-main class="layout_header" style="padding: 1%">
         <div class="layout_header_title">
           <span style="font-size: 22px;letter-spacing: 1px;font-weight: 600;color: #333B4A;">版本</span>
           <i class="el-icon-date calendar" @click="link_calendar" />
         </div>
-        <div style="position: relative;right: 1%">
+        <div style="position: relative;">
           <el-divider />
         </div>
         <el-row>
@@ -575,7 +575,7 @@ export default {
     display: block;
     height: 1px;
     width: 100%;
-    margin: 10px;
+    margin: 10px 0;
 }
 .version_list_layout_main .el-table__body tr:hover td {
   color: #409eff;