|
@@ -14,6 +14,10 @@
|
|
|
</view>
|
|
|
<u-mask :show="screenShow" @click="screenShow = false" z-index="100"></u-mask>
|
|
|
</view>
|
|
|
+ <view class="carNone" v-if="appointmentList.length == 0">
|
|
|
+ <img src="static/img/暂无数据-缺省页.png" alt="">
|
|
|
+ <p>暂无预约</p>
|
|
|
+ </view>
|
|
|
<view class="reservation-items" v-for="(item,index) in appointmentList" :key="item.id" @click="gotoUrl('pages/user/myReservation/reservationListDetails?id='+item.id)">
|
|
|
<view class="station-name ellipsis">
|
|
|
{{item.stationName}}/{{item.deviceName}}
|
|
@@ -93,7 +97,6 @@
|
|
|
|
|
|
<script>
|
|
|
import * as API from '@/apis/apointment.js'
|
|
|
- import * as WxJsApi from '@/utils/wxJsApi.js'
|
|
|
|
|
|
import {
|
|
|
hourDistanceArr,
|
|
@@ -111,11 +114,11 @@
|
|
|
statusList: [
|
|
|
{id:"",name:"全部预约单"},
|
|
|
{id:"0",name:"待确认"},
|
|
|
- {id:"1",name:"已确认"},
|
|
|
+ {id:"1",name:"已预约"},
|
|
|
{id:"2",name:"已完成"},
|
|
|
{id:"3",name:"已取消"},
|
|
|
{id:"4",name:"已拒绝"},
|
|
|
- {id:"5",name:"已过期"},
|
|
|
+ {id:"9",name:"已过期"},
|
|
|
],
|
|
|
statusClass: '',
|
|
|
pageIndex: 1,
|
|
@@ -127,13 +130,6 @@
|
|
|
onShow() {
|
|
|
this.getAppointmentList(true);
|
|
|
},
|
|
|
- onReady() {
|
|
|
- WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
|
|
|
- // console.log(res)
|
|
|
- }).catch(error => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
- },
|
|
|
onReachBottom() {
|
|
|
if (this.appointmentList.length < this.recordsTotal) {
|
|
|
this.myLoadmore();
|
|
@@ -163,12 +159,18 @@
|
|
|
status: this.status
|
|
|
}).then((res) => {
|
|
|
uni.hideLoading();
|
|
|
-
|
|
|
this.appointmentList = [
|
|
|
...this.appointmentList,
|
|
|
...res.data.data
|
|
|
];
|
|
|
this.recordsTotal = res.data.recordsTotal;
|
|
|
+
|
|
|
+ var list = res.data.data;
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ if(list[i].status == '0') {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}).catch(error => {
|
|
|
uni.showToast({
|
|
|
title: error,
|
|
@@ -180,24 +182,6 @@
|
|
|
this.pageIndex += 1;
|
|
|
this.getAppointmentList()
|
|
|
},
|
|
|
- //微信扫二维码
|
|
|
- getScanCode() {
|
|
|
- WxJsApi.scanQRCode(1).then(res => {
|
|
|
- console.log("scanQRCode------" + res)
|
|
|
- if (res) {
|
|
|
- API.scanCode(res).then((response) => {
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
refuseClick(item) {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -221,6 +205,19 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ .carNone{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ p{
|
|
|
+ margin-top: -60px;
|
|
|
+ }
|
|
|
+ }
|
|
|
.preference {
|
|
|
background-color: #ffffff;
|
|
|
left: 0rpx;
|
|
@@ -239,7 +236,7 @@
|
|
|
padding-bottom: 20rpx;
|
|
|
}
|
|
|
.content-s{
|
|
|
- height: 200px;
|
|
|
+ height: 240px;
|
|
|
overflow-y:scroll;
|
|
|
}
|
|
|
page {
|