健康报告修改位置
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// pages/myBookings/index.js
|
// pages/myBookings/index.js
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
let orderSn = ""
|
let orderSn = ""
|
||||||
|
let orderLimit = 48;
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,7 +114,7 @@ Page({
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '距离开课48小时内不得取消',
|
title: '距离开课' + orderLimit + '小时内不得取消',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -164,6 +165,9 @@ Page({
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
let currentDate = new Date().getTime();
|
let currentDate = new Date().getTime();
|
||||||
let startDate = currentDate;
|
let startDate = currentDate;
|
||||||
|
if (res.memberLessonTicket.venueLesson.orderLimit){
|
||||||
|
orderLimit = res.memberLessonTicket.venueLesson.orderLimit;
|
||||||
|
}
|
||||||
if (res.memberLessonTicket) {
|
if (res.memberLessonTicket) {
|
||||||
startDate = new Date(res.memberLessonTicket.venueLesson.date.replace(/-/g, "/") + ' ' + res.memberLessonTicket.venueLesson.startTime).getTime();
|
startDate = new Date(res.memberLessonTicket.venueLesson.date.replace(/-/g, "/") + ' ' + res.memberLessonTicket.venueLesson.startTime).getTime();
|
||||||
}
|
}
|
||||||
@@ -174,7 +178,7 @@ Page({
|
|||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
memberLessonTicket: res.memberLessonTicket,
|
memberLessonTicket: res.memberLessonTicket,
|
||||||
isSignIn: (startDate - currentDate) / 1000 / 60 / 60 < 48,
|
isSignIn: (startDate - currentDate) / 1000 / 60 / 60 < orderLimit,
|
||||||
})
|
})
|
||||||
}, err => {
|
}, err => {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user