Commit a9bbfb57 authored by 高宇's avatar 高宇

缴费记录

parent 08e77c01
......@@ -131,8 +131,8 @@
type: this.type,
userId: this.userId
}).then(res => {
uni.navigateTo({
url:'/homePage/parkingService/plateManagement/index'
uni.navigateBack({
delta:1,//返回层数,2则上上页
})
})
}
......
......@@ -35,7 +35,7 @@
</view>
<view style="width: 100%;height: 1rpx;background-color:#eee;"></view>
</view>
<view v-if="isShowButton" class="addButton">
<view v-if="isShowButton" class="addButton" @click="addPark">
<u-icon name="plus-circle"></u-icon>
<view style="margin-left: 10rpx;">添加车牌</view>
</view>
......@@ -82,12 +82,10 @@
export default {
data() {
return {
showList: true,
isShowButton: true,
showList: false,
isShowButton: false,
parkingId: '',
parkList: [
{car: '111',type: 1},
],
parkList: [],
tenantId: '',
img: 'http://192.144.239.97:20043/file/banner/20230605/6F749760FE1148369C4081EBD3248C6C.jpeg',
test: '',
......@@ -121,11 +119,42 @@
}
},
onShow() {
this.getList()
if(this.test === '') {
this.getParking()
}
},
methods: {
getList(){
const that = this
uni.getStorage({
key:'lifeData',
success:function(res){
console.log('data',res.data)
that.userId = res.data.vuex_user.id
that.$u.get('/user/car/list?userId=' + that.userId).then(Lres => {
console.log('车辆list',Lres)
if(Lres.length && Lres.length > 0 && Lres.length < 3) {
that.showList = true
that.isShowButton = true
console.log('1111')
} else if(Lres.length >= 3) {
that.showList = true
that.isShowButton = false
} else {
that.showList = false
that.isShowButton = false
}
that.parkList = Lres
})
}
})
},
addPark(){
uni.navigateTo({
url:'/homePage/parkingService/addplate/index'
})
},
getParking(){
const that = this
uni.getStorage({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment