-
+
-
+
-
李在地
- 清风街道
+ {{ item.createUserName }}
+ {{ item.publishDepartName }}
- #【闲置物品交易】
- 社家用闲置柜子自用,原价212,现价80要的联系
+ {{ item.content }}
-
-
-
-
+
+
-
2020-12-11 10:10
+
{{ item.createTime }}
- 10
+ {{ item.sharedCount }}
- 10
+ {{ item.appreciateCount }}
- 10
+ {{ item.commentCount }}
+
@@ -53,7 +55,13 @@
data () {
return {
- currIndex: 0
+ currIndex: 0,
+ name: '',
+ themeId: '',
+ list: [],
+ isMore: false,
+ current: 1,
+ total: 0
}
},
@@ -61,11 +69,69 @@
...mapState(['user', 'token'])
},
- onLoad() {
+ onLoad (query) {
+ this.themeId = query.themeId
+ this.name = query.name
+
+ this.$nextTick(() => {
+ this.getList()
+ })
},
methods: {
- ...mapActions(['autoLogin', 'authCheck'])
+ ...mapActions(['autoLogin', 'authCheck']),
+
+ changeTab (index) {
+ this.currIndex = index
+ this.isMore = false
+ this.current = 1
+
+ this.$nextTick(() => {
+ this.getList()
+ })
+ },
+
+ getList () {
+ if (this.isMore) return
+
+ this.$loading()
+ this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
+ params: {
+ current: this.current,
+ size: 10,
+ source: 0,
+ themeId: this.themeId,
+ 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]
+ } else {
+ this.list = res.data.records
+ }
+
+ this.total = res.data.total
+
+ 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()
},
onShareAppMessage() {