暂提
This commit is contained in:
parent
68b9524cce
commit
3c2563e3d1
@ -4,7 +4,7 @@ const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
|
||||
|
||||
export const JL3D_LOCAL_STATIC = publicPath+"/static";
|
||||
const BASE_UPLOAD_API = process.env.VUE_APP_UPLOAD_API;
|
||||
export const BASE_ASSET_API = process.env.VUE_APP_VOICE_API;
|
||||
export const BASE_ASSET_API = this.$store.user.state.resourcesUrl;
|
||||
// console.log(JL3D_LOCAL_STATIC);
|
||||
// console.log(BASE_UPLOAD_API);
|
||||
// console.log(BASE_ASSET_API);
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
size: 3,
|
||||
action: `${process.env.VUE_APP_UPLOAD_API}/api/upload/PICTURE?appId=00001&appSecret=joylink00001`,
|
||||
response: (res) => {
|
||||
return `${process.env.VUE_APP_VOICE_API}${res.data}`;
|
||||
return `${this.$store.user.state.resourcesUrl}${res.data}`;
|
||||
},
|
||||
error: () => { that.$message.error('图片上传失败,请检查网络状态'); },
|
||||
sizeError: () => { that.$message.error('图片上传失败,图片大小限制3MB'); } // 图片超过大小的回调
|
||||
|
@ -95,6 +95,9 @@ router.beforeEach( async (to, from, next) => {
|
||||
} else {
|
||||
store.dispatch('setBaseUrl', getBaseUrl());
|
||||
}
|
||||
if (resp && resp.data && resp.data.resourcesDomainName) {
|
||||
store.dispatch('setResourcesUrl', resp.data.resourcesDomainName);
|
||||
}
|
||||
} catch (e) {
|
||||
store.dispatch('setBaseUrl', getBaseUrl());
|
||||
}
|
||||
|
@ -21,7 +21,8 @@ const user = {
|
||||
companyAdmin: false,
|
||||
companyName: '',
|
||||
companyProjectList: [],
|
||||
baseUrl:''
|
||||
baseUrl:'',
|
||||
resourcesUrl: process.env.VUE_APP_VOICE_API
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@ -216,7 +217,7 @@ const user = {
|
||||
setBaseUrl ({commit}, baseUrl) {
|
||||
commit('setBaseUrl', baseUrl);
|
||||
},
|
||||
setResourcesUrl({}, resourcesUrl) {
|
||||
setResourcesUrl({commit}, resourcesUrl) {
|
||||
commit('setResourcesUrl', resourcesUrl);
|
||||
},
|
||||
setToken({commit}, token) {
|
||||
|
@ -95,7 +95,7 @@ export default {
|
||||
resultMap: {},
|
||||
loading: false,
|
||||
audioPlayId: '',
|
||||
baseUrl:process.env.VUE_APP_VOICE_API
|
||||
baseUrl:this.$store.user.state.resourcesUrl
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -84,7 +84,7 @@ export default {
|
||||
recordSendingId: null,
|
||||
audioDataMap: {},
|
||||
audioPlayId: '',
|
||||
baseUrl:process.env.VUE_APP_VOICE_API
|
||||
baseUrl:this.$store.user.state.resourcesUrl
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -56,7 +56,7 @@ export default {
|
||||
});
|
||||
|
||||
uploadFile(action, that.formData).then(resp => {
|
||||
const imgUrl = process.env.VUE_APP_VOICE_API + resp.data;
|
||||
const imgUrl = this.$store.user.state.resourcesUrl + resp.data;
|
||||
insertImgFn(imgUrl);
|
||||
}).catch(error => { console.log(error); });
|
||||
};
|
||||
|
@ -204,7 +204,7 @@ export default {
|
||||
},
|
||||
avatarUrl(val) {
|
||||
if (val && val.creatorAvatarPath) {
|
||||
return process.env.VUE_APP_VOICE_API + val.creatorAvatarPath;
|
||||
return this.$store.user.state.resourcesUrl + val.creatorAvatarPath;
|
||||
} else {
|
||||
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ export default {
|
||||
// yuyin:yuyin,
|
||||
currentAudioIndex:0,
|
||||
isPlay:false,
|
||||
baseUrl:process.env.VUE_APP_VOICE_API
|
||||
baseUrl: this.$store.user.state.resourcesUrl
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
|
Loading…
Reference in New Issue
Block a user