Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 years ago
parent
commit
23b0549a5d

+ 29 - 7
components/upload.vue

@@ -17,10 +17,10 @@
 				:src="item.url || item.path" :mode="imageMode"></image>
 				:src="item.url || item.path" :mode="imageMode"></image>
 		</view>
 		</view>
 		<slot name="file" :file="lists"></slot>
 		<slot name="file" :file="lists"></slot>
-		<view style="display: inline-block;" :class="{'customStyle':custom}" @tap="selectFile"
-			v-if="maxCount > lists.length">
+		<view style="display: inline-block;" :class="custom&&options.bgc==''?'customStyle':'customStyleBgc'"
+			@tap="selectFile" v-if="maxCount > lists.length">
 			<slot name="addBtn"></slot>
 			<slot name="addBtn"></slot>
-			<img v-if="custom" :src="options.bgc" alt="" class="imgstyle">
+			<img v-if="custom&&options.bgc!=''" :src="options.bgc" alt="" class="imgstyle">
 			<view class="u-list-item u-add-wrap" hover-class="u-add-wrap__hover" hover-stay-time="150" :style="{
 			<view class="u-list-item u-add-wrap" hover-class="u-add-wrap__hover" hover-stay-time="150" :style="{
 					width: width + 'rpx',
 					width: width + 'rpx',
 					height: width + 'rpx'
 					height: width + 'rpx'
@@ -665,12 +665,33 @@
 	// 	width: 100% !important;
 	// 	width: 100% !important;
 	// 	height: 100% !important;
 	// 	height: 100% !important;
 	// }
 	// }
+	.customStyleBgc {
+		width: 100% !important;
+		height: 440rpx !important;
+		display: flex !important;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+
+		.u-add-wrap {
+			width: 100% !important;
+			height: 100% !important;
+			background: transparent;
+		}
+
+		.u-add-tips {
+			font-size: 18px;
+			font-weight: 600;
+			color: #617E8B;
+		}
+	}
+
 	.customStyle {
 	.customStyle {
 		width: 100% !important;
 		width: 100% !important;
 		height: 440rpx !important;
 		height: 440rpx !important;
-		// background: #F5F6FA;
-		// border-radius: 20rpx;
-		// border: 2px dashed #C6CBCE;
+		background: #F5F6FA;
+		border-radius: 20rpx;
+		border: 2px dashed #C6CBCE;
 		display: flex !important;
 		display: flex !important;
 		justify-content: center;
 		justify-content: center;
 		align-items: center;
 		align-items: center;
@@ -693,7 +714,8 @@
 		width: 100% !important;
 		width: 100% !important;
 		height: 440rpx !important;
 		height: 440rpx !important;
 	}
 	}
-	.imgstyle{
+
+	.imgstyle {
 		width: 100% !important;
 		width: 100% !important;
 		height: 440rpx !important;
 		height: 440rpx !important;
 		position: absolute;
 		position: absolute;

+ 7 - 21
pageB/contract/contract_detail.vue

@@ -215,14 +215,6 @@
 				}
 				}
 			},
 			},
 			getList() {
 			getList() {
-				// tranCarNo:'',
-				// carNo:'',
-				// grossWeight:'',
-				// tare:'',
-				// loadNetWeight:'',
-				// loadPoundImg:'',
-				//  contractNo:'',
-				//  goodsName:'',
 				if (this.goods.carNo.length == 0) {
 				if (this.goods.carNo.length == 0) {
 					this.$api.msg('车牌号不能为空')
 					this.$api.msg('车牌号不能为空')
 					return
 					return
@@ -268,6 +260,11 @@
 											cancelText: "返回",
 											cancelText: "返回",
 											confirmText: "继续添加",
 											confirmText: "继续添加",
 											success: function(res) {
 											success: function(res) {
+												if (res.confirm) {
+													uni.navigateTo({
+														url: `/pageB/contract/contract_detail?`
+													})
+												}
 												setTimeout(() => {
 												setTimeout(() => {
 													var result = that.goods.tranCarNo
 													var result = that.goods.tranCarNo
 														.substr(that.goods.tranCarNo
 														.substr(that.goods.tranCarNo
@@ -399,19 +396,8 @@
 					success: res => {
 					success: res => {
 						if (res.confirm) {
 						if (res.confirm) {
 							if (e.currentTarget.dataset.index == 0) {
 							if (e.currentTarget.dataset.index == 0) {
-								this.personNoImg = "";
-							} else if (e.currentTarget.dataset.index == 1) {
-								this.personNoImg1 = "";
-							} else if (e.currentTarget.dataset.index == 2) {
-								this.driverNoImg = "";
-							} else if (e.currentTarget.dataset.index == 3) {
-								this.driverNoImg1 = "";
-							} else if (e.currentTarget.dataset.index == 4) {
-								this.carNoImg = "";
-							} else if (e.currentTarget.dataset.index == 5) {
-								this.carNoImg1 = "";
-							}
-
+								this.goods.loadPoundImg = "";
+							} 
 						}
 						}
 					}
 					}
 				})
 				})

+ 28 - 8
pageB/contract/look.vue

@@ -58,13 +58,13 @@
 				<view  v-if='item.loadPoundImg'>
 				<view  v-if='item.loadPoundImg'>
 					<view class="poundtitle">发货磅单</view>
 					<view class="poundtitle">发货磅单</view>
 					<view class="poundlists">
 					<view class="poundlists">
-						<image :src="item.loadPoundImg" mode="" class="poundlist"></image>
+						<image :src="item.loadPoundImg" mode="" @click="ViewImage(item.loadPoundImg)" class="poundlist"></image>
 					</view>
 					</view>
 				</view>
 				</view>
 				<view  v-if='item.unloadPoundImg'>
 				<view  v-if='item.unloadPoundImg'>
 					<view class="poundtitle">收货磅单</view>
 					<view class="poundtitle">收货磅单</view>
 					<view class="poundlists">
 					<view class="poundlists">
-						<image :src="item.unloadPoundImg" mode="" class="poundlist"></image>
+						<image :src="item.unloadPoundImg" mode="" @click="ViewImage(item.unloadPoundImg)" class="poundlist"></image>
 					</view>
 					</view>
 				</view>
 				</view>
 				<button v-if='item.confirmFlag != 3 && item.status == "已送达"' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
 				<button v-if='item.confirmFlag != 3 && item.status == "已送达"' class=" btn btns unload" style="background-color: #22C572; color: #FFFFFF ;width:80%;"
@@ -250,12 +250,32 @@
 						}
 						}
 					});
 					});
 			},
 			},
