This commit is contained in:
c
2025-03-12 20:11:03 +08:00
commit 70b7c82c97
1178 changed files with 148185 additions and 0 deletions
@@ -0,0 +1,30 @@
const db = uniCloud.database();
module.exports = {
_before: function () { // 通用预处理器
},
async getTags() {
try {
const res = await db.collection("uni-cms-categories").get();
// console.log();
let tags = [];
for (let i = 0 ; i < res.data.length; i++ ) {
tags.push({
text: res.data[i].name,
value: res.data[i]._id
});
}
return {
"code": "200",
"tags": tags
};
} catch(e) {
return {
"code": '500',
"msg": e.message
}
}
}
}
@@ -0,0 +1,7 @@
{
"name": "uni-cms-categories",
"dependencies": {},
"extensions": {
"uni-cloud-jql": {}
}
}