6df149af498862c811931921461ab1f0787866b9
数据资源中心高效研发框架 ADC-DA
1.官网地址
2.平台测试接口地址
3.详细使用步骤 (IDEA)
-
详细文档请参考官网,以下仅用IDEA演示
-
忽略SSL验证
git config --global http.sslVerify false -
获取源码方式有二
|-1. 用Git Bash
git clone https://60.247.58.117:50018/ADC-DA-Open/ADC-DA-2.0.git
- 若无法正常用idea运行,请将根目录下的pom.xml中的如下代码注释掉
<!-- Provided -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
<version>${spring.boot.version}</version>
</dependency>
-
访问前端页面
http://localhost:8080/index.html
layui版本框架可以直接访问,也可以采用nginx进行分离式部署 -
启动nginx (建议)
|-1. 配置nginx目录下conf目录中的nginx.conf文件,不要用记事本编辑conf文件,可以用写字板或其他编写代码的程序
|-1.1 需要配置的有 server,root,proxy_passserver { listen 8011; #前端端口号 root C:/IDEA/test/ADC-DA-2.0/adc-da-ui/src/main/resources; #项目路径,定位到adc-da-ui/main/resources,注意"/" location / { # 动态页面 后端端口号 if ( !-e $request_filename) { proxy_pass http://localhost:8080; } #root html; #index index.html index.htm; } }|-2.启动nginx 任务管理器-详细里面会有2个nginx信息
|-3. 访问 http://localhost:8011/html/index.html
|-3.1 如果可以访问 http://localhost:8011/swagger-ui.html ,不能访问index.html,则一定是root路径错误。
|-3.2若可以访问 http://localhost:8080/swagger-ui.html ,不能访问 http://localhost:8011/swagger-ui.html ,则一定是端口配置错误。
RSA非对称加密
methods: {
login () {
let pubkey = `MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKtSP3y2DkyoDQsFGr6sn4saLBFwcijEPWsWQ1Hnz8sIvn7V3TyNrSesf+7nPgnUk9Gt/7aKsXUkY67BzMJ5xkECAwEAAQ==`
let pwd = this.encryptedData(pubkey, this.loginForm.password)
let username = this.encryptedData(pubkey, this.loginForm.username)
this.$axios
.post('/login', {
username: username,
password: pwd
})
.then(successRes => {
if (successRes.data.code === 200) {
this.$store.commit('login', this.loginForm)
let path = this.$route.query.redirect
this.$router.replace({path: path === '/' || path === undefined ? '/index' : path})
}
})
.catch(failRes => {
})
},
// 加密
encryptedData (publicKey, str) {
// 私钥 和后端沟通
// 新建JSEncrypt对象
let encryptor = new JSEncrypt()
// 设置公钥
encryptor.setPublicKey(publicKey)
// 加密数据
let decrypt = encryptor.encrypt(str.toString())
return decrypt
}
}
Languages
JavaScript
78.7%
Java
18.1%
HTML
2.3%
CSS
0.9%
