mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
开发
This commit is contained in:
@@ -1,41 +1,43 @@
|
||||
/**课程标签模块的相关处理*/
|
||||
// import ajax from '@/utils/xajax.js'
|
||||
import http from "@/api/configPublic";
|
||||
// import http from "@/api/configPublic";
|
||||
// import {getCookieForName} from "@/api/method";
|
||||
import http from "./config";
|
||||
|
||||
/**
|
||||
* 分页查询:标签列表
|
||||
* @param {Object} query
|
||||
*/
|
||||
const portalPageList = (query = {}) => http.post(`/systemapi/xboe/m/coursetag/page`, query);
|
||||
const portalPageList = (query = {}) => http.post(`/admin/courseTag/list`, {params: query});
|
||||
|
||||
//改变标签的公共属性
|
||||
const changeTagPublic = (row = {}) => http.post(`/systemapi/xboe/m/coursetag/changePublicStatus`, {
|
||||
id: row.id,
|
||||
isPublic: row.isPublic
|
||||
const changeTagPublic = (row = {}) => http.post(`/admin/courseTag/changePublicStatus`, {
|
||||
id: row.id
|
||||
// isPublic: row.isPublic
|
||||
});
|
||||
|
||||
//改变标签的热点属性
|
||||
const changeTagHot = (row = {}) => http.post(`/systemapi/xboe/m/coursetag/changeHotStatus`, {
|
||||
id: row.id,
|
||||
isPublic: row.isHot
|
||||
const changeTagHot = (row = {}) => http.post(`/admin/courseTag/changeHotStatus`, {
|
||||
id: row.id
|
||||
// isPublic: row.isHot
|
||||
});
|
||||
|
||||
//查询指定id的标签关联的所有课程
|
||||
const showCourseByTag = (query = {}) => http.post(`/systemapi/xboe/m/coursetag/showCourseByTag`, query);
|
||||
const showCourseByTag = (query = {}) => http.post(`/admin/courseTag/showCourseByTag`, query);
|
||||
|
||||
|
||||
//解除指定id的课程和某个标签之间的关联关系
|
||||
const unbindCourseTagRelation = (params = {}) => http.post(`/systemapi/xboe/m/coursetag/unbind`, params);
|
||||
const unbindCourseTagRelation = (params = {}) => http.post(`/admin/courseTag/unbind`, params);
|
||||
|
||||
//编辑课程:标签模糊查询
|
||||
const searchTags = (params = {}) => http.post(`/systemapi/xboe/m/coursetag/searchTags`, params);
|
||||
const searchTags = (params = {}) => http.post(`/admin/courseTag/searchTags`, params);
|
||||
|
||||
|
||||
//编辑课程:创建标签(与当前课程关联)
|
||||
const createTag = (params = {}) => http.post(`/systemapi/xboe/m/coursetag/createTag`, params);
|
||||
const createTag = (params = {}) => http.post(`/admin/courseTag/createTag`, params);
|
||||
|
||||
//获取最新前10个热点标签
|
||||
const getHotTagList = (params = {}) => http.post(`/systemapi/xboe/m/coursetag/getHotTagList`, params);
|
||||
const getHotTagList = (params = {}) => http.post(`/admin/courseTag/getHotTagList`, params);
|
||||
|
||||
export default {
|
||||
portalPageList,
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageIndex"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
@@ -177,7 +177,7 @@
|
||||
:showQuickJumper="true"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="coursePageSize"
|
||||
v-model:current="courseSearchParam.pageIndex"
|
||||
v-model:current="courseSearchParam.pageNo"
|
||||
:total="courseTableTotal"
|
||||
class="pagination"
|
||||
@change="changeCoursePagination"
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
courseDialogVisible: false,
|
||||
|
||||
searchParam: {
|
||||
pageIndex: 1,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
id: "",
|
||||
tagName: "",
|
||||
@@ -213,7 +213,7 @@ export default {
|
||||
},
|
||||
|
||||
courseSearchParam: {
|
||||
pageIndex: 1,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
id: null
|
||||
},
|
||||
@@ -356,7 +356,7 @@ export default {
|
||||
state.tableLoading = true;
|
||||
try {
|
||||
const params = {
|
||||
pageIndex: state.searchParam.pageIndex,
|
||||
pageNo: state.searchParam.pageNo,
|
||||
pageSize: state.searchParam.pageSize,
|
||||
id: state.searchParam.id || undefined,
|
||||
tagName: state.searchParam.tagName || undefined,
|
||||
@@ -381,14 +381,14 @@ export default {
|
||||
|
||||
// 搜索提交
|
||||
const searchSubmit = () => {
|
||||
state.searchParam.pageIndex = 1;
|
||||
state.searchParam.pageNo = 1;
|
||||
getTagList();
|
||||
};
|
||||
|
||||
// 搜索重置
|
||||
const searchReset = () => {
|
||||
state.searchParam = {
|
||||
pageIndex: 1,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
id: "",
|
||||
tagName: "",
|
||||
@@ -399,7 +399,7 @@ export default {
|
||||
|
||||
// 分页变化
|
||||
const changePagination = (page) => {
|
||||
state.searchParam.pageIndex = page;
|
||||
state.searchParam.pageNo = page;
|
||||
getTagList();
|
||||
};
|
||||
|
||||
@@ -444,7 +444,7 @@ export default {
|
||||
const showCourseByTag = async (tagId) => {
|
||||
state.courseDialogVisible = true;
|
||||
state.courseSearchParam.id = tagId;
|
||||
state.courseSearchParam.pageIndex = 1;
|
||||
state.courseSearchParam.pageNo = 1;
|
||||
await getCourseListByTag();
|
||||
};
|
||||
|
||||
@@ -453,7 +453,7 @@ export default {
|
||||
state.courseTableLoading = true;
|
||||
try {
|
||||
const params = {
|
||||
pageIndex: state.courseSearchParam.pageIndex,
|
||||
pageNo: state.courseSearchParam.pageNo,
|
||||
pageSize: state.courseSearchParam.pageSize,
|
||||
id: state.courseSearchParam.id
|
||||
};
|
||||
@@ -482,7 +482,7 @@ export default {
|
||||
|
||||
// 课程分页变化
|
||||
const changeCoursePagination = (page) => {
|
||||
state.courseSearchParam.pageIndex = page;
|
||||
state.courseSearchParam.pageNo = page;
|
||||
getCourseListByTag();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user