-
+
-
李在地
- 清风街道
+ {{ 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 db4975d..526dc3b 100644
--- a/src/project/fengdu/AppCircle/MyPostList.vue
+++ b/src/project/fengdu/AppCircle/MyPostList.vue
@@ -138,30 +138,63 @@
...mapState(['user', 'token']),
},
+ onLoad () {
+ this.getTopicList()
+ },
+
methods: {
- getTotal() {
- this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => {
- if (res.code === 0 && res.data) {
- const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
- this.pages = Math.ceil(res.data.total / 10)
- this.list = list
+ getTopicList () {
+ this.$instance.post(`/api/appneighborhoodassistancetheme/list`, null, {
+ withoutToken: true,
+ params: {
+ current: 1,
+ size: 1000
+ }
+ }).then(res => {
+ if (res.code === 0) {
+
}
})
},
- getList() {
- this.$instance.post(`/app/appneighborhoodassistancetheme/list¤t=${this.current}&size=20`).then(res => {
- if (res.code === 0 && res.data) {
- const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
- this.pages = Math.ceil(res.data.total / 10)
- this.list = list
+
+ 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()
})
}
},
- onLoad() {
- this.getTotal()
+
+ onReachBottom () {
this.getList()
- },
+ }
}
diff --git a/src/project/fengdu/AppHome/img/kaiping3.png b/src/project/fengdu/AppHome/img/kaiping3.png
new file mode 100644
index 0000000..98d7d6b
Binary files /dev/null and b/src/project/fengdu/AppHome/img/kaiping3.png differ
diff --git a/src/project/fengdu/AppHome/openPage.vue b/src/project/fengdu/AppHome/openPage.vue
new file mode 100644
index 0000000..c96c8ba
--- /dev/null
+++ b/src/project/fengdu/AppHome/openPage.vue
@@ -0,0 +1,37 @@
+
+
+

+
+
+
+
+
+
\ No newline at end of file