Commit 0d845aa4 authored by wuwangwolihui's avatar wuwangwolihui

修改调整

parent 67a3b0a3
......@@ -7,8 +7,8 @@
// export const SERVER_WS_URL = "wss://123.56.237.167:20202"; // websocket
// 官网
export const SERVER_URL = 'https://api1.testgate.cn' // 正式环境
export const DEVELOPMENT_SERVER_URL = 'https://api1.testgate.cn' // 开发环境
export const SERVER_URL = 'http://api1.testgate.cn' // 正式环境
export const DEVELOPMENT_SERVER_URL = 'http://api1.testgate.cn' // 开发环境
export const SERVER_WS_URL = 'wss://api.thussat.com' // websocket
// 剑桥官网
// export const SERVER_URL = "https://api.testgate.cn"; // 正式环境
......
......@@ -49,13 +49,6 @@ const allowRequest = function (reqList, url) {
let loadingInstance = null
export function request(config) {
const identity = localStorage.getItem('index-identity')
if(config['data']){
config['data']['identify'] = identity;
}else if(config['param']){
config['param']['identify'] = identity;
}
const instance = axios.create({
baseURL: process.env.NODE_ENV === 'development' ?
DEVELOPMENT_SERVER_URL :
......@@ -64,17 +57,21 @@ export function request(config) {
})
instance.interceptors.request.use(
(config) => {
const loginUrl = '/web/auth/login'
const setAccountInfo = '/web/register/setAccountInfo'
const checkIdCard = '/web/auth/checkIdCard'
const passMsg = '/web/auth/sendPassMsg'
const loginOut = '/web/auth/loginOut'
console.log(config.url)
const loginUrl = '/web/auth/login';
const setAccountInfo = '/web/register/setAccountInfo';
const passMsgOld = '/web/auth/changePassOld';
const passMsgCode = '/web/auth/changePassCode';
const registerCode = '/web/code/registerCode';
const passwordCode = '/web/code/passwordCode';
const loginOut = '/web/auth/loginOut';
console.log(config)
if (
config.url == loginUrl ||
config.url == passMsg ||
config.url == setAccountInfo ||
config.url == checkIdCard
config.url.indexOf(loginUrl) != -1 ||
config.url.indexOf(setAccountInfo) != -1 ||
config.url.indexOf(passMsgOld) != -1 ||
config.url.indexOf(passMsgCode) != -1 ||
config.url.indexOf(registerCode) != -1 ||
config.url.indexOf(passwordCode) != -1
) {
return config
}
......
......@@ -4,18 +4,21 @@ import {
request
} from './network'
const identity = localStorage.getItem('index-identity')
// 发送注册时候验证码
export function registerCode(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/code/registerCode?phone=' + data
url: '/web/code/registerCode',
data
})
}
// 填写注册信息
export function setAccountInfo(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/register/setAccountInfo',
......@@ -25,6 +28,7 @@ export function setAccountInfo(data) {
// 获取注册信息
export function getAccountInfo(data) {
data['identity'] = identity;
return request({
method: 'post',
url: '/web/register/getAccountInfo',
......
......@@ -158,7 +158,9 @@
},
// 获取手机验证短信
getCode() {
if(!this.registerForm.phone){
return this.$message.error('请输入手机号');
}
// 倒计时60s
const TIME_COUNT = 60;
if (!this.timer) {
......
const path = require('path')
function resolve (dir) {
function resolve(dir) {
return path.join(__dirname, dir)
}
......@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost',
// port: 8080, // 端口号
// https: true, // https:{type:Boolean}
// open: true, // 配置自动启动浏览器
// hotOnly: true // 热更新
open: true, // 配置自动启动浏览器
hotOnly: true, // 热更新
// // proxy: {
// // "/api": {
// // target: "http://127.0.0.1:8080/",
......
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