-
+
-
李在地
- 清风街道
+ {{ item.createUserName }}
+ {{ item.publishDepartName }}
- #【闲置物品交易】
- 社家用闲置柜子自用,原价212,现价80要的联系
+ #【{{ item.topicName }}】
+ {{ item.content }}
-
-
-
-
+
+
-
2020-12-11 10:10
+
{{ item.createTime }}
- 10
+ {{ item.sharedCount }}
- 10
+ {{ item.appreciateCount }}
- 10
+ {{ item.commentCount }}
@@ -70,26 +68,88 @@
data () {
return {
- currIndex: 0
+ currIndex: 0,
+ topicList: [],
+ list: []
}
},
computed: {
- ...mapState(['user', 'token'])
+ ...mapState(['user', 'token']),
+
+ topic () {
+ return this.topicList.filter((v, index) => index < 8)
+ }
},
onLoad() {
+ this.getTopicList()
},
methods: {
- ...mapActions(['autoLogin', 'authCheck'])
+ getTopicList () {
+ this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
+ // withoutToken: true,
+ params: {
+ current: 1,
+ size: 100
+ }
+ }).then(res => {
+ if (res.code === 0) {
+ this.topicList = res.data.records
+ this.getList()
+ }
+ })
+ },
+
+ getList () {
+ if (this.isMore) return
+
+ this.$loading()
+ this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
+ params: {
+ current: this.current,
+ size: 10,
+ source: 0,
+ visibleRange: this.currIndex === 0 ? 1 : 0
+ }
+ }).then(res => {
+ if (res.code === 0) {
+ this.$hideLoading()
+ if (this.current > 1) {
+ this.list = [...this.list, ...res.data.records.map(e => {
+ return {
+ ...e,
+ topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
+ }
+ })]
+ } else {
+ this.list = res.data.records.map(e => {
+ return {
+ ...e,
+ topicName: this.topicList.filter(v => v.id === e.themeId).length ? this.topicList.filter(v => v.id === e.themeId)[0].title : ''
+ }
+ })
+ }
+
+ if (res.data.records.length < 10) {
+ this.isMore = true
+
+ return false
+ }
+
+ this.current = this.current + 1
+ } else {
+ this.isMore = true
+ }
+ }).catch(() => {
+ this.$hideLoading()
+ })
+ }
},
- onShareAppMessage() {
- return {
- title: '欢迎使用数字乡村治理服务一体化平台~',
- path: `/pages/AppCircle/AppCircle`
- }
+ onReachBottom () {
+ this.getList()
}
}
@@ -118,7 +178,6 @@
.nav {
display: flex;
align-items: center;
- justify-content: center;
flex-wrap: wrap;
margin: 0 32px 24px;
padding-top: 30px;
@@ -227,9 +286,9 @@
}
.item-content {
- margin: 16px;
+ margin: 16px 0;
line-height: 1.3;
- // text-align: justify;
+ text-align: justify;
span {
font-size: 28px;
diff --git a/src/project/fengdu/AppCircle/MyPostList.vue b/src/project/fengdu/AppCircle/MyPostList.vue
index e0f8d8b..79513d9 100644
--- a/src/project/fengdu/AppCircle/MyPostList.vue
+++ b/src/project/fengdu/AppCircle/MyPostList.vue
@@ -137,12 +137,63 @@
...mapState(['user', 'token']),
},
+ onLoad () {
+ this.getTopicList()
+ },
+
methods: {
+ getTopicList () {
+ this.$instance.post(`/api/appneighborhoodassistancetheme/list`, null, {
+ withoutToken: true,
+ params: {
+ current: 1,
+ size: 1000
+ }
+ }).then(res => {
+ if (res.code === 0) {
- },
- onShow() {
+ }
+ })
+ },
+ getList () {
+ if (this.isMore) return
+
+ this.$loading()
+ this.$instance.post(`/api/appactivityinfo/list`, null, {
+ withoutToken: true,
+ params: {
+ current: this.current,
+ size: 10
+ }
+ }).then(res => {
+ if (res.code === 0) {
+ this.$hideLoading()
+ if (this.current > 1) {
+ this.list = [...this.list, ...res.data.records]
+ } else {
+ this.list = res.data.records
+ }
+
+ if (res.data.records.length < 10) {
+ this.isMore = true
+
+ return false
+ }
+
+ this.current = this.current + 1
+ } else {
+ this.isMore = true
+ }
+ }).catch(() => {
+ this.$hideLoading()
+ })
+ }
},
+
+ onReachBottom () {
+ this.getList()
+ }
}