-			ViewImage(e) {
-				var img = [];
-				img.push(e)
-				uni.previewImage({
-					current: 0,
-					urls: img
+			ViewImage(imageUrl) {
+				console.log(imageUrl) // http://192.168.100.251:8970/6_1597822634094.png
+				var images = [];
+				images.push(imageUrl);
+				console.log(images)  // ["http://192.168.100.251:8970/6_1597822634094.png"]
+				uni.previewImage({ // 预览图片  图片路径必须是一个数组 => ["http://192.168.100.251:8970/6_1597822634094.png"]
+					current:0,
+					urls:images,
+					longPressActions: {  //长按保存图片到相册
+						itemList: ['保存图片'],
+						success: (data)=> {
+							console.log(data);
+							uni.saveImageToPhotosAlbum({ //保存图片到相册
+								filePath: payUrl,
+								success: function () {
+									uni.showToast({icon:'success',title:'保存成功'})
+								},
+								fail: (err) => {
+									uni.showToast({icon:'none',title:'保存失败,请重新尝试'})
+								}
+							});
+						},
+						fail: (err)=> {
+							console.log(err.errMsg);
+						}
+				}
 				});
 				});
 			},
 			},
 			priceInput(e) {
 			priceInput(e) {

+ 115 - 147
pageD/identity/companyIdentity.vue

@@ -1,38 +1,16 @@
 <template>
 <template>
 	<view class="center">
 	<view class="center">
-		<view>
+		<view class="top">
 			<text @click='consent' v-bind:class="switchs1">公司</text>
 			<text @click='consent' v-bind:class="switchs1">公司</text>
 			<text @click='consent' v-bind:class="switchs2">个人</text>
 			<text @click='consent' v-bind:class="switchs2">个人</text>
 		</view>
 		</view>
 		<view v-if="consentStatus == true">
 		<view v-if="consentStatus == true">
-			<view>
-				<upload
-					class="upload"
-					ref="upload"
-					:action="action"
-					:max-size="maxSize"
-					:max-count="1"
-					:size-type="['compressed']"
-					@on-success="getImgUrl"
-					@on-remove="onRemove"
-					@on-uploaded="isAdd = true"
-					:before-upload="filterFileType"
-					:options="uploadOptions"
-					:custom="uploadCustom"
-					@on-progress="onProgress"
-				></upload>
-				
-				<view style="margin: 0 auto;height: 240px;" v-if="license1 != ''" @click="license">
-					<image v-bind:src="license1" class="picture"></image>
-					<view class="floats" v-if="certificates == true">
-						<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
-						</image>
-						<view class="words">
-							上传营业执照
-						</view>
-					</view>
-				</view>
-
+			<!-- 公司营业执照上传 -->
+			<view v-if="license1 != ''">
+				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions"
+					:custom="uploadCustom" @on-progress="onProgress"></upload>
 			</view>
 			</view>
 			<view class="c-row b-b">
 			<view class="c-row b-b">
 				<text class="tit">公司名称</text>
 				<text class="tit">公司名称</text>
@@ -50,12 +28,16 @@
 		</view>
 		</view>
 		<view v-else>
 		<view v-else>
 			<view>
 			<view>
-				<view style="margin: 0 auto;" @click="idUp">
-					<image v-bind:src="id1" class="picture"></image>
-				</view>
-				<view style="margin: 0 auto;" @click="idLow">
-					<image v-bind:src="id2" class="picture"></image>
-				</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>
+				<!-- 个人身份证反面 -->
+				<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="uploadCustom1" @on-progress="onProgress"></upload>
 			</view>
 			</view>
 			<view class="c-row b-b">
 			<view class="c-row b-b">
 				<text class="tit">姓名</text>
 				<text class="tit">姓名</text>
@@ -83,19 +65,30 @@
 		mapState
 		mapState
 	} from 'vuex';
 	} from 'vuex';
 	export default {
 	export default {
-		components:{upload},
+		components: {
+			upload
+		},
 		name: "buy",
 		name: "buy",
 		data() {
 		data() {
 			return {
 			return {
 				action: this.$uploadUrl,
 				action: this.$uploadUrl,
-				maxSize: 20 * 1024 * 1024, //限制文件大小 2M
+				maxSize: 5 * 1024 * 1024, //限制文件大小 2M
 				btnLoading: false, //防止重复点击
 				btnLoading: false, //防止重复点击
 				isAdd: true,
 				isAdd: true,
-				imgUrls:[],
-				uploadCustom:true,
-				uploadOptions:{
-					"text":"上传营业执照",
-					"bgc":"../../static/img/authentication/business@3x.png"
+				imgUrls: [],
+				uploadCustom: true,
+				uploadCustom1: true,
+				uploadOptions: {
+					"text": "上传营业执照",
+					"bgc": ""
+				},
+				uploadOptions1: {
+					"text": "上传身份证头像页",
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/identityup%282%29.png"
+				},
+				uploadOptions2: {
+					"text": "上传身份证国徽页",
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/identitylow%282%29.png"
 				},
 				},
 				tupian: "",
 				tupian: "",
 				inputContent: null,
 				inputContent: null,
@@ -121,7 +114,6 @@
 				businessLicenseAddressUrl: "",
 				businessLicenseAddressUrl: "",
 				certificates: true,
 				certificates: true,
 			};
 			};
-
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 			...mapState(['hasLogin', 'userInfo'])
@@ -139,24 +131,93 @@
 					this.isAdd = false;
 					this.isAdd = false;
 				}
 				}
 			},
 			},
