Commit e162ac1a authored by 赵啸非's avatar 赵啸非

修改地址动态获取

parent b3f8ab18
...@@ -10,3 +10,5 @@ VUE_APP_WEBSOCKET_API =127.0.0.1:18222/m ...@@ -10,3 +10,5 @@ VUE_APP_WEBSOCKET_API =127.0.0.1:18222/m
# 门户登录地址 # 门户登录地址
VUE_APP_PORTAL_URL = /portal_home VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 11089
...@@ -10,3 +10,4 @@ VUE_APP_WEBSOCKET_API = ...@@ -10,3 +10,4 @@ VUE_APP_WEBSOCKET_API =
# 门户登录地址 # 门户登录地址
VUE_APP_PORTAL_URL = /portal_home VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 11089
...@@ -4,3 +4,5 @@ VUE_APP_API_BASE_URL=/basics_api ...@@ -4,3 +4,5 @@ VUE_APP_API_BASE_URL=/basics_api
#图片地址拼接 #图片地址拼接
VUE_APP_PORTAL_URL = /portal_home VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 11089
...@@ -28,10 +28,6 @@ export default { ...@@ -28,10 +28,6 @@ export default {
res.entity = this.util_toDateStr(res.entity, this.toDate); res.entity = this.util_toDateStr(res.entity, this.toDate);
this.form = Object.assign({}, this.form, res.entity); this.form = Object.assign({}, this.form, res.entity);
this.dict = Object.assign({}, this.dict, res.dict); this.dict = Object.assign({}, this.dict, res.dict);
console.log("entity",res.entity)
this.afterRender(res); this.afterRender(res);
}) })
.catch(error => { .catch(error => {
...@@ -42,7 +38,7 @@ export default { ...@@ -42,7 +38,7 @@ export default {
clearTimeout(this.loadingTimer); clearTimeout(this.loadingTimer);
this.loadingTimer = setTimeout(() => { this.loadingTimer = setTimeout(() => {
this.loading = false; this.loading = false;
}, 300); }, 500);
}) })
}, },
......
...@@ -24,6 +24,13 @@ const instance = axios.create({ ...@@ -24,6 +24,13 @@ const instance = axios.create({
instance.interceptors.request.use(config => { instance.interceptors.request.use(config => {
// 获取当前页面的主机名和端口号
const hostname = location.hostname;
//const port = location.port;
const port =process.env.VUE_APP_PORTAL_PORT=='undefined'?'11089':process.env.VUE_APP_PORTAL_PORT;
// 动态修改请求地址
config.url = `http://${hostname}:${port}/${config.url}`;
//config.data = Qs.stringify(config.data, {arrayFormat: 'repeat', allowDots: true}); //config.data = Qs.stringify(config.data, {arrayFormat: 'repeat', allowDots: true});
//config.data = Qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true}); //config.data = Qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true});
//brackets //brackets
......
...@@ -30,7 +30,13 @@ ...@@ -30,7 +30,13 @@
<i class="el-icon-arrow-down el-icon--right"></i> <i class="el-icon-arrow-down el-icon--right"></i>
</span> --> </span> -->
<!--
<i class="el-icon-s-home" style="font-size: 15px;margin-right: 10px" > 返回门户</i> <i class="el-icon-s-home" style="font-size: 15px;margin-right: 10px" > 返回门户</i>
-->
<!--
<el-link class="el-icon-s-home" style="font-size: 15px;margin-right: 10px" @click="returnHome" > 返回门户</el-link>
-->
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link" style="color:white"> <span class="el-dropdown-link" style="color:white">
...@@ -74,6 +80,9 @@ ...@@ -74,6 +80,9 @@
export default { export default {
name: "Header", name: "Header",
methods: { methods: {
returnHome(){
window.close();
},
handleCommand(key) { handleCommand(key) {
if(key === 'update'){ if(key === 'update'){
this.$router.push('/login/updatePwd') this.$router.push('/login/updatePwd')
......
...@@ -88,6 +88,24 @@ ...@@ -88,6 +88,24 @@
</properties> </properties>
</profile> </profile>
<profile>
<id>chuanshan-prod</id>
<properties>
<profiles.active>chuanshan-prod</profiles.active>
<profiles.server.port>17300</profiles.server.port>
<profiles.server.gatewayport>11078</profiles.server.gatewayport>
<profiles.server.path>/study</profiles.server.path>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov-chuanshan</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>INFO</profiles.log.level>
<package.environment>build</package.environment>
<skipUi>false</skipUi>
</properties>
</profile>
</profiles> </profiles>
<properties> <properties>
......
...@@ -60,10 +60,17 @@ public class UserSyncTaskImpl implements ITaskExcuteService { ...@@ -60,10 +60,17 @@ public class UserSyncTaskImpl implements ITaskExcuteService {
Map<String, String> headers = new HashMap<>(); Map<String, String> headers = new HashMap<>();
try { try {
String resp = HttpUtil.doGet(url, headers); String resp = HttpUtil.doGet(url, headers);
log.info("user resp:"+resp);
ApiResp<List<CustomerInfoPdu>> apiResp = JSON.parseObject(resp, new TypeReference<ApiResp<List<CustomerInfoPdu>>>() { ApiResp<List<CustomerInfoPdu>> apiResp = JSON.parseObject(resp, new TypeReference<ApiResp<List<CustomerInfoPdu>>>() {
}); });
if (apiResp.getCode() == 0) { if (apiResp.getCode() == 0) {
for (CustomerInfoPdu user : apiResp.getData()) { for (CustomerInfoPdu user : apiResp.getData()) {
if(ObjectUtils.isEmpty(user)){
log.info("user is null");
continue;
}
if("admin".equalsIgnoreCase(user.getAccount())){ if("admin".equalsIgnoreCase(user.getAccount())){
//更新超级管理员 //更新超级管理员
UserEntity userEntity = userService.get(1L); UserEntity userEntity = userService.get(1L);
......
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