Commit 41397218 by jscat

nyx weapp: 数据更新

1. 完善stat_community和stat_fair
parent a395b94a
// pages/member/activity-post/activity-edit/activity-edit.js // pages/member/activity-post/activity-edit/activity-edit.js
...@@ -25,7 +25,8 @@ Page({ ...@@ -25,7 +25,8 @@ Page({
// 城市模块 // 城市模块
city: "", city: "",
strAddress: "", entityName: "",
activityType: "",
// 分页加载部分 // 分页加载部分
stride: 0, stride: 0,
...@@ -76,14 +77,16 @@ Page({ ...@@ -76,14 +77,16 @@ Page({
} }
var city = app.globalData.defaultCity var city = app.globalData.defaultCity
var strAddress = city var entityName = ""
var activityType = ""
if (options.city != "" && options.city != undefined ) if (options.city != "" && options.city != undefined )
{ {
strAddress = options.city; city = options.city;
} }
else if(options.strAddress != "" && options.strAddress != undefined) else if(options.entityName != "" && options.entityName != undefined)
{ {
strAddress = options.strAddress entityName = options.entityName
activityType = options.activityType
} }
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
...@@ -102,10 +105,11 @@ Page({ ...@@ -102,10 +105,11 @@ Page({
curDate: curDate, curDate: curDate,
endDate: endDate, endDate: endDate,
city: city, city: city,
strAddress: strAddress, entityName: entityName,
activityType: activityType,
}); });
_this.getActivitiesByPeriod(0, 1, stride, strAddress, curDate, endDate); _this.getActivitiesByPeriod(0, 1, stride, city, entityName, activityType, curDate, endDate);
} }
...@@ -156,7 +160,9 @@ Page({ ...@@ -156,7 +160,9 @@ Page({
console.log('页面上拉触底') console.log('页面上拉触底')
var _this = this; var _this = this;
// var curIndex = _this.__data__.curIndex // var curIndex = _this.__data__.curIndex
// var strAddress = _this.__data__.category[curIndex].name var city = _this.__data__.city
var entityName = _this.__data__.entityName
var activityType = _this.__data__.activityType
var isHideLoadMore = _this.__data__.isHideLoadMore; var isHideLoadMore = _this.__data__.isHideLoadMore;
var pageIndex = _this.__data__.pageIndex; var pageIndex = _this.__data__.pageIndex;
var stride = _this.__data__.stride; var stride = _this.__data__.stride;
...@@ -168,8 +174,7 @@ Page({ ...@@ -168,8 +174,7 @@ Page({
console.log('加载更多') console.log('加载更多')
setTimeout(() => { setTimeout(() => {
_this.getActivities(1, pageIndex, 4, strAddress); _this.getActivitiesByPeriod(1, pageIndex, stride, city, entityName, activityType, curDate, endDate);
_this.getActivitiesByPeriod(1, pageIndex, stride, city, curDate, endDate);
}, 1000) }, 1000)
var bisHideLoadMoreType = true; var bisHideLoadMoreType = true;
_this.setData({ _this.setData({
...@@ -193,10 +198,10 @@ Page({ ...@@ -193,10 +198,10 @@ Page({
搜索逻辑: 搜索逻辑:
1. 按照address_name和beginDate, endDate联合查询 1. 按照address_name和beginDate, endDate联合查询
*/ */
getActivitiesByPeriod : function (scrollType, pageNum, pageCount, city, beginDate, endDate) { getActivitiesByPeriod : function (scrollType, pageNum, pageCount, city, entityName, activityType, beginDate, endDate) {
var _this = this; var _this = this;
var query_url = '&city=' + city + '&beginDate=' + beginDate + '&endDate=' + endDate var query_url = '&city=' + city + '&title=' + entityName + '&activityType=' + activityType + '&entityName=' + entityName + '&beginDate=' + beginDate + '&endDate=' + endDate
var strUrl = config.activity_period_query_url + "?pageCount=" + pageCount var strUrl = config.activity_period_query_url + "?pageCount=" + pageCount
+ "&pageNum=" + pageNum + query_url + "&pageNum=" + pageNum + query_url
......
<wxs module="tutil" src="./../../utils/date.wxs"></wxs> <wxs module="tutil" src="./../../utils/date.wxs"></wxs>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!-- jscat20200816 添加活动日历 for convinience --> <!-- jscat20200816 添加活动日历 for convinience -->
<block> <block>
<view class="items"> <view class="items">
<navigator url="/pages/activity/activity-list/activity-list?strAddress={{communities[curCommunity]}}"> <navigator url="/pages/activity/activity-list/activity-list?entityName={{communities[curCommunity]}}&activityType={{activityType}}">
<image src="../../icon/member/schedule.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image> <image src="../../icon/member/schedule.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">本周活动</text> <text style="font-size:28rpx;">本周活动</text>
</navigator> </navigator>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论