123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <template>
- <view class="box">
- <view class="carlistBox">
- <view class="line" v-for="(item,index) in carList" @click="itemClick(item)">
- <view class="lineCont">
- <view>
- <image :src="item.brandLogo" mode="widthFix" class="brandLogo"></image>
- </view>
- <view style="padding-left: 29rpx;">
- <view class="carName">
- <span>{{item.brand}} {{item.series}}</span>
- <view class="plateNumber">{{item.plateNumber}}</view>
- </view>
- <view class="carMS">{{item.carModel}}</view>
- </view>
- </view>
- <view class="lineBottom">
- <view class="lineDel" @click.stop="editCar(item.id)">编辑</view>
- <view class="lineDel" @click.stop="maintain(item)">保养信息</view>
- <!-- <view class="Default" v-show="item.isDefault!=1" @click.stop="defaultCar(item)">设为默认</view>
- <view class="DefaultYES" v-show="item.isDefault==1">已设为默认</view> -->
- </view>
- <view class="DefaultIcon" v-show="item.isDefault==1">默认</view>
- </view>
- </view>
- <view v-if="carList==''&&loding" class="nodataBox">
- <image src="http://dmsphoto.66km.com.cn/thFiles/3C95A4C5-73F8-4B34-902B-703B8A0825C9.png" mode="widthFix" class="nodataImg"></image>
- <view class="noTxt">暂无数据</view>
- </view>
- <view class="bottomView">
- <view class="saveCar" @click="addBtn">
- <!-- <image src="../../../static/img/icon_tianjiacheliang.png" mode=""
- style="width: 44rpx; height: 36rpx; margin-right: 10rpx;"></image> -->
- <view>添加爱车</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- carList: '',
- loding: false,
- type: '',
- carId: '',
- fromMe: false,
- }
- },
- onLoad(opt) {
- this.$common.isUserId()
- this.type = opt.type;
- // console.log(this.type)
- this.fromMe = opt.fromMe
- },
- onShow() {
- this.getqueryMyBMemberCar();
- this.carId = uni.getStorageSync("maintainCarData").id
- },
- methods: {
- maintain(item){
- uni.navigateTo({
-
- url:'../../index/handbook?mileage='+item.milage+'&liyangId='+item.nLevelID
- })
- },
- getqueryMyBMemberCar() {
- uni.showLoading({
- title: '加载中'
- })
- this.loding = false;
- this.$http('opencarOwnerHome/queryCarInfoList', {
- }, 'GET').then(res => {
- uni.hideLoading();
- this.carList = res.data;
- this.loding = true;
- })
- },
- addBtn() {
- uni.navigateTo({
- url: 'addCar'
- })
-
-
-
- },
- editCar(id) {
- uni.navigateTo({
- url: 'addCar?id=' + id + '&isEditCar=true'
- })
- },
- itemClick(item){
- this.$store.commit('mutationscarInfo', item)
- uni.navigateBack({
- delta: 1
- })
- },
-
-
- }
- }
- </script>
- <style scoped>
- .box {
- min-height: 100vh;
- background: #F4F5F7;
- }
- .nodataImg {
- width: 400rpx;
- padding-top: 100rpx;
- }
- .noTxt {
- font-size: 36rpx;
- color: #999999;
- padding-top: 50rpx;
- }
- .nodataBox {
- text-align: center;
- }
- .bottomView {
- background-color: #FFFFFF;
- width: 100%;
- height: 120rpx;
- position: fixed;
- bottom: 0rpx;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
- .saveCar {
- background: linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
- margin: 23rpx 30rpx;
- height: 74rpx;
- border-radius: 37rpx;
- color: #FFFFFF;
- font-size: 30rpx;
- font-weight: bold;
- align-items: center;
- display: flex;
- justify-content: center;
- }
- .carlistBox {
- padding-bottom: 120rpx;
- }
- .carlistBox {
- padding: 24rpx;
- padding-bottom: 120rpx;
- }
- .brandLogo {
- width: 63rpx;
- height: 63rpx;
- }
- .line {
- background: #FFFFFF;
- padding: 27rpx 20rpx;
- border-radius: 10rpx;
- margin-bottom: 20rpx;
- position: relative;
- }
- .lineCont {
- display: flex;
- }
- .carName {
- color: #3C3C3C;
- font-size: 30rpx;
- display: flex;
- }
- .plateNumber {
- border-radius: 4px;
- border: 1px solid #F19D01;
- height: 32rpx;
- line-height: 32rpx;
- padding: 0 10rpx;
- color: #F19D01;
- font-size: 22rpx;
- margin-left: 20rpx;
- margin-top: 5rpx;
- }
- .carMS {
- color: #666666;
- font-size: 26rpx;
- padding-top: 5px;
- }
- .lineBottom {
- display: flex;
- justify-content: flex-end;
- padding-top: 20rpx;
- }
- .lineDel {
- /* width: 94rpx; */
- height: 50rpx;
- border-radius: 25rpx;
- border: 1px solid #DDDDDD;
- text-align: center;
- line-height: 50rpx;
- font-size: 26rpx;
- color: #3C3C3C;
- margin-right: 29rpx;
- padding: 0 20rpx;
- }
- .Default {
- width: 148rpx;
- height: 50rpx;
- border-radius: 25rpx;
- border: 1px solid #FF4F00;
- line-height: 50rpx;
- text-align: center;
- color: #FF4F00;
- font-size: 26rpx;
- }
- .DefaultYES {
- width: 148rpx;
- height: 50rpx;
- border-radius: 25rpx;
- border: 1px solid #DDDDDD;
- line-height: 50rpx;
- text-align: center;
- color: #999999;
- font-size: 26rpx;
- }
- .DefaultIcon {
- position: absolute;
- top: 0;
- right: 0;
- width: 109rpx;
- height: 40rpx;
- background: linear-gradient(131deg, #FFA72C 0%, #FF450F 100%);
- border-radius: 0px 10rpx 0px 10rpx;
- text-align: center;
- line-height: 40rpx;
- color: #FFFFFF;
- font-size: 22rpx;
- }
- </style>
|