Files
car-system-app/pages/driver/serve/repair/bind_result.vue
2024-06-17 10:29:45 +08:00

143 lines
4.1 KiB
Vue

<template>
<view class="bindingresult">
<!-- 绑定成功 -->
<view class="allview">
<view class="topview">
<!-- #ifdef MP-WEIXIN -->
<u-image :showLoading="true" width="148rpx" height="148rpx" :src="`${config.aliyunOssUrl}/static/images/app/serve/bind_mate.png`" mode=""></u-image>
<!-- #endif -->
<!-- #ifdef APP -->
<u-image :showLoading="true" width="148rpx" height="148rpx" src="@/static/images/app/serve/bind_mate.png" mode=""></u-image>
<!-- #endif -->
</view>
<view class="contentview">
<u-cell-group :border="false">
<!-- <u-cell title="姓名" :value="userInfo.nickname?userInfo.nickname:'暂无'"></u-cell> -->
<u-cell title="姓名" :value="userInfo.realName?userInfo.realName:'--'"></u-cell>
<u-cell title="车型" :value="formObj.modelName?formObj.modelName:'--'"></u-cell>
<u-cell title="行驶证">
<view slot="right-icon">
<view class="conimg">
<u-image :showLoading="true" :src="formObj.driveLicense" width="112rpx" height="112rpx"></u-image>
</view>
</view>
</u-cell>
<u-cell title="车牌号" :value="formObj.carNo?formObj.carNo:'--'"></u-cell>
<u-cell title="解绑日期" :value="formObj.unbindTime?formObj.unbindTime:'--'"></u-cell>
<u-cell title="车辆类型 " :value="formObj.category==1?'公户车':formObj.category==2?'私家车':'--'"></u-cell>
<u-cell title="所属公司" v-if="formObj.category==1" :value="formObj.company?formObj.company:'--'"></u-cell>
<u-cell title="车主姓名" v-if="formObj.category==2" :value="formObj.ownerName?formObj.ownerName:'--'"></u-cell>
<u-cell title="使用性质"
:value="formObj.type==1?'预约出租客运':formObj.type==2?'非营运':formObj.type==3?'租赁':'--'"></u-cell>
</u-cell-group>
</view>
</view>
<view class="con_btn">
<u-button @click="toHomePage" color='#13AFA8' shape="circle">返回首页</u-button>
</view>
</view>
</template>
<script>
import { getMyCarAPI,getCarInfoAPI,getMineInfoAPI, realNameDetaiNowlAPI} from '@/api/serve/repair'
import { mapGetters } from 'vuex'
import config from '@/config';
export default {
data() {
return {
formObj: {},
userInfo: {},
config,
}
},
onShow() {
this.getMyCar()
},
computed: {
...mapGetters(['carNo'])
},
methods: {
getMyCar() {
// 车辆信息
getMyCarAPI().then(car=>{
console.log(car, '车辆信息');
this.formObj = car.data
}).catch(err=>{
this.$toast(err)
})
// 提交绑定车辆信息后,跳转到绑定结果页面,
// 但提交的信息需在平台端审核同意后,车辆信息才会更新
// 在平台没有审核之前,绑定结果页面展示的还是旧的车辆信息
// 同时,车辆信息 及 解绑车辆信息 都是旧的车辆信息
// getMyCarAPI().then(async(res)=>{
// if(res.data.carNo==this.carNo){
// this.formObj=res.data
// }else{
// const carno=await getCarInfoAPI({carNo:this.carNo}) // 根据车牌号获取车辆信息
// this.formObj=carno.data
// }
// }).catch(err=>{
// console.log(err);
// })
// 实名详情
realNameDetaiNowlAPI().then(detail=>{
this.userInfo = detail.data
}).catch(err=>{
this.$toast(err)
})
},
toHomePage() {
uni.switchTab({
url: '/pages/driver/home/home'
});
}
}
}
</script>
<style lang="scss" scoped>
.bindingresult {
background-color: #F5F5F5;
height: 100vh;
position: relative;
}
.allview {
padding: 30rpx 0;
}
.topview {
// border: 1px solid red;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.contentview {
// border: 1px solid blue;
background-color: #fff;
padding: 24rpx;
font-size: 32rpx;
font-weight: 400;
color: #444444;
// line-height: 38rpx;
margin: 64rpx 30rpx 30rpx 30rpx;
.conimg {
// border: 1px solid red;
display: flex;
justify-content: flex-end;
}
}
.con_btn {
// margin: 0 30rpx;
width:95%;
margin: 0 24rpx;
position: absolute;
bottom: 80rpx;
}
</style>