achao 3 rokov pred
rodič
commit
61d6550ae4

+ 83 - 74
common/helper.js

@@ -94,92 +94,101 @@ const setAudit = (item) => {
 }
 const contactCustomerService = (item) => {
 	console.log(item)
-	if(!item){
-		item='110'
+	if (!item) {
+		item = '110'
 	}
 	console.log("联系客服")
 	uni.makePhoneCall({
-		phoneNumber: item
+		phoneNumber: item,
+		success: (res) => {
+			console.log('调用成功!')
+		},
+
+		// 失败回调
+		fail: (res) => {
+			console.log('调用失败!')
+			contactCustomerService(item)
+		}
 	});
 }
 // 获取市、区简称
 const filterUrban = (s) => {
-	return s.substring(0,s.length-1)
+	return s.substring(0, s.length - 1)
 }
 const filterArea = (q) => {
-	return q.substring(0,q.length-1)
+	return q.substring(0, q.length - 1)
 }
 //获取省份简称
 const getProvinceAbbreviation = (province) => {
-	    if(province == "北京市"||province == "北京")
-	        return "京";
-	    else if(province == "天津市"||province == "天津")
-	        return "津";
-	    else if(province == "重庆市"||province == "重庆")
-	        return "渝";
-	    else if(province == "上海市"||province == "上海")
-	        return "沪";
-	    else if(province == "河北省"||province == "河北")
-	        return "冀";
-	    else if(province == "山西省"||province == "山西")
-	        return "晋";
-	    else if(province == "辽宁省"||province == "辽宁")
-	        return "辽";
-	    else if(province == "吉林省"||province == "吉林")
-	        return "吉";
-	    else if(province == "黑龙江省"||province == "黑龙江")
-	        return "黑";
-	    else if(province == "江苏省"||province == "江苏")
-	        return "苏";
-	    else if(province == "浙江省"||province == "浙江")
-	        return "浙";
-	    else if(province == "安徽省"||province == "安徽")
-	        return "皖";
-	    else if(province == "福建省"||province == "福建")
-	        return "闽";
-	    else if(province == "江西省"||province == "江西")
-	        return "赣";
-	    else if(province == "山东省"||province == "山东")
-	        return "鲁";
-	    else if(province == "河南省"||province == "河南")
-	        return "豫";
-	    else if(province == "湖北省"||province == "湖北")
-	        return "鄂";
-	    else if(province == "湖南省"||province == "湖南")
-	        return "湘";
-	    else if(province == "广东省"||province == "广东")
-	        return "粤";
-	    else if(province == "海南省"||province == "海南")
-	        return "琼";
-	    else if(province == "四川省"||province == "四川")
-	        return "川";
-	    else if(province == "贵州省"||province == "贵州")
-	        return "贵";
-	    else if(province == "云南省"||province == "云南")
-	        return "云";
-	    else if(province == "陕西省"||province == "陕西")
-	        return "陕";
-	    else if(province == "甘肃省"||province == "甘肃")
-	        return "甘";
-	    else if(province == "青海省"||province == "青海")
-	        return "青";
-	    else if(province == "台湾省"||province == "台湾")
-	        return "台";
-	    else if(province == "内蒙古自治区"||province == "内蒙古")
-	        return "蒙";
-	    else if(province == "广西壮族自治区"||province == "广西")
-	        return "桂";
-	    else if(province == "宁夏回族自治区"||province == "宁夏")
-	        return "宁";
-	    else if(province == "新疆维吾尔自治区"||province == "新疆")
-	        return "新";
-	    else if(province == "西藏自治区"||province == "西藏")
-	        return "藏";
-	    else if(province == "香港特别行政区"||province == "香港")
-	        return "港";
-	    else if(province == "澳门特别行政区"||province == "澳门")
-	        return "澳";
-	
+	if (province == "北京市" || province == "北京")
+		return "京";
+	else if (province == "天津市" || province == "天津")
+		return "津";
+	else if (province == "重庆市" || province == "重庆")
+		return "渝";
+	else if (province == "上海市" || province == "上海")
+		return "沪";
+	else if (province == "河北省" || province == "河北")
+		return "冀";
+	else if (province == "山西省" || province == "山西")
+		return "晋";
+	else if (province == "辽宁省" || province == "辽宁")
+		return "辽";
+	else if (province == "吉林省" || province == "吉林")
+		return "吉";
+	else if (province == "黑龙江省" || province == "黑龙江")
+		return "黑";
+	else if (province == "江苏省" || province == "江苏")
+		return "苏";
+	else if (province == "浙江省" || province == "浙江")
+		return "浙";
+	else if (province == "安徽省" || province == "安徽")
+		return "皖";
+	else if (province == "福建省" || province == "福建")
+		return "闽";
+	else if (province == "江西省" || province == "江西")
+		return "赣";
+	else if (province == "山东省" || province == "山东")
+		return "鲁";
+	else if (province == "河南省" || province == "河南")
+		return "豫";
+	else if (province == "湖北省" || province == "湖北")
+		return "鄂";
+	else if (province == "湖南省" || province == "湖南")
+		return "湘";
+	else if (province == "广东省" || province == "广东")
+		return "粤";
+	else if (province == "海南省" || province == "海南")
+		return "琼";
+	else if (province == "四川省" || province == "四川")
+		return "川";
+	else if (province == "贵州省" || province == "贵州")
+		return "贵";
+	else if (province == "云南省" || province == "云南")
+		return "云";
+	else if (province == "陕西省" || province == "陕西")
+		return "陕";
+	else if (province == "甘肃省" || province == "甘肃")
+		return "甘";
+	else if (province == "青海省" || province == "青海")
+		return "青";
+	else if (province == "台湾省" || province == "台湾")
+		return "台";
+	else if (province == "内蒙古自治区" || province == "内蒙古")
+		return "蒙";
+	else if (province == "广西壮族自治区" || province == "广西")
+		return "桂";
+	else if (province == "宁夏回族自治区" || province == "宁夏")
+		return "宁";
+	else if (province == "新疆维吾尔自治区" || province == "新疆")
+		return "新";
+	else if (province == "西藏自治区" || province == "西藏")
+		return "藏";
+	else if (province == "香港特别行政区" || province == "香港")
+		return "港";
+	else if (province == "澳门特别行政区" || province == "澳门")
+		return "澳";
+
 }
 
 export default {

+ 2 - 2
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
-	baseUrlNew: 'https://apitest.eliangeyun.com',
-	// baseUrlNew: 'http://192.168.1.114:8091',
+	// baseUrlNew: 'https://apitest.eliangeyun.com',
+	baseUrlNew: 'http://192.168.1.114:8091',
 	// baseUrlNew: 'http://192.168.1.116:8999',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false

+ 1 - 0
manifest.json

@@ -1,3 +1,4 @@
+
 {
     "name" : "智运",
     "appid" : "__UNI__9C76CB6",

+ 32 - 17
pages/goodSource/index.vue

@@ -46,7 +46,8 @@
 							<view class="item1">
 								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate)}}</view>
 								<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
