Browse Source

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

ccj 1 year ago
parent
commit
d12345434a
4 changed files with 61 additions and 35 deletions
  1. 24 22
      .hbuilderx/launch.json
  2. 1 1
      pages/order/driverDetail.vue
  3. 11 2
      pages/order/map.nvue
  4. 25 10
      pages/release/selectAddress.vue

+ 24 - 22
.hbuilderx/launch.json

@@ -1,24 +1,26 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"h5" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"mp-weixin" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "h5" : {
+                "launchtype" : "local"
+            },
+            "mp-weixin" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        }
     ]
     ]
 }
 }

+ 1 - 1
pages/order/driverDetail.vue

@@ -86,7 +86,7 @@
 									{{item.createDate?item.createDate.split(' ')[0]:''}}
 									{{item.createDate?item.createDate.split(' ')[0]:''}}
 								</view>
 								</view>
 								<view class="flex m-top10">
 								<view class="flex m-top10">
-									<view class="branch_css ">{{item.driverScoreObtained}}</view>
+									<!-- <view class="branch_css ">{{item.driverScoreObtained}}</view> -->
 									<view class="">
 									<view class="">
 										<start count="5" v-model="item.driverScoreObtained" size="35" activeColor="#ffaa00" :size="18"
 										<start count="5" v-model="item.driverScoreObtained" size="35" activeColor="#ffaa00" :size="18"
 											:allowHalf='true' :disabled='true'>
 											:allowHalf='true' :disabled='true'>

+ 11 - 2
pages/order/map.nvue

@@ -43,11 +43,13 @@
 				<text style="width: 270px;">{{content}}</text>
 				<text style="width: 270px;">{{content}}</text>
 			</div>
 			</div>
 		</u-modal>
 		</u-modal>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
-	const img = '/static/logo.png';
+	// const img = '/static/logo.png';
+	const img = '/static/live-camera/shutter.png';
 	import * as config from '@/config'
 	import * as config from '@/config'
 	let baseUrl = config.def().baseUrlNew
 	let baseUrl = config.def().baseUrlNew
 	export default {
 	export default {
@@ -193,12 +195,17 @@
 						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
 						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
 					},
 					},
 					success: (res) => {
 					success: (res) => {
+						console.log("支付状态",res)
 						this.show = false
 						this.show = false
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "支付成功!",
+							})
 							this.getTrack(1) //调北斗
 							this.getTrack(1) //调北斗
 						} else {
 						} else {
 							uni.showToast({
 							uni.showToast({
-								title: '支付失败',
+								title: res.data.message,
 								icon: 'none',
 								icon: 'none',
 								duration: 2000
 								duration: 2000
 							})
 							})
@@ -210,6 +217,7 @@
 			// /hyOrderTravelPath/orderPath   
 			// /hyOrderTravelPath/orderPath   
 			//模拟获取远程数据
 			//模拟获取远程数据
 			getTrack(num) {
 			getTrack(num) {
+				var that = this
 				if (num == 0) { //平台轨迹
 				if (num == 0) { //平台轨迹
 					uni.request({
 					uni.request({
 						url: baseUrl + '/hyOrderTravelPath/getInfo',
 						url: baseUrl + '/hyOrderTravelPath/getInfo',
@@ -224,6 +232,7 @@
 						},
 						},
 						success: (res) => {
 						success: (res) => {
 							if (res.data.code == 200) {
 							if (res.data.code == 200) {
+								that.tips = "切换北斗轨迹"
 								if (res.data.data.records.length >0) {
 								if (res.data.data.records.length >0) {
 									var trajectory = []
 									var trajectory = []
 									for (let i = 0; i < res.data.data.records.length; i++) {
 									for (let i = 0; i < res.data.data.records.length; i++) {

+ 25 - 10
pages/release/selectAddress.vue

@@ -266,7 +266,7 @@
 			selectAddress(type) {
 			selectAddress(type) {
 				// 0临时地址 1 新增地址
 				// 0临时地址 1 新增地址
 				if (type == 0) {
 				if (type == 0) {
-					let that = this
+					var that = this
 					uni.chooseLocation({
 					uni.chooseLocation({
 						success: function(res) {
 						success: function(res) {
 							// var locationObj = that.$helper.formatLocation(res);
 							// var locationObj = that.$helper.formatLocation(res);
@@ -287,15 +287,30 @@
 							data.city = _address.City
 							data.city = _address.City
 							data.area = _address.Country
 							data.area = _address.Country
 							data.commonId = that.userInfo.id
 							data.commonId = that.userInfo.id
-							if (that.type == 0) {
-								uni.setStorageSync('storage_faddress', data)
-							} else {
-								uni.setStorageSync('storage_saddress', data)
-							}
-
-							uni.navigateBack({
-								delta: 1
-							})
+							
+							console.log("城市",_address.City)
+							uni.request({
+								url: 'https://restapi.amap.com/v3/config/district?key=d29a9d10160efaca0dd616bbec936d7f&subdistrict=1&keywords=' +
+									_address.City,
+								success: (res) => {
+									for (let i = 0; i < res.data.districts[0].districts.length; i++) {
+										if (res.data.districts[0].districts[i].name == _address.Country) {
+											data.adCode = res.data.districts[0].districts[i].adcode
+											console.log("行政区划代码" + data.adCode)
+											// that.$forceUpdate()
+											if (that.type == 0) {
+												uni.setStorageSync('storage_faddress', data)
+											} else {
+												uni.setStorageSync('storage_saddress', data)
+											}
+											uni.navigateBack({
+												delta: 1
+											})
+											break
+										}
+									}
+								}
+							});
 						},
 						},
 
 
 						fail(err) {
 						fail(err) {