Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
333d55b2
authored
Sep 22, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM -活动预约列表 去预约
parent
027516c2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
19 deletions
pages/mine/appointment/appointment.js
pages/mine/appointment/appointment.wxml
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/appointment/appointment.js
View file @
333d55b2
...
...
@@ -28,8 +28,10 @@ Page({
},
navigationScroll
:
0
,
navItem
:
[
{
content
:
'主题活动'
,
type
:
'0'
},
navItem
:
[{
content
:
'主题活动'
,
type
:
'0'
},
{
content
:
'夜间入园预约'
,
type
:
'1'
...
...
@@ -110,8 +112,20 @@ Page({
// },
],
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
,
height
:
0
,
...
...
@@ -138,19 +152,35 @@ Page({
//预约
goAppoint
(
e
)
{
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
({
url
:
'/pages/appointment/appointment?type='
+
type
,
url
:
url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
let
type
=
options
.
tab
?
1
*
options
.
tab
:
0
this
.
setData
({
height
:
wx
.
getSystemInfoSync
().
windowHeight
,
//获取屏幕的高度
active
:
type
})
// this.getList(this.data.active)
this
.
getActivity
()
if
(
type
===
0
)
{
this
.
getActivity
()
}
else
{
this
.
getList
(
type
)
}
},
// 页面滚动
onPageScroll
:
function
(
funcEvent
)
{
...
...
@@ -170,15 +200,21 @@ Page({
// 我的活动
getActivity
:
function
()
{
let
that
=
this
wx
.
showLoading
({
title
:
'加载中'
,
})
App
.
wxRequest
({
url
:
'/api/v1/activity/getMyActivityList'
,
data
:
{
activeState
:
''
,
//""全部 0 未开始 1进行中 2已结束
activeState
:
''
,
//""全部 0 未开始 1进行中 2已结束
pageSize
:
'10'
,
pageNo
:
'1'
,
type
:
'1'
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
let
funcData
=
res
.
data
.
list
let
tmpArr
=
[]
funcData
.
forEach
(
item
=>
{
...
...
@@ -186,8 +222,8 @@ Page({
orderId
:
item
.
orderId
,
enrollId
:
item
.
enrollId
,
name
:
item
.
name
,
status
:
item
.
status
,
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
activeState
:
item
.
activeState
,
// 活动状态(0 未开始 1进行中 2 已结束)
status
:
item
.
status
,
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
activeState
:
item
.
activeState
,
// 活动状态(0 未开始 1进行中 2 已结束)
cover
:
item
.
cover
,
date
:
item
.
activeDate
+
' '
+
item
.
activeTime
,
address
:
item
.
address
,
...
...
@@ -215,13 +251,19 @@ Page({
break
;
}
let
that
=
this
wx
.
showLoading
({
title
:
'加载中'
,
})
App
.
wxRequest
({
url
:
'/api/v1/subscribe/getList'
,
data
:
{
state
:
''
,
type
:
type
//0 入园预约 1 看房预约 全部 空字符
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
let
tmpArr
=
[]
res
.
data
.
forEach
(
item
=>
{
let
type
=
item
.
type
*
1
...
...
pages/mine/appointment/appointment.wxml
View file @
333d55b2
...
...
@@ -221,15 +221,15 @@
<view class="noActive" wx:if="{{data.length === 0 && active === 2}}">
<view class="noActive-title">暂无夜间入园预约</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 class="noActive" wx:if="{{data.length === 0 && active === 1}}">
<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 class="noActive" wx:if="{{activityList.length === 0 && active === 0}}">
<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>
...
...
pages/mine/home/home.js
View file @
333d55b2
...
...
@@ -65,6 +65,15 @@ Page({
goodTypeCountData
:
{},
enrollSubscribeData
:
{}
},
// 去活动预约列表
goAppointment
:
function
(
e
)
{
let
type
=
e
.
currentTarget
.
dataset
.
type
wx
.
navigateTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
type
,
})
},
// 去客服中心
goQuestion
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/mine/question/question'
,
...
...
pages/mine/home/home.wxml
View file @
333d55b2
...
...
@@ -229,7 +229,7 @@
</view>
<!-- 预约分类icno -->
<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">
<image src="{{imageResourcesBase+'mine/home/yy_theme.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.active > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.active}}">
...
...
@@ -237,7 +237,7 @@
</view>
<text>主题活动</text>
</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">
<image src="{{imageResourcesBase+'mine/home/yy_night.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.garden > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.garden}}">
...
...
@@ -245,7 +245,7 @@
</view>
<text>夜间入园预约</text>
</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">
<image src="{{imageResourcesBase+'mine/home/yy_house.png'}}"></image>
<view class="order-activity-badge {{ enrollSubscribeData.scanHouse > 9 ? 'badge-widen' : ''}}" wx:if="{{enrollSubscribeData.scanHouse}}">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment