浏览代码

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

gjy 3 年之前
父节点
当前提交
02b65bda04

+ 37 - 14
common/helper.js

@@ -92,23 +92,46 @@ const setAudit = (item) => {
 	}
 	console.log(item)
 }
-const contactCustomerService = (item) => {
-	console.log(item)
-	if (!item) {
-		item = '110'
+const contactCustomerService = (phone) => {
+	console.log(phone)
+	if (!phone) {
+		phone = '400123123'
 	}
-	console.log("联系客服")
-	uni.makePhoneCall({
-		phoneNumber: item,
-		success: (res) => {
-			console.log('调用成功!')
+	const res = uni.getSystemInfoSync();
+	// ios系统默认有个模态框
+	if(res.platform=='ios'){
+		uni.makePhoneCall({
+		phoneNumber:phone,
+		success(){
+			console.log('拨打成功了');
 		},
-		// 失败回调
-		fail: (res) => {
-			console.log('调用失败!')
-			contactCustomerService(item)
+		fail() {
+			console.log('拨打失败了');
 		}
-	});
+	})
+	}else{
+	//安卓手机手动设置一个showActionSheet
+		uni.showActionSheet({
+			itemList: [phone,'呼叫'],
+			success:function(res){
+				console.log(res);
+			   if(res.tapIndex==1){
+				uni.makePhoneCall({
+				  phoneNumber: phone,
+				success: (res) => {
+					console.log('调用成功!')
+				},
+			  
+				// 失败回调
+				fail: (res) => {
+					console.log('调用失败!')
+					// contactCustomerService(item)
+				}
+				})
+			  }
+			}
+		  })
+	}
 }
 // 获取市、区简称
 const filterUrban = (s) => {

+ 1 - 0
manifest.json

@@ -36,6 +36,7 @@
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
                     "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",

+ 4 - 8
pages/mine/cargoowner/addEnerprise.vue

@@ -85,8 +85,7 @@
 			</view>
 			<view class='line'></view>
 			<!-- :class="{'active':dataDetails.certificateAddressUrl&&dataDetails.company&&dataDetails.legalPersonName&&dataDetails.authorizationDeadline}" -->
-			<view
-				class="next-btn active" @click="submit()">
+			<view class="next-btn active" @click="submit()">
 				提交
 			</view>
 		</view>
@@ -431,19 +430,16 @@
 		}
 
 		.next-btn {
-			background: #F1F3F6;
+			background: #2772FB;
+			color: #fff;
 			width: 85%;
 			padding: 20rpx 20rpx;
 			text-align: center;
-			color: #C5CAD4;
 			border-radius: 50rpx;
 			margin: 0 auto;
 			margin-top: 10px;
 		}
 
-		.active {
-			background: #2772FB;
-			color: #fff;
-		}
+	
 	}
 </style>

+ 33 - 15
pages/mine/company/companyvideo.nvue

@@ -181,24 +181,42 @@
 							this.isAlreadyRecord = true
 						} else if (res.status == "end") {
 							console.log("结束录像")
-							videoFilePath = res.filePath;
 							uni.showLoading({
-								title:"保存视频中"
-							})
-							uploadImage('mp4', videoFilePath, 'appData/',
-								result => {
-									uni.hideLoading()
-									// 上传成功回调函数
-									console.log('视频地址', result)
-									uni.setStorageSync("videoSrc",result)
-									uni.navigateBack({
-										delta:1
+								title: '压缩中...'
+							});
+							var that = this;
+							uni.compressVideo({
+								src: tempFilePath,  
+								quality: 'low', //'low':低,'medium':中,'high':高  
+								success: function (res){            
+									console.log('压缩后',res)
+									videoFilePath = res.tempFilePath;
+									uni.showLoading({
+										title:"保存视频中"
 									})
-									// uni.$u.route('/pages/mine/company/addcompany', {
-									// 	videoSrc: result,
-									// });
+									uploadImage('mp4', videoFilePath, 'appData/',
+										result => {
+											uni.hideLoading()
+											// 上传成功回调函数
+											console.log('视频地址', result)
+											uni.setStorageSync("videoSrc",result)
+											uni.navigateBack({
+												delta:1
+											})
+											// uni.$u.route('/pages/mine/company/addcompany', {
+											// 	videoSrc: result,
+											// });
+										}
+									)
+								},
+								fail: function (err) {
+									uni.showToast({  
+										title:'视频压缩失败',  
+										icon:'none'
+									},2000)
 								}
-							)
+							})
+							
 							//                uni.saveVideoToPhotosAlbum({
 							//                    filePath: plus.io.convertAbsoluteFileSystem(videoFilePath),
 							//                    success: function(e) {

+ 1 - 1
pages/mine/myAccount/withdrawal.vue

@@ -121,7 +121,7 @@
 					id: this.id,
 					flag: this.flag
 				}).then(res => {
-					this.usableMoney = Number(res.data.accountBalance) - Number(res.data.frozenAmount)
+					this.usableMoney = Number(res.data.accountBalance) 
 				})
 			},
 			writeIn() {

+ 1 - 1
pages/order/orderDetails.vue

@@ -6,7 +6,7 @@
 			<view class='title flex flex-center'>
 				<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
 				<view class="nav-title">订单详情</view>
-				<u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService">
+				<u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService()">
 				</u-icon>
 			</view>
 		</view>

+ 2 - 1
pages/public/register.vue

@@ -229,7 +229,8 @@
 						password: this.password,
 						verifyCode: this.verifyCode,
 						userName: username,
-						identification:2
+						identification:2,
+						avatarUrl:"https://taohaoliang.oss-cn-beijing.aliyuncs.com/appData/165672849620975.png"//司机默认头像
 					}).then(res => {
 						if (res.code == '11002') {
 							uni.showToast({