zhongtianhaoyuan 1 vuosi sitten
vanhempi
commit
d1baafc7ef
4 muutettua tiedostoa jossa 61 lisäystä ja 35 poistoa
  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]:''}}
 								</view>
 								<view class="flex m-top10">
-									<view class="branch_css ">{{item.driverScoreObtained}}</view>
+									<!-- <view class="branch_css ">{{item.driverScoreObtained}}</view> -->
 									<view class="">
 										<start count="5" v-model="item.driverScoreObtained" size="35" activeColor="#ffaa00" :size="18"
 											:allowHalf='true' :disabled='true'>

+ 11 - 2
pages/order/map.nvue

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

+ 25 - 10
pages/release/selectAddress.vue

@@ -266,7 +266,7 @@
 			selectAddress(type) {
 				// 0临时地址 1 新增地址
 				if (type == 0) {
-					let that = this
+					var that = this
 					uni.chooseLocation({
 						success: function(res) {
 							// var locationObj = that.$helper.formatLocation(res);
@@ -287,15 +287,30 @@
 							data.city = _address.City
 							data.area = _address.Country
 							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) {