Commit 0d845aa4 authored by wuwangwolihui's avatar wuwangwolihui

修改调整

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