+			// 营业执照上传
 			getImgUrl(res) {
 			getImgUrl(res) {
 				console.log(res)
 				console.log(res)
+				console.log('------------res-----------')
 				this.imgUrls.push(res);
 				this.imgUrls.push(res);
+				this.identityAuthenticationInfo.businessLicenseAddressUrl = res
+			},
+			// 身份证正面
+			getImgUrl1(res) {
+				console.log(res)
+				let that = this
+				that.id[0] = res
+				that.id1 = res
+				that.identityImgs1.personImg = res
+				that.$api.doRequest('get', '/driverViewInfo/personShibie', that
+					.identityImgs1).then(res => {
+					if (res.data.data.recPerson != null) {
+						if (res.data.data.recPerson != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'customerName', res.data.data.recPerson)
+						}
+					}
+					if (res.data.data.recPersonNo != null) {
+						if (res.data.data.recPersonNo != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'customerNumberCard', res.data.data
+								.recPersonNo)
+						}
+					}
+				}).catch(res => {
+					uni.showToast({
+						title: res.data.message,
+						icon: 'none',
+						duration: 2000
+					})
+				})
+			},
+			// 身份证反面
+			getImgUrl2(res) {
+				console.log(res)
+				let that = this
+				that.id[1] = res
+				that.id2 = res
+				that.identityImgs1.personImg = res
+				that.$api.doRequest('get', '/driverViewInfo/personShibie', that
+					.identityImgs1).then(res => {
+					if (res.data.data.recPerson != null) {
+						if (res.data.data.recPerson != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'customerName', res.data.data.recPerson)
+						}
+					}
+					if (res.data.data.recPersonNo != null) {
+						if (res.data.data.recPersonNo != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'customerNumberCard', res.data.data
+								.recPersonNo)
+						}
+					}
+				}).catch(res => {
+					uni.showToast({
+						title: res.data.message,
+						icon: 'none',
+						duration: 2000
+					})
+				})
+			},
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
 			},
 			},
-			onProgress(e){
-				console.log('-----------------------')
+			onProgress(e) {
 				console.log(e)
 				console.log(e)
 			},
 			},
 			onRemove(index) {
 			onRemove(index) {
 				this.imgUrls.splice(index, 1);
 				this.imgUrls.splice(index, 1);
 			},
 			},
 			jumpUrl() {
 			jumpUrl() {
+				debugger
 				if (this.consentStatus) {
 				if (this.consentStatus) {
 					if (!this.identityAuthenticationInfo.compName) {
 					if (!this.identityAuthenticationInfo.compName) {
 						this.$api.msg('公司名称不能为空')
 						this.$api.msg('公司名称不能为空')
 						return
 						return
 					}
 					}
-					if (this.identityAuthenticationInfo.compName.length < 2 || this.identityAuthenticationInfo.compName.length > 25) {
+					if (this.identityAuthenticationInfo.compName.length < 2 || this.identityAuthenticationInfo.compName
+						.length > 25) {
 						this.$api.msg('公司名称输入错误')
 						this.$api.msg('公司名称输入错误')
 						return
 						return
 					}
 					}
@@ -164,7 +225,8 @@
 						this.$api.msg('纳税人识别号不能为空')
 						this.$api.msg('纳税人识别号不能为空')
 						return
 						return
 					}
 					}
-					if (this.identityAuthenticationInfo.payTaxesCard.length < 15 || this.identityAuthenticationInfo.payTaxesCard.length > 20) {
+					if (this.identityAuthenticationInfo.payTaxesCard.length < 15 || this.identityAuthenticationInfo
+						.payTaxesCard.length > 20) {
 						this.$api.msg('纳税人识别号输入错误')
 						this.$api.msg('纳税人识别号输入错误')
 						return
 						return
 					}
 					}
@@ -193,7 +255,8 @@
 						this.$api.msg('姓名不能为空')
 						this.$api.msg('姓名不能为空')
 						return
 						return
 					}
 					}
