Commit e17da679 authored by gh's avatar gh

'修改,'

parent 6cfab2e0
File added
No preview for this file type
import { GetUrl } from '@/api/urlconfig'
// todo: url
// 第一个参数:项目区分 ------ ''为e速报修;'yuying'为育英
// 第二个参数:正式测试区分 ------ true为正式;false为测试
const urlConfig = GetUrl('', false)
const baseUrl = '/api'
const httpUrl = urlConfig.httpUrl // 接口
const h5Url = urlConfig.h5Url // h5线上地址
// todo: url
// const httpUrl = 'http://repairtest.dxccy.com' // 测试接口
// const h5Url = 'http://repair.test.h5.dxccy.com' // 测试h5线上地址
const httpUrl = 'https://repair.dxccy.com' // 正式接口
const h5Url = 'https://repair.h5.dxccy.com' // 正式h5线上地址
// const httpUrl = 'https://repair.dxccy.com' // 正式接口
// const h5Url = 'https://repair.h5.dxccy.com' // 正式h5线上地址
// todo: 育英
// todo: url
// const httpUrl = 'https://yuyingtest.dxccy.com' // 测试接口
// const h5Url = 'http://yuying.test.h5.dxccy.com' // 测试h5线上地址
// const httpUrl = 'https://yuying.dxccy.com' // 正式接口
// const h5Url = 'https://yuying.h5.dxccy.com' // 正式h5线上地址
const wxLogin = '/api/worker/login' // 微信登录获取token、登录状态
const curScope = 'scopes=snsapi_base&type=1'
......
export function GetUrl (type = '', online) {
let httpUrl = ''
let h5Url = ''
switch (type) {
case 'yuying':
// 育英中学
if (!online) {
// 测试
httpUrl = 'http://yuyingtest.dxccy.com' // 测试接口
h5Url = 'http://yuying.test.h5.dxccy.com' // 测试h5线上地址
} else {
// 正式
httpUrl = 'https://yuying.dxccy.com' // 正式接口
h5Url = 'https://yuying.h5.dxccy.com' // 正式h5线上地址
}
break
default:
// 默认自身项目
if (!online) {
// 测试
httpUrl = 'http://repairtest.dxccy.com' // 测试接口
h5Url = 'http://repair.test.h5.dxccy.com' // 测试h5线上地址
} else {
// 正式
httpUrl = 'https://repair.dxccy.com' // 正式接口
h5Url = 'https://repair.h5.dxccy.com' // 正式h5线上地址
}
}
return { httpUrl, h5Url }
}
......@@ -157,6 +157,7 @@ router.beforeEach((to, from, next) => {
return true
} else {
console.log('ok-------3')
console.log(selfApi.WINDOWHREF_LOGIN_TOKEN, 'selfApi.WINDOWHREF_LOGIN_TOKEN--------')
// return
window.document.location = selfApi.WINDOWHREF_LOGIN_TOKEN // url-
return true
......
......@@ -61,8 +61,10 @@ module.exports = {
proxy: {
'/api/': {
// todo: url
// target: 'http://repairtest.dxccy.com/api', // 测试
target: 'https://repair.dxccy.com/api', // 正式
target: 'http://repairtest.dxccy.com/api', // 测试
// target: 'https://repair.dxccy.com/api', // 正式
// target: 'http://yuyingtest.dxccy.com/api', // 育英测试
// target: 'https://yuying.dxccy.com/api', // 育英正式
autoRewrite: true,
changeOrigin: true,
ws: true,
......
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