Browse Source

Merge remote-tracking branch 'origin/master'

Wren 1 year ago
parent
commit
41ebbed6cc

+ 10 - 1
front/admin-front/src/api/user.js

@@ -94,4 +94,13 @@ export function currentUser() {
     url: baseUrl + 'uc/user/current',
     url: baseUrl + 'uc/user/current',
     method: 'get',
     method: 'get',
   })
   })
-}
+}
+
+//修改密码
+export function updatePassword(params) {
+  return request({
+    url: 'uc/user/update_password',
+    method: 'post',
+    data: params
+  })
+}

+ 8 - 0
front/admin-front/src/assets/navbar/password.svg

@@ -0,0 +1,8 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="mask0_1208_1084" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20">
+<rect width="20" height="20" fill="#D9D9D9"/>
+</mask>
+<g mask="url(#mask0_1208_1084)">
+<path d="M1.66671 15.8333V14.1667H18.3334V15.8333H1.66671ZM2.62504 10.7917L1.54171 10.1667L2.25004 8.91668H0.833374V7.66668H2.25004L1.54171 6.45834L2.62504 5.83334L3.33337 7.04168L4.04171 5.83334L5.12504 6.45834L4.41671 7.66668H5.83337V8.91668H4.41671L5.12504 10.1667L4.04171 10.7917L3.33337 9.54168L2.62504 10.7917ZM9.29171 10.7917L8.20837 10.1667L8.91671 8.91668H7.50004V7.66668H8.91671L8.20837 6.45834L9.29171 5.83334L10 7.04168L10.7084 5.83334L11.7917 6.45834L11.0834 7.66668H12.5V8.91668H11.0834L11.7917 10.1667L10.7084 10.7917L10 9.54168L9.29171 10.7917ZM15.9584 10.7917L14.875 10.1667L15.5834 8.91668H14.1667V7.66668H15.5834L14.875 6.45834L15.9584 5.83334L16.6667 7.04168L17.375 5.83334L18.4584 6.45834L17.75 7.66668H19.1667V8.91668H17.75L18.4584 10.1667L17.375 10.7917L16.6667 9.54168L15.9584 10.7917Z" fill="#1C1B1F"/>
+</g>
+</svg>

+ 253 - 4
front/admin-front/src/layout/components/Navbar.vue

@@ -65,6 +65,7 @@
         </div>
         </div>
         <img src="../../assets/navbar/arrow_right_alt.svg" alt="arrow_right_alt">
         <img src="../../assets/navbar/arrow_right_alt.svg" alt="arrow_right_alt">
       </div>
       </div>
+
       <div class="item" style="margin-bottom: 16px">
       <div class="item" style="margin-bottom: 16px">
         <div class="left">
         <div class="left">
           <img src="../../assets/navbar/account_balance.svg" alt="account_balance">
           <img src="../../assets/navbar/account_balance.svg" alt="account_balance">
@@ -79,14 +80,80 @@
           :value="item.value">
           :value="item.value">
         </el-option>
         </el-option>
       </el-select>
       </el-select>
+      <div class="item" @click="changePassword" style="margin-top: 28px;cursor: pointer">
+        <div class="left">
+          <img src="../../assets/navbar/password.svg" alt="logout">
+          修改密码
+        </div>
+      </div>
       <div class="item" @click="logout" style="margin-top: 28px;color: #EB5757;cursor: pointer">
       <div class="item" @click="logout" style="margin-top: 28px;color: #EB5757;cursor: pointer">
         <div class="left">
         <div class="left">
           <img src="../../assets/navbar/logout.svg" alt="logout">
           <img src="../../assets/navbar/logout.svg" alt="logout">
           退出登录
           退出登录
         </div>
         </div>
-
       </div>
       </div>
     </div>
     </div>
