Commit 260ac4c5 by 弓厶

调整网络地址

parent fe37a3d2
...@@ -12,7 +12,7 @@ const local = { ...@@ -12,7 +12,7 @@ const local = {
'^/api/auth/ciop': '/auth/ciop' '^/api/auth/ciop': '/auth/ciop'
} }
}, },
'/api/api/ciop': { /*'/api/api/ciop': {
target: 'http://localhost:11091', target: 'http://localhost:11091',
//target: 'http://132.97.54.60:58334', //target: 'http://132.97.54.60:58334',
ws: false, ws: false,
...@@ -41,6 +41,16 @@ const local = { ...@@ -41,6 +41,16 @@ const local = {
//默认所有请求都加了api前缀,需要去掉 //默认所有请求都加了api前缀,需要去掉
'^/api/app': '/' '^/api/app': '/'
} }
},*/
'/api/manager': {
target: 'http://localhost:10001',
ws: false,
changeOrigin: true,
pathRewrite: {
//默认所有请求都加了api前缀,需要去掉
'^/api/manager': '/manager'
}
} }
} }
} }
......
server_tokens off; server_tokens off;
server { server {
listen 11090; listen 11090;
server_name 172.18.101.171; server_name 172.18.101.171;
client_max_body_size 100M; client_max_body_size 100M;
proxy_connect_timeout 180; proxy_connect_timeout 180;
proxy_read_timeout 180; proxy_read_timeout 180;
proxy_send_timeout 180; proxy_send_timeout 180;
location / { location / {
root /etc/nginx/html; root /etc/nginx/html;
} }
location /auth {
proxy_pass http://gateway:10001/auth;
}
# 后端管理接口
location /manager {
proxy_pass http://gateway:10001/manager;
}
# 新用户模块
location /auth { # 老用户模块
proxy_pass http://gateway:10001/auth;
}
# 后端管理接口
location /manager {
proxy_pass http://gateway:10001/manager;
}
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
location = /50x.html { location = /50x.html {
root html; root html;
}
} }
}
import {postAction,getAotion} from '@/api/manage' import {postAction,getAotion} from '@/api/manage'
const prefix = '/api/ciop'; const prefix = '/manager/ciop';
// 获取活动列表 // 获取活动列表
let findByList = (params) => postAction(prefix + "/school/partner/list" , params); let findByList = (params) => postAction(prefix + "/school/partner/list" , params);
......
...@@ -6,10 +6,12 @@ import {Modal, notification} from 'ant-design-vue' ...@@ -6,10 +6,12 @@ import {Modal, notification} from 'ant-design-vue'
import { ACCESS_TOKEN } from "@/store/mutation-types" import { ACCESS_TOKEN } from "@/store/mutation-types"
import { serialize } from '@/utils/util' import { serialize } from '@/utils/util'
const env = process.env.NODE_ENV; //获取当前环境 //获取当前环境
const env = process.env.NODE_ENV;
let api = "/" + window.wsPackName; let api = "/" + window.wsPackName;
if(env === 'development'){ //测试环境默认添加前缀 if(env === 'development'){
//测试环境默认添加前缀
api = '/api/' + window.wsPackName; api = '/api/' + window.wsPackName;
} }
// 创建 axios 实例 // 创建 axios 实例
......
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