-									{{$helper.filterArea(good.sendArea)}}</view>
+									{{$helper.filterArea(good.sendArea)}}
+								</view>
 							</view>
 
 							<image class="jt-icon item2" src="@/static/images/goodSource/jt.png" mode='widthFix'>
@@ -54,7 +55,8 @@
 							<view class="item3">
 								<view class="ssx">{{$helper.getProvinceAbbreviation(good.unloadPrivate)}}</view>
 								<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
-									{{$helper.filterArea(good.unloadArea)}}</view>
+									{{$helper.filterArea(good.unloadArea)}}
+								</view>
 							</view>
 						</view>
 						<view class="right gray">
@@ -157,7 +159,8 @@
 				scrollTop: 0,
 				count: 0,
 				lng: '',
-				lat: ''
+				lat: '',
+				bool: false,
 			}
 		},
 		onTabItemTap(e) {
@@ -182,9 +185,6 @@
 				this.getLngLat();
 				// #endif
 			}
-			// #ifdef APP-PLUS
-			this.getLngLat();
-			// #endif
 			if (uni.getStorageSync('sPlaceObj')) {
 				this.endPlace = uni.getStorageSync('sPlaceObj');
 			} else {
@@ -277,6 +277,11 @@
 									})
 								}
 							})
+						}else{
+							this.$refs.uToast.show({
+								type: 'error',
+								message:res.message,
+							})
 						}
 					})
 					.catch(res => {
@@ -358,17 +363,18 @@
 				this.show = true
 			},
 			getLngLat() {
-				// uni.showLoading({
-				// 	title:'获取定位信息'
-				// })
+				uni.showLoading({
+					title: '获取定位信息'
+				})
 				uni.getLocation({
 					type: 'gcj02',
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
 							that.startPlace.selected = res.address.city
-							this.lng = res.longitude;
-							this.lat = res.latitude;
+							that.lng = res.longitude;
+							that.lat = res.latitude;
+							uni.hideLoading()
 						} else {
 							if (uni.getSystemInfoSync().platform == 'android') {
 								var context = plus.android.importClass("android.content.Context");
@@ -376,9 +382,9 @@
 									"android.location.LocationManager");
 								var main = plus.android.runtimeMainActivity();
 								var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
-								this.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+								that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
 							}
-							if (this.bool === false) {
+							if (that.bool === false) {
 								uni.showModal({
 									title: '提示',
 									content: '请打开定位服务',
@@ -401,6 +407,7 @@
 									}
 								});
 							}
+							uni.hideLoading()
 						}
 					}
 				});