+
+<!--    <div class="systemSetup" style="right: 0;left: 0;margin: auto" v-if="changePasswordBox">-->
+<!--      <div class="title">-->
+<!--        <div class="left">-->
+<!--          <img src="../../assets/navbar/password.svg" alt="tune">-->
+<!--          修改密码-->
+<!--        </div>-->
+<!--        <img @click="changePasswordBox = false" style="cursor: pointer" src="../../assets/navbar/close.svg" alt="close">-->
+<!--      </div>-->
+<!--      <div class="horizontalLine"/>-->
+
+<!--      <div class="item" @click="changePassword" style="margin-top: 28px;cursor: pointer">-->
+<!--        <div class="left">-->
+<!--          <img src="../../assets/navbar/password.svg" alt="logout">-->
+<!--          修改密码-->
+<!--        </div>-->
+<!--      </div>-->
+<!--      <div class="item" @click="logout" style="margin-top: 28px;color: #EB5757;cursor: pointer">-->
+<!--        <div class="left">-->
+<!--          <img src="../../assets/navbar/logout.svg" alt="logout">-->
+<!--          退出登录-->
+<!--        </div>-->
+<!--      </div>-->
+<!--    </div>-->
+    <el-dialog :visible.sync="changePasswordBox"  width="440px" :show-close="false" @closed="changePasswordPopClosed">
+      <div class="changePasswordPop">
+        <div class="changePasswordPopBox">
+          <div class="changePasswordPopBoxTitle">
+            修改密码
+          </div>
+          <div class="changePasswordPopBoxInputBox">
+            <div class="changePasswordPopBoxInput">
+              <div class="passwordError" v-if="oldPasswordError">
+                {{oldPasswordErrorText}}
+              </div>
+              <el-input v-model="oldPassword" @input="passwordInput" placeholder="输入您当前的密码" type="password"
+                        show-password input-style="font-weight: 700;font-size: 16px;line-height: 20px;color: #8a8a89;"/>
+            </div>
+            <div class="changePasswordPopBoxInput">
+              <div class="passwordError" v-if="newPasswordOneError">
+                {{newPasswordOneErrorText}}
+              </div>
+              <el-input v-model="newPasswordOne" @input="passwordInput" placeholder="输入您新的密码" type="password"
+                        show-password input-style="font-weight: 700;font-size: 16px;line-height: 20px;color: #8a8a89;"/>
+            </div>
+            <div class="changePasswordPopBoxInput">
+              <div class="passwordError" v-if="newPasswordTwoError">
+                {{newPasswordTwoErrorText}}
+              </div>
+              <el-input v-model="newPasswordTwo" @input="passwordInput" placeholder="再次输入您新的密码"
+                        type="password"
+                        show-password input-style="font-weight: 700;font-size: 16px;line-height: 20px;color: #8a8a89;"/>
+            </div>
+          </div>
+          <div class="confirmButton" @click="confirmPassword">
+            确认
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+
     <el-drawer
     <el-drawer
       :visible.sync="drawerEmail"
       :visible.sync="drawerEmail"
       :with-header="false">
       :with-header="false">
@@ -162,7 +229,6 @@
         </div>
         </div>
       </div>
       </div>
     </el-drawer>
     </el-drawer>
-
   </div>
   </div>
 </template>
 </template>
 
 
@@ -171,6 +237,8 @@ import { mapGetters } from "vuex";
 import Hamburger from "@/components/Hamburger";
 import Hamburger from "@/components/Hamburger";
 import Cookies from "js-cookie";
 import Cookies from "js-cookie";
 import Search from './Search.vue';
 import Search from './Search.vue';
+import {updatePassword} from '@/api/user.js'
+
 export const baseUrl = process.env.VUE_APP_BASEURL;
 export const baseUrl = process.env.VUE_APP_BASEURL;
 const TokenKey = "X-UC-AuthToken";
 const TokenKey = "X-UC-AuthToken";
 const cityOptions = ['执行记录', '执行策略', 'Gas+支出金额', '执行进度'];
 const cityOptions = ['执行记录', '执行策略', 'Gas+支出金额', '执行进度'];
