| | |
| | | </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" |
| | |
| | | <!-- 图片预览弹出框 --> |
| | | <view class="previewImage-container"> |
| | | <previewImage ref="previewImage" |
| | | :imgs="TourImgList" |
| | | :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'; |
| | |
| | | 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: '蓝色' |
| | | } |
| | | ], |
| | | TourImgList: ['https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj1.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj2.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj3.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj4.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj5.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj6.jpg', |
| | | 'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj7.jpg' |
| | | ], |
| | | initPwdShow: false |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | this.$u.toast('修改失败'); |
| | | }); |
| | | }, |
| | | initPwd() { |
| | | this.initPwdShow = true |
| | | }, |
| | | 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; |
| | | }, |