diff --git a/src/api/website/home/index.js b/src/api/website/home/index.js
index 9540089..be66efe 100644
--- a/src/api/website/home/index.js
+++ b/src/api/website/home/index.js
@@ -1,4 +1,5 @@
import request from "@/utils/request";
+import { resolveStaticUrl } from "@/utils/url";
// 获取首页统计
export function getAllCount() {
@@ -54,6 +55,14 @@ export function banner(params) {
url: "/app/config/list",
method: "get",
params,
+ }).then((resp) => {
+ resp.data.map((el) => {
+ if (el.images) {
+ el.images = resolveStaticUrl(el.images);
+ }
+ return el;
+ });
+ return resp;
});
}
@@ -281,7 +290,7 @@ export const getEnterpriseMap = () =>
// /app/map/achievementMap
export const getAchievementMap = () =>
- request({
- url: "/app/map/achievementMap",
- method: "get",
- });
\ No newline at end of file
+ request({
+ url: "/app/map/achievementMap",
+ method: "get",
+ });
diff --git a/src/utils/url.js b/src/utils/url.js
new file mode 100644
index 0000000..5701ae9
--- /dev/null
+++ b/src/utils/url.js
@@ -0,0 +1,8 @@
+export const resolveStaticUrl = (url) => {
+ const fileIndex = url.indexOf("file");
+ if (fileIndex > 0) {
+ return `${import.meta.env.VITE_APP_BASE_API}/${url.substring(fileIndex)}`;
+ } else {
+ return `${import.meta.env.VITE_APP_BASE_API}/file/${url}`;
+ }
+};
diff --git a/src/views/website/activity/activity.vue b/src/views/website/activity/activity.vue
index 6970710..1a360e0 100644
--- a/src/views/website/activity/activity.vue
+++ b/src/views/website/activity/activity.vue
@@ -76,7 +76,7 @@
@@ -313,6 +313,7 @@ import {
import { ElMessage } from "element-plus";
import { getToken } from "@/utils/auth";
import { useI18n } from "vue-i18n";
+import { resolveStaticUrl } from "@/utils/url";
console.log(activeQrCode);
// import { omit } from "lodash";
diff --git a/src/views/website/solution/solution.vue b/src/views/website/solution/solution.vue
index 29e9cad..acbee1e 100644
--- a/src/views/website/solution/solution.vue
+++ b/src/views/website/solution/solution.vue
@@ -45,7 +45,7 @@
-
![]()
+
{{ item[descriptionField] }}
-
![]()
+
@@ -69,12 +69,14 @@
@click="handlePath(child.id)"
>
{{ child[titleField] }}
-
{{ child[descriptionField] }}
+
+ {{ child[descriptionField] }}
+
@@ -102,6 +104,7 @@ import { banner } from "@/api/website/home/index";
import { useRoute, useRouter } from "vue-router";
import { getCase } from "@/api/website/solution";
import { useI18n } from "vue-i18n";
+import { resolveStaticUrl } from "@/utils/url";
// import { getCategory } from "../../../api/website/solution";
const router = useRouter();
diff --git a/src/views/website/website-layout.vue b/src/views/website/website-layout.vue
index 286d5df..3f02300 100644
--- a/src/views/website/website-layout.vue
+++ b/src/views/website/website-layout.vue
@@ -21,7 +21,7 @@ const route = useRoute();
width: 100%;
.content {
width: 100%;
- padding-top: 80px;
+ padding-top: 160px;
height: 100%;
}
}
diff --git a/vite.config.js b/vite.config.js
index 4ac41ad..5f68450 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -32,7 +32,7 @@ export default defineConfig(({ mode, command }) => {
// https://cn.vitejs.dev/config/#server-proxy
"/dev-api": {
// target: "http://101.34.131.16:1618",
- target: "http://101.34.131.16:81/api",
+ target: "http://119.45.197.174:81/api",
// target: "http://192.168.0.201:1618",
// target: 'http://172.18.3.127:1618',
changeOrigin: true,