Commit 333d55b2 by zqm

MM -活动预约列表 去预约

parent 027516c2
...@@ -28,8 +28,10 @@ Page({ ...@@ -28,8 +28,10 @@ Page({
}, },
navigationScroll: 0, navigationScroll: 0,
navItem: [ navItem: [{
{content:'主题活动',type:'0'}, content: '主题活动',
type: '0'
},
{ {
content: '夜间入园预约', content: '夜间入园预约',
type: '1' type: '1'
...@@ -110,8 +112,20 @@ Page({ ...@@ -110,8 +112,20 @@ Page({
// }, // },
], ],
data: [ // 假数据数组,type=0入园预约,type=1 看房预约 data: [ // 假数据数组,type=0入园预约,type=1 看房预约
{title:'夜间入园预约',type:'0',time:'6月30日 20:00-24:00',num:3,url:'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'}, {
{title:'看房预约',type:'1',time:'6月30日',num:3,url:' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'}, title: '夜间入园预约',
type: '0',
time: '6月30日 20:00-24:00',
num: 3,
url: 'http://upload.miaomiao-bao.com/36acd202008141719598303.jpg'
},
{
title: '看房预约',
type: '1',
time: '6月30日',
num: 3,
url: ' http://upload.miaomiao-bao.com/4c644202008141702599692.jpg'
},
], ],
active: 0, active: 0,
height: 0, height: 0,
...@@ -138,19 +152,35 @@ Page({ ...@@ -138,19 +152,35 @@ Page({
//预约 //预约
goAppoint(e) { goAppoint(e) {
let type = e.currentTarget.dataset.index; let type = e.currentTarget.dataset.index;
let url = ''
if (type == 0) {
//活动列表
url = '/pages/play/activity/activity'
} else if (type == 1) {
// 夜间入园预约
url = '/pages/home/night-appointment/night-appointment'
} else if (type == 2) {
url = "/pages/commodity/room-appointment/room-appointment"
}
wx.navigateTo({ wx.navigateTo({
url: '/pages/appointment/appointment?type=' + type, url: url
}) })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function(options) { onLoad: function (options) {
let type = options.tab ? 1 * options.tab : 0
this.setData({ this.setData({
height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度 height: wx.getSystemInfoSync().windowHeight, //获取屏幕的高度
active: type
}) })
// this.getList(this.data.active) if (type === 0) {
this.getActivity() this.getActivity()
} else {
this.getList(type)
}
}, },
// 页面滚动 // 页面滚动
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
...@@ -170,6 +200,9 @@ Page({ ...@@ -170,6 +200,9 @@ Page({
// 我的活动 // 我的活动
getActivity: function () { getActivity: function () {
let that = this let that = this
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getMyActivityList', url: '/api/v1/activity/getMyActivityList',
data: { data: {
...@@ -178,7 +211,10 @@ Page({ ...@@ -178,7 +211,10 @@ Page({
pageNo: '1', pageNo: '1',
type: '1' type: '1'
}, },
success: function(res) { success: function (res) {
wx.hideLoading({
success: (res) => {},
})
let funcData = res.data.list let funcData = res.data.list
let tmpArr = [] let tmpArr = []
funcData.forEach(item => { funcData.forEach(item => {
...@@ -215,13 +251,19 @@ Page({ ...@@ -215,13 +251,19 @@ Page({
break; break;
} }
let that = this let that = this
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/getList', url: '/api/v1/subscribe/getList',
data: { data: {
state: '', state: '',
type: type //0 入园预约 1 看房预约 全部 空字符 type: type //0 入园预约 1 看房预约 全部 空字符
}, },
success: function(res) { success: function (res) {
wx.hideLoading({
success: (res) => {},
})
let tmpArr = [] let tmpArr = []
res.data.forEach(item => { res.data.forEach(item => {
let type = item.type * 1 let type = item.type * 1
......
...@@ -221,15 +221,15 @@ ...@@ -221,15 +221,15 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无夜间入园预约</view> <view class="noActive-title">暂无夜间入园预约</view>
<view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view> <view class="noActive-rule">20:00后入园需要提前预约,每日限流200人</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{data.length === 0 && active === 1}}"> <view class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<view class="noActive-title">暂无看房预约</view> <view class="noActive-title">暂无看房预约</view>
<view class="noActive-botton" data-index="2" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view>
</view> </view>
<view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}"> <view class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
<view class="noActive-title">暂无活动预约</view> <view class="noActive-title">暂无活动预约</view>
<view class="noActive-botton" data-index="1" bindtap="goAppoint">去预约</view> <view class="noActive-botton" data-index="0" bindtap="goAppoint">去预约</view>
</view> </view>
</view> </view>
......
...@@ -65,6 +65,15 @@ Page({ ...@@ -65,6 +65,15 @@ Page({
goodTypeCountData: {}, goodTypeCountData: {},
enrollSubscribeData: {} enrollSubscribeData: {}
}, },
// 去活动预约列表
goAppointment: function (e) {
let type = e.currentTarget.dataset.type
wx.navigateTo({
url: '/pages/mine/appointment/appointment?tab=' + type,
})
},
// 去客服中心
goQuestion: function () { goQuestion: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/question/question', url: '/pages/mine/question/question',
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
</view> </view>
<!-- 预约分类icno --> <!-- 预约分类icno -->
<view class="order-activity-icon-list row con-b"> <view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='0' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image> <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}}">
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
</view> </view>
<text>主题活动</text> <text>主题活动</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='1' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image> <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}}">
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</view> </view>
<text>夜间入园预约</text> <text>夜间入园预约</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c"> <view class="order-activity-icon-wrapper col align-c" data-type='2' bindtap="goAppointment">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image> <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}}">
......
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