diff --git a/.env.prod b/.env.prod index 2cc59cb..eafe2a3 100644 --- a/.env.prod +++ b/.env.prod @@ -1 +1,2 @@ VITE_APP_API_BASE_URL=https://guozhan.szjixun.cn/api/ +VITE_ERP_API_BASE_URL=https://erpapi.fontree.cn/ \ No newline at end of file diff --git a/.env.test b/.env.test index 3f0abb6..1d638f1 100644 --- a/.env.test +++ b/.env.test @@ -1 +1,2 @@ VITE_APP_API_BASE_URL=http://172.16.100.93:8004/api/ +VITE_ERP_API_BASE_URL=http://114.218.158.24:9020/ \ No newline at end of file diff --git a/src/views/workinfo/index.vue b/src/views/workinfo/index.vue index bec1356..b76a290 100644 --- a/src/views/workinfo/index.vue +++ b/src/views/workinfo/index.vue @@ -2,22 +2,34 @@ import { ref,onMounted } from 'vue'; import { useRoute } from 'vue-router'; import { showImagePreview } from 'vant'; - +import axios from 'axios'; const info = ref({ - title: "家山树几棵", - image: "https://e-cdn.fontree.cn/exhibition/prod/default/国展报名/0737054f-b2c7-4c92-8e75-1100faca19da.png", - artist: "李甜甜02", - size: "2400cmX54656cm", + title: "", + image: "", + artist: "", + size: "", year: "", - type: "中国画", - material: "宣纸", + type: "", + material: "", appreciation: "" }); const route = useRoute(); onMounted(() => { if(route.query.info){ - info.value = JSON.parse(decodeURIComponent(route.query.info)); + axios({ + method: 'post', + url: `${import.meta.env.VITE_ERP_API_BASE_URL}exhibition/get-info-byUuid`, + data: { + uuid: decodeURIComponent(route.query.info) + } + }).then(res => { + if(res.data.code === 0){ + info.value = res.data.data; + } + }); } + + });