-					if (this.identityAuthenticationInfo.customerName.length < 2 || this.identityAuthenticationInfo.customerName.length > 10) {
+					if (this.identityAuthenticationInfo.customerName.length < 2 || this.identityAuthenticationInfo
+						.customerName.length > 10) {
 						this.$api.msg('姓名输入错误')
 						this.$api.msg('姓名输入错误')
 						return
 						return
 					}
 					}
@@ -226,105 +289,6 @@
 					this.switchs2 = "switchs1"
 					this.switchs2 = "switchs1"
 				}
 				}
 			},
 			},
-
-			license() {
-				var that = this
-				uni.chooseImage({
-					count:1,
-					success: function(res) {
-						uni.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)
-								that.identityAuthenticationInfo.businessLicenseAddressUrl = strToObj.url
-								that.license1 = strToObj.url
-								that.certificates = false
-							}
-						})
-					}
-				})
-			},
-			idUp(){
-				var that = this
-				uni.chooseImage({
-					count:1,
-					success: function(res) {
-						uni.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)			
-								that.id[0] = strToObj.url
-								that.id1 = strToObj.url
-								that.identityImgs1.personImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/personShibie', that.identityImgs1).then(res => {
-									if(res.data.data.recPerson != null){
-										if(res.data.data.recPerson != ""){
-										that.$set(that.identityAuthenticationInfo,'customerName',res.data.data.recPerson)
-										}
-									}
-									if(res.data.data.recPersonNo != null){
-										if(res.data.data.recPersonNo != ""){
-										that.$set(that.identityAuthenticationInfo,'customerNumberCard',res.data.data.recPersonNo)
-										}
-									}			
-								}).catch(res => {
-									uni.showToast({
-										title: res.data.message,
-										icon: 'none',
-										duration: 2000
-									})
-								})
-							}
-						})
-					}
-				})
-			},
-			idLow(){
-				var that = this
-				uni.chooseImage({
-					count:1,
-					success: function(res) {
-						uni.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)			
-								that.id[1] = strToObj.url
-								that.id2 = strToObj.url
-								that.identityImgs1.personImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/personShibie', that.identityImgs1).then(res => {
-									if(res.data.data.recPerson != null){
-										if(res.data.data.recPerson != ""){
-										that.$set(that.identityAuthenticationInfo,'customerName',res.data.data.recPerson)
-										}
-									}
-									if(res.data.data.recPersonNo != null){
-										if(res.data.data.recPersonNo != ""){
-										that.$set(that.identityAuthenticationInfo,'customerNumberCard',res.data.data.recPersonNo)
-										}
-									}
-									
-									
-								}).catch(res => {
-									uni.showToast({
-										title: res.data.message,
-										icon: 'none',
-										duration: 2000
-									})
-								})
-							}
-						})
-					}
-				})
-			},
 			phoneinput(e) {
 			phoneinput(e) {
 				if (e.detail.value.length == 11) {
 				if (e.detail.value.length == 11) {
 					this.codestatus = true
 					this.codestatus = true
@@ -428,4 +392,8 @@
 		top: -150px;
 		top: -150px;
 		text-align: center;
 		text-align: center;
 	}
 	}
+
+	.upload {
+		margin: 20rpx 0;
+	}
 </style>
 </style>

+ 139 - 124
pageD/identity/companyIdentityThree.vue

@@ -1,27 +1,16 @@
 <template>
 <template>
 	<view class="center">
 	<view class="center">
 		<view>
 		<view>
-
-			<view style="margin: 0 auto;height: 240px;" v-if="bank1 != ''" @click="bankUp()">
-				<image v-bind:src="bank1" class="picture"></image>
-				<view class="floats" v-if="certificates == true">
-					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
-					</image>
-					<view class="words">
-						上传银行卡正面
-					</view>
-				</view>
-			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="bank2 != ''" @click="bankLow()">
-				<image v-bind:src="bank2" 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="getImgUrl" @on-error="onError" @on-remove="onRemove"
+				@on-uploaded="isAdd = true" :before-upload="filterFileType" :options="uploadOptions"
+				:custom="uploadCustom" @on-progress="onProgress"></upload>
+			<!-- 上传银行卡反面 -->
+			<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="uploadCustom" @on-progress="onProgress"></upload>
 		</view>
 		</view>
 		<view class="c-row b-b">
 		<view class="c-row b-b">
 			<text class="tit">银行卡号</text>
 			<text class="tit">银行卡号</text>
@@ -66,12 +55,13 @@
 		<view class="c-row b-b">
 		<view class="c-row b-b">
 			<text class="tit">手机号</text>
 			<text class="tit">手机号</text>
 			<view class="con-list">
 			<view class="con-list">
-				<input placeholder="请填写手机号" @input='phoneinput' type="number" maxlength="11" v-model="identityAuthenticationInfo.customerPhone"></input>
+				<input placeholder="请填写手机号" @input='phoneinput' type="number" maxlength="11"
+					v-model="identityAuthenticationInfo.customerPhone"></input>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view style='width:100%;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 		<view style='width:100%;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
 			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
 			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain' class='getcode'>{{sendText}}</button>
-			<view  class="con-list" style='position:relative;'>
+			<view class="con-list" style='position:relative;'>
 				<input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number" maxlength="6">
 				<input style='text-align:right;' v-model='verifyCode' placeholder="请输入验证码" type="number" maxlength="6">
 			</view>
 			</view>
 		</view>
 		</view>
@@ -92,15 +82,34 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import upload from '@/components/upload.vue';
 	import {
 	import {
 		mapState
 		mapState
 	} from 'vuex';
 	} from 'vuex';
 	export default {
 	export default {
+		components: {
+			upload
+		},
 		name: "buy",
 		name: "buy",
 		data() {
 		data() {
 			return {
 			return {
-				bank1: "../../static/img/authentication/bankup(3).png",
-				bank2: "../../static/img/authentication/banklow(3).png",
+				action: this.$uploadUrl,
+				maxSize: 5 * 1024 * 1024, //限制文件大小 2M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				imgUrls: [],
+				uploadCustom: true,
+				uploadCustom1: true,
+				uploadOptions: {
+					"text": "上传银行卡正面",
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/bankup%282%29.png"
+				},
+				uploadOptions1: {
+					"text": "上传银行卡反面",
+					"bgc": "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/banklow%282%29.png"
+				},
+				// bank1: "../../static/img/authentication/bankup(3).png",
+				// bank2: "../../static/img/authentication/banklow(3).png",
 				bankid: [],
 				bankid: [],
 				consentStatus: true,
 				consentStatus: true,
 				consentStatus1: false,
 				consentStatus1: false,
@@ -118,7 +127,7 @@
 				certificatesTwo: true,
 				certificatesTwo: true,
 				zhihangStatus: true,
 				zhihangStatus: true,
 				verification: true,
 				verification: true,
-				identityAuthenticationInfos:{},
+				identityAuthenticationInfos: {},
 			}
 			}
 		},
 		},
 		computed: {
 		computed: {
@@ -132,99 +141,100 @@
 			}
 			}
 		},
 		},
 		methods: {
 		methods: {
-			obtain() {
-				if (this.sendText == "获取验证码"){
-					this.getcode()
+			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;
 				}
 				}
 			},
 			},
-			bankUp() {
-				var that = this
-				uni.chooseImage({
-					success: function(res) {
-						uni.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)
-								that.bankid[0] = strToObj.url
-								that.bank1 = strToObj.url
-								that.certificates = false
-								that.bankImgs1.bankImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
-									.bankImgs1).then(res => {
-									if (res.data.data.bankNo != null) {
-										if (res.data.data.bankNo != "") {
-											that.$set(that.identityAuthenticationInfo,
-												'bankCard', res.data.data.bankNo)
-										}
-									}
-									if (res.data.data.bankName != null) {
-										if (res.data.data.bankName != "") {
-											that.$set(that.identityAuthenticationInfo,
-												'bankDeposit', res.data.data.bankName)
-										}
-									}
-									if (res.data.data.bankNameZhihang.length != 0) {
-										that.bankType = res.data.data.bankNameZhihang
-									}
-								}).catch(res => {
-									uni.showToast({
-										title: res.data.message,
-										icon: 'none',
-										duration: 2000
-									})
-								})
-							}
-						})
+			getImgUrl(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				let that = this
+				that.bankid[0] = res
+				that.bank1 = res
+				that.certificates = false
+				that.bankImgs1.bankImg = res
+				that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+					.bankImgs1).then(res => {
+					if (res.data.data.bankNo != null) {
+						if (res.data.data.bankNo != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'bankCard', res.data.data.bankNo)
+						}
+					}
+					if (res.data.data.bankName != null) {
+						if (res.data.data.bankName != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'bankDeposit', res.data.data.bankName)
+						}
+					}
+					if (res.data.data.bankNameZhihang.length != 0) {
+						that.bankType = res.data.data.bankNameZhihang
 					}
 					}
