123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <template>
- <view class="content">
- <view class="content3 flex s-row">
- <view class="flex flex-space-between width100">
- 上传银行卡正面
- </view>
- <u-button type="primary" @click="uploadImg(3)">上传银行卡号页</u-button>
- <view class="flex flex-space-between width100">
- <view>银行卡卡号</view>
- <view class="flex">
- <u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="dataDetails.name">
- </u--input>
- <u--image src="../../static/images/xiangji-2.png" width="40px" height="40px" @click='photograph'>
- </u--image>
- </view>
- </view>
- <view class="flex flex-space-between width100">
- <view>开户行</view>
- <view class="flex">
- <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.name">
- </u--input>
- </view>
- </view>
- <view class="flex flex-space-between width100">
- <view>开户支行</view>
- <view class="flex">
- <u--input placeholder="选择开户支行" inputAlign='right' border="none" v-model="dataDetails.name">
- </u--input>
- <view>手动输入</view>
- </view>
- </view>
- <view class="flex flex-space-between width100">
- <view>收款人</view>
- <view class="flex">
- <u--input placeholder="输入收款人姓名" inputAlign='right' border="none" v-model="dataDetails.name">
- </u--input>
- </view>
- </view>
- </view>
- <view class="" @click="submit">提交</view>
- <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
- @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
- </u-action-sheet>
- </view>
- </template>
- <script>
- import upload from '@/components/upload.vue';
- import uploadImage from '@/components/ossutil/uploadFile.js';
- var _this;
- export default {
- components: {},
- data() {
- return {
- uploadType: '',
- isShowimgType: false,
- dataDetails: {
- name: '阿萨啊',
- carNumberList: [{
- kahao: '',
- addressUrl: ''
- }],
- bankList: [{
- yhk: '',
- kh: '',
- khh: '',
- khzh: '',
- skr: ''
- }],
- },
- imagesrc: ''
- };
- },
- onLoad() {
- _this = this;
- },
- methods: {
- //设置图片
- setImage(e) {
- //
- 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) {
- //
- this.imagesrc = path;
- uploadImage('image',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('image',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('image',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 {
- 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:
- }
- }
- },
- //身份证正面
- 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
- // })
- // })
- },
- submit(){
- console.log(' tijia')
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .row4-img {
- width: 32rpx;
- height: 32rpx;
- }
- </style>
|