修改绑定车辆显示
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="contentStyle">
|
||||
<view class="status-bar"></view>
|
||||
<!-- <view class="status-bar"></view>
|
||||
<uni-nav-bar title="绑定车辆" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar>
|
||||
</uni-nav-bar> -->
|
||||
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view v-if="carList.length === 0" class="empty-state">
|
||||
@@ -12,11 +12,14 @@
|
||||
|
||||
<view class="car-item" v-for="(item, index) in carList" :key="index" @click="handleItemClick(item, index)"
|
||||
:class="{ checked: selectedIndex === index }">
|
||||
<image :src="item.carImageUrl" mode="aspectFill" class="car-avatar"
|
||||
@error="item.carImageUrl = defaultCarImg" />
|
||||
<image :src="item.carImageUrl" mode="scaleToFill" class="car-avatar" v-if="item.carImageUrl"/>
|
||||
<image :src="defaultCarImg" mode="aspectFill" class="car-avatar-default" v-if="!item.carImageUrl"/>
|
||||
<view class="car-info">
|
||||
<view class="car-plate">{{ item.carNum }}</view>
|
||||
<view class="car-model">{{ item.carBrand }}·{{ item.carColor }}</view>
|
||||
<view class="car-model">{{ item.carBrand }}
|
||||
<text v-if="item.carBrand && item.carColor">·</text>
|
||||
{{ item.carColor }}
|
||||
</view>
|
||||
<view class="car-bindParkingSpace">{{ item.bindParkingSpace }}</view>
|
||||
</view>
|
||||
<!-- <view class="status-tag"
|
||||
@@ -47,7 +50,7 @@
|
||||
} from '@/pageSubPack/api/apiSub.js'
|
||||
|
||||
const statusBarHeight = ref(20)
|
||||
const defaultCarImg = "http://47.104.199.163:9090/images/propertyImgs/defaultCarImg.png"
|
||||
const defaultCarImg = "https://wuye.ckdzkj.com/images/propertyImgs/defaultCarImg.png"
|
||||
const selectedId = ref('')
|
||||
const selectedName = ref('')
|
||||
const selectedIndex = ref(-1)
|
||||
@@ -154,27 +157,6 @@
|
||||
uni.setStorageSync('bindCarName', selectedName.value)
|
||||
goBack()
|
||||
}, 1500)
|
||||
// postCarBind({
|
||||
// carId: selectedId.value
|
||||
// }).then(bindRes => {
|
||||
// uni.hideLoading()
|
||||
// if (bindRes.code === 200) {
|
||||
// uni.showToast({
|
||||
// title: '绑定成功',
|
||||
// icon: 'success'
|
||||
// })
|
||||
// setTimeout(() => {
|
||||
// uni.setStorageSync('bindCarId', selectedId.value)
|
||||
// uni.setStorageSync('bindCarName', selectedName.value)
|
||||
// goBack()
|
||||
// }, 1500)
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: bindRes.msg || '绑定失败',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -193,10 +175,6 @@
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
@@ -207,7 +185,7 @@
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx;
|
||||
padding: 0px 40rpx 180rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -228,7 +206,16 @@
|
||||
}
|
||||
|
||||
.bottom-btn {
|
||||
padding: 20rpx 30rpx 40rpx;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 20rpx 30rpx;
|
||||
padding-bottom: calc(40rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.car-item {
|
||||
@@ -251,10 +238,15 @@
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #f0f4ff;
|
||||
margin-right: 24rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.car-avatar-default{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-right: 36rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
font-size: 24rpx;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="form-container">
|
||||
<!-- 手机号输入框(带+86前缀) -->
|
||||
<view class="input-group phone-input">
|
||||
<image class="iconStyle" src="http://47.104.199.163:9090/images/propertyImgs/phoneIcon.png"></image>
|
||||
<image class="iconStyle" src="https://wuye.ckdzkj.com/images/propertyImgs/phoneIcon.png"></image>
|
||||
<input
|
||||
class="input-item"
|
||||
type="number"
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<!-- 验证码输入框(带获取验证码按钮) -->
|
||||
<view class="input-group code-input" style="padding: 0 0 0 20rpx;">
|
||||
<image class="iconStyle" src="http://47.104.199.163:9090/images/propertyImgs/codeIcon.png"></image>
|
||||
<image class="iconStyle" src="https://wuye.ckdzkj.com/images/propertyImgs/codeIcon.png"></image>
|
||||
<input
|
||||
class="input-item code-item"
|
||||
type="number"
|
||||
|
||||
Reference in New Issue
Block a user