0103405a by zhangmeng

订单支付,时间限制

1 parent 21335b63
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
50 50
51 <div class="calendarList"> 51 <div class="calendarList">
52 <ul v-loading="loading"> 52 <ul v-loading="loading">
53 <li v-for="n in schList" :key="n.id" @click="goMatch(n)"> 53 <li v-for="n in schList" :key="n.id" >
54 <el-row style="width: 100%"> 54 <el-row style="width: 100%">
55 <div style="margin-right: 25px"> 55 <div style="margin-right: 25px">
56 <el-image style="width: 90px;height: 115px" :src="fillImgUrl(n.photos?.split(',')[0]) " fit="cover" /> 56 <el-image style="width: 90px;height: 115px" :src="fillImgUrl(n.photos?.split(',')[0]) " fit="cover" />
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
73 </el-row> 73 </el-row>
74 <el-row> 74 <el-row>
75 <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> 75 <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>
76 <el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button> 76 <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>
77 </el-row> 77 </el-row>
78 </el-row> 78 </el-row>
79 </div> 79 </div>
...@@ -150,10 +150,10 @@ function goMatch(n) { ...@@ -150,10 +150,10 @@ function goMatch(n) {
150 }) 150 })
151 } 151 }
152 152
153 function disabledDate(e){ 153 // function disabledDate(e){
154 return e.getTime()<=Date.now() 154 // return e.getTime()<=Date.now()
155 console.log(e) 155 // console.log(e)
156 } 156 // }
157 </script> 157 </script>
158 158
159 <style scoped lang="scss"> 159 <style scoped lang="scss">
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
72 </el-row> 72 </el-row>
73 <el-row> 73 <el-row>
74 <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> 74 <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>
75 <el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button> 75 <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>
76 </el-row> 76 </el-row>
77 </el-row> 77 </el-row>
78 </div> 78 </div>
......
...@@ -386,7 +386,6 @@ const errorBox = ref(false) ...@@ -386,7 +386,6 @@ const errorBox = ref(false)
386 const hideconfirmbtn = ref(false) 386 const hideconfirmbtn = ref(false)
387 387
388 const user = useUserStore().user 388 const user = useUserStore().user
389 // 1763462073870237698
390 if (useUserStore().user) { 389 if (useUserStore().user) {
391 isLogin.value = true 390 isLogin.value = true
392 } 391 }
...@@ -482,7 +481,6 @@ function goHome() { ...@@ -482,7 +481,6 @@ function goHome() {
482 } 481 }
483 482
484 function goPay() { 483 function goPay() {
485 debugger
486 if (payType.value == '2') { 484 if (payType.value == '2') {
487 booking.createWePay({orderId: orderId.value}).then(res => { 485 booking.createWePay({orderId: orderId.value}).then(res => {
488 wePayCodeUrl.value = res.data 486 wePayCodeUrl.value = res.data
...@@ -503,6 +501,29 @@ let handle; ...@@ -503,6 +501,29 @@ let handle;
503 501
504 function startforGetData() { 502 function startforGetData() {
505 handle = setTimeout(() => { 503 handle = setTimeout(() => {
504 if (type.value=='photography'){
505 photographyOrder().then(res=>{
506 if (form.value.payDate) {
507 if (handle) {
508 clearTimeout(handle)
509 handle = null
510 }
511 } else {
512 startforGetData()
513 }
514 })
515 }else if(type.value=='makeUp'){
516 MakeUpOrder().then(res=>{
517 if (form.value.payDate) {
518 if (handle) {
519 clearTimeout(handle)
520 handle = null
521 }
522 } else {
523 startforGetData()
524 }
525 })
526 }else{
506 getData().then( res => { 527 getData().then( res => {
507 if (form.value.payDate) { 528 if (form.value.payDate) {
508 if (handle) { 529 if (handle) {
...@@ -513,6 +534,7 @@ function startforGetData() { ...@@ -513,6 +534,7 @@ function startforGetData() {
513 startforGetData() 534 startforGetData()
514 } 535 }
515 }) 536 })
537 }
516 }, 2000) 538 }, 2000)
517 } 539 }
518 540
...@@ -522,7 +544,7 @@ function showLogin() { ...@@ -522,7 +544,7 @@ function showLogin() {
522 544
523 545
524 function MakeUpOrder(){ 546 function MakeUpOrder(){
525 booking.getMealOrderInfo({orderId: orderId.value}).then(res => { 547 return booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
526 form.value=res.data 548 form.value=res.data
527 totalFee.value=language.value==0?form.value.total:form.value.totalEn 549 totalFee.value=language.value==0?form.value.total:form.value.totalEn
528 }).catch(err => { 550 }).catch(err => {
...@@ -543,7 +565,7 @@ function MakeUpIno(){ ...@@ -543,7 +565,7 @@ function MakeUpIno(){
543 565
544 566
545 function photographyOrder(){ 567 function photographyOrder(){
546 booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => { 568 return booking.getPhotoOrderInfo({orderId: orderId.value}).then(res => {
547 form.value=res.data 569 form.value=res.data
548 totalFee.value=language.value==0?form.value.total:form.value.totalEn 570 totalFee.value=language.value==0?form.value.total:form.value.totalEn
549 }).catch(err => { 571 }).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!