|
|
@@ -94,7 +94,11 @@
|
|
|
<block v-if="currentSx == 0">
|
|
|
<view class="gwList flex justify-center" v-if="dataList.length > 0">
|
|
|
<view class="gwList-box">
|
|
|
- <scroll-view scroll-y="true" style="width: 100%;height: 100%;">
|
|
|
+ <scroll-view scroll-y="true" style="width: 100%;height: 100%;" refresher-enabled="true"
|
|
|
+ :refresher-threshold="80" refresher-background="#fff" refresher-default-style="white"
|
|
|
+ :refresher-triggered="isRefreshing" @refresherrefresh="handlePullDownRefresh"
|
|
|
+ @refresherpulling="onPullingDown" @scrolltolower="loadMore"
|
|
|
+ scroll-with-animation="true">
|
|
|
<view class="gwList-box-item flex justify-center" @click="gotoInfo(item.postPushId)"
|
|
|
v-for="(item, index) in dataList" :key="index">
|
|
|
<view class="gwList-box-item-box">
|
|
|
@@ -151,6 +155,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <nomore v-if="dataList.length > 0 && page >= totlo"></nomore>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -159,10 +164,15 @@
|
|
|
<empty />
|
|
|
</view>
|
|
|
</block>
|
|
|
+ <!-- 公司 -->
|
|
|
<block v-else>
|
|
|
<view class="gwList flex justify-center" v-if="dataList.length > 0">
|
|
|
<view class="gwList-box">
|
|
|
- <scroll-view scroll-y="true" style="width: 100%;height: 100%;">
|
|
|
+ <scroll-view scroll-y="true" style="width: 100%;height: 100%;" refresher-enabled="true"
|
|
|
+ :refresher-threshold="80" refresher-background="#fff" refresher-default-style="white"
|
|
|
+ :refresher-triggered="isRefreshing" @refresherrefresh="handlePullDownRefresh"
|
|
|
+ @refresherpulling="onPullingDown" @scrolltolower="loadMore"
|
|
|
+ scroll-with-animation="true">
|
|
|
<view class="box" v-for="(item, index) in dataList" :key="'company' + index">
|
|
|
<view class="gwList-box-item company"
|
|
|
@click="goTo('/my/enterpriseInfo/enterpriseInfo?companyId=' + item.companyId)">
|
|
|
@@ -172,7 +182,7 @@
|
|
|
:src="item.companyLogo ? item.companyLogo : '../../static/images/index/jipinIcom.svg'"
|
|
|
class="jipin-icon"></u-avatar>
|
|
|
<view class="gwList-box-item-box-info-l">
|
|
|
- <view class="companyTitle">{{ item.companyAllName }}</view>
|
|
|
+ <view class="companyTitle">{{ item.companyName || item.companyAllName }}</view>
|
|
|
<view class="company-info-text">
|
|
|
{{ item.companyPeople }} · {{ item.companyScope }}
|
|
|
</view>
|
|
|
@@ -224,6 +234,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <nomore v-if="dataList.length > 0 && page >= totlo"></nomore>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -265,9 +276,11 @@
|
|
|
|
|
|
<script>
|
|
|
import empty from '../../components/empty.vue'
|
|
|
+import nomore from '../../components/nomore.vue'
|
|
|
export default {
|
|
|
components: {
|
|
|
- empty
|
|
|
+ empty,
|
|
|
+ nomore
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -305,7 +318,8 @@ export default {
|
|
|
showSortModalFlag: false,
|
|
|
selectedSort: 0,
|
|
|
sortOptions: ['综合排序', '最新优先', '距离优先'],
|
|
|
- filter: '筛选'
|
|
|
+ filter: '筛选',
|
|
|
+ isRefreshing: false
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -378,6 +392,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 下拉刷新
|
|
|
+ handlePullDownRefresh() {
|
|
|
+ this.isRefreshing = true;
|
|
|
+ this.page = 1
|
|
|
+ this.getUserList();
|
|
|
+ },
|
|
|
+ // 下拉中
|
|
|
+ onPullingDown(e) {
|
|
|
+ // 可以在这里处理下拉中的动画效果
|
|
|
+ },
|
|
|
+ // 加载更多
|
|
|
+ loadMore() {
|
|
|
+ if (this.page < this.totlo) {
|
|
|
+ this.page += 1
|
|
|
+ this.getUserList();
|
|
|
+ }
|
|
|
+ },
|
|
|
// 删除历史记录
|
|
|
clearHistory() {
|
|
|
let that = this;
|
|
|
@@ -547,7 +578,7 @@ export default {
|
|
|
let action = this.currentSx == 1 ? '/app/company/getCompanyPostPush' : '/app/postPush/userGetPostPushList'
|
|
|
|
|
|
this.$Request.get(action, data).then(res => {
|
|
|
- uni.stopPullDownRefresh()
|
|
|
+ this.isRefreshing = false
|
|
|
if (res.code == 0) {
|
|
|
if (this.currentSx == 0)
|
|
|
res.data.records.map(item => {
|
|
|
@@ -572,6 +603,8 @@ export default {
|
|
|
}
|
|
|
this.totlo = res.data.pages
|
|
|
}
|
|
|
+ }).catch(() => {
|
|
|
+ this.isRefreshing = false
|
|
|
})
|
|
|
},
|
|
|
//跳转
|