第一次提交
This commit is contained in:
54
ChargingStation/pages/vehicle/binding/index.scss
Normal file
54
ChargingStation/pages/vehicle/binding/index.scss
Normal file
@@ -0,0 +1,54 @@
|
||||
.binding_body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(241, 248, 253, 0.9);
|
||||
padding: 54rpx 35rpx;
|
||||
box-sizing: border-box;
|
||||
.binding_container_footer{
|
||||
width: 680rpx;
|
||||
height: 106rpx;
|
||||
background: #121836;
|
||||
border-radius: 15rpx 15rpx 15rpx 15rpx;
|
||||
opacity: 1;
|
||||
margin: 0 auto;
|
||||
color: #ffffff;
|
||||
font-size: 34rpx;
|
||||
position: absolute;
|
||||
bottom: 80rpx;
|
||||
}
|
||||
.binding_container {
|
||||
width: 100%;
|
||||
height: 319rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
opacity: 1;
|
||||
padding: 40rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
.binding_footer {
|
||||
font-size: 22rpx;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.binding_num {
|
||||
margin-top: 30rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
.binding_num_item {
|
||||
width: 59rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
opacity: 1;
|
||||
border: 1rpx solid #cacaca;
|
||||
}
|
||||
.binding_num_item:last-child{
|
||||
border: 1rpx solid #52ca37;
|
||||
}
|
||||
}
|
||||
.binding_title {
|
||||
color: #121836;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
67
ChargingStation/pages/vehicle/binding/index.vue
Normal file
67
ChargingStation/pages/vehicle/binding/index.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<view class="binding_body">
|
||||
<view class="binding_container">
|
||||
<view class="binding_title">车牌号码 </view>
|
||||
<view @click="$refs.plateNumber.open()" class="binding_num flex around">
|
||||
<view v-for=" (item,index) in 8 " class="binding_num_item flex ac jc">
|
||||
{{plateNum[index]?plateNum[index]:''}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="binding_footer">充电时请选择正确的车牌号码</view>
|
||||
</view>
|
||||
<view @click="binding" :style="{background:this.plateNum.length&&!duplicate?'':'#bbbbbb'}" class="binding_container_footer flex ac jc">
|
||||
确定绑定
|
||||
</view>
|
||||
<view style="position: absolute;right: 0;left: 0;">
|
||||
<keyboardPlates ref="plateNumber" :plateNum.sync='plateNum' @change="getPlateNum" isShow></keyboardPlates>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import station from '@/api/station.js'
|
||||
import keyboardPlates from '../../../components/plate/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
keyboardPlates
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
plateNum: '',
|
||||
duplicate:false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
binding() {
|
||||
|
||||
if(!this.plateNum&&this.duplicate){
|
||||
return
|
||||
}
|
||||
this.duplicate = true
|
||||
station.vehicleSave({
|
||||
plateNumber:this.plateNum,
|
||||
createSource: 'MALL_COMS_MINI'
|
||||
}).then(res=>{
|
||||
setTimeout(()=>{
|
||||
uni.showToast({
|
||||
title:'添加成功',
|
||||
icon:'none',
|
||||
success() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
},1000)
|
||||
}).finally(()=>{
|
||||
this.duplicate = false
|
||||
})
|
||||
},
|
||||
getPlateNum() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import 'index.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user