Commit 383d71b3 authored by 高宇's avatar 高宇

初始化项目

parent bc213858
...@@ -2,24 +2,41 @@ import request from '@/utils/request' ...@@ -2,24 +2,41 @@ import request from '@/utils/request'
import { encrypt } from '@/utils/jsencrypt' import { encrypt } from '@/utils/jsencrypt'
import Qs from 'qs' import Qs from 'qs'
// 登录方法
// 登录方法 // 登录方法
export function login(username, password, code, uuid) { export function login(username, password, code, uuid) {
const data = { const data = {
username, username,
password, password
code, // code,
uuid // uuid
} }
console.log('加密前数据', data)
return request({ return request({
url: '/auth/login', url: '/auth/login',
method: 'post', method: 'post',
data: Qs.stringify({ params: data,
sign: encrypt(data) headers: {
}), 'Content-Type': 'application/x-www-form-urlencoded'
headers: {} }
}) })
} }
// export function login(username, password, code, uuid) {
// const data = {
// username,
// password,
// code,
// uuid
// }
// console.log('加密前数据', data)
// return request({
// url: '/auth/login',
// method: 'post',
// data: Qs.stringify({
// sign: encrypt(data)
// }),
// headers: {}
// })
// }
// 刷新token // 刷新token
export function refreshToken(params) { export function refreshToken(params) {
return request({ return request({
......
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` }); // this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
// this.$router.push('/welcome') // this.$router.push('/welcome')
this.$router.push('/controlPlatform/control') this.$router.push('/controlPlatform/control')
// setTimeout(this.loading =false,1000)
this.loading = false this.loading = false
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
......
...@@ -86,8 +86,9 @@ module.exports = { ...@@ -86,8 +86,9 @@ module.exports = {
// target: `http://192.168.1.31:8082/`, // target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.12:8082/`, // 孙浩 // target: `http://192.168.1.12:8082/`, // 孙浩
// target: `http://192.168.1.41:8082/`, // target: `http://192.168.1.41:8082/`,
target: `http://49.232.167.247:20014/`, // 线上 // target: `http://49.232.167.247:20014/`, // 线上
// target: `http://192.168.1.30:8082/`, // target: `http://192.168.1.30:8082/`,
target: `http://localhost:8088/`,
// target: `http://49.232.167.247:20014/`, // target: `http://49.232.167.247:20014/`,
// changeOrigin: true, // changeOrigin: true,
pathRewrite: { pathRewrite: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment