gjy 2 gadi atpakaļ
vecāks
revīzija
1f12f0f2b8

+ 148 - 1
App.vue

@@ -14,6 +14,119 @@
 	import permision from "@/js_sdk/wa-permission/permission.js"
 	export default {
 		methods: {
+			getLngLat(){
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: res => {
+						if (res.latitude) {
+							console.log(res)
+							if(res.address.city){
+								if(res.address.city.indexOf('市')!=-1){
+									res.address.city=res.address.city.substring(0,res.address.city.length-1)
+								}
+							}
+							if(res.address.province){
+								if(res.address.province.indexOf('省')!=-1){
+									res.address.province=res.address.province.substring(0,res.address.province.length-1)
+								}
+							}
+							uni.setStorageSync('fPlaceObj',{
+								fchoosearea:'全部',
+								fchoosecity:res.address.city,
+								fchooseprovince:res.address.province,
+								selected:res.address.city
+							})
+							uni.setStorageSync('sPlaceObj',{
+								schoosearea:'请选择区',
+								schoosecity:'请选择市',
+								schooseprovince:'全国',
+								selected:'全国'
+							})
+							uni.setStorageSync('longitudeAndLatitude',res.longitude+','+res.latitude)
+				}
+				}
+				})
+			},
+			checkOpenGPSServiceByAndroidIOS() {
+				console.log()
+			    let system = uni.getSystemInfoSync(); // 获取系统信息
+			    console.log(system);
+			    if (system.platform === 'android') { // 判断平台
+			        var context = plus.android.importClass("android.content.Context");
+			        var locationManager = plus.android.importClass("android.location.LocationManager");
+			        var main = plus.android.runtimeMainActivity();
+			        var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+			        if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+			            uni.showModal({
+			                title: '提示',
+			                content: '请打开定位服务功能',
+			                // showCancel: false, // 不显示取消按钮
+			                success(res) {
+								if(res.confirm){
+									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+										var Intent = plus.android.importClass('android.content.Intent');
+										var Settings = plus.android.importClass('android.provider.Settings');
+										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+										main.startActivity(intent); // 打开系统设置GPS服务页面
+										this.getLngLat()
+									} else {
+										uni.setStorageSync('fPlaceObj',{
+											fchoosearea:'全部',
+											fchoosecity:'市辖区',
+											fchooseprovince:'北京',
+											selected:res.address.city
+										})
+										uni.setStorageSync('sPlaceObj',{
+											schoosearea:'请选择区',
+											schoosecity:'请选择市',
+											schooseprovince:'全国',
+											selected:'全国'
+										})
+										uni.setStorageSync('longitudeAndLatitude','116.3972,39.9096')
+									}
+								} 
+			                }
+			            });
+			        }else{
+						this.getLngLat()
+					}
+			    } else if (system.platform === 'ios') {
+			        console.log("苹果");
+			        var cllocationManger = plus.ios.import("CLLocationManager");
+			        var enable = cllocationManger.locationServicesEnabled();
+			        var status = cllocationManger.authorizationStatus();
+			        plus.ios.deleteObject(cllocationManger);
+			        if (enable && status != 2) {
+						this.getLngLat()
+			            console.log("手机系统的定位已经打开");
+			        } else {
+			            console.log("手机系统的定位没有打开");
+			            uni.showModal({
+			                title: '提示',
+			                content: '请前往设置-隐私-定位服务打开定位服务功能',
+			                // showCancel: false, // 不显示取消按钮
+			                success(res) {
+								if(res.confirm){
+									var UIApplication = plus.ios.import("UIApplication");
+									var application2 = UIApplication.sharedApplication();
+									var NSURL2 = plus.ios.import("NSURL");
+									// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
+									// var setting2 = NSURL2.URLWithString("App-Prefs:root=LOCATION_SERVICES");
+									// var setting2 = NSURL2.URLWithString("app-settings");
+									var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION");
+									// var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION_SERVICES");
+									application2.openURL(setting2);
+									plus.ios.deleteObject(setting2);
+									plus.ios.deleteObject(NSURL2);
+									plus.ios.deleteObject(application2);
+									this.getLngLat()
+								}
+			                }
+			            });
+			        }
+			    }
+			},
 			...mapMutations(['login']),
 			// vue的method里编写如下代码
 			// async requestAndroidPermission(permisionID) {
@@ -34,7 +147,41 @@
 		},
 	
 		onLaunch: function() {
+			var that = this
 			// #ifdef APP-PLUS
+			this.checkOpenGPSServiceByAndroidIOS()
+			// uni.getNetworkType({
+			// 	success: function (res) {
+			// 		if(res.networkType=='none'){
+			// 			let options = {
+			// 			    title: '提示', 
+			// 				info:'当前没有网络中',
+			// 			    okText: '连接Wifi', 
+			// 				cancelText:'开启流量',
+			// 				infoAlignment:'center',
+			// 				radius:10,
+			// 			    // cancelText: '否',
+			// 				// showCancel:false,
+			// 				okButtonColor:'#2772FB'
+			// 			};
+			// 			const native = uni.requireNativePlugin('AJ-Alert');
+			// 			native.showAction(options, result => {
+			// 				// #ifdef APP-PLUS
+			// 				            	if (uni.getSystemInfoSync().platform == 'ios') {
+			// 				            		plus.ios.import("UIApplication").sharedApplication().performSelector("exit")
+			// 				            	} else if (uni.getSystemInfoSync().platform == 'android') {
+			// 				            		plus.runtime.quit();
+			// 				            	}
+			// 				            // #endif
+			// 			    // 点击是的回调, result暂时没有返回内容
+			// 			}, cancel => {
+			// 			    // 点击否的回调
+			// 			});
+						
+			// 		}
+			// 		console.log(res.networkType);
+			// 	}
+			// });
 			console.log(uni.getStorageSync('userInfo'))
 			if(uni.getStorageSync('userInfo')){
 				that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
@@ -301,7 +448,7 @@
 
 			// }, false);
 			// #endif
-			this.$socket.initWebIM(this.$ws, true, true)
+			// this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';
 			if (userInfo.id) {
 				//更新登陆状态

+ 153 - 0
components/fh-no-network/fh-no-network.vue

@@ -0,0 +1,153 @@
+<template>
+	<view
+		v-if="show"
+		class="no-network-main"
+		:style="{ height: backgroundHeight + 'px', width: backgroundWidth + 'px' }"
+	>
+		<view class="no-network-area">
+			<view
+				class="no-network-picture"
+				:style="{ height: backgroundImageHeight, width: backgroundImageWidth }"
+			></view>
+			<view class="no-network-content">哎呀,网络信号丢失</view>
+			<view class="no-network-handle">
+				请检查网络,或前往
+				<span class="go-to-sitting" @click="gotoSitting">设置</span>
+			</view>
+			<view class="no-network-retry" @click="retry">重试</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import gotoAppPermissionSetting from './utils.js'
+export default {
+	name: 'FhNoNetwork',
+	mounted() {
+		const that = this
+		// #ifdef APP-PLUS
+		uni.getNetworkType({
+			success: function(res) {
+				console.log(res)
+				if (res.networkType == 'none' || res.networkType == 'unknown') {
+					that.shrink()
+				} else {
+					that.unfold()
+				}
+			}
+		})
+		// #endif
+		uni.onNetworkStatusChange(function(res) {
+			if (res.isConnected) {
+				that.unfold()
+				console.log(res.networkType)
+			} else {
+				that.shrink()
+			}
+		})
+	},
+	computed: {
+		backgroundImageWidth() {
+			if (this.backgroundWidth < 768) {
+				return this.backgroundWidth + 'px'
+			}
+			return '439.46rpx'
+		},
+		backgroundImageHeight() {
+			if (this.backgroundWidth < 768) {
+				return this.backgroundWidth / 2 + 'px'
+			}
+			return '219.73rpx'
+		}
+	},
+	data() {
+		return {
+			show: false,
+			backgroundHeight: uni.getSystemInfoSync().screenHeight,
+			backgroundWidth: uni.getSystemInfoSync().screenWidth
+		}
+	},
+	methods: {
+		shrink: function() {
+			this.show = true
+		},
+		unfold: function() {
+			this.show = false
+		},
+		gotoSitting: function() {
+			gotoAppPermissionSetting()
+		},
+		retry: function() {
+			uni.getNetworkType({
+				success: function(res) {
+					console.log(res)
+					if (res.networkType == 'none' || res.networkType == 'unknown') {
+						uni.showToast({
+							title: '无网络连接',
+							icon: 'none'
+						})
+					}
+				}
+			})
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.no-network-main {
+	position: absolute;
+	top: 0;
+	background-color: #ffffff;
+	z-index: 10000;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	.no-network-area {
+		.no-network-picture {
+			background-image: url(../../static/fh-no-network/no-network.png);
+			background-repeat: no-repeat;
+			background-size: contain;
+		}
+		.no-network-content {
+			width: 100%;
+			text-align: center;
+			height: 18.32rpx;
+			line-height: 18.32rpx;
+			color: #333333;
+			font-family: PingFangSC-Medium;
+			font-size: 13.19rpx;
+			margin-bottom: 6.6rpx;
+		}
+		.no-network-handle {
+			width: 100%;
+			text-align: center;
+			height: 14.65rpx;
+			line-height: 14.65rpx;
+			font-family: PingFangSC-Regular;
+			font-size: 10.26rpx;
+			color: #666666;
+			margin-bottom: 29.3rpx;
+		}
+		.go-to-sitting {
+			height: 14.65rpx;
+			line-height: 14.65rpx;
+			font-family: PingFangSC-Regular;
+			font-size: 10.26rpx;
+			color: #1677ff;
+		}
+		.no-network-retry {
+			width: 209.48rpx;
+			height: 33.7rpx;
+			border: 1.47rpx solid #333333;
+			border-radius: 16.48rpx;
+			line-height: 32.23rpx;
+			text-align: center;
+			font-size: 11.72rpx;
+			font-family: PingFangSC-Medium;
+			letter-spacing: 1.18rpx;
+			margin: 0 auto;
+		}
+	}
+}
+</style>

+ 12 - 0
components/fh-no-network/readme.md

@@ -0,0 +1,12 @@
+# 无网络页面
+<fh-no-network\>是在无网络信号时覆盖屏幕的页面,提供“前往设置”按钮让用户进入设置,设置网络;在网络连接后会自动收起。
+# 平台差异
+全平台基本支持
+# 安装方式
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,通过**使用HBuilderX导入插件**或者**下载插件ZIP**,将解压出**fh-no-network**文件夹放到**components**目录下。
+# 基本用法
+~~~
+<template>
+    <fh-no-network></fh-no-network>
+</template>
+~~~

+ 24 - 0
components/fh-no-network/utils.js

@@ -0,0 +1,24 @@
+const gotoAppPermissionSetting = function() {
+    if (plus.os.name === 'iOS') {
+        var UIApplication = plus.ios.import('UIApplication');
+        var application2 = UIApplication.sharedApplication();
+        var NSURL2 = plus.ios.import('NSURL');
+        var setting2 = NSURL2.URLWithString('app-settings:');
+        application2.openURL(setting2);
+        plus.ios.deleteObject(setting2);
+        plus.ios.deleteObject(NSURL2);
+        plus.ios.deleteObject(application2);
+    } else {
+        var Intent = plus.android.importClass('android.content.Intent');
+        var Settings = plus.android.importClass('android.provider.Settings');
+        var Uri = plus.android.importClass('android.net.Uri');
+        var mainActivity = plus.android.runtimeMainActivity();
+        var intent = new Intent();
+        intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
+        var uri = Uri.fromParts('package', mainActivity.getPackageName(), null);
+        intent.setData(uri);
+        mainActivity.startActivity(intent);
+    }
+};
+
+export default gotoAppPermissionSetting;

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	// baseUrlNew: 'https://apitest.eliangeyun.com',
-	baseUrlNew: 'http://192.168.110.9:8099',
+	baseUrlNew: 'https://apitest.eliangeyun.com',
+	// baseUrlNew: 'http://192.168.110.9:8099',
 	// baseUrlNew: 'http://192.168.110.82:8999',
 	// baseUrlNew: 'http://192.168.1.119:8999',
 	h5Appid: 'wxb66b599f7f61b46f',

+ 9 - 7
package.json

@@ -1,11 +1,13 @@
 {
-    "id": "gaojianghua-linkage",
-    "name": "完美三级联动",
-    "version": "1.0.1",
-    "description": "简单, 好用, 易自行更改的地区三级联动选择器, 拥有市, 区的全部选项. ",
+    "id": "fh-no-network",
+    "name": "无网络信号页面",
+    "version": "1.0.0",
+    "description": "在无网络信号情况下弹出遮挡屏幕,提供“前往设置”按钮让用户可以直接进入设置,设置网络;网络连接后自动收起",
     "keywords": [
-        "简单",
-        "易用",
-        "易根据自身需求更改"
+        "无网络",
+        "无网络信号",
+        "没有网络",
+        "遮罩",
+        "遮罩页面"
     ]
 }

+ 6 - 5
pages/goodSource/index.vue

@@ -1,6 +1,7 @@
 <!-- 货源 -->
 <template>
 	<view class="content">
+<!-- 		<fh-no-network></fh-no-network> -->
 		<view class="banner">
 			<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
 			<view class="head flex s-row paddingr35">
@@ -201,7 +202,7 @@
 				var that=this
 				console.log('good',1111)
 				// this.$nextTick(function(){
-					this.getLngLat();
+					// this.getLngLat();
 				// })		
 				// #endif
 			}
@@ -463,7 +464,6 @@
 							let _data = {
 								searchKeyWord: this.tabIndex + 1,
 								searchType: _pickerSelect,
-							
 								pageSize: 10,
 								currentPage: 1,
 								loadingPlaceCity: that.startPlace.fchoosecity,
@@ -472,8 +472,8 @@
 							}
 							that.$forceUpdate()
 							// that.$set(that.startPlace,'selected',res.address.city)
-							that.lng = res.longitude;
-							that.lat = res.latitude;
+							// that.lng = res.longitude;
+							// that.lat = res.latitude;
 							that.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
 									if (res.code == 200) {
 										console.log(res.data.records)
@@ -585,10 +585,11 @@
 					// unLoadingPlaceCity: this.endPlace.schoosecity
 
 				}
+				console.log(uni.getStorageSync('longitudeAndLatitude'))
 				// if (this.tabIndex == 2) {
 					if(!this.startPlace.selected){
 						console.log(1)
-						this.getLngLat();
+						// this.getLngLat();
 					}else{
 						
 						_data.driverLongitude = this.lng

+ 4 - 4
pages/mine/driverCertificationNext.vue

@@ -2,11 +2,11 @@
 	<view class="content">
 		<view class="top-head"></view>
 		<view class="container">
-			<!-- <u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
-				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist" :key="index"
+			<u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
+				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist" :key="index"
 					:label="item.name" :name="item.name" @change="radioChange">
 				</u-radio>
-			</u-radio-group> -->
+			</u-radio-group>
 			<view class="level1-title">证件信息</view>
 			<view class="content1">
 				<view class="title">上传驾驶证主页</view>
@@ -752,7 +752,7 @@
 	.radio-group {
 		display: flex;
 		align-items: center;
-		justify-content: space-between;
+		
 	}
 
 	.level1-title {

+ 23 - 22
pages/mine/editDriverCertification.vue

@@ -328,18 +328,19 @@
 			},
 			uploadImg(type, index) {
 				this.uploadType = type
-				this.isShowimgType = true
+				// this.isShowimgType = true
 				this.index = index
+				this.imgTypeSelect()
 
 			},
 			// 上传图片
-			imgTypeSelect(val) {
-				console.log(val)
+			imgTypeSelect() {
+				// console.log(val)
 				console.log(this.uploadType)
-				if (val.name == '相册') {
+				// if (val.name == '相册') {
 					uni.chooseImage({
 						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
+						// sourceType: this.$helper.chooseImage.sourceType,
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
 							uploadImage('image',res.tempFilePaths[0], 'appData/',
@@ -388,23 +389,23 @@
 						}
 					});
 
-				} else {
-					switch (this.uploadType) {
-						case 0:
-							break
-						case 1:
-							uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=idcardface');
-							console.log('身份正面')
-							break
-						case 2:
-							uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=badge');
-							console.log('身份反面')
-							break
-						case 3:
-							break
-						case 4:
-					}
-				}
+				// } else {
+				// 	switch (this.uploadType) {
+				// 		case 0:
+				// 			break
+				// 		case 1:
+				// 			uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=idcardface');
+				// 			console.log('身份正面')
+				// 			break
+				// 		case 2:
+				// 			uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=badge');
+				// 			console.log('身份反面')
+				// 			break
+				// 		case 3:
+				// 			break
+				// 		case 4:
+				// 	}
+				// }
 
 			},
 			next(val) {

+ 9 - 8
pages/mine/editDriverCertificationNext.vue

@@ -3,7 +3,7 @@
 		<view class="top-head"></view>
 		<view class="container">
 			<u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
-				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist" :key="index"
+				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist" :key="index"
 					:label="item.name" :name="item.name" @change="radioChange">
 				</u-radio>
 			</u-radio-group>
@@ -393,11 +393,11 @@
 				this.isShowDrive = false
 			},
 			// 上传图片
-			imgTypeSelect(val) {
-				if (val.name == '相册') {
+			imgTypeSelect() {
+				// if (val.name == '相册') {
 					uni.chooseImage({
 						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
+						// sourceType: this.$helper.chooseImage.sourceType,
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
 							uploadImage('image', res.tempFilePaths[0], 'appData/',
@@ -471,14 +471,15 @@
 						}
 					});
 
-				} else {
+				// } else {
 
-				}
+				// }
 
 			},
 			uploadImg(type) {
 				this.uploadType = type
-				this.isShowimgType = true
+				// this.isShowimgType = true
+				this.imgTypeSelect()
 			},
 			validate() {
 				// true 为校验不通过
@@ -727,7 +728,7 @@
 	.radio-group {
 		display: flex;
 		align-items: center;
-		justify-content: space-between;
+		// justify-content: space-between;
 	}
 
 	.level1-title {

+ 4 - 9
pages/mine/evaluate.vue

@@ -5,9 +5,9 @@
 				<view class="top flex flex-space-between">
 					<view class="left flex">
 						<view  class="flex" style='align-items: center;'>
-							<image style='width:60rpx;height:60rpx;border-radius:50%;'
+							<image style='width:60rpx;height:60rpx;margin-right: 10px;border-radius:50%;'
 							 :src="item.ownerPortrait" mode=""></image>
-							{{item.ownerAnonymous=='1'?'匿名评价':item.ownerName}}:
+							{{item.ownerAnonymous=='1'?'匿名评价':item.ownerName}}
 						</view>
 						<!-- <u-icon name="arrow-right" color="#ccc" size="18"></u-icon> -->
 					</view>
@@ -51,16 +51,11 @@
 				<view class="pl-style">
 					{{item.ownerContent}}
 				</view>
-				<view class="color2979ff flex">
-					<view @click="clickZK(item)">展开</view>
-					<u-icon name="arrow-down" color="#2979ff" size="18" v-if="item.isOpen"></u-icon>
-					<u-icon name="arrow-up" color="#2979ff" size="18" v-else></u-icon>
-				</view>
-				<view v-if="item.isOpen" class="img-content">
+				<view class="img-content">
 					<u--image :showLoading="true" :src="item1" width="80px" height="80px" class="img"
 						v-for="(item1,index) in item.imgList"></u--image>
 				</view>
-				<u-line class="line"></u-line>
+				<u-line v-if='index!=list.length-1' class="line"></u-line>
 				<view class="gray999">
 					{{item.ownerAnonymous==1?"匿名评价":''}}
 				</view>

+ 4 - 1
pages/mine/manageBankCards/addBankCard.vue

@@ -322,7 +322,10 @@
 												this.$refs.uToast.show({
 													...params
 												})
-												uni.$u.route('/pages/mine/manageBankCards/index');
+												uni.navigateBack({
+													delta: 1
+												});
+												// uni.$u.route('/pages/mine/manageBankCards/index');
 								
 											} else {
 												uni.$u.toast(res.message);

+ 4 - 4
pages/mine/manageVehicles/addVehicle.vue

@@ -1233,10 +1233,10 @@
 								type: 'success',
 								message: "提交成功!",
 								complete() {
-									// uni.navigateBack({
-									// 	delta: 1
-									// });
-									uni.$u.route('/pages/mine/manageVehicles/index');
+									uni.navigateBack({
+										delta: 1
+									});
+									// uni.$u.route('/pages/mine/manageVehicles/index');
 								}
 							})
 							// this.$refs.uToast.show({

+ 4 - 4
pages/mine/manageVehicles/editVehicle.vue

@@ -1199,10 +1199,10 @@
 								type: 'success',
 								message: "提交成功!",
 								complete() {
-									// uni.navigateBack({
-									// 	delta: 1
-									// });
-									uni.$u.route('/pages/mine/manageVehicles/index');
+									uni.navigateBack({
+										delta: 1
+									});
+									// uni.$u.route('/pages/mine/manageVehicles/index');
 								}
 							})
 							// this.$refs.uToast.show({

+ 4 - 1
pages/mine/often/addRoute.vue

@@ -275,7 +275,10 @@
 									type: 'success',
 									message: "提交成功!",
 									complete() {
-										uni.$u.route("pages/mine/often/oftenRoute")
+										uni.navigateBack({
+											delta: 1
+										});
+										// uni.$u.route("pages/mine/often/oftenRoute")
 									}
 								})
 							}

+ 16 - 6
pages/order/index.vue

@@ -337,6 +337,7 @@
 
 		// },
 		onShow() {
+			var that=this
 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 				reCommonId: this.userInfo.id,
 			}).then(res3 => {
@@ -391,13 +392,19 @@
 				this.show=false
 			},
 			toggle(item){
-				if (item.orderStatusKey == 1) {
-					this.isShowTerminationReason = false
-				} else {
-					this.isShowTerminationReason = true
-				}
 				this.id = item.id
-				this.show = true
+				if(item.orderStatus=='未装车'){
+					if (item.orderStatusKey == 1) {
+						this.isShowTerminationReason = false
+					} else {
+						this.isShowTerminationReason = true
+					}
+					
+					this.show = true
+				}else{
+					this.isShowAlert=true
+				}
+				
 			},
 			open() {
 			          // console.log('open');
@@ -487,6 +494,7 @@
 					return
 				}
 				// #endif
+				var that =this
 				if (this.alertTitle == '确定删除全部历史记录?') {
 					uni.removeStorageSync('useSearchList');
 					this.useSearchList = [];
@@ -523,6 +531,7 @@
 									type: 'success',
 									message: "终止订单成功",
 									complete() {
+										
 										that.mescroll.resetUpScroll()
 									}
 								})
@@ -531,6 +540,7 @@
 							} else {
 								uni.$u.toast("终止订单失败!");
 							}
+							this.show=false
 							this.isShowAlert = false
 
 						})