+				}).catch(res => {
+					uni.showToast({
+						title: res.data.message,
+						icon: 'none',
+						duration: 2000
+					})
 				})
 				})
 			},
 			},
-			bankLow() {
-				var that = this
-				uni.chooseImage({
-					success: function(res) {
-						uni.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)
-								that.bankid[1] = strToObj.url
-								that.bank2 = strToObj.url
-								that.certificatesTwo = false
-								that.bankImgs1.bankImg = strToObj.url
-								that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
-									.bankImgs1).then(res => {
-									if (res.data.data.bankNo != null) {
-										if (res.data.data.bankNo != "") {
-											that.$set(that.identityAuthenticationInfo,
-												'bankCard', res.data.data.bankNo)
-										}
-									}
-									if (res.data.data.bankName != null) {
-										if (res.data.data.bankName != "") {
-											that.$set(that.identityAuthenticationInfo,
-												'bankDeposit', res.data.data.bankName)
-										}
-									}
-									if (res.data.data.bankNameZhihang != null) {
-										that.bankType = res.data.data.bankNameZhihang
-									}
-								}).catch(res => {
-									uni.showToast({
-										title: res.data.message,
-										icon: 'none',
-										duration: 2000
-									})
-								})
-
-							}
-						})
+			getImgUrl1(res) {
+				console.log(res)
+				console.log('------------res-----------')
+				let that = this
+				that.bankid[1] = res
+				that.bank2 = res
+				that.certificatesTwo = false
+				that.bankImgs1.bankImg = res
+				that.$api.doRequest('get', '/driverViewInfo/bankShibie', that
+					.bankImgs1).then(res => {
+					if (res.data.data.bankNo != null) {
+						if (res.data.data.bankNo != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'bankCard', res.data.data.bankNo)
+						}
 					}
 					}
+					if (res.data.data.bankName != null) {
+						if (res.data.data.bankName != "") {
+							that.$set(that.identityAuthenticationInfo,
+								'bankDeposit', res.data.data.bankName)
+						}
+					}
+					if (res.data.data.bankNameZhihang != null) {
+						that.bankType = res.data.data.bankNameZhihang
+					}
+				}).catch(res => {
+					uni.showToast({
+						title: res.data.message,
+						icon: 'none',
+						duration: 2000
+					})
 				})
 				})
