haugnfuli 3 년 전
부모
커밋
2184ee0f98
1개의 변경된 파일67개의 추가작업 그리고 18개의 파일을 삭제
  1. 67 18
      pageD/identity/driverIdentityThree.vue

+ 67 - 18
pageD/identity/driverIdentityThree.vue

@@ -16,35 +16,47 @@
 					@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions"
 					:custom="uploadCustom" @on-progress="onProgress"></upload>
 			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="drives != ''" @click="drive">
-				<image v-bind:src="drives" class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="drives != ''">
+				<!-- <image v-bind:src="drives" class="picture"></image>
 				<view class="floats" v-if="certificatesTwo == true">
 					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
 					</image>
 					<view class="words">
 						上传驾驶证
 					</view>
-				</view>
+				</view> -->
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl1" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions1"
+					:custom="uploadCustom1" @on-progress="onProgress"></upload>
 			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="practices != ''" @click="practice">
-				<image v-bind:src="practices" class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="practices != ''" >
+				<!-- <image v-bind:src="practices" class="picture"></image>
 				<view class="floats" v-if="certificatesThree == true">
 					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
 					</image>
 					<view class="words">
 						上传道路运营证
 					</view>
-				</view>
+				</view> -->
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl2" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions2"
+					:custom="uploadCustom2" @on-progress="onProgress"></upload>
 			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="operates != ''" class="fujian" @click="operate">
-				<image v-bind:src="operates" class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="operates != ''" class="fujian" >
+				<!-- <image v-bind:src="operates" class="picture"></image>
 				<view class="floats" v-if="certificatesFour == true">
 					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
 					</image>
 					<view class="words">
 						上传从业资格证
 					</view>
-				</view>
+				</view> -->
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl3" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions3"
+					:custom="uploadCustom3" @on-progress="onProgress"></upload>
 			</view>
 			<button class="btns btn" @click="commit">提交</button>
 
@@ -71,14 +83,28 @@
 				imgUrls: [],
 				uploadCustom: true,
 				uploadCustom1: true,
+				uploadCustom2: true,
+				uploadCustom3: true,
 				uploadOptions: {
 					"text": "上传行驶证",
-					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/bankup%282%29.png"
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/travel.png"
+				},
+				uploadOptions1: {
+					"text": "上传驾驶证",
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/drive.png"
+				},
+				uploadOptions2: {
+					"text": "上传道路运营证",
+					"bgc": ""
 				},
-				travels: "../../static/img/authentication/travel(3).png",
-				drives: "../../static/img/authentication/drive(3).png",
-				practices: "../../static/img/authentication/business@3x.png",
-				operates: "../../static/img/authentication/business@3x.png",
+				uploadOptions3: {
+					"text": "上传从业资格证",
+					"bgc": ""
+				},
+				// travels: "../../static/img/authentication/travel(3).png",
+				// drives: "../../static/img/authentication/drive(3).png",
+				// practices: "../../static/img/authentication/business@3x.png",
+				// operates: "../../static/img/authentication/business@3x.png",
 				DriverViewInfo: {},
 				addressUrl: [],
 				certificates: true,
@@ -110,10 +136,34 @@
 			getImgUrl(res) {
 				console.log(res)
 				console.log('------------res-----------')
-				that.travels = res
-				that.addressUrl[0] = res
-				that.certificates = false
+				this.travels = res
+				this.addressUrl[0] = res
+				this.certificates = false
 
+			},
+			getImgUrl1(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				this.travels = res
+				this.addressUrl[1] = res
+				this.certificates = false
+			
+			},
+			getImgUrl2(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				this.travels = res
+				this.addressUrl[2] = res
+				this.certificates = false
+			
+			},
+			getImgUrl3(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				this.travels = res
+				this.addressUrl[3] = res
+				this.certificates = false
+			
 			},
 			onError(error) {
 				alert(error)
@@ -127,7 +177,6 @@
 				this.imgUrls.splice(index, 1);
 			},
 			commit() {
-				var that = this
 				if (this.addressUrl[0] == "" || this.addressUrl[0] == null) {
 					this.$api.msg('请上传行驶证!')
 					return