system-phone 3.1.53 → 3.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-phone",
3
- "version": "3.1.53",
3
+ "version": "3.1.55",
4
4
  "description": "手机模块 前端组件",
5
5
  "author": "何宁社 <524395609@qq.com>",
6
6
  "license": "ISC",
@@ -35,6 +35,7 @@
35
35
  "babel-preset-stage-2": "^6.0.0",
36
36
  "chai": "^3.5.0",
37
37
  "co": "^4.6.0",
38
+ "bcryptjs": "^2.4.3",
38
39
  "connect-history-api-fallback": "^1.1.0",
39
40
  "cross-env": "^1.0.7",
40
41
  "cross-spawn": "^2.1.5",
@@ -59,7 +59,7 @@
59
59
  * globle 校验参数 Device_IEMI 是否需要校验设备iemi编码
60
60
  *
61
61
  */
62
-
62
+ import bcrypt from 'bcryptjs';
63
63
  import Vue from 'vue'
64
64
  import * as Util from '../Util'
65
65
  import JSEncrypt from 'jsencrypt'
@@ -238,11 +238,16 @@ export default {
238
238
  let loginData = {}
239
239
  try {
240
240
  let ret = {}
241
+ let loginData = {
242
+ username: this.ename,
243
+ password: this.password,
244
+ resourceName: '手机服务'
245
+ }
246
+ if (Vue.passwordEncryption){
247
+ loginData.password = bcrypt.hashSync(this.password, 10)
248
+ }
241
249
  try {
242
- ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-auth/login`, {
243
- username: this.ename, password: this.password,
244
- resourceName: '手机服务'
245
- }, {
250
+ ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-auth/login`, loginData, {
246
251
  resolveMsg: null,
247
252
  rejectMsg: null,
248
253
  headerConfig: {'Content-type': 'application/json'}