Commit 518f0b0265a9477cb1b9b33bdc6d256e79af028f
1 parent
ac45e4f6
回滚修复登陆的bug时不必修改的代码
Showing
4 changed files
with
2 additions
and
11 deletions
web_src/package-lock.json
| @@ -5175,11 +5175,6 @@ | @@ -5175,11 +5175,6 @@ | ||
| 5175 | "integrity": "sha1-9OaGxd4eofhn28rT1G2WlCjfmMQ=", | 5175 | "integrity": "sha1-9OaGxd4eofhn28rT1G2WlCjfmMQ=", |
| 5176 | "dev": true | 5176 | "dev": true |
| 5177 | }, | 5177 | }, |
| 5178 | - "js-md5": { | ||
| 5179 | - "version": "0.7.3", | ||
| 5180 | - "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz", | ||
| 5181 | - "integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==" | ||
| 5182 | - }, | ||
| 5183 | "js-tokens": { | 5178 | "js-tokens": { |
| 5184 | "version": "3.0.2", | 5179 | "version": "3.0.2", |
| 5185 | "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", | 5180 | "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", |
web_src/package.json
| @@ -15,7 +15,6 @@ | @@ -15,7 +15,6 @@ | ||
| 15 | "core-js": "^2.6.5", | 15 | "core-js": "^2.6.5", |
| 16 | "echarts": "^4.7.0", | 16 | "echarts": "^4.7.0", |
| 17 | "element-ui": "2.10.1", | 17 | "element-ui": "2.10.1", |
| 18 | - "js-md5": "^0.7.3", | ||
| 19 | "moment": "^2.29.1", | 18 | "moment": "^2.29.1", |
| 20 | "vue": "^2.6.11", | 19 | "vue": "^2.6.11", |
| 21 | "vue-clipboard2": "^0.3.1", | 20 | "vue-clipboard2": "^0.3.1", |
web_src/src/components/Login.vue
| @@ -18,6 +18,7 @@ | @@ -18,6 +18,7 @@ | ||
| 18 | </template> | 18 | </template> |
| 19 | 19 | ||
| 20 | <script> | 20 | <script> |
| 21 | +import crypto from 'crypto' | ||
| 21 | export default { | 22 | export default { |
| 22 | name: 'Login', | 23 | name: 'Login', |
| 23 | data(){ | 24 | data(){ |
| @@ -55,7 +56,7 @@ export default { | @@ -55,7 +56,7 @@ export default { | ||
| 55 | //需要想后端发送的登录参数 | 56 | //需要想后端发送的登录参数 |
| 56 | let loginParam = { | 57 | let loginParam = { |
| 57 | username: this.username, | 58 | username: this.username, |
| 58 | - password: this.$md5(this.password) | 59 | + password: crypto.createHash('md5').update(this.password, "utf8").digest('hex') |
| 59 | } | 60 | } |
| 60 | var that = this; | 61 | var that = this; |
| 61 | //设置在登录状态 | 62 | //设置在登录状态 |
web_src/src/main.js
| @@ -9,10 +9,6 @@ import VueCookies from 'vue-cookies'; | @@ -9,10 +9,6 @@ import VueCookies from 'vue-cookies'; | ||
| 9 | import echarts from 'echarts'; | 9 | import echarts from 'echarts'; |
| 10 | 10 | ||
| 11 | import VueClipboard from 'vue-clipboard2' | 11 | import VueClipboard from 'vue-clipboard2' |
| 12 | - | ||
| 13 | -import md5 from 'js-md5' | ||
| 14 | -Vue.prototype.$md5 = md5 | ||
| 15 | - | ||
| 16 | Vue.use(VueClipboard) | 12 | Vue.use(VueClipboard) |
| 17 | Vue.use(ElementUI); | 13 | Vue.use(ElementUI); |
| 18 | Vue.use(VueCookies); | 14 | Vue.use(VueCookies); |