Browse Source

优化

master
zhaoyongnian 5 years ago
parent
commit
cb1d580a6d
  1. 2
      subpages/associationNew/pages/addTopic/addTopic.js
  2. 14
      subpages/associationNew/pages/eventlist/eventlist.js
  3. 5
      subpages/associationNew/pages/eventlist/eventlist.json
  4. 2
      subpages/associationNew/pages/eventlist/eventlist.wxss

2
subpages/associationNew/pages/addTopic/addTopic.js

@ -32,7 +32,7 @@ Page({
}) })
if(options.topicType == 0){ if(options.topicType == 0){
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '事好鼓个掌' title: '事好鼓个掌'
}) })
}else{ }else{
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({

14
subpages/associationNew/pages/eventlist/eventlist.js

@ -35,7 +35,7 @@ Page({
}) })
if (options.topicType == 0) { if (options.topicType == 0) {
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
title: '事好鼓个掌' title: '事好鼓个掌'
}) })
} else { } else {
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
@ -56,6 +56,7 @@ Page({
partyGroupId: this.data.partyGroupId, //党群id partyGroupId: this.data.partyGroupId, //党群id
} }
topiclist(para).then(res => { topiclist(para).then(res => {
wx.stopPullDownRefresh();
that.setData({ that.setData({
bannedFlag: res.data.bannedFlag, bannedFlag: res.data.bannedFlag,
nodata: false, nodata: false,
@ -71,6 +72,7 @@ Page({
}) })
} }
}).catch(err => { }).catch(err => {
wx.stopPullDownRefresh();
that.setData({ that.setData({
topiclist: [], topiclist: [],
nodata: true, nodata: true,
@ -129,7 +131,12 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {
this.setData({
pageIndex: 1,
pageSize: 10,
topiclist: [],
})
this.topiclist()
}, },
/** /**
@ -199,7 +206,8 @@ Page({
// 失去焦点 // 失去焦点
bindAddressInput(e) { bindAddressInput(e) {
this.setData({ //失去焦点以后view隐藏 this.setData({ //失去焦点以后view隐藏
ifcomment: false ifcomment: false,
commentContent:''
}) })
}, },
// 双向绑定 // 双向绑定

5
subpages/associationNew/pages/eventlist/eventlist.json

@ -3,5 +3,8 @@
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata" "no-data":"../../../../components/nodata/nodata"
}, },
"navigationBarTitleText": "" "navigationBarTitleText": "",
"enablePullDownRefresh": true,
"backgroundColor": "#f8f8f8",
"backgroundTextStyle": "dark"
} }

2
subpages/associationNew/pages/eventlist/eventlist.wxss

@ -64,7 +64,7 @@ page {
} }
.attitude { .attitude {
width: calc(100% - 158rpx); width: calc(100% - 300rpx);
margin-top: 21rpx; margin-top: 21rpx;
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save