Compare commits

...

1 Commits
master ... prod

Author SHA1 Message Date
吕天方 b6334291a9 修改接口为动态地址
7 months ago

@ -1,6 +1,6 @@
{
"name": "ruoyi",
"version": "1.0.202406181508",
"version": "1.0.202406201647",
"description": "金鸡湖现代服务业品牌管理系统",
"author": "若依",
"license": "MIT",

@ -60,7 +60,7 @@ export default {
},
data() {
return {
uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
uploadUrl: location.origin + '/api' + "/common/upload", //
headers: {
Authorization: "Bearer " + getToken()
},
@ -194,7 +194,7 @@ export default {
//
let length = quill.getSelection().index;
// res.url
quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName);
quill.insertEmbed(length, "image", location.origin + '/api' + res.fileName);
//
quill.setSelection(length + 1);
} else {

@ -72,8 +72,8 @@ export default {
return {
number: 0,
uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
baseUrl: location.origin + '/api',
uploadFileUrl: location.origin + '/api' + "/common/upload", //
headers: {
Authorization: "Bearer " + getToken(),
},

@ -39,7 +39,7 @@ export default {
if (isExternal(real_src)) {
return real_src;
}
return process.env.VUE_APP_BASE_API + real_src;
return location.origin + '/api' + real_src;
},
realSrcList() {
if (!this.src) {
@ -51,7 +51,7 @@ export default {
if (isExternal(item)) {
return srcList.push(item);
}
return srcList.push(process.env.VUE_APP_BASE_API + item);
return srcList.push(location.origin + '/api' + item);
});
return srcList;
},

@ -76,8 +76,8 @@ export default {
dialogImageUrl: "",
dialogVisible: false,
hideUpload: false,
baseUrl: process.env.VUE_APP_BASE_API,
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
baseUrl: location.origin + '/api',
uploadImgUrl: location.origin + '/api' + "/common/upload", //
headers: {
Authorization: "Bearer " + getToken(),
},

@ -53,7 +53,7 @@ router.beforeEach((to, from, next) => {
}).catch((err) => {
store.dispatch("LogOut").then(() => {
Message.error(err);
location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login"
location.href = location.origin + '/api' + "/system/singlelogin/login"
});
});
} else {

@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { blobValidate } from "@/utils/ruoyi";
const baseURL = process.env.VUE_APP_BASE_API
const baseURL = location.origin + '/api'
let downloadLoadingInstance;
export default {

@ -111,7 +111,7 @@ const user = {
return new Promise((resolve, reject) => {
getInfo().then(res => {
const user = res.user
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : location.origin + '/api' + user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions)

@ -16,7 +16,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: process.env.VUE_APP_BASE_API,
baseURL: location.origin + '/api',
// 超时
timeout: 10000
})

@ -96,7 +96,7 @@ export default {
info:[],
fileInfo:[],
loading:false,
VUE_APP_BASE_API:process.env.VUE_APP_BASE_API,
VUE_APP_BASE_API:location.origin + '/api',
}
},
mounted() {

@ -174,7 +174,7 @@ export default {
},
title:"导入企业",
infoVisible:false,
baseUrl: process.env.VUE_APP_BASE_API,
baseUrl: location.origin + '/api',
//
upload: {
//
@ -184,7 +184,7 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/system/enterpriseBasicInfo/importEnterprise"
url: location.origin + '/api' + "/system/enterpriseBasicInfo/importEnterprise"
},
fileList: [],
number: 0,

@ -147,6 +147,7 @@ export default {
},
},
created() {
console.log(process.env.VUE_APP_BASE_API);
this.getCode();
this.getCookie();
},
@ -174,7 +175,7 @@ export default {
},
handleLogin() {
if(this.userType == '01') {
location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login"
location.href = location.origin + '/api' + "/system/singlelogin/login"
} else {
this.$refs.loginForm.validate((valid) => {
if (valid) {

@ -8,7 +8,7 @@ export default {
components: { iFrame },
data() {
return {
url: process.env.VUE_APP_BASE_API + "/druid/login.html"
url: location.origin + '/api' + "/druid/login.html"
};
},
};

@ -1945,7 +1945,7 @@ export default {
dicts: ['bms_responsibility_unit', 'bms_level', 'bms_affiliation_type', 'sys_declaration_type', 'jjh_project_type', 'template_industry', 'new_template_type'],
data() {
return {
VUE_APP_BASE_API:process.env.VUE_APP_BASE_API,
VUE_APP_BASE_API:location.origin + '/api',
size: '',
templateInfo: {},
baseInfo: {},

@ -714,7 +714,7 @@ export default {
name:"updataChange",
data() {
return {
VUE_APP_BASE_API:process.env.VUE_APP_BASE_API,
VUE_APP_BASE_API:location.origin + '/api',
openCity: false,
enterpriseInfo: {},
form:{

@ -283,7 +283,7 @@ export default {
headers: { Authorization: "Bearer " + getToken() },
//
// url: process.env.VUE_APP_BASE_API + "/jjh/jProject/export"
url: process.env.VUE_APP_BASE_API + "/jjh/jProject/importTemplateProject"
url: location.origin + '/api' + "/jjh/jProject/importTemplateProject"
},
tabHeader: undefined,
};

@ -161,7 +161,7 @@ export default {
info:[],
fileInfo:[],
loading:false,
VUE_APP_BASE_API:process.env.VUE_APP_BASE_API,
VUE_APP_BASE_API:location.origin + '/api',
}
},
mounted() {

@ -431,7 +431,7 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
url: location.origin + '/api' + "/system/user/importData"
},
//
queryParams: {

@ -137,7 +137,7 @@ export default {
formData.append("avatarfile", data, this.options.filename);
uploadAvatar(formData).then(response => {
this.open = false;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.options.img = location.origin + '/api' + response.imgUrl;
store.commit('SET_AVATAR', this.options.img);
this.$modal.msgSuccess("修改成功");
this.visible = false;

@ -8,7 +8,7 @@ export default {
components: { iFrame },
data() {
return {
url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html"
url: location.origin + '/api' + "/swagger-ui/index.html"
};
},
};

Loading…
Cancel
Save