+ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7053c49 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.{js,jsx,ts,tsx,vue}] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..b040716 --- /dev/null +++ b/.env.development @@ -0,0 +1,14 @@ +# 开发环境配置 +ENV = 'development' + +# 定义变量 +VUE_APP_CITY_TYPE = '' + +# 开发环境接口调用前缀 +# VUE_APP_BASE_API = '/dev-api' + +# base api +# VUE_APP_API_PREFIX = '/portal' +# VUE_APP_BASE_API = '/portal' +VUE_APP_BASE_API = 'http://192.168.98.115:9012' +# VUE_APP_GATEWAY = '/proxy-ah' diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..05754bd --- /dev/null +++ b/.env.production @@ -0,0 +1,19 @@ + +# 标识为生产环境 +NODE_ENV=production + + +# 测试0 生产1 +VUE_APP_ENV = '1' +# 定义变量 +VUE_APP_CITY_TYPE = 'nx' + +# base api +VUE_APP_BASE_API = '' +# VUE_APP_GATEWAY = '/ferry_service/ferryController/conveyor' + +# 以下三个配置用于本地代码直接发到手机上离线测试, 把 NODE_ENV=production 注释掉就行 +#NODE_ENV=development +#VUE_APP_BASE_API = 'http://10.134.200.200:17001' +#VUE_APP_ISENCRYPTION='no' + diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..e6529fc --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +build/*.js +src/assets +public +dist diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5df47ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +.DS_Store +node_modules +/dist +/1000114 + + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +dist.zip + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..00fbdb1 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "semi": false, + "singleQuote": true +} \ No newline at end of file diff --git a/README.md b/README.md index c8a0fd2..0210b69 100644 --- a/README.md +++ b/README.md @@ -1 +1,49 @@ -能效诊断app前端 \ No newline at end of file +# 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/). diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..ee4d6f9 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,25 @@ +const path = require('path') +module.exports = { + presets: [ + [ + '@babel/preset-env',{ + // 可以entry或者usage + useBuiltIns: 'entry', + corejs: 3, + }, + ], + ], + plugins: [ + [ + "@babel/plugin-transform-runtime", + { + corejs: false, + version: require('@babel/runtime-corejs3/package.json').version, + absoluteRuntime: path.dirname( + require.resolve('@babel/runtime-corejs3/package.json') + ) + } + ] + ] +}; + diff --git a/index.html b/index.html new file mode 100644 index 0000000..ad4a5fd --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +