Эх сурвалжийг харах

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

zhongxiaoyu 2 жил өмнө
parent
commit
c6391865af

+ 9 - 0
src/api/newLogin.js

@@ -44,6 +44,15 @@ export function changePassword (params) {
   })
 }
 
+//忘记密码
+export function changeSecpasswd (params) {
+  return request({
+    url: '/foxlibc/reset-secpasswd',
+    method: 'post',
+    data: params
+  })
+}
+
 //权限获取
 export function permission (params) {
   return request({

+ 1 - 0
src/layout/index.vue

@@ -157,6 +157,7 @@ export default {
       try {
         const res = await changePassword({
           username: this.name,
+          userId: sessionStorage.getItem('User_Id'),
           originPassword: MD5(this.dataForm.old),
           // passwd: MD5(this.dataForm.again),
           newPassword: this.dataForm.again,

+ 6 - 9
src/views/accountManagement/components/accountHome.vue

@@ -126,7 +126,7 @@
     <!--修改密码弹框-->
     <Dialog width="496px" customClass="dataStoreInfoDialog" :flag="pwdflag">
       <div class="dialog-public-background">
-        <div class="title">修改密码</div>
+        <div class="title">修改二级密码</div>
         <div class="content">
           <div class="ruleZf">特殊字符:`、!、@、#、$、%、^、&、*、(、)、_、+、{、}、"、:、?、>、&lt;、`、,、.、/、'、;、[、]、=、-、\、|</div>
           <div class="ruleZf">密码规则:长度为8-20个字符,并且必须包含数字、大写字母、小写字母、特殊字符</div>
@@ -155,6 +155,7 @@ import NoData from "@/components/nodata";
 import { translateDataToTreeAll } from "@/utils/validate";
 import { mapGetters } from "vuex";
 import { GeneralDataReception, Query } from "@/api/dataIntegration";
+import { changeSecpasswd } from '@/api/newLogin';
 import MD5 from "blueimp-md5";
 export default {
   components: { Search, Dialog, NoData },
@@ -457,10 +458,8 @@ export default {
       //   path: '/account/accountAdd'
       // })
     },
-    authUser (userId) {
+    authUser () {
       this.pwdflag = true;
-      this.roleId = userId;
-      this.getAccountInfo();
     },
     //存储数据项-提交
     addSubmit (formName) {
@@ -470,11 +469,9 @@ export default {
             this.$message.error("两次输入的密码不一致,请重新输入");
             return false;
           }
-          this.dataForm.user_sec_pwd = MD5(this.dataForm.again)
-          const obj = Object.assign(this.ruleForm, this.dataForm)
-          const { code, message } = await GeneralDataReception({
-            serviceId: SERVICE_ID.accountScId,
-            dataContent: JSON.stringify(obj),
+          const { code, message } = await changeSecpasswd({
+            userId: sessionStorage.getItem('User_Id'),
+            newPassword: this.dataForm.again,
           });
           if (code == 0) {
             this.$message.success(message);