0103405a by zhangmeng

订单支付,时间限制

1 parent 21335b63
......@@ -50,7 +50,7 @@
<div class="calendarList">
<ul v-loading="loading">
<li v-for="n in schList" :key="n.id" @click="goMatch(n)">
<li v-for="n in schList" :key="n.id" >
<el-row style="width: 100%">
<div style="margin-right: 25px">
<el-image style="width: 90px;height: 115px" :src="fillImgUrl(n.photos?.split(',')[0]) " fit="cover" />
......@@ -73,7 +73,7 @@
</el-row>
<el-row>
<div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px">{{ language==0?'¥':'€'}} </span> {{language==0?n.mealPrice:n.mealPriceEn}}</div>
<el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
<el-button :disabled="n.num-n.counts<=0||Date.now()>dayjs(currentDate).subtract(-1,'day').valueOf()" class="btn-lineG w200px" round type="primary" size="large" @click="goMatch(n)">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
</el-row>
</el-row>
</div>
......@@ -150,10 +150,10 @@ function goMatch(n) {
})
}
function disabledDate(e){
return e.getTime()<=Date.now()
console.log(e)
}
// function disabledDate(e){
// return e.getTime()<=Date.now()
// console.log(e)
// }
</script>
<style scoped lang="scss">
......
......@@ -72,7 +72,7 @@
</el-row>
<el-row>
<div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px">{{ language==0?'¥':'€'}} </span> {{language==0?n.photoPrice:n.photoPriceEn}}</div>
<el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
<el-button :disabled="n.num-n.counts<=0||Date.now()>dayjs(currentDate).subtract(-1,'day').valueOf()" class="btn-lineG w200px" round type="primary" size="large" @click="goMatch(n)">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
</el-row>
</el-row>
</div>
......
......@@ -386,7 +386,6 @@ const errorBox = ref(false)
const hideconfirmbtn = ref(false)
const user = useUserStore().user
// 1763462073870237698
if (useUserStore().user) {
isLogin.value = true
}
......@@ -482,7 +481,6 @@ function goHome() {
}
function goPay() {
debugger
if (payType.value == '2') {
booking.createWePay({orderId: orderId.value}).then(res => {
wePayCodeUrl.value = res.data
......@@ -503,16 +501,40 @@ let handle;
function startforGetData() {
handle = setTimeout(() => {
getData().then( res => {
if (form.value.payDate) {
if (handle) {
clearTimeout(handle)
handle = null
if (type.value=='photography'){
photographyOrder().then(res=>{
if (form.value.payDate) {
if (handle) {
clearTimeout(handle)
handle = null
}
} else {
startforGetData()
}
} else {
startforGetData()
}
})
})
}else if(type.value=='makeUp'){
MakeUpOrder().then(res=>{
if (form.value.payDate) {
if (handle) {
clearTimeout(handle)
handle = null
}
} else {
startforGetData()
}
})
}else{
getData().then( res => {
if (form.value.payDate) {
if (handle) {
clearTimeout(handle)
handle = null
}
} else {
startforGetData()
}
})
}
}, 2000)
}
......@@ -522,7 +544,7 @@ function showLogin() {
function MakeUpOrder(){
booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
return booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
form.value=res.data
totalFee.value=language.value==0?form.value.total:form.value.totalEn
}).catch(err => {
......@@ -543,7 +565,7 @@ function MakeUpIno(){
function photographyOrder(){
booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => {
return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => {
form.value=res.data
totalFee.value=language.value==0?form.value.total:form.value.totalEn
}).catch(err => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!