123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <template>
- <view class="content">
- <u-radio-group v-model="radiovalue1" iconPlacement="row">
- <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
- :label="item.name" :name="item.name" @change="radioChange">
- </u-radio>
- </u-radio-group>
- <view class="level1-title">证件信息</view>
- <view class="content1">
- <view class="flex flex-space-between">
- <view class="left">
- <view>驾驶证主页</view>
- <u-button type="primary">上传驾驶证主页</u-button>
- </view>
- <view class="left">
- <view>驾驶证副页</view>
- <u-button type="primary">上传驾驶证副页</u-button>
- </view>
- </view>
- <view class="flex flex-space-between">
- <view>驾驶证有效期</view>
- <view>选择驾驶证有效期</view>
- </view>
- </view>
- <u-divider text="分割线"></u-divider>
- <view class="content2">
- <view class="flex flex-space-between">
- <view class="left">
- <view>行驶证主页</view>
- <u-button type="primary">上传行驶证主页</u-button>
- </view>
- <view class="left">
- <view>行驶证副页</view>
- <u-button type="primary">上传行驶证副页</u-button>
- </view>
- </view>
- <view class="flex flex-space-between">
- <view>行驶证有效期</view>
- <view>选择行驶证有效期</view>
- </view>
- </view>
- <u-divider text="分割线"></u-divider>
- <view class="content3">
- <view class="flex flex-space-between">
- <view class="left">
- <view>挂车行驶证主页</view>
- <u-button type="primary">上传挂车行驶证主页</u-button>
- </view>
- <view class="left">
- <view>挂车行驶证副页</view>
- <u-button type="primary">上传挂车行驶证副页</u-button>
- </view>
- </view>
- <view class="flex flex-space-between">
- <view>挂车行驶证有效期</view>
- <view>选择挂车行驶证有效期</view>
- </view>
- <u-divider text="分割线"></u-divider>
- </view>
- <view class="content4">
- <view class="flex s-row">
- <view class="">从业资格证</view>
- <u-button type="primary">上传从业资格证</u-button>
- </view>
- <view class="flex flex-space-between">
- <view>从业资格证有效期</view>
- <view>选择从业资格证有效期</view>
- </view>
- </view>
- <u-divider text="分割线"></u-divider>
- <view class="content5">
- <view class="flex s-row">
- <view class="">运营证</view>
- <u-button type="primary">上传运营证</u-button>
- </view>
- <view class="flex flex-space-between">
- <view>运营证有效期</view>
- <view>选择运营证有效期</view>
- </view>
- </view>
- <u-divider text="分割线"></u-divider>
- <view class="content6">
- <view class="flex s-row">
- <view class="">挂车运营证</view>
- <u-button type="primary">上传挂车运营证</u-button>
- </view>
- <view class="flex flex-space-between">
- <view>挂车运营证有效期</view>
- <view>选择挂车运营证有效期</view>
- </view>
- </view>
- <u-button type="primary" @click="submit">提交</u-button>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
- import uploadImage from '@/components/ossutil/uploadFile.js';
- var _this;
- export default {
- components: {},
- data() {
- return {
- radiolist1: [{
- name: '挂车司机',
- disabled: false
- },
- {
- name: '非挂车司机',
- disabled: false
- }
- ],
- // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
- radiovalue1: '挂车司机',
- };
- },
- onLoad(options) {
- _this = this;
- console.log(options)
- },
- methods: {
- submit() {
- // 校验
- console.log('提交')
- },
- radioChange(n) {
- console.log('radioChange', n);
- },
- //设置图片
- setImage(e) {
- debugger
- console.log(e);
- //显示在页面
- //this.imagesrc = e.path;
- if (e.dotype == 'idphoto') {
- _this.zjzClipper(e.path);
- } else if (e.dotype == 'watermark') {
- _this.watermark(e.path);
- } else {
- _this.savePhoto(e.path);
- }
- },
- //保存图片到相册,方便核查
- savePhoto(path) {
- debugger
- this.imagesrc = path;
- uploadImage(path, 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- //保存到相册
- // uni.saveImageToPhotosAlbum({
- // filePath: path,
- // success: () => {
- // uni.showToast({
- // title: '已保存至相册',
- // duration: 2000
- // });
- // }
- // });
- },
- uploadImg(type) {
- this.uploadType = type
- this.isShowimgType = true
- },
- photograph() {
- console.log('拍照')
- let that = this;
- uni.chooseImage({
- count: 1,
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- uploadImage(res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- }
- )
- }
- });
- },
- imgTypeSelect(val) {
- console.log(val)
- console.log(this.uploadType)
- if (val.name == '相册') {
- uni.chooseImage({
- count: 1,
- sourceType: this.$helper.chooseImage.sourceType,
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- uploadImage(res.tempFilePaths[0], 'appData/',
- result => {
- // 上传成功
- console.log('图片地址', result)
- switch (this.uploadType) {
- case 0:
- console.log('人车合影')
- break
- case 1:
- console.log('身份正面')
- break
- case 2:
- console.log('身份反面')
- break
- case 3:
- console.log('银行卡')
- break
- case 4:
- }
- }
- )
- }
- });
- } else {
- debugger
- switch (this.uploadType) {
- case 0:
- console.log('人车合影')
- break
- case 1:
- uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=face');
- console.log('身份正面')
- break
- case 2:
- console.log('身份反面')
- break
- case 3:
- console.log('银行卡')
- break
- case 4:
- }
- }
- },
- // 上传人车合影
- unloadGroupPhoto() {
- this.isShowimgType = true
- // uni.chooseImage({
- // count: 1,
- // success: function (res) {
- // console.log(JSON.stringify(res.tempFilePaths));
- // uploadImage(res.tempFilePaths[0], 'appData/',
- // result => {
- // // 上传成功
- // console.log('图片地址', result)
- // }
- // )
- // }
- // });
- },
- //身份证正面
- getImgUrl1(src) {
- // console.log(src)
- // console.log('------------res-----------')
- // let that = this;
- // that.id[0] = src
- // that.id1 = src
- // that.certificates = false
- // that.personImgs.personImg = that.id[0]
- // that.$api.doRequest('get', '/driverViewInfo/personShibie', that
- // .personImgs).then(res => {
- // if (res.data.data.recPerson != null) {
- // if (res.data.data.recPerson != "") {
- // that.$set(that.DriverViewInfo, 'driverName', res
- // .data.data.recPerson)
- // }
- // }
- // if (res.data.data.recPersonNo != null) {
- // if (res.data.data.recPersonNo != "") {
- // that.$set(that.DriverViewInfo, 'numberCard', res
- // .data.data.recPersonNo)
- // }
- // }
- // }).catch(res => {
- // uni.showToast({
- // title: res.data.message,
- // icon: 'none',
- // duration: 2000
- // })
- // })
- },
- // getImgUrl(res) {
- // // this.detailData.addressUrl = res
- // console.log(res)
- // console.log('------------res-----------')
- // },
- // onError(error) {
- // console.log('------------error-----------')
- // console.log(error)
- // },
- // onRemove(index) {},
- // filterFileType(index, lists) {
- // if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
- // lists.splice(index, 1);
- // // 当前文件不支持
- // uni.showModal({
- // title: '暂不支持当前图片类型',
- // showCancel: false
- // });
- // } else {
- // this.isAdd = false;
- // }
- // },
- // onProgress(e) {
- // console.log(e)
- // },
- },
- };
- </script>
- <style scoped lang="scss">
- .row4-img {
- width: 32rpx;
- height: 32rpx;
- }
- </style>
|