Przeglądaj źródła

更新天地图切换地址不刷新的bug

朱秀平 1 rok temu
rodzic
commit
c84e86cdee
3 zmienionych plików z 134 dodań i 74 usunięć
  1. 2 2
      common/httpRequest.js
  2. 130 70
      pages/index/index.vue
  3. 2 2
      pages/login/login.vue

+ 2 - 2
common/httpRequest.js

@@ -211,7 +211,7 @@ module.exports = {
 		header = header || "application/json";
 		url = this.config("APIHOST1") + url;
 		// let token = uni.getStorageSync("token");
-		console.log(token,'参数')
+		// console.log(token,'参数')
 		let token = uni.getStorageSync("token");
 		if (token) {
 			return new Promise((succ, error) => {
@@ -224,7 +224,7 @@ module.exports = {
 						"token": token
 					},
 					success: function(result) {
-						// var jie="RPX3_v1bTP4fLfrEMWHegBp_pJPh8TGDaN-SHZFjyyJOcNlwZJ7dREaKJR5KCYvBzrwWTORQbAiVxUbeM9yR64iuxF9KkcVI8l0OUbwqixblBww6nd-9X48KfSNXwBs3TIT_GvK62Syyawj6uxrW8w=="
+						// var jie="EHYt1nJqiV2VpDqxntFpcb17geRnSxJW-ZugH12cNPBOI-mNnp5AAIzgxAgqQyCVsP5k6UvCt8cRqmK76cnC-brHdC4prNKtEMwjY_ByHOQLjfqWiTVLznd61bcB9yXo5wboHvgmk_J3doKkobGH97OWY6dFEdkzDd8Nh6KhbvE6rwERsOuuQK6yL0g8bODr"
 						// console.log('结果',decrypt(urlSafeBase64Decode(jie)))
 						if(ifShangxian==1){
 							const decryptData =decrypt(urlSafeBase64Decode(result.data))

+ 130 - 70
pages/index/index.vue

@@ -1417,22 +1417,22 @@ export default {
 					console.log('当前位置的经度:' + res.longitude)
 					console.log('当前位置的纬度:' + res.latitude)
 					
-					uni.request({ 
-						url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
-						success: res => {
-							console.log(res,'ppp运行')
-							that.province = res.data.result.addressComponent.province
-							that.city = res.data.result.addressComponent.city
-							that.district = res.data.result.addressComponent.county
-						},
-						fail: err => {
-							console.log("请求超时");
-							console.log(err); 
-						},
-						// complete: () => { //无论成功都会调用
-						// 	uni.hideLoading()
-						// }
-					})
+					// uni.request({ 
+					// 	url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
+					// 	success: res => {
+					// 		console.log(res,'ppp运行')
+					// 		that.province = res.data.result.addressComponent.province
+					// 		that.city = res.data.result.addressComponent.city
+					// 		that.district = res.data.result.addressComponent.county
+					// 	},
+					// 	fail: err => {
+					// 		console.log("请求超时");
+					// 		console.log(err); 
+					// 	},
+					// 	// complete: () => { //无论成功都会调用
+					// 	// 	uni.hideLoading()
+					// 	// }
+					// })
 					
 					// let data = {
 					// 	lat: res.latitude,
@@ -1670,22 +1670,22 @@ export default {
 					console.log('当前位置的经度:' + res.longitude)
 					console.log('当前位置的纬度:' + res.latitude)
 					
-					uni.request({
-						url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
-						success: res => {
-							console.log(res,'ppp运行')
-							that.province = res.data.result.addressComponent.province
-							that.city = res.data.result.addressComponent.city
-							that.district = res.data.result.addressComponent.county
-						},
-						fail: err => {
-							console.log("请求超时");
-							console.log(err); 
-						},
-						// complete: () => { //无论成功都会调用
-						// 	uni.hideLoading()
-						// }
-					})
+					// uni.request({
+					// 	url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
+					// 	success: res => {
+					// 		console.log(res,'ppp运行')
+					// 		that.province = res.data.result.addressComponent.province
+					// 		that.city = res.data.result.addressComponent.city
+					// 		that.district = res.data.result.addressComponent.county
+					// 	},
+					// 	fail: err => {
+					// 		console.log("请求超时");
+					// 		console.log(err); 
+					// 	},
+					// 	// complete: () => { //无论成功都会调用
+					// 	// 	uni.hideLoading()
+					// 	// }
+					// })
 					// let data = {
 					// 	lat: res.latitude,
 					// 	lng: res.longitude
@@ -2182,45 +2182,105 @@ export default {
 				title: '加载中',
 				mask: true // 是否显示透明蒙层,防止触摸穿透
 			})
-			var daa = {
-				buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
-				indentType: this.indentType,
-				limit: 10,
-				page: this.page1,
-				receivingPattern: this.receivingPettern,
-				riderLat: this.latitude,
-				riderLng: this.longitude
-			}
-			console.log('之前', daa)
-			this.$Request
-				.postJson('/app/tbindent/find-new-indent-group-by-shop', {
-					buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
-					indentType: this.indentType,
-					limit: 10,
-					page: this.page1,
-					receivingPattern: this.receivingPettern,
-					riderLat: this.latitude,
-					riderLng: this.longitude,
-					city:this.city
-				})
-				.then((res) => {
-					uni.hideLoading()
-					if (res.data) {
-						if (res.data.list.length > 0) {
-						}
-						this.totalCount1 = res.data.totalCount
-						if (this.page1 == 1) {
-							this.list_shanghu = res.data.list
-						} else {
-							this.list_shanghu = this.list_shanghu.concat(res.data.list)
-						}
-						console.log(this.list_shanghu, 'this.list_shanghu')
+			uni.request({
+				url: this.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+this.longitude+',%22lat%22:'+this.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
+				success: res => {
+					console.log(res,'ppp运行')
+					this.province = res.data.result.addressComponent.province
+					this.city = res.data.result.addressComponent.city
+					this.district = res.data.result.addressComponent.county
+					var daa = {
+						buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
+						indentType: this.indentType,
+						limit: 10,
+						page: this.page1,
+						receivingPattern: this.receivingPettern,
+						riderLat: this.latitude,
+						riderLng: this.longitude,
+						city:this.city
 					}
-					this.$forceUpdate()
-					uni.stopPullDownRefresh()
-					// 加载提示关闭
-					uni.hideLoading()
-				})
+					console.log('之前', daa)
+					this.$Request
+						.postJson('/app/tbindent/find-new-indent-group-by-shop', {
+							buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
+							indentType: this.indentType,
+							limit: 10,
+							page: this.page1,
+							receivingPattern: this.receivingPettern,
+							riderLat: this.latitude,
+							riderLng: this.longitude,
+							city:this.city
+						})
+						.then((res) => {
+							uni.hideLoading()
+							console.log('接单池商家',res)
+							if (res.data) {
+								if (res.data.list.length > 0) {
+								}
+								this.totalCount1 = res.data.totalCount
+								if (this.page1 == 1) {
+									this.list_shanghu = res.data.list
+								} else {
+									this.list_shanghu = this.list_shanghu.concat(res.data.list)
+								}
+								console.log(this.list_shanghu, 'this.list_shanghu')
+							}
+							this.$forceUpdate()
+							uni.stopPullDownRefresh()
+							// 加载提示关闭
+							uni.hideLoading()
+						})
+				},
+				fail: err => {
+					console.log("请求超时");
+					console.log(err); 
+					var daa = {
+						buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
+						indentType: this.indentType,
+						limit: 10,
+						page: this.page1,
+						receivingPattern: this.receivingPettern,
+						riderLat: this.latitude,
+						riderLng: this.longitude,
+						city:this.city
+					}
+					console.log('之前', daa)
+					this.$Request
+						.postJson('/app/tbindent/find-new-indent-group-by-shop', {
+							buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
+							indentType: this.indentType,
+							limit: 10,
+							page: this.page1,
+							receivingPattern: this.receivingPettern,
+							riderLat: this.latitude,
+							riderLng: this.longitude,
+							city:this.city
+						})
+						.then((res) => {
+							uni.hideLoading()
+							console.log('接单池商家',res)
+							if (res.data) {
+								if (res.data.list.length > 0) {
+								}
+								this.totalCount1 = res.data.totalCount
+								if (this.page1 == 1) {
+									this.list_shanghu = res.data.list
+								} else {
+									this.list_shanghu = this.list_shanghu.concat(res.data.list)
+								}
+								console.log(this.list_shanghu, 'this.list_shanghu')
+							}
+							this.$forceUpdate()
+							uni.stopPullDownRefresh()
+							// 加载提示关闭
+							uni.hideLoading()
+						})
+				},
+				// complete: () => { //无论成功都会调用
+				// 	uni.hideLoading()
+				// }
+			})
+			
 		},
 		// 获取新任务数据
 		taskData() {

+ 2 - 2
pages/login/login.vue

@@ -7,10 +7,10 @@
 				<view class="headers">
 					<image src="../../static/logo.png" style="border-radius: 50%;"></image>
 				</view>
-				<view class="content">
+				<!-- <view class="content">
 					<view>申请获取以下权限</view>
 					<text style="margin-top: 20rpx;">获得你的公开信息(昵称,头像、地区等)</text>
-				</view>
+				</view> -->
 				<button v-show="weixinPhone" style="background: #FF7F00;background-color: #FF7F00;color: #FFFFFF;"
 					class="bottom" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 					授权手机号