Initial commit to Gitea
This commit is contained in:
@@ -12,15 +12,15 @@
|
||||
<script lang="uts">
|
||||
const db = uniCloud.databaseForJQL()
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
colList(): any[] {
|
||||
return [
|
||||
db.collection('uni-cms-articles').where("\"article_status\" == 1").field('thumbnail,title,publish_date,user_id').getTemp(), // 文章集合
|
||||
db.collection('uni-id-users').field('_id,nickname').getTemp() // 用户集合
|
||||
]
|
||||
}
|
||||
}
|
||||
export default {
|
||||
computed: {
|
||||
colList(): any[] {
|
||||
return [
|
||||
db.collection('uni-cms-articles').where({ article_status: 1 }).field('thumbnail,title,publish_date,user_id').getTemp(), // 文章集合
|
||||
db.collection('uni-id-users').field('_id,nickname').getTemp() // 用户集合
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
},
|
||||
// 连表查询,返回两个集合的查询结果
|
||||
colList() {
|
||||
if (this.colList_flag === false) {
|
||||
if (this.colList_flag === false || !this.tags_v || this.tags_v.length === 0) {
|
||||
return [
|
||||
db.collection(articleDBName).where({
|
||||
article_status: 1,
|
||||
@@ -118,7 +118,7 @@
|
||||
return [
|
||||
db.collection(articleDBName).where({
|
||||
article_status: 1,
|
||||
category_id: this.tags_v ? db.command.in(this.tags_v) : []
|
||||
category_id: db.command.in(this.tags_v)
|
||||
}).field('thumbnail,title,publish_date,user_id, excerpt').getTemp(), // 文章集合
|
||||
db.collection(userDBName).field('_id,nickname').getTemp() // 用户集合
|
||||
]
|
||||
@@ -336,4 +336,4 @@
|
||||
.pages .uni-list ::v-deep .uni-list--border:after {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user