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
749e8459
authored
Sep 22, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao
parents
aa0acf14
0f38dae9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
122 additions
and
29 deletions
pages/mine/appointment-ticket/appointment-ticket.js
pages/mine/appointment-ticket/appointment-ticket.wxml
pages/mine/appointment-ticket/appointment-ticket.wxss
pages/mine/appointment/appointment.js
pages/mine/appointment/appointment.wxml
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/order/order.js
pages/pay/order-detail/order-detail.wxml
pages/mine/appointment-ticket/appointment-ticket.js
View file @
749e8459
// pages/hotelAccommodation/hotelAccommodation.js
const
App
=
getApp
()
Page
({
/**
* 页面的初始数据
*/
...
...
@@ -12,6 +11,9 @@ Page({
mobile
:
''
,
num
:
''
,
time
:
''
,
tickerInfo
:
{},
isDoing
:
false
,
isShowCancel
:
false
},
showHotline
()
{
...
...
@@ -19,6 +21,65 @@ Page({
hotline
:
true
})
},
//取消预约
onCancel
:
function
(
event
)
{
let
that
=
this
if
(
this
.
data
.
isDoing
)
return
wx
.
lin
.
showDialog
({
type
:
"confirm"
,
title
:
""
,
content
:
"是否确认取消预约"
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
)
wx
.
showLoading
({
title
:
'处理中'
,
mask
:
true
})
this
.
setData
({
isDoing
:
true
})
App
.
wxRequest
({
url
:
'/api/v1/subscribe/cancelSubscribe'
,
data
:
{
'id'
:
that
.
data
.
tickerInfo
.
id
},
success
:
(
response
)
=>
{
wx
.
hideLoading
()
that
.
setData
({
isDoing
:
false
})
wx
.
lin
.
showToast
({
image
:
'/image/success.png'
,
title
:
'取消成功'
,
})
setTimeout
(()
=>
{
let
type
=
that
.
data
.
type
let
tabType
=
2
if
(
type
==
0
)
{
//返回夜间入园预约列表
tabType
=
1
}
else
{
// 返回看房预约
tabType
=
2
}
wx
.
redirectTo
({
url
:
'/pages/mine/appointment/appointment?tab='
+
tabType
,
})
},
2000
);
}
})
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
}
}
})
},
//客服热线拨打
call
()
{
wx
.
makePhoneCall
({
...
...
@@ -39,12 +100,23 @@ Page({
console
.
log
(
'.............'
,
options
.
detail
)
let
detail
=
JSON
.
parse
(
options
.
detail
);
console
.
log
(
detail
);
let
yyDate
=
detail
.
subscribeDate
?
Date
.
parse
(
detail
.
subscribeDate
.
replace
(
/-/
,
'/'
))
:
0
let
nowStr
=
new
Date
().
toLocaleString
().
substr
(
0
,
10
)
+
" 00:00:00"
let
now
=
Date
.
parse
(
nowStr
)
console
.
log
(
yyDate
,
'yyDateyyDateyyDateyyDateyyDate'
);
console
.
log
(
nowStr
,
'nowStr'
);
console
.
log
(
now
,
'now'
);
let
isShowCancel
=
now
<=
yyDate
this
.
setData
({
tickerInfo
:
detail
,
type
:
detail
.
type
,
name
:
detail
.
name
,
mobile
:
detail
.
mobile
,
num
:
detail
.
num
,
time
:
detail
.
time
,
isShowCancel
})
},
})
\ No newline at end of file
pages/mine/appointment-ticket/appointment-ticket.wxml
View file @
749e8459
...
...
@@ -35,12 +35,16 @@
</view>
<image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image>
</view>
<view class="bottom-btns">
<view class="custom
" bindtap="showHotline">客服咨询
</view>
<view class="bottom-btns"
wx:if="{{isShowCancel}}"
>
<view class="custom
margin-right-20" bindtap="onCancel">取消预约
</view>
<view class="custom" bindtap="showHotline">客服咨询</view>
</view>
<view wx:else class="custom" bindtap="showHotline">客服咨询</view>
</view>
</view>
<l-dialog />
<l-toast l-image-class="toast-image"></l-toast>
<!-- 客服热线 -->
<l-arc-popup show="{{hotline}}" arc-radius="30">
...
...
pages/mine/appointment-ticket/appointment-ticket.wxss
View file @
749e8459
...
...
@@ -127,3 +127,6 @@
.bottom-btns {
display: flex;
}
.margin-right-20{
margin-right: 20rpx;
}
\ No newline at end of file
pages/mine/appointment/appointment.js
View file @
749e8459
...
...
@@ -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
:
t
mpArr
activityList
:
t
hat
.
data
.
activityList
.
concat
(
tmpArr
)
})
}
})
...
...
@@ -301,6 +311,7 @@ Page({
let
that
=
this
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
App
.
wxRequest
({
url
:
'/api/v1/subscribe/getList'
,
...
...
@@ -336,7 +347,7 @@ Page({
id
:
item
.
id
,
mobile
:
item
.
mobile
,
name
:
item
.
name
,
subscribeDate
:
item
.
subscribeDate
}
tmpArr
.
push
(
obj
)
})
...
...
@@ -355,7 +366,6 @@ Page({
if
(
this
.
data
.
active
==
0
)
{
this
.
getActivity
()
}
},
// 导航栏返回事件。
...
...
pages/mine/appointment/appointment.wxml
View file @
749e8459
...
...
@@ -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}}">
...
...
pages/mine/home/home.js
View file @
749e8459
...
...
@@ -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
},
...
...
pages/mine/home/home.wxml
View file @
749e8459
...
...
@@ -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>
...
...
pages/mine/order/order.js
View file @
749e8459
...
...
@@ -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'
,
...
...
pages/pay/order-detail/order-detail.wxml
View file @
749e8459
...
...
@@ -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>
...
...
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