+
+			},
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			onRemove(index) {
+				this.imgUrls.splice(index, 1);
+			},
+			obtain() {
+				if (this.sendText == "获取验证码") {
+					this.getcode()
+				}
 			},
 			},
 			bankChange(e) {
 			bankChange(e) {
 				this.bankIndex = e.detail.value
 				this.bankIndex = e.detail.value
@@ -337,10 +347,9 @@
 						verifyCode: this.verifyCode
 						verifyCode: this.verifyCode
 					}).then(res => {
 					}).then(res => {
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
-							if(that.userInfo){
+							if (that.userInfo) {
 								that.identityAuthenticationInfo.commonId = that.userInfo.id
 								that.identityAuthenticationInfo.commonId = that.userInfo.id
-							}
-							else{
+							} else {
 								that.identityAuthenticationInfo.commonId = res.data.data.id
 								that.identityAuthenticationInfo.commonId = res.data.data.id
 							}
 							}
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
@@ -351,7 +360,8 @@
 								confirmText: '确定',
 								confirmText: '确定',
 								success: function(res) {
 								success: function(res) {
 									if (res.confirm) {
 									if (res.confirm) {
-										that.identityAuthenticationInfos.customerPhone = that.identityAuthenticationInfo.customerPhone
+										that.identityAuthenticationInfos.customerPhone = that
+											.identityAuthenticationInfo.customerPhone
 										that.$api.doRequest('get',
 										that.$api.doRequest('get',
 												'/identityAuthenticationInfo/selectPhone', that
 												'/identityAuthenticationInfo/selectPhone', that
 												.identityAuthenticationInfos)
 												.identityAuthenticationInfos)
@@ -363,20 +373,25 @@
 														success: function(res) {
 														success: function(res) {
 															if (res.confirm) {
 															if (res.confirm) {
 																that.$api.doRequest('post',
 																that.$api.doRequest('post',
-																		'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',that.identityAuthenticationInfo)
+																		'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',
+																		that
+																		.identityAuthenticationInfo
+																		)
 																	.then(res => {
 																	.then(res => {
-																		if (res.data.code == 200) {
+																		if (res.data
+																			.code ==
+																			200) {
 																			uni.showToast({
 																			uni.showToast({
 																				title: '提交成功',
 																				title: '提交成功',
 																				icon: 'none',
 																				icon: 'none',
 																				duration: 2000
 																				duration: 2000
 																			})
 																			})
 																			uni.navigateBack({
 																			uni.navigateBack({
-																				delta:3
+																				delta: 3
 																			})
 																			})
 																		}
 																		}
 																	})
 																	})
-															} 
+															}
 														}
 														}
 													});
 													});
 												} else if (res.data.code == 200) {
 												} else if (res.data.code == 200) {
@@ -391,7 +406,7 @@
 																	duration: 2000
 																	duration: 2000
 																})
 																})
 																uni.navigateBack({
 																uni.navigateBack({
-																	delta:3
+																	delta: 3
 																})
 																})
 															}
 															}
 														})
 														})
@@ -490,7 +505,7 @@
 		align-items: center;
 		align-items: center;
 		padding: 20rpx 30rpx;
 		padding: 20rpx 30rpx;
 		position: relative;
 		position: relative;
