Commit 65491e6c authored by wdy's avatar wdy

Merge remote-tracking branch 'origin/master'

parents ad4cc093 a9bbfb57
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
type: this.type, type: this.type,
userId: this.userId userId: this.userId
}).then(res => { }).then(res => {
uni.navigateTo({ uni.navigateBack({
url:'/homePage/parkingService/plateManagement/index' delta:1,//返回层数,2则上上页
}) })
}) })
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</view> </view>
<view style="width: 100%;height: 1rpx;background-color:#eee;"></view> <view style="width: 100%;height: 1rpx;background-color:#eee;"></view>
</view> </view>
<view v-if="isShowButton" class="addButton"> <view v-if="isShowButton" class="addButton" @click="addPark">
<u-icon name="plus-circle"></u-icon> <u-icon name="plus-circle"></u-icon>
<view style="margin-left: 10rpx;">添加车牌</view> <view style="margin-left: 10rpx;">添加车牌</view>
</view> </view>
...@@ -82,12 +82,10 @@ ...@@ -82,12 +82,10 @@
export default { export default {
data() { data() {
return { return {
showList: true, showList: false,
isShowButton: true, isShowButton: false,
parkingId: '', parkingId: '',
parkList: [ parkList: [],
{car: '111',type: 1},
],
tenantId: '', tenantId: '',
img: 'http://192.144.239.97:20043/file/banner/20230605/6F749760FE1148369C4081EBD3248C6C.jpeg', img: 'http://192.144.239.97:20043/file/banner/20230605/6F749760FE1148369C4081EBD3248C6C.jpeg',
test: '', test: '',
...@@ -121,11 +119,42 @@ ...@@ -121,11 +119,42 @@
} }
}, },
onShow() { onShow() {
this.getList()
if(this.test === '') { if(this.test === '') {
this.getParking() this.getParking()
} }
}, },
methods: { 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(){ getParking(){
const that = this const that = this
uni.getStorage({ 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