Initial commit to Gitea

This commit is contained in:
root
2026-05-04 00:43:20 +08:00
parent a41fbbd663
commit b3c6fc67c9
15 changed files with 830 additions and 835 deletions
@@ -93,6 +93,9 @@
userInfo() {
return store.userInfo
},
queryUserId() {
return this.userInfo && this.userInfo._id ? this.userInfo._id : '__empty__'
},
realNameStatus() {
if (!this.userInfo.realNameAuth) {
return 0
@@ -113,7 +116,7 @@
return [
db.collection("cms-articles-collect")
.where({
user_id: this.userInfo._id,
user_id: this.queryUserId,
})
.getTemp(),
db.collection(articleDBName)
@@ -256,6 +259,13 @@
return uniCloud.importObject("cms-articles-log").getHistory(this.userInfo._id);
}
},
watch: {
'userInfo._id'(val, oldVal) {
if (val && val !== oldVal && this.$refs.udb) {
this.refresh()
}
}
},
async onReady() {
// #ifdef MP
this.initNavBarSize() // 初始化导航栏大小
@@ -347,4 +357,4 @@
.pages .uni-list ::v-deep .uni-list--border:after {
background-color: #f5f5f5;
}
</style>
</style>
+12 -2
View File
@@ -97,6 +97,9 @@
userInfo() {
return store.userInfo
},
queryUserId() {
return this.userInfo && this.userInfo._id ? this.userInfo._id : '__empty__'
},
realNameStatus() {
if (!this.userInfo.realNameAuth) {
return 0
@@ -118,7 +121,7 @@
return [
db.collection("cms-articles-like")
.where({
user_id: this.userInfo._id,
user_id: this.queryUserId,
})
.getTemp(),
db.collection(articleDBName)
@@ -258,6 +261,13 @@
return uniCloud.importObject("cms-articles-log").getHistory(this.userInfo._id);
}
},
watch: {
'userInfo._id'(val, oldVal) {
if (val && val !== oldVal && this.$refs.udb) {
this.refresh()
}
}
},
async onReady() {
// #ifdef MP
this.initNavBarSize() // 初始化导航栏大小
@@ -349,4 +359,4 @@
.pages .uni-list ::v-deep .uni-list--border:after {
background-color: #f5f5f5;
}
</style>
</style>
+10 -7
View File
@@ -125,7 +125,7 @@ import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
return [
db.collection("follow")
.where(this.where)
.where(this.followWhere)
.field("_id,fid,create_time")
.getTemp(),
db.collection("uni-id-users")
@@ -133,6 +133,13 @@ import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
.getTemp()
];
},
followWhere() {
return this.userInfo && this.userInfo._id ? {
uid: this.userInfo._id
} : {
uid: '__empty__'
}
}
},
data() {
@@ -151,9 +158,7 @@ import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
listData: [], // 列表数据
loadType: null,
followLst: [],
where:{},
followLst: []
}
},
methods: {
@@ -283,8 +288,6 @@ import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
this.listHeight = uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - this
.navBarHeight + 'px'; // 计算列表高度
this.where = {uid: this.userInfo._id};
console.log(this.where)
this.$refs.udb.loadData();
},
@@ -476,4 +479,4 @@ import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
background: #F8F8F8;
}
</style>
</style>
+13 -3
View File
@@ -106,6 +106,9 @@
userInfo() {
return store.userInfo
},
queryUserId() {
return this.userInfo && this.userInfo._id ? this.userInfo._id : '__empty__'
},
realNameStatus() {
if (!this.userInfo.realNameAuth) {
return 0
@@ -127,8 +130,8 @@
return [
db.collection("cms-articles-log")
.where({
user_id: this.userInfo._id,
article_id: db.command.neq([])
user_id: this.queryUserId,
article_id: db.command.exists(true)
})
.getTemp(),
db.collection(articleDBName)
@@ -273,6 +276,13 @@
return uniCloud.importObject("cms-articles-log").getHistory(this.userInfo._id);
}
},
watch: {
'userInfo._id'(val, oldVal) {
if (val && val !== oldVal && this.$refs.udb) {
this.refresh()
}
}
},
async onReady() {
// #ifdef MP
this.initNavBarSize() // 初始化导航栏大小
@@ -418,4 +428,4 @@
margin-left: 14rpx;
}
}
</style>
</style>
+12 -2
View File
@@ -127,6 +127,9 @@
userInfo() {
return store.userInfo
},
queryUserId() {
return this.userInfo && this.userInfo._id ? this.userInfo._id : '__empty__'
},
realNameStatus() {
if (!this.userInfo.realNameAuth) {
return 0
@@ -147,7 +150,7 @@
return [
db.collection("comment")
.where({
parent_author_id: this.userInfo._id,
parent_author_id: this.queryUserId,
})
.getTemp(),
db.collection("uni-id-users")
@@ -407,6 +410,13 @@
})
}
},
watch: {
'userInfo._id'(val, oldVal) {
if (val && val !== oldVal && this.$refs.udb) {
this.refresh()
}
}
},
async onReady() {
// #ifdef MP
this.initNavBarSize() // 初始化导航栏大小
@@ -592,4 +602,4 @@
line-height: 12px;
padding: 0 0 2px 5px;
}
</style>
</style>