diff --git a/vueHomilyLink/src/api/HomeApi.js b/vueHomilyLink/src/api/HomeApi.js
index 55a665b..21e603a 100644
--- a/vueHomilyLink/src/api/HomeApi.js
+++ b/vueHomilyLink/src/api/HomeApi.js
@@ -6,7 +6,7 @@ const homeApi = {
},
//获取视频列表
getHomeVideo(){
- return service.get('/mainpage/get-videos');
+ return service.get('/mainpage/get-videos?flagType=1');
}
}
export default homeApi;
\ No newline at end of file
diff --git a/vueHomilyLink/src/api/index.js b/vueHomilyLink/src/api/index.js
index a388e65..a6ba51f 100644
--- a/vueHomilyLink/src/api/index.js
+++ b/vueHomilyLink/src/api/index.js
@@ -1,9 +1,11 @@
import axios from "axios";
const service = axios.create({
- baseURL: 'http://localhost:8080',
+ // baseURL: 'http://192.168.8.191:8080',
+ // baseURL: 'http://localhost:8080',
+ baseURL: '/api',
});
-
+// http://192.168.8.191:8080
//Axios的响应拦截器..
service.interceptors.response.use(resp => {
diff --git a/vueHomilyLink/src/views/HomeView.vue b/vueHomilyLink/src/views/HomeView.vue
index 6797f11..9a7791b 100644
--- a/vueHomilyLink/src/views/HomeView.vue
+++ b/vueHomilyLink/src/views/HomeView.vue
@@ -1,7 +1,7 @@
@@ -59,35 +97,46 @@ onMounted(() => {
推荐
- -
-
-
-
![文章图片]()
-
-
-
-
-
{{ item.title }}
-
-
- "{{ item.authorName }}"
-
-
{{ item.publishTime }}
-
-
- "{{ item.viewsCount }}"
-
-
-
- "{{ item.commentsCount }}"
-
-
-
- "{{ item.likesCount }}"
-
-
-
-
+
+
+
+
+
![文章图片]()
+
+
+
+
+
+
{{ title }}
+
+
+ {{ articleData.authorName[index] }}
+
+
+ {{ articleData.publishTime[index] }}
+
+
+
+ {{ articleData.viewsCount[index] }}
+
+
+
+ {{ articleData.commentsCount[index] }}
+
+
+
+ {{ articleData.likesCount[index] }}
+
+
+
+
@@ -215,17 +264,29 @@ body {
display: flex;
}
-.corner-mark {
+ .corner-mark {
position: absolute;
top: 0;
left: 0;
- background-color: red;
+ background-color: rgb(128, 128, 128);
color: white;
padding: 2px 5px;
border-radius: 2px;
font-size: 12px;
}
+.color-red {
+ background-color: red;
+}
+
+.color-green {
+ background-color: rgb(255, 102, 0);
+}
+
+.color-blue {
+ background-color: rgb(255, 196, 0);
+}
+
.play-time {
position: absolute;
bottom: 10%;
@@ -236,4 +297,22 @@ body {
border-radius: 2px;
font-size: 12px;
}
+
+.club {
+ position: absolute;
+ top: 0;
+ right: 0;
+ /* 可以根据实际需求调整容器大小等样式 */
+
+ width: 10px;
+ height: 10px;
+}
+.club_img img {
+ position: absolute;
+ top: 0;
+ right: 0;
+ /* 可以根据实际需求调整图片的大小等其他样式,以下是示例 */
+ width: 15px; /* 假设调整宽度 */
+ height: 15px; /* 假设调整高度 */
+ }
diff --git a/vueHomilyLink/vite.config.js b/vueHomilyLink/vite.config.js
index 4217010..3f92ffb 100644
--- a/vueHomilyLink/vite.config.js
+++ b/vueHomilyLink/vite.config.js
@@ -15,4 +15,14 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
+ server: {
+ proxy: {
+ '/api': {
+ // target: 'http://192.168.8.191:8080',
+ target: 'http://localhost:8080',
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/api/, '')
+ }
+ }
+ }
})