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