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
7c4ccaf9
authored
Sep 22, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM - 活动预约。取消预约
parent
05f095e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
4 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-ticket/appointment-ticket.js
View file @
7c4ccaf9
// pages/hotelAccommodation/hotelAccommodation.js
const
App
=
getApp
()
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
...
@@ -12,6 +11,9 @@ Page({
...
@@ -12,6 +11,9 @@ Page({
mobile
:
''
,
mobile
:
''
,
num
:
''
,
num
:
''
,
time
:
''
,
time
:
''
,
tickerInfo
:
{},
isDoing
:
false
,
isShowCancel
:
false
},
},
showHotline
()
{
showHotline
()
{
...
@@ -19,6 +21,65 @@ Page({
...
@@ -19,6 +21,65 @@ Page({
hotline
:
true
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
()
{
call
()
{
wx
.
makePhoneCall
({
wx
.
makePhoneCall
({
...
@@ -39,12 +100,23 @@ Page({
...
@@ -39,12 +100,23 @@ Page({
console
.
log
(
'.............'
,
options
.
detail
)
console
.
log
(
'.............'
,
options
.
detail
)
let
detail
=
JSON
.
parse
(
options
.
detail
);
let
detail
=
JSON
.
parse
(
options
.
detail
);
console
.
log
(
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
({
this
.
setData
({
tickerInfo
:
detail
,
type
:
detail
.
type
,
type
:
detail
.
type
,
name
:
detail
.
name
,
name
:
detail
.
name
,
mobile
:
detail
.
mobile
,
mobile
:
detail
.
mobile
,
num
:
detail
.
num
,
num
:
detail
.
num
,
time
:
detail
.
time
,
time
:
detail
.
time
,
isShowCancel
})
})
},
},
})
})
\ No newline at end of file
pages/mine/appointment-ticket/appointment-ticket.wxml
View file @
7c4ccaf9
...
@@ -35,12 +35,16 @@
...
@@ -35,12 +35,16 @@
</view>
</view>
<image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image>
<image src="http://sm-web.meiqicloud.com/userfiles/appResources/appointment/night/ornament-1.png" class="thanks"></image>
</view>
</view>
<view class="bottom-btns">
<view class="bottom-btns"
wx:if="{{isShowCancel}}"
>
<view class="custom
" bindtap="showHotline">客服咨询
</view>
<view class="custom
margin-right-20" bindtap="onCancel">取消预约
</view>
<view class="custom" bindtap="showHotline">客服咨询</view>
<view class="custom" bindtap="showHotline">客服咨询</view>
</view>
</view>
<view wx:else class="custom" bindtap="showHotline">客服咨询</view>
</view>
</view>
</view>
</view>
<l-dialog />
<l-toast l-image-class="toast-image"></l-toast>
<!-- 客服热线 -->
<!-- 客服热线 -->
<l-arc-popup show="{{hotline}}" arc-radius="30">
<l-arc-popup show="{{hotline}}" arc-radius="30">
...
...
pages/mine/appointment-ticket/appointment-ticket.wxss
View file @
7c4ccaf9
...
@@ -126,4 +126,7 @@
...
@@ -126,4 +126,7 @@
.bottom-btns {
.bottom-btns {
display: flex;
display: flex;
}
.margin-right-20{
margin-right: 20rpx;
}
}
\ No newline at end of file
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