Compare commits

...

1 Commits
master ... prod

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

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

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

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

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

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

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

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

@ -111,7 +111,7 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo().then(res => {
const user = res.user 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是否是一个非空数组 if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles) commit('SET_ROLES', res.roles)
commit('SET_PERMISSIONS', res.permissions) commit('SET_PERMISSIONS', res.permissions)

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

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

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

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

@ -8,7 +8,7 @@ export default {
components: { iFrame }, components: { iFrame },
data() { data() {
return { 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'], dicts: ['bms_responsibility_unit', 'bms_level', 'bms_affiliation_type', 'sys_declaration_type', 'jjh_project_type', 'template_industry', 'new_template_type'],
data() { data() {
return { return {
VUE_APP_BASE_API:process.env.VUE_APP_BASE_API, VUE_APP_BASE_API:location.origin + '/api',
size: '', size: '',
templateInfo: {}, templateInfo: {},
baseInfo: {}, baseInfo: {},

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

@ -283,7 +283,7 @@ export default {
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// //
// url: process.env.VUE_APP_BASE_API + "/jjh/jProject/export" // 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, tabHeader: undefined,
}; };

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

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

@ -137,7 +137,7 @@ export default {
formData.append("avatarfile", data, this.options.filename); formData.append("avatarfile", data, this.options.filename);
uploadAvatar(formData).then(response => { uploadAvatar(formData).then(response => {
this.open = false; 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); store.commit('SET_AVATAR', this.options.img);
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.visible = false; this.visible = false;

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

Loading…
Cancel
Save