@@ -411,6 +418,11 @@
 					uni.$u.route('/pages/goodSource/shippingDetails', {
 						id: id,
 					});
+				} else if (this.firstAuthentication.authenticationStatus == '已过期') {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "证件已过期,请上传新证件!",
+					})
 				} else {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -480,8 +492,13 @@
 					_data.longitude = this.lng
 					_data.latitude = this.lat
 				}
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
 				this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
 						if (res.code == 200) {
+							uni.hideLoading()
 							this.mescroll.endBySize(res.data.records.length, res.data.total);
 							if (page.num == 1) {
 								this.goods = [];
@@ -503,10 +520,6 @@
 					});
 			},
 			clickTab(val) {
-				uni.showLoading({
-					mask: true,
-					title: '加载中'
-				})
 				this.tabIndex = val.index
 				this.upCallback({
 					size: 10,
@@ -533,6 +546,8 @@
 				];
 				[this.startPlace.selected, this.endPlace.selected] = [this.endPlace.selected, this.startPlace.selected];
 				// [this.startPlace, this.endPlace] = [this.endPlace, this.startPlace];
+				uni.setStorageSync('fPlaceObj', this.startPlace);
+				uni.setStorageSync('sPlaceObj', this.endPlace);
 			},
 			goCity(type) {
 				uni.$u.route('/pages/goodSource/selectCity', {

+ 7 - 0
pages/goodSource/selectCity.vue

@@ -472,6 +472,13 @@
 			},
 			// 选择市
 			selectCity(item, i, statusIndex) {
+			if(item.label=='全部'){
+				this.$refs.uToast.show({
+					type: 'error',
+					message: "不能选择全部,请重新选择!"
+				})
+				return
+			}
 				this.count = 0;
 				if (this.type == 0) {
 					this.isfcity = i

+ 0 - 1
pages/mine/index.vue

@@ -148,7 +148,6 @@
 			})
 		},
 		onLoad() {
-			debugger
 			that = this
 
 		},

+ 31 - 34
pages/mine/settings/editAvatar.vue

@@ -85,41 +85,38 @@
 			},
 			submit(){
 				this.deptListurl.id = this.userInfo.id
-	
+				this.$request.baseRequest('post', '/commonUser/editUserInfo', this.deptListurl).then(res => {
+						uni.showToast({
+							title: '修改成功!',
+							icon: 'success',
+							duration: 2000,
+							success() {
+								setTimeout(()=>{
+									that.userInfo.avatarUrl = that.deptListurl.avatarUrl
+									var _student = uni.getStorageSync('userInfo');
+									_student.avatarUrl = that.deptListurl.avatarUrl;
+									uni.setStorageSync('userInfo', _student);
+									var name = 'userInfo';
+									var value = _student;
+									that.$store.commit('$uStore', {
+										name,
+										value
+									});
+									this.$refs.uToast.show({
+										type: 'success',
+										message: "修改成功!",
+									})
+									uni.navigateBack({
+										delta:1
+									})
+								},2000)
+							}
+						})
 				
-				
-				
-				
-				
-				// this.$request.baseRequest('post', '/commonUser/editUserInfo', this.deptListurl).then(res => {
-				// 		uni.showToast({
-				// 			title: '修改成功!',
-				// 			icon: 'success',
-				// 			duration: 2000,
-				// 			success() {
-				// 				setTimeout(()=>{
-				// 					that.userInfo.avatarUrl = that.deptListurl.avatarUrl
-				// 					var _student = uni.getStorageSync('userInfo');
-				// 					_student.avatarUrl = that.deptListurl.avatarUrl;
-				// 					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 => {
-				// 	uni.$u.toast( res.message);
-				// 	});
+					})
+					.catch(res => {
+					uni.$u.toast( res.message);
+					});
 			}
 		}
 	}

+ 66 - 66
pages/public/login.vue

@@ -185,73 +185,73 @@
 								// 
 								// 
 							})
-							that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
-								mobilePhone: this.phone,
-								veriCode: "123456",
-								loginFlag: 2
-							}).then(res1 => {
-								console.log("loginQuickly", res)
-								if (res1.data.code == 200) {
-									uni.setStorageSync('pcuserInfo', res1.data)
-									that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
-										reCommonId: this.userInfo.id,
-									}).then(res3 => {
-										if (res3.data) {
-											let name = 'myTip';
-											let value = res3.data
-											if (value == 0) {
-												uni.removeTabBarBadge({
-													index: 2
-												})
-											}
-											that.$store.commit('$uStore', {
-												name,
-												value
-											});
-											if (value != 0 && value) {
-												uni.setTabBarBadge({
-													index: 2,
-													text: value + ""
-												})
-											}
-										}
-									})
-									helper.getListByUserId()
-								} else {
-									that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
-										mobilePhone: '14444444444',
-										veriCode: "123456",
-										loginFlag: 2
-									}).then(res2 => {
-										that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
-											reCommonId: this.userInfo.id,
-										}).then(res3 => {
-											if (res3.data) {
-												let name = 'myTip';
-												let value = res3.data
-												if (value == 0) {
-													uni.removeTabBarBadge({
-														index: 2
-													})
-												}
-												that.$store.commit('$uStore', {
-													name,
-													value
-												});
-												if (value != 0 && value) {
-													uni.setTabBarBadge({
-														index: 2,
-														text: value + ""
-													})
-												}
-											}
-										})
-										uni.setStorageSync('pcuserInfo', res2.data)
-										helper.getListByUserId()
-									})
-								}
+							// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+							// 	mobilePhone: this.phone,
+							// 	veriCode: "123456",
+							// 	loginFlag: 2
+							// }).then(res1 => {
+							// 	console.log("loginQuickly", res)
+							// 	if (res1.code == 200) {
+							// 		uni.setStorageSync('pcuserInfo', res1.data)
+							// 		that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+							// 			reCommonId: this.userInfo.id,
+							// 		}).then(res3 => {
+							// 			if (res3.data) {
+							// 				let name = 'myTip';
+							// 				let value = res3.data
+							// 				if (value == 0) {
+							// 					uni.removeTabBarBadge({
+							// 						index: 2
+							// 					})
+							// 				}
+							// 				that.$store.commit('$uStore', {
+							// 					name,
+							// 					value
+							// 				});
+							// 				if (value != 0 && value) {
+							// 					uni.setTabBarBadge({
+							// 						index: 2,
+							// 						text: value + ""
+							// 					})
+							// 				}
+							// 			}
+							// 		})
+							// 		helper.getListByUserId()
+							// 	} else {
+							// 		that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+							// 			mobilePhone: '14444444444',
+							// 			veriCode: "123456",
+							// 			loginFlag: 2
+							// 		}).then(res2 => {
+							// 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+							// 				reCommonId: this.userInfo.id,
+							// 			}).then(res3 => {
+							// 				if (res3.data) {
+							// 					let name = 'myTip';
+							// 					let value = res3.data
+							// 					if (value == 0) {
+							// 						uni.removeTabBarBadge({
+							// 							index: 2
+							// 						})
+							// 					}
+							// 					that.$store.commit('$uStore', {
+							// 						name,
+							// 						value
+							// 					});
+							// 					if (value != 0 && value) {
+							// 						uni.setTabBarBadge({
+							// 							index: 2,
+							// 							text: value + ""
+							// 						})
+							// 					}
+							// 				}
+							// 			})
+							// 			uni.setStorageSync('pcuserInfo', res2.data)
+							// 			helper.getListByUserId()
+							// 		})
+							// 	}
 
