【开发】 标协会员
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
// pages/council/council.js
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
list: []
|
||||
},
|
||||
goBack(){
|
||||
wx.navigateBack()
|
||||
},
|
||||
loadData(){
|
||||
wx.showToast({
|
||||
title: '加载中...',
|
||||
icon: 'loading'
|
||||
})
|
||||
let params = {
|
||||
pageNo: this.data.pageNo,
|
||||
pageSize: this.data.pageSize,
|
||||
// 创建时间倒叙排序
|
||||
column:'createTime',
|
||||
order:'desc'
|
||||
}
|
||||
UserApi.councilList(params).then(res=>{
|
||||
if(res.success){
|
||||
if(res.result.records && res.result.records.length){
|
||||
this.setData({
|
||||
list: [...this.data.list, ...res.result.records]
|
||||
})
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
wx.showToast({
|
||||
title: '加载失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
})
|
||||
},
|
||||
// 理事会详情页
|
||||
detail(e){
|
||||
wx.navigateTo({
|
||||
url: `../councilDetail/councilDetail?id=${e.currentTarget.dataset.committee.id}&name=${e.currentTarget.dataset.committee.name}&type=council`,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
this.data.pageNo++
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<!--pages/council/council.wxml-->
|
||||
<!--pages/meeting/meeting.wxml-->
|
||||
<!-- 自定义头部start -->
|
||||
<view class="custom flex_center" style="padding-top:{{statusBarHeight}}px">
|
||||
<image src="../../assets/images/back.png" bindtap="goBack"></image>
|
||||
<text>理事会</text>
|
||||
</view>
|
||||
<view class="empty_custom" style="padding-top:{{statusBarHeight}}px"></view><!-- 空view用来填充自定义头部的padding-top -->
|
||||
<!-- 自定义头部end -->
|
||||
<view>
|
||||
<view class="item" wx:for="{{list}}" wx:key="item" bindtap="detail" data-committee="{{item}}">
|
||||
<text>{{item.name}}</text>
|
||||
<view>项目负责人:{{item.principal}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="no-data" wx:if="{{list.length == 0}}">暂无数据</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* pages/council/council.wxss */
|
||||
page{
|
||||
padding-bottom: 20px;
|
||||
background-color: #f5f5f5;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.item{
|
||||
box-sizing: border-box;
|
||||
padding: 0 15px;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
line-height: 40px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.item:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user