update
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
import { resolveStaticUrl } from "@/utils/url";
|
||||||
|
|
||||||
// 获取首页统计
|
// 获取首页统计
|
||||||
export function getAllCount() {
|
export function getAllCount() {
|
||||||
@ -54,6 +55,14 @@ export function banner(params) {
|
|||||||
url: "/app/config/list",
|
url: "/app/config/list",
|
||||||
method: "get",
|
method: "get",
|
||||||
params,
|
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
|
// /app/map/achievementMap
|
||||||
export const getAchievementMap = () =>
|
export const getAchievementMap = () =>
|
||||||
request({
|
request({
|
||||||
url: "/app/map/achievementMap",
|
url: "/app/map/achievementMap",
|
||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
|
|||||||
8
src/utils/url.js
Normal file
8
src/utils/url.js
Normal file
@ -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}`;
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -76,7 +76,7 @@
|
|||||||
<div class="_l">
|
<div class="_l">
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 358px; height: 220px; vertical-align: middle"
|
style="width: 358px; height: 220px; vertical-align: middle"
|
||||||
:src="item.image"
|
:src="resolveStaticUrl(item.image)"
|
||||||
fit="fill"
|
fit="fill"
|
||||||
></el-image>
|
></el-image>
|
||||||
</div>
|
</div>
|
||||||
@ -313,6 +313,7 @@ import {
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { resolveStaticUrl } from "@/utils/url";
|
||||||
|
|
||||||
console.log(activeQrCode);
|
console.log(activeQrCode);
|
||||||
// import { omit } from "lodash";
|
// import { omit } from "lodash";
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<div class="_info conter1000">
|
<div class="_info conter1000">
|
||||||
<div v-if="isOddEvenNumber(index)" class="_r">
|
<div v-if="isOddEvenNumber(index)" class="_r">
|
||||||
<img :src="item.image" alt srcset />
|
<img :src="resolveStaticUrl(item.image)" alt srcset />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="isOddEvenNumber(index) ? '_paddingl' : '_paddingr'"
|
:class="isOddEvenNumber(index) ? '_paddingl' : '_paddingr'"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<p>{{ item[descriptionField] }}</p>
|
<p>{{ item[descriptionField] }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isOddEvenNumber(index)" class="_r">
|
<div v-if="!isOddEvenNumber(index)" class="_r">
|
||||||
<img :src="item.image" alt srcset />
|
<img :src="resolveStaticUrl(item.image)" alt srcset />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="_list conter1400">
|
<div class="_list conter1400">
|
||||||
@ -69,12 +69,14 @@
|
|||||||
@click="handlePath(child.id)"
|
@click="handlePath(child.id)"
|
||||||
>
|
>
|
||||||
<el-image
|
<el-image
|
||||||
:src="child.image"
|
:src="resolveStaticUrl(child.image)"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
style="width: 100%; height: 135px"
|
style="width: 100%; height: 135px"
|
||||||
></el-image>
|
></el-image>
|
||||||
<div class="_head text_hidden">{{ child[titleField] }}</div>
|
<div class="_head text_hidden">{{ child[titleField] }}</div>
|
||||||
<div class="_detail text_hidden">{{ child[descriptionField] }}</div>
|
<div class="_detail text_hidden">
|
||||||
|
{{ child[descriptionField] }}
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="_liBtn text-right">
|
<div class="_liBtn text-right">
|
||||||
@ -102,6 +104,7 @@ import { banner } from "@/api/website/home/index";
|
|||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { getCase } from "@/api/website/solution";
|
import { getCase } from "@/api/website/solution";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { resolveStaticUrl } from "@/utils/url";
|
||||||
// import { getCategory } from "../../../api/website/solution";
|
// import { getCategory } from "../../../api/website/solution";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
@ -21,7 +21,7 @@ const route = useRoute();
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
.content {
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 80px;
|
padding-top: 160px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
"/dev-api": {
|
"/dev-api": {
|
||||||
// target: "http://101.34.131.16:1618",
|
// 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://192.168.0.201:1618",
|
||||||
// target: 'http://172.18.3.127:1618',
|
// target: 'http://172.18.3.127:1618',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user