+ 61 - 6
pages/order/orderDetails.vue

@@ -207,16 +207,42 @@
 				v-if='isShowTerminationReason'>
 			</u--textarea>
 		</u-modal>
+		<u-popup :show="show" mode="bottom" @close="close" @open="open">
+			<view class="">
+				<view ><u-icon @click="closepopup" class='close' name="close" size="20"></u-icon></view>
+				
+				<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
+				<view style="margin: 0 auto;">
+		           	<u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" v-if='isShowTerminationReason' >
+		           	<u-radio  :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+		           		:label="item.name" :name="item.name" @change="radioChange" >
+		           	</u-radio>
+		           </u-radio-group>
+		           </view>
+				   <view style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
+		           <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
+		           <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
+		           	v-if='isShowTerminationReason'>
+		           </u--textarea>
+				   <view class='termination' :class="{'active':value2.length>0}" @click='confirmClick'>终止</view>
+			</view>
+		           
+		</u-popup>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
+	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	export default {
+		components:{
+			uniPopup
+		},
 		data() {
 			return {
 				zcPhoneList:[],
 				xcPhoneList:[],
+				show:false,
 				carrierInfo:{},
 				freightInfo:{},
 				cyinfoStatus: '未装车',
@@ -370,6 +396,7 @@
 						terminationReasonDescription: this.value2,
 						terminator:1
 					}).then(res => {
+						this.show=false
 						this.isShowAlert = false
 						// this.mescroll.resetUpScroll()
 						this.$refs.uToast.show({
@@ -390,13 +417,18 @@
 			stop() {
 				let item = this.dataObj
 				// 货主接单
-				if (item.orderStatusKey == 1) {
-					this.isShowTerminationReason = false
-				} else {
-					this.isShowTerminationReason = true
-				}
 				this.id = item.id
-				this.isShowAlert = true
+				if(item.orderStatus=='未装车'){
+					if (item.orderStatusKey == 1) {
+						this.isShowTerminationReason = false
+					} else {
+						this.isShowTerminationReason = true
+					}
+					
+					this.show = true
+				}else{
+					this.isShowAlert=true
+				}
 			},
 			toPhone(){
 				uni.makePhoneCall({
@@ -625,4 +657,27 @@
 	/deep/.u-modal__content {
 		flex-direction: column;
 	}
+	/deep/.u-popup__content{
+		border-radius: 10px;
+		padding:20px;
+	}
+	/deep/.u-radio{
+		margin:40rpx 0;
+	}
+	.close{
+		position:absolute;
+		right:20px;
+	}
+	.termination{
+		background:#F1F3F6;
+		color:#C5CAD4;
+		padding:10px;
+		border-radius:30px;
+		text-align: center;
+		margin-top:30rpx;
+	}
+	.termination.active{
+		background: #2772FB;
+		color: white;
+	}
 </style>

+ 22 - 0
pages/order/signContract.vue

@@ -403,6 +403,20 @@
 						}
 					
 				}
+				if (uni.$u.test.isEmpty(that.dataDetails.carrierInfo.carNo)) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "车牌号不能为空!",
+					})
+					return
+				}
+				if (uni.$u.test.isEmpty(that.dataDetails.weight)) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "装车净重不能为空!",
+					})
+					return
+				}
 				if (uni.$u.test.isEmpty(that.dataDetails.freight)) {
 					that.$refs.uToast.show({
 						type: 'error',
@@ -446,6 +460,14 @@
 					})
 					return
 				}
