old mode 100644
new mode 100755
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import crypto from 'crypto' | 
|---|
|  |  |  | import userService from "../service/UserService"; | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: "changePassword", | 
|---|
|  |  |  | props: {}, | 
|---|
|  |  |  | 
|---|
|  |  |  | password: this.newPassword | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }).then((res)=> { | 
|---|
|  |  |  | if (res.data === "success"){ | 
|---|
|  |  |  | if (res.data.code === 0) { | 
|---|
|  |  |  | this.$message({ | 
|---|
|  |  |  | showClose: true, | 
|---|
|  |  |  | message: '修改成功,请重新登录', | 
|---|
|  |  |  | 
|---|
|  |  |  | this.showDialog = false; | 
|---|
|  |  |  | setTimeout(()=>{ | 
|---|
|  |  |  | // 删除cookie,回到登录页面 | 
|---|
|  |  |  | this.$cookies.remove("session"); | 
|---|
|  |  |  | userService.clearUserInfo(); | 
|---|
|  |  |  | this.$router.push('/login'); | 
|---|
|  |  |  | this.sseSource.close(); | 
|---|
|  |  |  | },800) | 
|---|