Browse Source

接口文件

DESKTOP-O04BTUJ\muzen 2 năm trước cách đây
mục cha
commit
598a1aed76
3 tập tin đã thay đổi với 60 bổ sung52 xóa
  1. 10 10
      src/api/operation/channel.js
  2. 25 0
      src/api/operation/recommend.js
  3. 25 42
      src/api/operation/tag.js

+ 10 - 10
src/api/operation/channel.js

@@ -26,15 +26,6 @@ export function channelEdit(data) {
   })
 }
 
-// 可选频道内容列表
-export function channelList(data) {
-  return request({
-    url: `/device/channelTemplate/search`,
-    method: 'post',
-    data
-  })
-}
-
 // 规则列表
 export function page(data) {
   return request({
@@ -81,7 +72,7 @@ export function edit(data) {
 }
 
 // 频道内容列表
-export function list(data) {
+export function channelList(data) {
   return request({
     url: `/device/channelTemplate/addtemplate`,
     method: 'post',
@@ -120,3 +111,12 @@ export function devList(type) {
     method: 'post',
   })
 }
+
+// 排序
+export function change(data) {
+  return request({
+    url: `/device/channel/channel/sortEdit`,
+    method: 'post',
+    data
+  })
+}

+ 25 - 0
src/api/operation/recommend.js

@@ -70,3 +70,28 @@ export function upOrDown(id, status){
     method: 'get' 
   })
 }
+
+// 新增时间段
+export function submitTime(data) {
+  return request({
+    url: `/admin/appTime/addOrUpdate`,
+    method: 'post',
+    data
+  })
+}
+
+// 查询时间段列表
+export function timeList() {
+  return request({
+    url: `/admin/appTime/list`,
+    method: 'get'
+  })
+}
+
+// 上下架时间段
+export function changeTime(ids, status) {
+  return request({
+    url: `/admin/appTime/hitOrSold/${ids}/${status}`,
+    method: 'get'
+  })
+}

+ 25 - 42
src/api/operation/tag.js

@@ -1,36 +1,36 @@
 import request from '@/utils/request'
 
-// 标签列表
+// 列表
 export function list(data) {
   return request({
-    url: `/tag/pageList`,
-    method: 'get',
+    url: `/admin/tag/searchTagPageList`,
+    method: 'post',
     data
   })
 }
 
-// 新增标签
-export function create(data) {
+// 新增 / 编辑 一级标签
+export function submitFirst(data) {
   return request({
-    url: `/tag/addPage`,
+    url: `/admin/tag/firstAddOrUpdate`,
     method: 'post',
     data
   })
 }
 
-// 全部内容列表
-export function contentList(data) {
+// 新增 / 编辑 二级标签
+export function submitSecond(data) {
   return request({
-    url: `/tag/searchTagPage`,
+    url: `/admin/tag/secondAddOrUpdate`,
     method: 'post',
     data
   })
 }
 
-// 已添加的内容列表
-export function findList(data) {
+// 新增 / 编辑 三级标签
+export function submitThree(data){
   return request({
-    url: `/tag/findList`,
+    url: `/admin/tag/threeAddOrUpdate`,
     method: 'post',
     data
   })
@@ -39,49 +39,32 @@ export function findList(data) {
 // 标签详情
 export function detail(id) {
   return request({
-    url: `/tag/findDeatilById/${id}`,
+    url: `/admin/tag/findDeatilById/${id}`,
     method: 'get'
   })
 }
 
-// 编辑标签
-export function edit(data) {
+// 标签上下架
+export function change(id, status) {
   return request({
-    url: `/tag/editPage`,
-    method: 'post',
-    data
-  })
-}
-
-// 新增频道内容
-export function createTag(data) {
-  return request({
-    url: `/tag/addtagPage`,
-    method: 'post',
-    data
+    url: `/admin/tag/hitOrSold/${id}/${status}`,
+    method: 'get'
   })
 }
 
-// 删除已选的频道内容
-export function remove(id) {
+// 删除标签
+export function remove(id){
   return request({
-    url: `/tag/delete/${id}`,
+    url: `/admin/tag/remove/${id}`,
     method: 'delete'
   })
 }
 
-// 删除列表标签
-export function getRemove(id) {
+// 关联内容
+export function contentList(data){
   return request({
-    url: `/tag/remove/${id}`,
-    method: 'get'
-  })
-}
-
-// 删除子标签
-export function removeChildren(id) {
-  return request({
-    url: `/tag/removeChildren/${id}`,
-    method: 'get'
+    url: `/admin/tag/searchTagPage`,
+    method: 'post',
+    data
   })
 }