-		font-size:14px;
+		font-size: 14px;
 	}
 	}
 
 
 	.con-list {
 	.con-list {
@@ -539,8 +554,8 @@
 	}
 	}
 
 
 	.getcode.active {
 	.getcode.active {
-		background:#22C572;
-		color:#fff;
+		background: #22C572;
+		color: #fff;
 	}
 	}
 
 
 	.words {
 	.words {

+ 40 - 52
pages/user/set_nickname.vue

@@ -39,60 +39,48 @@
 					return
 					return
 				}
 				}
 				var that = this
 				var that = this
-				uni.showModal({
-					content: "您确定要更改昵称?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.deptListurl.userName = that.nickname
-							that.deptListurl.id = that.userInfo.id
-							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
-									res => {
-										if (res.data.code == 200) {
-											uni.showToast({
-												title: '修改成功!',
-												icon: 'success',
-												duration: 2000,
-												success() {
-													setTimeout(()=>{
-														var _student = uni.getStorageSync('userInfo');
-														_student.userName = that.nickname;
-														uni.setStorageSync('userInfo', _student);
-														var name = 'userInfo';
-														var value = _student;
-														that.$store.commit('$uStore', {
-															name,
-															value
-														});
-														uni.navigateBack()
-													},2000)
-												}
-											})
-										}
-									})
-								.catch(res => {
-									if(res.errmsg){
-										uni.showToast({
-											title: res.errmsg,
-											icon: 'none',
-											duration: 2000
-										})
+				that.deptListurl.userName = that.nickname
+				that.deptListurl.id = that.userInfo.id
+				that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
+						res => {
+							if (res.data.code == 200) {
+								uni.showToast({
+									title: '修改成功!',
+									icon: 'success',
+									duration: 2000,
+									success() {
+										setTimeout(()=>{
+											var _student = uni.getStorageSync('userInfo');
+											_student.userName = that.nickname;
+											uni.setStorageSync('userInfo', _student);
+											var name = 'userInfo';
+											var value = _student;
+											that.$store.commit('$uStore', {
+												name,
+												value
+											});
+											uni.navigateBack()
+										},2000)
 									}
 									}
-									else{
-										uni.showToast({
-											title: "系统异常,请联系管理员",
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								});
-
-						} else if (res.cancel) {
-							// console.log('用户点击取消');
+								})
+							}
+						})
+					.catch(res => {
+						if(res.errmsg){
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+						else{
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
 						}
 						}
-					},
-				})
+					});
 
 
 
 
 
 

+ 43 - 54
pages/user/set_picture.vue

@@ -113,64 +113,53 @@
 					return
 					return
 				}
 				}
 				var that = this
 				var that = this
-				uni.showModal({
-					content: "您确定要更改图像?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.deptListurl.avatarUrl = that.identityUrl
-							that.deptListurl.id = that.userInfo.id
-							that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
-									res => {
-										if (res.data.code == 200) {
-												uni.showToast({
-													title: '修改成功!',
-													icon: 'success',
-													duration: 2000,
-													success() {
-														setTimeout(()=>{
-															that.userInfo.avatarUrl = that.identityUrl
-															var _student = uni.getStorageSync('userInfo');
-															_student.avatarUrl = that.identityUrl;
-															uni.setStorageSync('userInfo', _student);
-															var name = 'userInfo';
-															var value = _student;
-															that.$store.commit('$uStore', {
-																name,
-																value
-															});
-															// this.$api.msg('修改成功2!')
-															uni.navigateBack({
-																delta:1
-															})
-														},2000)
-													}
+				that.deptListurl.avatarUrl = that.identityUrl
+				that.deptListurl.id = that.userInfo.id
+				that.$api.doRequest('post', '/commonUser/editUserInfo', that.deptListurl).then(
+						res => {
+							if (res.data.code == 200) {
+									uni.showToast({
+										title: '修改成功!',
+										icon: 'success',
+										duration: 2000,
+										success() {
+											setTimeout(()=>{
+												that.userInfo.avatarUrl = that.identityUrl
+												var _student = uni.getStorageSync('userInfo');
+												_student.avatarUrl = that.identityUrl;
+												uni.setStorageSync('userInfo', _student);
+												var name = 'userInfo';
+												var value = _student;
+												that.$store.commit('$uStore', {
+													name,
+													value
+												});
+												// this.$api.msg('修改成功2!')
+												uni.navigateBack({
+													delta:1
 												})
 												})
-											
+											},2000)
 										}
 										}
 									})
 									})
-								.catch(res => {
-									if(res.data.errmsg){
-										uni.showToast({
-											title: res.data.errmsg,
-											icon: 'none',
-											duration: 2000
-										})
-									}
-									else{
-										uni.showToast({
-											title: "系统异常,请联系管理员",
-											icon: 'none',
-											duration: 2000
-										})
-									}
-								});
-						} else if (res.cancel) {
-							// console.log('用户点击取消');
+								
+							}
+						})
+					.catch(res => {
+						if(res.data.errmsg){
+							uni.showToast({
+								title: res.data.errmsg,
+								icon: 'none',
+								duration: 2000
+							})
 						}
 						}
-					},
-				})
+						else{
+							uni.showToast({
+								title: "系统异常,请联系管理员",
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					});
 			},
 			},
 		}
 		}
 	}
 	}

