调整
This commit is contained in:
parent
04a7a757c3
commit
863b18f955
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "智汇谷",
|
||||
"appid" : "__UNI__DE5C136",
|
||||
"appid" : "__UNI__0B08B09",
|
||||
"description" : "",
|
||||
"versionName" : "1.5.0",
|
||||
"versionCode" : "100",
|
||||
@ -62,7 +62,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxad32159e458099ed",
|
||||
"appid" : "wx5eb63c2154c5dc89",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : true,
|
||||
@ -88,7 +88,8 @@
|
||||
"h5" : {
|
||||
"template" : "template.h5.html",
|
||||
"router" : {
|
||||
"mode" : "history"
|
||||
"mode" : "history",
|
||||
"base" : "/uniapp/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
144
pages/member/member.vue
Normal file
144
pages/member/member.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<view class="activity-list">
|
||||
<!-- <lwTopnav bgColor="#fff" lwColor="#000" :isShow="false" lwTitle="成员单位一览"></lwTopnav> -->
|
||||
<u-tabs class="utabs" :list="list" :is-scroll="true" :current="current" @change="change"></u-tabs>
|
||||
<view style="height: 80rpx;"></view>
|
||||
<scroll-view class="result-list" scroll-y>
|
||||
<u-empty marginTop="200" v-if="dataList==null||dataList.length===0" mode="list"></u-empty>
|
||||
<view style="margin-top: -30rpx;padding-top: 30rpx;" v-else>
|
||||
<Dynamics :list="dataList" />
|
||||
</view>
|
||||
<view class="tip" v-if="isFinish">
|
||||
~~已加载全部内容~~
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lwTopnav from "@/components/lw-topnav/lw-topnav";
|
||||
import Dynamics from "@/pages/home/component/dynamics.vue";
|
||||
export default {
|
||||
components:{
|
||||
lwTopnav,Dynamics
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 导航栏列表
|
||||
list:[],
|
||||
// 列表
|
||||
dataList:[],
|
||||
form:{
|
||||
moduleName: '',
|
||||
labelName: '',
|
||||
size: 10,
|
||||
current: 1
|
||||
},
|
||||
module:{
|
||||
moduleName: '',
|
||||
id: 0,
|
||||
},
|
||||
current: 0,
|
||||
isFinish: false
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.module = {
|
||||
moduleName: options.moduleName,
|
||||
id: options.id,
|
||||
};
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 滑动到底
|
||||
onReachBottom() {
|
||||
this.onreachBottom();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 上拉刷新
|
||||
onPullDownRefresh() {
|
||||
try{
|
||||
this.form = {
|
||||
moduleName: this.module.moduleName,
|
||||
labelName: this.list[this.current].name,
|
||||
size: 10,
|
||||
current: 1
|
||||
};
|
||||
this.isFinish = false;
|
||||
this.getDate();
|
||||
}catch(e){}
|
||||
finally{
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
},
|
||||
// 初始化
|
||||
async init(){
|
||||
let listLabelRes = await this.$api.getChildLabel(this.module.id);
|
||||
if(listLabelRes?.success){
|
||||
this.list = listLabelRes.data;
|
||||
}
|
||||
this.form.moduleName = this.module.moduleName;
|
||||
this.form.labelName = this.list[this.current].name;
|
||||
this.getDate();
|
||||
},
|
||||
// 获取成员单位一览列表
|
||||
async getDate(){
|
||||
let that = this;
|
||||
let res = await this.$api.getArticleList(this.form);
|
||||
if(res?.success){
|
||||
const { size, current, total, records } = res.data;
|
||||
if(current === 1) that.dataList = records;
|
||||
else that.dataList.push(...records);
|
||||
that.isFinish = current*size >= total;
|
||||
}
|
||||
},
|
||||
// scroll-view到底部加载更多
|
||||
onreachBottom() {
|
||||
console.log(123,this.isFinish)
|
||||
if(this.isFinish) return;
|
||||
this.form.current++;
|
||||
this.getDate();
|
||||
},
|
||||
// tabs切换
|
||||
change(index){
|
||||
this.current = index;
|
||||
this.form = {
|
||||
moduleName: this.module.moduleName,
|
||||
labelName: this.list[index].name,
|
||||
size: 10,
|
||||
current: 1
|
||||
};
|
||||
this.isFinish = false;
|
||||
this.getDate();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.activity-list{
|
||||
.utabs{
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
position: fixed;
|
||||
}
|
||||
.result-list{
|
||||
min-height: 50vh;
|
||||
padding: 0;
|
||||
// background-color: #f9f9f9;
|
||||
view{
|
||||
width: 100%;
|
||||
padding: 0 25rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.tip{
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
color: #c7c7c7;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user