-							})
+							// })
 							that.$store.commit('login', res.data)
 							var name = 'userInfo';
 							var value = res.data;

+ 34 - 33
pages/public/register.vue

@@ -29,7 +29,8 @@
 			</view>
 			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='register'
 				class='verificationCode'>注册</button>
-			<view style='color:#6A6A6A;margin-top:10px;font-size:30rpx;display:flex;justify-content:center;align-items: center;'>
+			<view
+				style='color:#6A6A6A;margin-top:10px;font-size:30rpx;display:flex;justify-content:center;align-items: center;'>
 				<u--image @click='consent'
 					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
 					width="17px" height="17px"></u--image>
@@ -247,40 +248,39 @@
 							that.$request.baseRequest('get', '/commonUser/login', {
 									phone: this.phone,
 									password: this.password,
-									loginFlag:2
+									loginFlag: 2
 								}).then(res => {
+									debugger
+									if (res.code == 200) {
+										// // pc登录
+										// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+										// 	mobilePhone: this.phone,
+										// 	veriCode: "123456",
+										// }).then(res1 => {
+										// 	if (res1.code == 200) {
+										// 		uni.setStorageSync('pcUserInfo', res1.data)
 
-									if (res.data.code == 200) {
-										// pc登录
-										that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
-											mobilePhone: this.phone,
-											veriCode: "123456",
-										}).then(res1 => {
-											if (res1.data.code == 200) {
-												uni.setStorageSync('pcUserInfo', res1.data.data)
-
-												helper.getListByUserId()
-											} else {
-												that.$api.doRequest('post',
-													'/commonUser/api/loginQuickly', {
-														mobilePhone: '14444444444',
-														veriCode: "123456",
-													}).then(res2 => {
-													uni.setStorageSync('pcUserInfo', res2.data
-														.data)
-													helper.getListByUserId()
-												})
-											}
-										})
-										uni.setStorageSync('userInfo', res.data.data)
-										that.$store.commit('login', res.data.data)
-										// that.liangxinLogin()
+										// 		helper.getListByUserId()
+										// 	} else {
+										// 		that.$api.doRequest('post',
+										// 			'/commonUser/api/loginQuickly', {
+										// 				mobilePhone: '14444444444',
+										// 				veriCode: "123456",
+										// 			}).then(res2 => {
+										// 			uni.setStorageSync('pcUserInfo', res2
+										// 				.data)
+										// 			helper.getListByUserId()
+										// 		})
+										// 	}
+										// })
+										uni.setStorageSync('userInfo', res.data)
+										that.$store.commit('login', res.data)
 										uni.switchTab({
-											url: '/pages/sale/information'
+											url: '/pages/goodSource/index'
 										});
 									} else {
 										uni.showToast({
-											title: res.data.message,
+											title: res.message,
 											icon: 'none',
 											duration: 2000
 										})
@@ -320,10 +320,11 @@
 </script>
 
 <style lang='scss' scoped>
-	uni-navigator{
-	    display: inline-block;
-	    color: #2772FB;
+	uni-navigator {
+		display: inline-block;
+		color: #2772FB;
 	}
+
 	.password {
 		border: none;
 		outline: none;
@@ -357,7 +358,7 @@
 		padding-top: 85px;
 		position: relative;
 		width: 100vw;
-		height: calc(100vh - 85px) ;
+		height: calc(100vh - 85px);
 		overflow: hidden;
 		background: url('~@/static/images/mine/bg@2x.png');
 		background-size: 100%;