|
@@ -42,7 +42,39 @@ async function getLibNamesAndFirstLib(data) {
|
|
|
|
|
|
|
|
|
async function copyTemplateLib(userID, userName, compilationID) {
|
|
|
- let template = await getLib({libID: '00000000'});
|
|
|
+ // let template = await getLib({libID: '00000000'});
|
|
|
+ let template = {
|
|
|
+ libID: "00000000",
|
|
|
+ libName: "模板",
|
|
|
+ datas: [
|
|
|
+ {
|
|
|
+ "ID": "00000001",
|
|
|
+ "ParentID": "-1",
|
|
|
+ "NextSiblingID": "00000002",
|
|
|
+ "type": 1,
|
|
|
+ "nodeName": "分类1"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "ID": "00000002",
|
|
|
+ "ParentID": "-1",
|
|
|
+ "NextSiblingID": "00000003",
|
|
|
+ "type": 1,
|
|
|
+ "nodeName": "分类2"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "ID": "00000003",
|
|
|
+ "ParentID": "-1",
|
|
|
+ "NextSiblingID": "-1",
|
|
|
+ "type": 1,
|
|
|
+ "nodeName": "分类3"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ share: {
|
|
|
+ "shareName": "共享",
|
|
|
+ "shareTo": []
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
let newLib = {
|
|
|
userID: userID,
|
|
|
compilationID: compilationID,
|
|
@@ -53,7 +85,7 @@ async function copyTemplateLib(userID, userName, compilationID) {
|
|
|
};
|
|
|
newLib.share.shareName = `共享-${newLib.libName}`;
|
|
|
await blModel.create(newLib);
|
|
|
- console.log(JSON.stringify(newLib));
|
|
|
+ // console.log(JSON.stringify(newLib));
|
|
|
return newLib;
|
|
|
};
|
|
|
|