@@ -230,7 +298,18 @@ export default {
       checkAll: false,
       checkAll: false,
       checkedCities: ['执行记录', '执行策略', 'Gas+支出金额', '执行进度'],
       checkedCities: ['执行记录', '执行策略', 'Gas+支出金额', '执行进度'],
       cities: cityOptions,
       cities: cityOptions,
-      isIndeterminate: true
+      isIndeterminate: true,
+
+      changePasswordBox:false,
+      oldPassword:'',
+      newPasswordOne:'',
+      newPasswordTwo:'',
+      oldPasswordError:false,
+      newPasswordOneError:false,
+      newPasswordTwoError:false,
+      oldPasswordErrorText:'',
+      newPasswordOneErrorText:'',
+      newPasswordTwoErrorText:''
     };
     };
   },
   },
   created() {
   created() {
@@ -276,7 +355,83 @@ export default {
       let checkedCount = value.length;
       let checkedCount = value.length;
       this.checkAll = checkedCount === this.cities.length;
       this.checkAll = checkedCount === this.cities.length;
       this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
       this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
+    },
+    confirmPassword(){
+      if(!this.passwordCheck()){
+        return
+      }
+      let params = {
+        oldPassword: this.oldPassword,
+        newPassword: this.newPasswordOne,
+      }
+      updatePassword(params).then(res=>{
+          this.logout()
+      }).catch(res=>{
+        this.oldPasswordError = true
+        this.oldPasswordErrorText = '* ' + res
+      })
+    },
+    changePassword(){
+      this.changePasswordBox = true
+    },
+    changePasswordPopClosed(){
+      this.oldPassword = ''
+      this.newPasswordOne = ''
+      this.newPasswordTwo = ''
+      this.oldPasswordError = false
+      this.newPasswordOneError = false
+      this.newPasswordTwoError = false
+    },
+    //密码校验
+    passwordCheck(){
+      this.oldPasswordError = false
+      if (this.newPasswordOne.length < 6) {
+        this.newPasswordOneError = true
+        this.newPasswordOneErrorText = '* 密码必须至少有6个字符'
+        return false
+      }else {
+        this.newPasswordOneError = false
+      }
+      if (this.newPasswordTwo.length < 6) {
+        this.newPasswordTwoError = true
+        this.newPasswordTwoErrorText = '* 密码必须至少有6个字符'
+        return false
+      }else {
+        this.newPasswordTwoError = false
+      }
+      if (this.newPasswordOne.length > 16) {
+        this.newPasswordOneError = true
+        this.newPasswordOneErrorText = '* 密码最多为16个字符'
+        return false
+      }else {
+        this.newPasswordOneError = false
+
+      }
+      if (this.newPasswordTwo.length > 16) {
+        this.newPasswordTwoError = true
+        this.newPasswordTwoErrorText = '* 密码最多为16个字符'
+        return false
+      }else {
+        this.newPasswordTwoError = false
+      }
+      if (this.newPasswordOne !== this.newPasswordTwo) {
+        this.newPasswordOneError = true
+        this.newPasswordTwoError = true
+        this.newPasswordOneErrorText = '* 两个密码不匹配'
+        this.newPasswordTwoErrorText = '* 两个密码不匹配'
+        return false
+      }
+      this.newPasswordOneError = false
+      this.newPasswordTwoError = false
+      return true
+    },
+    //修改密码输入框禁止输入空格
+    passwordInput(){
+      this.oldPassword = this.oldPassword.replace(/\s+/g, '')
+      this.newPasswordOne = this.newPasswordOne.replace(/\s+/g, '')
+      this.newPasswordTwo = this.newPasswordTwo.replace(/\s+/g, '')
     }
     }
+
   },
   },
 };
 };
 </script>
 </script>
@@ -353,7 +508,7 @@ export default {
 }
 }
 .systemSetup{
 .systemSetup{
   width: 360px;
   width: 360px;
-  height: 345px;
+  height: 385px;
   background: #FFFFFF;
   background: #FFFFFF;
   border-radius: 10px;
   border-radius: 10px;
   padding: 30px 36px;
   padding: 30px 36px;
@@ -517,5 +672,99 @@ export default {
     }
     }
   }
   }
 }
 }
