dev
This commit is contained in:
parent
75b735128f
commit
8c6e84d856
|
|
@ -19,6 +19,7 @@ import {ElMessage} from 'element-plus'
|
||||||
import {Plus} from '@element-plus/icons-vue'
|
import {Plus} from '@element-plus/icons-vue'
|
||||||
import {defineModel, onMounted, ref, watch} from 'vue'
|
import {defineModel, onMounted, ref, watch} from 'vue'
|
||||||
import {loadConfig} from "@/utils/config.ts";
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
const imageName = defineModel()
|
const imageName = defineModel()
|
||||||
const imageUrl = ref<any>()
|
const imageUrl = ref<any>()
|
||||||
|
|
@ -26,7 +27,7 @@ const uploadUrl= ref<any>()
|
||||||
const getImageUrl = (imageName:any) => {
|
const getImageUrl = (imageName:any) => {
|
||||||
if (!imageName) return
|
if (!imageName) return
|
||||||
loadConfig().then(res => {
|
loadConfig().then(res => {
|
||||||
imageUrl.value = res.base_url + 'file/getImage/' + imageName
|
imageUrl.value = res.base_url + API.Common.File.GetImage+'/'+ imageName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const emit = defineEmits(['uploadSuccess'])
|
const emit = defineEmits(['uploadSuccess'])
|
||||||
|
|
@ -48,7 +49,7 @@ const beforeUpload = (file: any) => {
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadConfig().then((res: any) => {
|
loadConfig().then((res: any) => {
|
||||||
uploadUrl.value = res.base_url + "file/upload";
|
uploadUrl.value = res.base_url + API.Common.File.Upload;
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
watch(imageName,(newValue)=>{
|
watch(imageName,(newValue)=>{
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const init = async () => {
|
||||||
list.value.forEach((item: any) => {
|
list.value.forEach((item: any) => {
|
||||||
if (item.k == "logoUrl") {
|
if (item.k == "logoUrl") {
|
||||||
loadConfig().then((res: any) => {
|
loadConfig().then((res: any) => {
|
||||||
imageUrl.value = res.base_url + API.Common.File.GetImage + item.val
|
imageUrl.value = res.base_url + API.Common.File.GetImage + '/' + item.val
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue