明树Git Lab

Commit 0eba9273 authored by zfp1's avatar zfp1

update

parent c954ede1
Pipeline #104022 passed with stage
in 3 seconds
......@@ -13,7 +13,7 @@ async function createResource(req, res, next) {
ret = ret.toJSON();
console.log(ret);
if (body.resourceInfos && body.resourceInfos.length && ret.id) {
if(type == 1){
if(body.type == 1){
let ris = [];
for (let index = 0; index < body.resourceInfos.length; index++) {
const element = body.resourceInfos[index];
......@@ -22,7 +22,7 @@ async function createResource(req, res, next) {
}
console.log(ris, "===")
await DB.ResourcesInfo.bulkCreate(ris);
} else if(type == 2) {
} else if(body.type == 2) {
//树结构
let ris = [];
let data = utils.flattenTreeIterative(body.resourceInfos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment