能效诊断
This commit is contained in:
@@ -1 +1,49 @@
|
||||
能效诊断app前端
|
||||
# xtkb-app
|
||||
|
||||
## 测试环境加密修改
|
||||
*'pwd-restclient' 库 timeformatter*
|
||||
```js
|
||||
export function encryptStr(dataSource) {
|
||||
var seid = faultylabsMD5(Math.random() + '')
|
||||
seid = seid.substring(11, 27).toLowerCase()
|
||||
var sid = faultylabsMD5(seid)
|
||||
var sm2Modulus = sid.substring(11, 27).toLowerCase()
|
||||
//构建时间戳
|
||||
// debugger
|
||||
var timestamp = Date.parse(new Date()) + ''
|
||||
//使用数据+时间戳充当摘要盐值;
|
||||
var salt = '{' + dataSource + '}' + '{' + timestamp + '}'
|
||||
//SM3摘要加密
|
||||
var deg = SG_sm3encrypt(salt)
|
||||
var ciphertext = SG_sm4encrypt(salt + '&&' + deg, '40jny6ut8i0sj3cz')
|
||||
var retValue = ciphertext + 'xtkb' + seid
|
||||
//console.log(retValue);
|
||||
return retValue
|
||||
}
|
||||
export function decryptStr(dataSource) {
|
||||
return SG_sm4decrypt(dataSource, '40jny6ut8i0sj3cz')
|
||||
}
|
||||
```
|
||||
|
||||
## Project setup
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
yarn serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
yarn lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
||||
Reference in New Issue
Block a user