+::v-deep .el-dialog {
+  background: #FFFFFF;
+  border: 1px solid #F1F1F1;
+  border-radius: 16px;
+  padding: 0;
+}
+
+::v-deep .el-dialog__title {
+  font-weight: 700;
+  font-size: 19px;
+  line-height: 24px;
+  color: #2A2E39;
+}
+
+::v-deep .el-dialog__header {
+  padding: 0;
+}
+
+::v-deep .el-dialog__headerbtn {
+  top: 40px;
+  right: 56px;
+  width: 0;
+  height: 0;
+}
+
+::v-deep .el-dialog__body {
+  padding: 0;
+}
+
+.changePasswordPop{
+  width: 440px;
+  //height: 460px;
+  background: #F8F6F1;
+  border: 1px solid #F1F1F1;
+  box-shadow: 0px 4px 16px rgba(240, 202, 65, 0.2);
+  backdrop-filter: blur(2px);
+  border-radius: 16px;
+}
 
 
+.changePasswordPopBox {
+  width: 440px;
+  padding: 24px;
+  background: rgba(255, 255, 255, 0.6);
+  border: 1px solid #F1F1F1;
+  backdrop-filter: blur(2px);
+  border-radius: 16px;
+}
+
+.changePasswordPopBoxTitle {
+  font-weight: 700;
+  font-size: 19px;
+  line-height: 24px;
+  color: #181818;
+}
+
+.changePasswordPopBoxInputBox {
+  display: flex;
+  flex-direction: column;
+  gap: 20px;
+  margin-top: 24px;
+  margin-bottom: 28px;
+}
+
+.changePasswordPopBoxInput {
+  width: 100%;
+  height: 60px;
+  //border: 1px solid #F1F1F1;
+  border-radius: 18px;
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+
+.confirmButton {
+  font-weight: 700;
+  font-size: 16px;
+  line-height: 20px;
+  color: #181818;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  gap: 8px;
+  width: 100%;
+  height: 56px;
+  background: linear-gradient(135deg, #FEF380 0%, #E8FFC7 100%);
+  border: 1px solid #D9EA9A;
+  box-shadow: 0 8px 24px rgba(40, 41, 61, 0.08);
+  border-radius: 16px;
+  cursor: pointer;
+}
+.passwordError{
+  position: absolute;
+  top: -20px;
+  color: red;
+}
 </style>
 </style>

+ 113 - 43
front/admin-front/src/views/autoplay/index.vue

@@ -146,6 +146,10 @@
             计划任务执行次数
             计划任务执行次数
             <el-input v-model="currentTaskInfo.planTimes" placeholder="计划任务执行次数"></el-input>
             <el-input v-model="currentTaskInfo.planTimes" placeholder="计划任务执行次数"></el-input>
           </div>
           </div>
+          <div class="input">
+            预估GAS
+            <el-input v-model="currentTaskInfo.estimatedGas" placeholder="预估GAS"></el-input>
+          </div>
         </div>
         </div>
       </div>
       </div>
     </el-drawer>
     </el-drawer>
@@ -325,7 +329,7 @@
             </div>
             </div>
             <div class="item" v-for="item in currentRecordData.airdropParams">
             <div class="item" v-for="item in currentRecordData.airdropParams">
               <div class="title">
               <div class="title">
-                {{item.note}}
+                {{ item.note }}
               </div>
               </div>
               <div class="info">
               <div class="info">
                 {{ item.value }}
                 {{ item.value }}
@@ -338,12 +342,12 @@
                 正在进行中
                 正在进行中
               </div>
               </div>
               <div class="number">
               <div class="number">
-                总计交互地址: {{ongoingDataTotal}}
+                总计交互地址: {{ ongoingDataTotal }}
               </div>
               </div>
             </div>
             </div>
-<!--            <div class="right" style="cursor: pointer" @click="refresh">-->
-<!--              <img src="../../assets/autoplay/Frame.svg" alt="Frame">-->
-<!--            </div>-->
+            <!--            <div class="right" style="cursor: pointer" @click="refresh">-->
+            <!--              <img src="../../assets/autoplay/Frame.svg" alt="Frame">-->
+            <!--            </div>-->
             <div class="button" @click="refresh">
             <div class="button" @click="refresh">
               <img src="../../assets/autoplay/Frame.svg" alt="Frame">
               <img src="../../assets/autoplay/Frame.svg" alt="Frame">
               刷新
               刷新
@@ -462,7 +466,7 @@
             </div>
             </div>
             <div class="item" v-for="item in currentRecordData.airdropParams">
             <div class="item" v-for="item in currentRecordData.airdropParams">
               <div class="title">
               <div class="title">
-                {{item.note}}
+                {{ item.note }}
               </div>
               </div>
               <div class="info">
               <div class="info">
                 {{ item.value }}
                 {{ item.value }}
@@ -475,7 +479,7 @@
                 已完成
                 已完成
               </div>
               </div>
               <div class="number">
               <div class="number">
-                总计交互地址: {{ongoingDataTotal}}
+                总计交互地址: {{ ongoingDataTotal }}
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
@@ -531,9 +535,9 @@
               <img src="../../assets/autoplay/done_all.svg" alt="done_all">
               <img src="../../assets/autoplay/done_all.svg" alt="done_all">
               执行进度已完成
               执行进度已完成
             </div>
             </div>
-<!--            <div class="number">-->
-<!--              {{ currentTaskInfo.executeTimes }}/{{ currentTaskInfo.planTimes }}-->
-<!--            </div>-->
+            <!--            <div class="number">-->
+            <!--              {{ currentTaskInfo.executeTimes }}/{{ currentTaskInfo.planTimes }}-->
+            <!--            </div>-->
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -597,7 +601,7 @@
             </div>
             </div>
             <div class="item" v-for="item in currentRecordData.airdropParams">
             <div class="item" v-for="item in currentRecordData.airdropParams">
               <div class="title">
               <div class="title">
-                {{item.note}}
+                {{ item.note }}
               </div>
               </div>
               <div class="info">
               <div class="info">
                 {{ item.value }}
                 {{ item.value }}
@@ -610,7 +614,7 @@
                 正在进行中
                 正在进行中
               </div>
               </div>
               <div class="number">
               <div class="number">
-                总计交互地址: {{ongoingDataTotal}}
+                总计交互地址: {{ ongoingDataTotal }}
               </div>
               </div>
             </div>
             </div>
             <div style="display: flex;align-items: center;gap:32px">
             <div style="display: flex;align-items: center;gap:32px">
@@ -786,18 +790,18 @@
               <el-input v-model="batchExecutionParams.intervalMax" placeholder="输入最大间隔时间/分"></el-input>
               <el-input v-model="batchExecutionParams.intervalMax" placeholder="输入最大间隔时间/分"></el-input>
             </div>
             </div>
           </div>
           </div>
-<!--          <div class="item">-->
-<!--            <div class="title">-->
-<!--              交互金额-->
-<!--            </div>-->
-<!--            <el-input v-model="batchExecutionParams.amount" placeholder="输入最大交互金额"></el-input>-->
-<!--          </div>-->
-<!--          <div class="item">-->
-<!--            <div class="title">-->
-<!--              最大 Gas fee-->
-<!--            </div>-->
-<!--            <el-input v-model="batchExecutionParams.maxGas" placeholder="输入最大 Gas fee"></el-input>-->
-<!--          </div>-->
+          <!--          <div class="item">-->
+          <!--            <div class="title">-->
+          <!--              交互金额-->
+          <!--            </div>-->
+          <!--            <el-input v-model="batchExecutionParams.amount" placeholder="输入最大交互金额"></el-input>-->
+          <!--          </div>-->
+          <!--          <div class="item">-->
+          <!--            <div class="title">-->
+          <!--              最大 Gas fee-->
+          <!--            </div>-->
+          <!--            <el-input v-model="batchExecutionParams.maxGas" placeholder="输入最大 Gas fee"></el-input>-->
+          <!--          </div>-->
           <div class="item" v-for="item in paramsData">
           <div class="item" v-for="item in paramsData">
             <div class="title">
             <div class="title">
               {{ item.note }}
               {{ item.note }}
@@ -812,7 +816,7 @@
           <div class="inputTitle">
           <div class="inputTitle">
             钱包密码
             钱包密码
           </div>
           </div>
-          <el-input type="password" :show-password="true" v-model="batchExecutionParams.password"
+          <el-input type="password" :show-password="true" v-model="password"
                     placeholder="输入钱包密码"></el-input>
                     placeholder="输入钱包密码"></el-input>
           <div class="confirm" @click="batchExecutionTask">
           <div class="confirm" @click="batchExecutionTask">
             <img src="../../assets/autoplay/check1.svg" alt="check1">
             <img src="../../assets/autoplay/check1.svg" alt="check1">
@@ -897,6 +901,10 @@
             计划任务执行次数
             计划任务执行次数
             <el-input v-model="currentAddTaskInfo.planTimes" placeholder="计划任务执行次数"></el-input>
             <el-input v-model="currentAddTaskInfo.planTimes" placeholder="计划任务执行次数"></el-input>
           </div>
           </div>
+          <div class="input">
+            预估GAS
+            <el-input v-model="currentAddTaskInfo.estimatedGas" placeholder="预估GAS"></el-input>
+          </div>
         </div>
         </div>
       </div>
       </div>
     </el-drawer>
     </el-drawer>
@@ -910,6 +918,8 @@ import {addTaskInfo, batchExecution, getExecutionRecord, modifyTaskInfo, paramet
 import {getGroupList} from "@/api/adress";
 import {getGroupList} from "@/api/adress";
 import {getInteractionRecord, retryFailed} from "@/api/record";
 import {getInteractionRecord, retryFailed} from "@/api/record";
 import {projectPage} from "@/api/project";
 import {projectPage} from "@/api/project";
+import CryptoJS from "crypto-js";
+import Web3 from 'web3'
 
 
 export default {
 export default {
   data() {
   data() {
@@ -938,10 +948,10 @@ export default {
       value1: '',
       value1: '',
       recordData: [],
       recordData: [],
       ongoingData: [],//下一层
       ongoingData: [],//下一层
-      ongoingDataTotal:0,
+      ongoingDataTotal: 0,
       drawerStrategy: false,
       drawerStrategy: false,
       accountPassword: false,
       accountPassword: false,
-      retryPassword:false,
+      retryPassword: false,
       batchExecutionParams: {
       batchExecutionParams: {
         groupName: '',
         groupName: '',
         maxGas: '',
         maxGas: '',
@@ -952,9 +962,10 @@ export default {
         projectId: '',
         projectId: '',
         taskId: ''
         taskId: ''
       },
       },
-      retryParams:{
-        executeId:'',
-        password:''
+      password:'',
+      retryParams: {
+        executeId: '',
+        password: ''
       },
       },
       currentTaskInfo: {
       currentTaskInfo: {
         taskType: '',
         taskType: '',
@@ -963,7 +974,8 @@ export default {
         amsTaskId: '',
         amsTaskId: '',
         planTimes: '',
         planTimes: '',
         projectName: '',
         projectName: '',
-        taskCode:''
+        taskCode: '',
+        estimatedGas: ''
       },
       },
       currentRecordData: {},
       currentRecordData: {},
       paramsData: [],
       paramsData: [],
@@ -1030,6 +1042,19 @@ export default {
       })
       })
     },
     },
     batchExecutionTask() {
     batchExecutionTask() {
+      // 要加密的数据
+      const dataToEncrypt = this.password;
+      console.log('输入的密码:', dataToEncrypt);
+      // 获取当前北京时间
+      const beijingDate = this.getCurrentBeijingTime();
+      // 生成keyByte
+      const keyByte = this.generateKeyByteArray(beijingDate);
+      console.log('生成的toHex:', keyByte);
+      // 加密数据
+      const encryptedData = this.encryptData(dataToEncrypt, keyByte);
+      console.log('加密后的数据:', encryptedData);
+
+      this.batchExecutionParams.password = encryptedData
       this.batchExecutionParams.airdropParams = this.paramsData
       this.batchExecutionParams.airdropParams = this.paramsData
       batchExecution(this.batchExecutionParams).then(() => {
       batchExecution(this.batchExecutionParams).then(() => {
         this.accountPassword = false
         this.accountPassword = false
@@ -1037,6 +1062,43 @@ export default {
         this.getTaskList()
         this.getTaskList()
       })
       })
     },
     },
+    // 获取当前北京时间并格式化为 YYYYMMDD
+    getCurrentBeijingTime() {
+      const localDate = new Date();
+      const localTime = localDate.getTime(); // 获取当前本地时间的时间戳
+      const localOffset = localDate.getTimezoneOffset() * 60000; // 本地时区偏移的毫秒数
+      const utcTime = localTime + localOffset; // 转换为 UTC 时间
+      const beijingOffset = 8 * 60 * 60000; // 北京时区偏移的毫秒数
+      const beijingTime = utcTime + beijingOffset; // 加上北京时区偏移
+
+      const beijingDate = new Date(beijingTime);
+      const year = beijingDate.getFullYear();
+      const month = (beijingDate.getMonth() + 1).toString().padStart(2, '0');
+      const day = beijingDate.getDate().toString().padStart(2, '0');
+
+      return `${year}${month}${day}${year}${month}${day}`;
+    },
+    // 生成
+    generateKeyByteArray(content) {
+      let bytes = [];
+      let len, c;
+      len = content.length;
+      for (let i = 0; i < len; i++) {
+        c = content[i];
+        bytes.push(parseInt(c))
+      }
+      console.log('当前北京时间的数组',bytes);
+      return Web3.utils.bytesToHex(bytes).substring(2);
+    },
+    // 加密函数
+    encryptData(word, keyStr) {
+      let key = CryptoJS.enc.Hex.parse(keyStr)
+      console.log('CryptoJS生成的key',key);
+      let encrypted = CryptoJS.AES.encrypt(word, key, {mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7}) // 加密模式为ECB,补码方式为PKCS5Padding(也就是PKCS7)
+
+      return encrypted.toString()
+
+    },
     viewTaskDetails(item) {
     viewTaskDetails(item) {
       this.currentTaskInfo = JSON.parse(JSON.stringify(item))
       this.currentTaskInfo = JSON.parse(JSON.stringify(item))
       this.drawerDetails = true
       this.drawerDetails = true
@@ -1048,7 +1110,8 @@ export default {
         airdropProjectId: this.currentTaskInfo.amsProjectId,
         airdropProjectId: this.currentTaskInfo.amsProjectId,
         amsTaskId: this.currentTaskInfo.amsTaskId,
         amsTaskId: this.currentTaskInfo.amsTaskId,
         planTimes: this.currentTaskInfo.planTimes,
         planTimes: this.currentTaskInfo.planTimes,
-        taskCode:this.currentTaskInfo.taskCode
+        taskCode: this.currentTaskInfo.taskCode,
+        estimatedGas: this.currentTaskInfo.estimatedGas
       }
       }
       modifyTaskInfo(params).then(() => {
       modifyTaskInfo(params).then(() => {
         this.drawerDetails = false
         this.drawerDetails = false
@@ -1074,7 +1137,8 @@ export default {
         taskName: this.currentAddTaskInfo.taskName,
         taskName: this.currentAddTaskInfo.taskName,
         airdropProjectId: this.currentAddTaskInfo.airdropProjectId,
         airdropProjectId: this.currentAddTaskInfo.airdropProjectId,
         planTimes: this.currentAddTaskInfo.planTimes,
         planTimes: this.currentAddTaskInfo.planTimes,
-        taskCode: this.currentAddTaskInfo.taskCode
+        taskCode: this.currentAddTaskInfo.taskCode,
+        estimatedGas: this.currentAddTaskInfo.estimatedGas
       }
       }
       console.log(params);
       console.log(params);
       addTaskInfo(params).then(() => {
       addTaskInfo(params).then(() => {
@@ -1123,18 +1187,18 @@ export default {
         this.paramsData = res
         this.paramsData = res
       })
       })
     },
     },
-    retry(){
+    retry() {
       let params = {
       let params = {
-        executeId:this.currentRecordData.executeId,
-        password:this.retryParams.password
+        executeId: this.currentRecordData.executeId,
+        password: this.retryParams.password
       }
       }
-      retryFailed(params).then(res =>{
+      retryFailed(params).then(res => {
         console.log(res);
         console.log(res);
         this.refresh()
         this.refresh()
         this.retryPassword = false
         this.retryPassword = false
       })
       })
     },
     },
-    drawerRecordClosed(){
+    drawerRecordClosed() {
       this.drawerRecordStatus = 0;
       this.drawerRecordStatus = 0;
       this.retryPassword = false
       this.retryPassword = false
     }
     }
@@ -1209,6 +1273,7 @@ export default {
     flex-wrap: wrap;
     flex-wrap: wrap;
     height: 650px;
     height: 650px;
     overflow: auto;
     overflow: auto;
+
     .app-container-table-main-item {
     .app-container-table-main-item {
       width: 340px;
       width: 340px;
       height: 315px;
       height: 315px;
@@ -1538,12 +1603,14 @@ export default {
         display: flex;
         display: flex;
         flex-direction: column;
         flex-direction: column;
         gap: 8px;
         gap: 8px;
-        .back{
+
+        .back {
           cursor: pointer;
           cursor: pointer;
           display: flex;
           display: flex;
           align-items: center;
           align-items: center;
-          gap:4px;
+          gap: 4px;
         }
         }
+
         .missionName {
         .missionName {
           display: flex;
           display: flex;
           gap: 8px;
           gap: 8px;
@@ -1643,7 +1710,8 @@ export default {
         display: flex;
         display: flex;
         justify-content: space-between;
         justify-content: space-between;
         flex-wrap: wrap;
         flex-wrap: wrap;
-        gap:20px;
+        gap: 20px;
+
         .item {
         .item {
           display: flex;
           display: flex;
           flex-direction: column;
           flex-direction: column;
@@ -1692,12 +1760,13 @@ export default {
             color: #8e8f91;
             color: #8e8f91;
           }
           }
         }
         }
-        .button{
+
+        .button {
           display: flex;
           display: flex;
           align-items: center;
           align-items: center;
           width: fit-content;
           width: fit-content;
           height: 36px;
           height: 36px;
-          gap:4px;
+          gap: 4px;
           border: 1px solid #E0E0E0;
           border: 1px solid #E0E0E0;
           border-radius: 40px;
           border-radius: 40px;
           padding: 0 12px;
           padding: 0 12px;
@@ -1796,6 +1865,7 @@ export default {
         }
         }
       }
       }
     }
     }
+
     .accountPassword {
     .accountPassword {
       width: 440px;
       width: 440px;
       height: 374px;
       height: 374px;

+ 1 - 0
front/admin-front/src/views/dashboard/index.vue

@@ -864,6 +864,7 @@ export default {
                 font-size: 11px;
                 font-size: 11px;
                 line-height: 14px;
                 line-height: 14px;
                 color: #181818;
                 color: #181818;
+                max-width: 80px;
               }
               }
 
 
               .progress {
               .progress {

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "crypto-js": "^4.1.1"
+  }
+}