提交 75896edd 编写于 作者: 芊里

反馈列表整改

上级 8061d7b8
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
} }
} }
} }
// "navigationBarTitleText": "",
// "navigationBarBackgroundColor": "#FFFFFF",
}, { }, {
"path": "pages/list/search/search", "path": "pages/list/search/search",
"style": { "style": {
...@@ -69,7 +67,7 @@ ...@@ -69,7 +67,7 @@
}, { }, {
"path": "uni_modules/opendb-feedback/pages/opendb-feedback/list", "path": "uni_modules/opendb-feedback/pages/opendb-feedback/list",
"style": { "style": {
"navigationBarTitleText": "反馈列表" "navigationBarTitleText": "常见问题"
} }
}, { }, {
"path": "uni_modules/opendb-feedback/pages/opendb-feedback/add", "path": "uni_modules/opendb-feedback/pages/opendb-feedback/add",
......
<template> <template>
<view class="container"> <view class="container">
<unicloud-db ref="udb" v-slot:default="{data, pagination, loading, hasMore, error}" collection="opendb-feedback" <unicloud-db ref="udb" v-slot:default="{data, pagination, loading, hasMore, error}" collection="opendb-feedback"
field="user_id,create_date,content,imgs,is_reply,feedback_id,contact,mobile,reply_count"> field="content, title" where="is_reply == false">
<view v-if="data && data.length"> <view v-if="data && data.length">
<uni-list> <uni-collapse :accordion="true">
<uni-list-item v-for="(item, index) in data" :key="index" showArrow :clickable="true" <uni-collapse-item v-for="(item, index) in data" :key="index" :title="item.title" :show-animation="true">
@click="handleItemClick(item._id)"> <text class="content">{{ item.content }}</text>
<view slot="body"> </uni-collapse-item>
<!-- 此处默认显示为_id,请根据需要自行修改为其他字段 --> </uni-collapse>
{{item.content}}
</view>
</uni-list-item>
</uni-list>
</view> </view>
<uni-nodata v-else @retry="refreshData"></uni-nodata> <uni-nodata v-else @retry="refreshData"></uni-nodata>
</unicloud-db> </unicloud-db>
...@@ -22,23 +18,16 @@ ...@@ -22,23 +18,16 @@
<script> <script>
export default { export default {
data() { data() {
return { return {
loadMore: {
contentdown: '',
contentrefresh: '',
contentnomore: ''
}
} }
}, },
methods: { methods: {
refreshData() { refreshData() {
this.$refs.udb.loadData({ this.$refs.udb.loadData({
clear: true clear: true
}, (res) => {}) }, (res) => {
}, console.log(res);
handleItemClick(id) {
uni.navigateTo({
url: './detail?id=' + id
}) })
}, },
fabClick() { fabClick() {
...@@ -59,5 +48,8 @@ ...@@ -59,5 +48,8 @@
} }
</script> </script>
<style> <style>
.content{
padding: 20rpx;
}
</style> </style>
{ {
"bsonType": "object", "bsonType": "object",
"permission": { "permission": {
"read": "!doc.is_reply", "read": "doc.is_reply == false",
"create": true, "create": true,
"update": false, "update": false,
"delete": false "delete": false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册