Commit 0f38dae9 by zqm

MM - 改BUG

parent bd9d2e02
......@@ -12,9 +12,11 @@ Page({
* 页面的初始数据
*/
data: {
isFinished: false,
option: {},
isDoing: false,
pageNo: 1,
pageSize: 10,
// 导航栏相关属性
navigationStyle: {
normal: {
......@@ -109,11 +111,12 @@ Page({
// 点击导航切换,默认是全部的
chageNav(e) {
let index = e.currentTarget.dataset.index
console.log(index, 'nav----------');
if (index === 0) {
this.setData({
pageNo: 1,
activityList: []
activityList: [],
isFinished: false
})
this.getActivity()
} else {
......@@ -247,15 +250,17 @@ Page({
},
// 我的活动
getActivity: function () {
if (this.data.isFinished) return
let that = this
wx.showLoading({
title: '加载中',
mask:true
})
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
activeState: '', //""全部 0 未开始 1进行中 2已结束
pageSize: '10',
pageSize: this.data.pageSize,
pageNo: this.data.pageNo,
type: '1'
},
......@@ -264,6 +269,11 @@ Page({
success: (res) => {},
})
let funcData = res.data.list
if (funcData.length < that.data.pageSize) {
that.setData({
isFinished: true
})
}
let tmpArr = []
funcData.forEach(item => {
let obj = {
......@@ -281,7 +291,7 @@ Page({
tmpArr.push(obj)
})
that.setData({
activityList: tmpArr
activityList: that.data.activityList.concat(tmpArr)
})
}
})
......@@ -301,6 +311,7 @@ Page({
let that = this
wx.showLoading({
title: '加载中',
mask:true
})
App.wxRequest({
url: '/api/v1/subscribe/getList',
......@@ -355,7 +366,6 @@ Page({
if (this.data.active == 0) {
this.getActivity()
}
},
// 导航栏返回事件。
......
......@@ -225,11 +225,11 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view>
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view>
<!-- 主题活动数据为空 -->
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
......
......@@ -267,7 +267,7 @@ Page({
}
})
},
//活动预约统计
//获取活动预约统计
getCountEnrollSubscribe() {
let that = this
App.wxRequest({
......@@ -406,14 +406,14 @@ Page({
}
},
// 我的活动
// 获取我的活动
getMyActivityList() {
var that = this
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
activeState: '1',
pageSize: 2,
pageSize: -1,
pageNo: 1,
type: 1
},
......
......@@ -232,7 +232,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}">
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.active}}">
{{enrollSubscribeData.active}}</view>
</view>
<text>主题活动</text>
......@@ -240,7 +241,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}">
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.garden}}">
{{enrollSubscribeData.garden}}</view>
</view>
<text>夜间入园预约</text>
......@@ -248,7 +250,8 @@
<view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}">
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}"
wx:if="{{enrollSubscribeData.scanHouse}}">
{{enrollSubscribeData.scanHouse}}</view>
</view>
<text>看房预约</text>
......@@ -257,7 +260,8 @@
<!-- 预约卡片 -->
<view class="appintment">
<!-- 主题活动 -->
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}"
bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row">
<view class="appointment-activity-img">
......@@ -314,8 +318,7 @@
</view> -->
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity" wx:if="{{activityList.length>1}}">
<view class="more row align-c con-c" bindtap="onShowMoreActivity" wx:if="{{activityListBackup.length>2}}">
<text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
......
......@@ -77,8 +77,6 @@ Page({
queryOrder: function () {
// 数据全部加载完成不再执行
console.log(this.data.isFinished, '-----------------------------------this.data.isFinished');
if (this.data.isFinished) return
let that = this;
// let funcName = this.data.orderType[this.data.orderTypeActive].value
......@@ -88,6 +86,7 @@ Page({
})
wx.showLoading({
title: '加载中',
mask:true
})
App.wxRequest({
url: '/api/v1/order/getOrderList',
......
......@@ -142,7 +142,7 @@
<view class="info-content col con-c">
<view class="info-content-item row">
<text class="info-content-item-label">报名活动</text>
<text class="info-content-item-title">儿童营地儿童营地儿童营地儿童营地儿童营地儿童营地</text>
<text class="info-content-item-title">{{orderInfo.commodity[0].name}}</text>
</view>
<view class="info-content-item row">
<text class="info-content-item-label">活动时间</text>
......@@ -150,15 +150,15 @@
</view>
<view class="info-content-item row">
<text class="info-content-item-label">活动地点</text>
<text class="info-content-item-describe">儿童营地</text>
<text class="info-content-item-describe">{{orderInfo.officeName}}</text>
</view>
<view class="info-content-item row">
<text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">姓名</text>
<text class="info-content-item-tip">{{orderInfo.contactName}}</text>
</view>
<view class="info-content-item row">
<text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}">
</image>
......@@ -171,7 +171,7 @@
<image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view>
<view class="info-code col con-c align-c">
<text>{{'张门票可用'}}</text>
<text>{{orderInfo.commodity.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{orderInfo.expireTime}}</text>
</view>
......@@ -281,7 +281,7 @@
<text
wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text>
<text
wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text>
wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1&&orderInfo.tipIntegral}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text>
</view>
</view>
</view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment