|
@@ -20,29 +20,19 @@
|
|
|
<view class="item-box" v-for="(item,index) of initList" :key='index'>
|
|
|
<view class="item-top">
|
|
|
<view class="top-left">
|
|
|
- <!-- <image class="img" :src="" v-if="item.userDTO.avata"></image> -->
|
|
|
<u-avatar :src="item.userDTO.avatar" size="45" />
|
|
|
</view>
|
|
|
<view class="top-right">
|
|
|
<view class="right-title">{{ item.userDTO.nickname }}</view>
|
|
|
<view class="right-address">
|
|
|
- <view class="marRight-20">
|
|
|
- {{ item.distanceTime }}
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
-
|
|
|
- {{ item.location }}
|
|
|
- </view>
|
|
|
+ <view class="marRight-20"> {{ item.distanceTime }} </view>
|
|
|
+ <view class=""> {{ item.location }} </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<!-- <u-line margin='10rpx 0'></u-line> -->
|
|
|
-
|
|
|
<view class="item-center">
|
|
|
- <view class="center-text">
|
|
|
- {{ item.textContent }}
|
|
|
- </view>
|
|
|
+ <view class="center-text"> {{ item.textContent }} </view>
|
|
|
<view class="center-img-box">
|
|
|
<image v-for="itm of item.resourceVos" class="center-img" :src="itm.resourceKey" @click='reviewImg(itm)'>
|
|
|
</image>
|
|
@@ -84,20 +74,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- clientContentList,
|
|
|
- addEvaulateRecords
|
|
|
- } from '@/api/client/community.js';
|
|
|
+ import { clientContentList, addEvaulateRecords } from '@/api/client/community.js';
|
|
|
import communityPop from "./components/communityPop.vue"
|
|
|
- // import empty from "@/components/empty/index.vue"
|
|
|
- import {
|
|
|
- GetDateToNewData
|
|
|
- } from "@/utils/tools.js"
|
|
|
+ import { GetDateToNewData } from "@/utils/tools.js"
|
|
|
export default {
|
|
|
- components: {
|
|
|
- communityPop,
|
|
|
- // empty
|
|
|
- },
|
|
|
+ components: { communityPop },
|
|
|
data() {
|
|
|
return {
|
|
|
communityShow: false,
|
|
@@ -126,8 +107,26 @@
|
|
|
userId: '',
|
|
|
dynamicId: 0,
|
|
|
dynamicUserId: 0,
|
|
|
+ total:0
|
|
|
}
|
|
|
},
|
|
|
+ // 下拉刷新
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.params.pageNum = 1
|
|
|
+ this.initList = []
|
|
|
+ this.handlerInitList()
|
|
|
+ setTimeout(function () {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ this.uToast('刷新成功')
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ // 触底刷新
|
|
|
+ onReachBottom() {
|
|
|
+ let { pageNum , pageSize } = this.params
|
|
|
+ if( pageNum * pageSize > this.total ) return this.uToast('没有更多啦')
|
|
|
+ this.params.pageNum ++
|
|
|
+ this.handlerInitList()
|
|
|
+ },
|
|
|
onShow() {
|
|
|
this.handlerInitList()
|
|
|
},
|
|
@@ -149,15 +148,18 @@
|
|
|
let time = GetDateToNewData(rs.createTime)
|
|
|
this.$set(rs, 'distanceTime', time)
|
|
|
})
|
|
|
- this.initList = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ this.initList = [...this.initList,...res.data.records]
|
|
|
})
|
|
|
},
|
|
|
// 切换顶部tabbar
|
|
|
tabChange(e) {
|
|
|
this.params.type = e.type
|
|
|
+ this.params.pageNum = 1
|
|
|
+ this.initList = []
|
|
|
this.handlerInitList()
|
|
|
},
|
|
|
- // 发布按钮
|
|
|
+ // 点击发布按钮
|
|
|
handlerToPublish() {
|
|
|
uni.navigateTo({
|
|
|
url: "/pagesCustomer/communityPostReview"
|