diff --git a/vueHomilyLink/src/api/ChannelApi.js b/vueHomilyLink/src/api/ChannelApi.js new file mode 100644 index 0000000..acfb155 --- /dev/null +++ b/vueHomilyLink/src/api/ChannelApi.js @@ -0,0 +1,22 @@ +import service from "."; + +const ChannelApi = { + //获取频道列表 + getchannels(){ + return service.get('/list'); + }, + //获取shows列表 + getShows(Id,UserId,FlagType){ + return service.post('/channel',{Id,UserId,FlagType}); + }, + //订阅状态 + subscribe(Id,UserId){ + return service.post('/subscription',{Id,UserId}) + }, + //取消订阅 + unSubscribe(Id,UserId){ + return service.delete('/subscription',{Id,UserId}) + } + +} +export default ChannelApi; \ No newline at end of file diff --git a/vueHomilyLink/src/api/index.js b/vueHomilyLink/src/api/index.js index f4a660c..e8e7453 100644 --- a/vueHomilyLink/src/api/index.js +++ b/vueHomilyLink/src/api/index.js @@ -4,7 +4,7 @@ const service = axios.create({ // baseURL: 'http://192.168.9.19:8080', baseURL: '/api' }); - +// http://192.168.8.191:8080 //Axios的响应拦截器.. service.interceptors.response.use(resp => { diff --git a/vueHomilyLink/src/views/ChannelView.vue b/vueHomilyLink/src/views/ChannelView.vue index 4cceea3..dd62036 100644 --- a/vueHomilyLink/src/views/ChannelView.vue +++ b/vueHomilyLink/src/views/ChannelView.vue @@ -1,38 +1,16 @@ @@ -172,14 +96,15 @@ function submit() {
- +
- - + + @@ -198,12 +123,24 @@ function submit() {
- - - + + +
+ -
+ + +
  • @@ -237,6 +174,80 @@ function submit() {
+ +
+
    + +
  • +
    + +
    + 视频缩略图 +
    + {{ show.videoDuration }} +
    +
    + +
    + +

    {{ show.name }}

    + +
    + +
    + +
    {{ show.user.username }}
    +
    + + {{ show.comments }}评论 + +
    {{ show.releaseTime }} +
    +
    +
    +
    +
  • +
+
+ + +
+
    + +
  • +
    + +
    + 视频缩略图 +
    + {{ show.videoDuration }} +
    +
    + +
    + +

    {{ show.name }}

    + +
    + +
    + +
    {{ show.user.username }}
    +
    + + {{ show.comments }}评论 + +
    {{ show.releaseTime }} +
    +
    +
    +
    +
  • +
+
+ + +
@@ -400,9 +411,8 @@ function submit() { } .active { - color: red; + color: red; border-bottom: 2px solid red; - /* 修正了属性名中的空格 */ } .list-display { diff --git a/vueHomilyLink/vite.config.js b/vueHomilyLink/vite.config.js index 26696aa..a44a510 100644 --- a/vueHomilyLink/vite.config.js +++ b/vueHomilyLink/vite.config.js @@ -23,5 +23,5 @@ export default defineConfig({ rewrite: (path) => path.replace(/^\/api/, '') } } - }, + } })