Commit 24269642 by jscat

nyx weapp: udpate

1. /live/live页面, 当sortType为同一类型时, 不强制刷新
parent 3f7ab116
......@@ -615,7 +615,7 @@ Page({
},
// 开始搜索
//获取活动
onGetActivities: function () {
var _this = this;
......@@ -624,6 +624,7 @@ Page({
var strCategory = _this.__data__.category[curIndex].order
var strSearch = _this.__data__.strSearch
var activityType = _this.__data__.activityType
_this.getActivities(0, 1, 4, strCity, activityType, strCategory, strSearch);
},
......
......@@ -544,20 +544,33 @@ Page({
},
// 开始搜索
onGetLives: function (e) {
//获取lives
onGetLives: function () {
var _this = this;
var sortType = e == undefined ? _this.__data__.sortType : e.currentTarget.dataset.id
var sortType = _this.__data__.sortType
var strSearch = _this.__data__.strSearch
var strCity = _this.__data__.city
var liveType = _this.__data__.liveType
_this.getLives(0, 1, 4, strCity, liveType, strSearch);
_this.setData({ strSearch, sortType })
},
//获取lives
onSwitchType: function (e) {
var _this = this;
var sortType = e == undefined ? _this.__data__.sortType : e.currentTarget.dataset.id
var strSearch = _this.__data__.strSearch
var strCity = _this.__data__.city
var liveType = _this.__data__.liveType
if(sortType != _this.__data__.sortType)
{
_this.setData({ sortType })
_this.onGetLives();
}
_this.setData({
strSearch: strSearch,
sortType: sortType,
})
},
})
......
......@@ -42,19 +42,19 @@
<view class="workbench">
<view class="list">
<block>
<view class="items" bindtap="onGetLives" data-id="01">
<view class="items" bindtap="onSwitchType" data-id="01">
<image src="../../icon/member/schedule.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">人气: 100</text>
</view>
</block>
<!-- todo 0828 我的活动暂时也不实现 -->
<view class="items" bindtap="onGetLives" data-id="02">
<view class="items" bindtap="onSwitchType" data-id="02">
<image src="../../icon/activity/order.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">热度: 1.2k</text>
</view>
<view class="items" bindtap="onGetLives" data-id="03">
<view class="items" bindtap="onSwitchType" data-id="03">
<image src="../../icon/my/fav.png" style="margin-top:10rpx; margin-bottom:-10rpx"></image>
<text style="font-size:28rpx;">关注: 12.5k</text>
</view>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论