| | |
| | | mode="widthFix"></image> |
| | | <view class="label-text">车头车尾车身照片</view> |
| | | </view> |
| | | <view class="img-container" |
| | | v-for="item in userInfo.bodyofcarJpg?userInfo.bodyofcarJpg.split(','):[]"> |
| | | <u--image :showLoading="true" |
| | | :src="item.url ? item.url : ''" |
| | | width="80px" |
| | | height="80px" |
| | | @click="imageClickCarBody(item.url)"> |
| | | <view slot="error" |
| | | style="font-size: 24rpx;">加载失败</view> |
| | | </u--image> |
| | | <view class="img-container special"> |
| | | <view class="img-container_item" |
| | | v-for="item in userInfo.bodyCarImg"> |
| | | <u--image :showLoading="true" |
| | | :src="BaseUrl+item" |
| | | width="80px" |
| | | height="80px" |
| | | @click="imageClickCarBody(item)"> |
| | | <view slot="error" |
| | | style="font-size: 24rpx;">加载失败</view> |
| | | </u--image> |
| | | </view> |
| | | </view> |
| | | <view style="display: flex;align-items: center;height: 100%; width: 150rpx;" |
| | | v-if='userInfo.bodyCarImg?(userInfo.bodyCarImg.length===0?true:false):true'> |
| | | 暂无图片 |
| | | </view> |
| | | </view> |
| | | <view class="car-img"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="loginout"> |
| | | <view class="loginout-main"><u-button text="修改密码" |
| | | type="primary" |
| | | @click="initPwd" |
| | | shape="circle" |
| | | plain></u-button></view> |
| | | <view class="loginout-main"><u-button text="退出登录" |
| | | type="primary" |
| | | @click="logout" |
| | | shape="circle" |
| | | plain></u-button></view> |
| | | </view> |
| | | <!-- 引导页 --> |
| | | <view class="noob-tour" |
| | | style="margin-top: 80rpx;"> |
| | | <combined-title title="操作指引"></combined-title> |
| | | <u-cell-group> |
| | | <u-cell title="新手指引" |
| | | name='1' |
| | | :clickable="true" |
| | | @click="noobTour"> |
| | | <u-badge type="primary" |
| | | value="01" |
| | | slot='icon'></u-badge> |
| | | <u-icon slot="value" |
| | | name="arrow-right" |
| | | size="30" |
| | | color="#b8b8b8"></u-icon> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | </view> |
| | | <!-- 图片预览弹出框 --> |
| | | <view class="previewImage-container"> |
| | | <previewImage ref="previewImage" |
| | | :imgs="driverTourImgList" |
| | | :saveBtn='false'></previewImage> |
| | | </view> |
| | | |
| | | <!-- 图片预览弹出框 --> |
| | |
| | | @confirm="logoutConfirm" |
| | | @cancel="logoutCancel"></u-modal> |
| | | </view> |
| | | <view class="initPwdModal"> |
| | | <u-modal :show="initPwdShow" |
| | | title="重置密码" |
| | | showCancelButton |
| | | content="初始密码将变更为123456,是否确认重置" |
| | | @confirm="initPwdConfirm" |
| | | @cancel="initPwdCancel"></u-modal> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { customerId, userInfo, redirectLogin } from '@/utils/status'; |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | import { mapMutations } from 'vuex'; |
| | | import { mapMutations, mapState } from 'vuex'; |
| | | import { onlineurl } from '@/api/request.js' |
| | | import combinedTitle from '@/components/combined-title/combined-title.vue'; |
| | | import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; |
| | | export default { |
| | | components: { |
| | | combinedTitle, |
| | | previewImage |
| | | }, |
| | | computed: { |
| | | ...mapState(['driverTourImgList']), |
| | | }, |
| | | data() { |
| | | return { |
| | | // 获取的司机详情 |
| | |
| | | weight: { |
| | | type: 'number', |
| | | required: true, |
| | | message: '请填写体重', |
| | | trigger: ['blur', 'change'] |
| | | trigger: ['blur', 'change'], |
| | | transform(value) { |
| | | return Number(value); |
| | | }, |
| | | validator: (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error('请填写体重')) |
| | | } else if (value > 200) { |
| | | callback(new Error('请填写合理体重')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | }, |
| | | password: { |
| | | required: false, |
| | |
| | | value: '蓝色' |
| | | } |
| | | ], |
| | | initPwdShow: false |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | this.$reqGet('getUserEntity').then(res => { |
| | | uni.hideLoading(); |
| | | this.editUserInfo = this.userInfo = res.data; |
| | | this.userInfo.bodyCarImg = this.userInfo.bodyofcarJpg ? this.userInfo.bodyofcarJpg.split(',') : |
| | | []; |
| | | console.log(this.userInfo.bodyCarImg); |
| | | this.editUserInfo.password = "" |
| | | uni.setStorageSync('carImg', this.userInfo.carImg); |
| | | uni.setStorageSync('drivingImg', this.userInfo.drivingImg); |
| | |
| | | }, |
| | | imageClickCarBody(url) { |
| | | this.previewImageSrc = url; |
| | | this.$nextTick(() => { |
| | | this.previewImageShow = true; |
| | | }); |
| | | }, |
| | | beforeRead() { |
| | | this.changeisUploadimg(true); |
| | |
| | | this.$u.toast('修改失败'); |
| | | }); |
| | | }, |
| | | initPwd() { |
| | | uni.navigateTo({ |
| | | url: `/pages/login/resetPassword/resetPassword` |
| | | }) |
| | | }, |
| | | initPwdConfirm() { |
| | | this.initPwdShow = false |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }); |
| | | this.editUserInfo.password = '123456'; |
| | | this.editUserInfo.carImg = uni.getStorageSync('carImg'); |
| | | this.editUserInfo.drivingImg = uni.getStorageSync('drivingImg') |
| | | this.$reqPost('updateUser', this.editUserInfo, 'json').then(res => { |
| | | uni.hideLoading() |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: '重置成功', |
| | | duration: 2000, |
| | | icon: 'success' |
| | | }) |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '修改失败'); |
| | | } |
| | | }).catch(err => { |
| | | this.$u.toast('修改失败'); |
| | | }); |
| | | }, |
| | | initPwdCancel() { |
| | | this.initPwdShow = false |
| | | }, |
| | | logout() { |
| | | this.logoutShow = true; |
| | | }, |
| | |
| | | logoutCancel() { |
| | | this.logoutShow = false; |
| | | }, |
| | | // 跳转发运统计页面 |
| | | statistics() { |
| | | uni.navigateTo({ |
| | | url: '/pages/customer-page/customer-my/faYunstatistics/faYunstatistics' |
| | | }); |
| | | noobTour() { |
| | | this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj1.jpg') |
| | | } |
| | | } |
| | | }; |
| | |
| | | height: 50rpx; |
| | | } |
| | | } |
| | | |
| | | .special { |
| | | width: 100%; |
| | | flex-wrap: wrap; |
| | | height: 100%; |
| | | @include flex; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | .editDriverPopup-container { |
| | | .u-popup { |
| | | .u-transition { |
| | | height: 75%; |
| | | height: 80%; |
| | | |
| | | .u-popup__content { |
| | | overflow: scroll !important; |
| | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |