案例和课程edit treeList

This commit is contained in:
joshen@zcwytd.com
2023-08-02 18:29:20 +08:00
parent 8b6f366c6a
commit 7cb325c38d
3 changed files with 38 additions and 15 deletions

View File

@@ -1013,10 +1013,12 @@ export default {
async loadTypeData() {
let $this = this;
try {
const { result, status } = await apiType.tree(1);
if (status === 200) {
const result= await apiType.treeList(1,28,1);
const {data:{ records},code} = result
if (code === 200) {
let tree = [];
result.forEach((item, index) => {
records.forEach((item, index) => {
let newItem = {
type: 11,
id: item.id,
@@ -1029,7 +1031,7 @@ export default {
//增加死数据
item.children.push({
type: 12,
id: item.id + index,
id: item.id * (index + 200),
name: '线上品牌系列课程',
children: [],
checked: false,
@@ -1061,6 +1063,8 @@ export default {
})
}
$this.oneList.push(newItem);
console.log(newItem);
});
this.loadLocalFilters();