大屏漏洞问题修复
This commit is contained in:
parent
9406ee5413
commit
22e28b4666
|
|
@ -2,45 +2,43 @@
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
var proxyUrl =
|
var proxyUrl = (module.exports = {
|
||||||
|
dev: {
|
||||||
module.exports = {
|
// Paths
|
||||||
dev: {
|
assetsSubDirectory: 'static',
|
||||||
// Paths
|
assetsPublicPath: '/',
|
||||||
assetsSubDirectory: 'static',
|
host: 'localhost', // can be overwritten by process.env.HOST
|
||||||
assetsPublicPath: '/',
|
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
host: 'localhost', // can be overwritten by process.env.HOST
|
autoOpenBrowser: false,
|
||||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
errorOverlay: true,
|
||||||
autoOpenBrowser: false,
|
notifyOnErrors: true,
|
||||||
errorOverlay: true,
|
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||||
notifyOnErrors: true,
|
devtool: 'cheap-module-eval-source-map',
|
||||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
cacheBusting: true,
|
||||||
devtool: 'cheap-module-eval-source-map',
|
cssSourceMap: true,
|
||||||
cacheBusting: true,
|
proxyTable: {
|
||||||
cssSourceMap: true,
|
'/screen': {
|
||||||
proxyTable: {
|
// target: 'http://112.29.103.165:21626',//重庆
|
||||||
'/screen': {
|
target: 'http://192.168.2.158:49080', //测试
|
||||||
// target: 'http://112.29.103.165:21626',//重庆
|
// target: 'http://10.40.92.74:8080',
|
||||||
target: 'http://192.168.0.14:21624',//测试
|
changeOrigin: true,
|
||||||
// target: 'http://10.40.92.74:8080',
|
// secure: true, //如果是https接口,需要配置这个参数
|
||||||
changeOrigin: true,
|
pathRewrite: {
|
||||||
// secure: true, //如果是https接口,需要配置这个参数
|
'^/screen': '/',
|
||||||
pathRewrite: {
|
|
||||||
'^/screen': '/'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
build: {
|
},
|
||||||
index: path.resolve(__dirname, '../dist/index01.html'),
|
build: {
|
||||||
// Paths
|
index: path.resolve(__dirname, '../dist/index01.html'),
|
||||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
// Paths
|
||||||
assetsSubDirectory: 'static01',
|
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||||
assetsPublicPath: '/bigScrap/',
|
assetsSubDirectory: 'static01',
|
||||||
productionSourceMap: false,
|
assetsPublicPath: '/bigScrap/',
|
||||||
devtool: '#source-map',
|
productionSourceMap: false,
|
||||||
productionGzip: false,
|
devtool: '#source-map',
|
||||||
productionGzipExtensions: ['js', 'css'],
|
productionGzip: false,
|
||||||
bundleAnalyzerReport: process.env.npm_config_report
|
productionGzipExtensions: ['js', 'css'],
|
||||||
}
|
bundleAnalyzerReport: process.env.npm_config_report,
|
||||||
}
|
},
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@ var testUrl = '112.29.103.165:21624/'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"',
|
NODE_ENV: '"production"',
|
||||||
//post用当前域名
|
//post用当前域名
|
||||||
API_ROOT: '"/sgzbgl-api/"',
|
API_ROOT: '"/screen"',
|
||||||
// API_ROOT: '/sgzbgl-api/',
|
// API_ROOT: '/sgzbgl-api/',
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -22,6 +22,7 @@
|
||||||
"jquery": "^3.6.1",
|
"jquery": "^3.6.1",
|
||||||
"js-base64": "^3.6.0",
|
"js-base64": "^3.6.0",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
|
"jsencrypt": "^3.3.2",
|
||||||
"less-loader": "^4.1.0",
|
"less-loader": "^4.1.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"scss": "^0.2.4",
|
"scss": "^0.2.4",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
||||||
|
|
||||||
|
// 密钥对生成 http://web.chacuo.net/netrsakeypair
|
||||||
|
|
||||||
|
const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdHnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ=='
|
||||||
|
|
||||||
|
const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKNPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gAkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWowcSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99EcvDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthhYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3UP8iWi1Qw0Y='
|
||||||
|
|
||||||
|
// 加密
|
||||||
|
export function encrypt(txt) {
|
||||||
|
const encryptor = new JSEncrypt()
|
||||||
|
encryptor.setPublicKey(publicKey) // 设置公钥
|
||||||
|
return encryptor.encrypt(txt) // 对数据进行加密
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解密
|
||||||
|
export function decrypt(txt) {
|
||||||
|
const encryptor = new JSEncrypt()
|
||||||
|
encryptor.setPrivateKey(privateKey) // 设置私钥
|
||||||
|
return encryptor.decrypt(txt) // 对数据进行解密
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -112,6 +112,8 @@ import {
|
||||||
getSendIphoneCodeApi,
|
getSendIphoneCodeApi,
|
||||||
loginCodeApi,
|
loginCodeApi,
|
||||||
} from '../../api/userLogin'
|
} from '../../api/userLogin'
|
||||||
|
|
||||||
|
import { encrypt } from '@/untils/jsencrypt.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -182,10 +184,11 @@ export default {
|
||||||
username: this.form.userName,
|
username: this.form.userName,
|
||||||
password: this.form.passWord,
|
password: this.form.passWord,
|
||||||
}
|
}
|
||||||
|
params.password = encrypt(params.password)
|
||||||
authLoginApi(params).then((res) => {
|
authLoginApi(params).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
localStorage.setItem('token', res.data.access_token)
|
localStorage.setItem('token', res.data.access_token)
|
||||||
this.$router.push('./Home/index')
|
this.$router.push({ name: 'home' })
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg)
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue