فهرست منبع

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-app

achao 3 سال پیش
والد
کامیت
7d5037860c
5فایلهای تغییر یافته به همراه143 افزوده شده و 66 حذف شده
  1. 21 1
      App.vue
  2. 64 57
      pages/mine/driverCertificationNext.vue
  3. 12 5
      pages/mine/index.vue
  4. 35 1
      pages/mine/settings/editAvatar.vue
  5. 11 2
      pages/public/login.vue

+ 21 - 1
App.vue

@@ -32,7 +32,27 @@
 			// },
 		},
 		onLaunch: function() {
-			
+			uni.getSystemInfo({
+			        success:function(e){
+			            Vue.prototype.statusBar = e.statusBarHeight
+			            // #ifndef MP
+			            if(e.platform == 'android') {
+			                Vue.prototype.customBar = e.statusBarHeight + 50
+			            }else {
+			                Vue.prototype.customBar = e.statusBarHeight + 45
+			            }
+			            // #endif
+			            
+			            // #ifdef MP-WEIXIN
+			            let custom = wx.getMenuButtonBoundingClientRect()
+			            Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
+			            // #endif
+			            
+			            // #ifdef MP-ALIPAY
+			            Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
+			            // #endif
+			        }
+			    })
 			// #ifdef APP-PLUS
 			
 			var that = this

+ 64 - 57
pages/mine/driverCertificationNext.vue

@@ -441,41 +441,45 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车行驶证主页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车行驶证副页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "行驶证副页不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车行驶证档案编号不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车行驶证有效期不能为空!",
-					})
-					return true
+				if(this.radiovalue=='挂车司机'){
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证主页不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证副页不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证档案编号不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车行驶证有效期不能为空!",
+						})
+						return true
+					}
 				}
+				
+				// if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "行驶证副页不能为空!",
+				// 	})
+				// 	return true
+				// }
+				
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -511,26 +515,28 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车道路运输证不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车道路运输证号不能为空!",
-					})
-					return true
-				}
-				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "挂车道路运输证有效期不能为空!",
-					})
-					return true
+				if(this.radiovalue=='挂车司机'){
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证号不能为空!",
+						})
+						return true
+					}
+					if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "挂车道路运输证有效期不能为空!",
+						})
+						return true
+					}
 				}
 				return false
 			},
@@ -539,7 +545,7 @@
 			
 				// 校验
 				if (this.validate()) return
-				debugger
+				// debugger
 				if(this.dataDetails.driverSex=='男'){
 					this.dataDetails.driverCall = this.dataDetails.driverCall+'先生'
 				}else{
@@ -556,11 +562,12 @@
 
 
 				this.$request.baseRequest('post', '/driverInfo/api/addInfo', this.dataDetails).then(res => {
-						if(res.data.code==200){
+						if(res.code==200){
 							uni.$u.route('/pages/mine/index');
+						}else{
+							uni.$u.toast(res.message);
 						}
 
-
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);

+ 12 - 5
pages/mine/index.vue

@@ -50,7 +50,7 @@
 					</image>
 					<view>管理银行卡</view>
 				</view>
-				<view> > </view>
+				<view> <image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image> </view>
 			</view>
 			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/manageVehicles/index',3)">
 				<view class="flex align-center">
@@ -58,7 +58,7 @@
 					</image>
 					<view>管理车辆</view>
 				</view>
-				<view> > </view>
+				<view><image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image></view>
 			</view>
 			<view class="flex flex-space-between" @click="$helper.contactCustomerService">
 				<view class="flex align-center">
@@ -66,7 +66,7 @@
 					</image>
 					<view>联系客服</view>
 				</view>
-				<view> > </view>
+				<view> <image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image></view>
 			</view>
 			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/helpDescription')">
 				<view class="flex align-center">
@@ -74,7 +74,7 @@
 					</image>
 					<view>帮助说明</view>
 				</view>
-				<view> > </view>
+				<view> <image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image></view>
 			</view>
 			<view class="flex flex-space-between" @click="goDetailPage('/pages/mine/set')">
 				<view class="flex align-center">
@@ -82,7 +82,7 @@
 					</image>
 					<view>设置</view>
 				</view>
-				<view> > </view>
+				<view> <image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image></view>
 			</view>
 		</view>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
@@ -266,6 +266,13 @@
 		height: var(--status-bar-height);
 	}
 
+.arrow {
+		margin-left: 15px;
+		width: 8px;
+		height: 12px;
+		// justify-content: flex-end
+
+	}
 	.head {
 		.row1 {
 			display: flex;

+ 35 - 1
pages/mine/settings/editAvatar.vue

@@ -81,7 +81,41 @@
 					});
 
 				} else {
-
+					uni.chooseImage({
+						count: 1,
+						sourceType: 'camera',
+						success: function(res) {
+							console.log(JSON.stringify(res.tempFilePaths));
+							uploadImage(res.tempFilePaths[0], 'appData/',
+								result => {
+									// 上传成功
+									console.log('图片地址', result)
+									that.$request.baseRequest('get', '/BDAccessToken/getAuth', {
+											apiKey: 'yNWLRW6unoUxo2KXiCZxOxGS',
+											secretKey: 'E8hqzKWdFdTGnFnpAwZ7ixtL89SN3deR'
+										}).then(res => {
+											console.log(res)
+											that.$request.baseRequest('post',
+													'/commonUser/getUserDefinedBean', {
+														accessToken: res.data,
+														imagePath: result
+													}).then(res1 => {
+													that.deptListurl.avatarUrl = result
+												})
+												.catch(res => {
+													uni.$u.toast(res.message);
+												});
+										})
+										.catch(res => {
+											uni.$u.toast(res.message);
+										});
+					
+					
+					
+								}
+							)
+						}
+					});
 				}
 
 			},

+ 11 - 2
pages/public/login.vue

@@ -20,8 +20,17 @@
 				<!-- <u--input class='password' border="none" v-model='password'
 					placeholder="请输入密码,6-16位字符" :type="type" value="">
 					</u--input> -->
-				<u-input class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
-					:type="isShowPassword" :clearable='true'>
+				<u-input v-if="isShowPassword=='password'" class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
+					type="password" :clearable='true'>
+					<template slot="suffix">
+						<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
+							v-if="isShowPassword=='password'"></u-icon>
+						<u-icon name="eye-off" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(2)" v-else>
+						</u-icon>
+					</template>
+				</u-input>
+				<u-input v-else class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
+					type="text" :clearable='true'>
 					<template slot="suffix">
 						<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
 							v-if="isShowPassword=='password'"></u-icon>