+ 6 - 67
pages/user/user.vue

@@ -64,18 +64,10 @@
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
 			</view>
 		</view>
 		</view>
-		<neil-modal :show="inputShow" @close="cancel" :style="{display:inputStatus}" title="修改昵称" showCancel="true">
-			<input v-model="inputContent" style="margin:20upx;" placeholder="请输入昵称" />
-			<button class="margin:20upx;bg-green">
-				确认修改
-			</button>
-
-		</neil-modal>
 	</view>
 	</view>
 </template>
 </template>
 <script>
 <script>
 	import dragButton from "@/components/drag-button/drag-button.vue";
 	import dragButton from "@/components/drag-button/drag-button.vue";
-	import neilModal from '@/components/neil-modal/neil-modal.vue';
 	import {
 	import {
 		mapState
 		mapState
 	} from 'vuex';
 	} from 'vuex';
@@ -84,7 +76,6 @@
 		pageAtTop = true;
 		pageAtTop = true;
 	export default {
 	export default {
 		components: {
 		components: {
-			neilModal,
 			dragButton
 			dragButton
 		},
 		},
 		data() {
 		data() {
@@ -106,63 +97,6 @@
 				userphone:"",
 				userphone:"",
 				username:"请更改昵称",
 				username:"请更改昵称",
 				gridList: [
 				gridList: [
-					// {
-					// 	num:0,
-					// 	name: '货源信息',
-					// 	icon:'cuIcon-apps',
-					// 	tips: 0,
-					// 	url:'/pages/tran/my_tran?TabCur=0',
-					// 	show:true
-					// },
-					// {
-					// 	num:1,
-					// 	name: '承运信息',
-					// 	icon:'cuIcon-calendar',
-					// 	tips: 0,
-					// 	url:'/pages/tran/my_tran?TabCur=1',
-					// 	show:true
-					// },
-					// {
-					// 	num:2,
-					// 	name: '我的合同',
-					// 	icon:'cuIcon-copy',
-					// 	tips: 0,
-					// 	url:'/pageB/contract/contract',
-					// 	show:true
-					// },
-					// {
-					// 	num:3,
-					// 	name: '消息列表',
-					// 	icon:'cuIcon-news',
-					// 	tips: 0,
-					// 	url:'/pages/user/message',
-					// 	show:true
-					// },
-					// {
-					// 	num:4,
-					// 	name: '任务中心',
-					// 	icon:'cuIcon-copy',
-					// 	tips: 0,
-					// 	url:`/pages/user/task`,
-					// 	show:true
-					// },
-					// {
-					// 	num:5,
-					// 	name: '我的车辆',
-					// 	icon:'cuIcon-deliver',
-					// 	tips: 0,
-					// 	url:'',
-					// 	show:true
-					// },
-					// {
-					// 	num:6,
-					// 	name: '联系我们',
-					// 	icon:'cuIcon-phone',
-					// 	tips: 0,
-					// 	url:'/pages/user/contact',
-					// 	show:true
-					// },
-					// {
 					{
 					{
 						num: 0,
 						num: 0,
 						name: '身份认证',
 						name: '身份认证',
@@ -261,7 +195,9 @@
 			// 手机号中间4位加*
 			// 手机号中间4位加*
 			starUserphone(){
 			starUserphone(){
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
 				let reg = /^(\d{3})\d{4}(\d{4})$/;
-				return this.userphone.replace(reg, "$1****$2");
+				if(this.userphone){
+					return this.userphone.replace(reg, "$1****$2");
+				}
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
@@ -480,6 +416,9 @@
 					confirmText: '确定',
 					confirmText: '确定',
 					success: (e) => {
 					success: (e) => {
 						if (e.confirm) {
 						if (e.confirm) {
+							uni.hideTabBarRedDot({
+								index:3
+							})
 							uni.clearStorageSync();
 							uni.clearStorageSync();
 							that.$store.commit('logout')
 							that.$store.commit('logout')
 							that.$api.logout()
 							that.$api.logout()

BIN
static/img/jiaoyi.png


BIN
static/img/jiaoyi_check.png


BIN
static/img/liangmai.png


BIN
static/img/liangmai_check.png


BIN
static/img/liangxin.png


BIN
static/img/liangxin_check.png


BIN
static/img/splash1.png


BIN
static/img/splash1@2x.png


BIN
static/img/splash1@3x.png


BIN
static/img/splash2.png


BIN
static/img/splash2@2x.png


BIN
static/img/splash2@3x.png


BIN
static/img/splash3.png


BIN
static/img/splash3@2x.png


BIN
static/img/splash3@3x.png


BIN
static/img/wode.png


BIN
static/img/wode_check.png


BIN
static/img/wuliu.png


BIN
static/img/wuliu_check.png


BIN
static/img/zixun.png


BIN
static/img/zixun_check.png