+				if (uni.$u.test.isEmpty(that.dataDetails.bankDeposit)) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "收款账号不能为空!",
+					})
+					return
+				}
+				
 				_obj.trailerNumber = that.dataDetails.trailerNumber
 				_obj.tranStartDate = that.dataDetails.tranStartDate
 				_obj.tranEndDate = that.dataDetails.tranEndDate

BIN
static/fh-no-network/no-network.png


+ 11 - 1
util/request.js

@@ -17,11 +17,21 @@ const baseRequest = (method, url, data,header) => {
 			'content-type': contentheader //'application/x-www-form-urlencoded; charset=UTF-8',
 		}
 		}
+		
 		let promise = new Promise(function(resolve, reject) {
 			uni.request(baseDefaultOpts).then(
 				(res) => {
-					// console.log(JSON.stringify(res[1].data))
+					// console.log(JSON.stringify(res))
+					if(res[1]){
 						resolve(res[1].data)
+					}else{
+						uni.showToast({
+								icon:'none',
+							    title: '网络异常,请检查网络状况',
+							    duration: 2000 
+							}); 
+					}
+						
 					// if(res[1].data.code == '200' || res[1].data.code == 200){
 					// 	// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
 					// 	resolve(res[1].data)

+ 1 - 1
websocket_sdk.js

@@ -149,7 +149,7 @@ export default class Websocket {
                         //     }
                         // })
 						uni.showToast({
-							title: "网络错误 请重新打开网络",
+							title: "网络错误,请检查网络状况",
 							icon: 'none'
 						})
                     }