Browse Source

图片修改为两张

aleyds 3 years ago
parent
commit
8afc88d00a
3 changed files with 34 additions and 29 deletions
  1. 2 2
      common/config.js
  2. 5 3
      pages/getin/getin.vue
  3. 27 24
      pages/parking/parking.vue

+ 2 - 2
common/config.js

@@ -1,5 +1,5 @@
-const host = 'https://wx.hw.hongweisoft.com/parking';//本地
-// const host = 'https://parking.pdzhtc.com';//正式
+// const host = 'https://wx.hw.hongweisoft.com/parking';//本地
+const host = 'https://parking.pdzhtc.com';//正式
 // const host = 'http://172.16.90.64:7000';
 const config = {
 	wxAppid:'wxbe90cc7c5233dd84',// wxAppid 

+ 5 - 3
pages/getin/getin.vue

@@ -273,7 +273,9 @@
 				// files = this.$refs.uUpload.lists;
 				files.forEach(function(element) {
 					console.log('files',element)
-				  that.images.push(element[0].response.data.url);
+					if(element.length > 0 && element[0]?.response){
+						that.images.push(element[0]?.response?.data.url);
+					}
 				});
 				if((that.images=='' || that.images==null)&&that.images.length < 2){
 					this.$refs.uToast.show({
@@ -282,8 +284,8 @@
 					})
 				}else{
 					this.time = this.confirmTime;
-				console.log(this.timeList[1].time)
-				this.timeshow=true;
+					console.log(this.timeList[1].time)
+					this.timeshow=true;
 				}
 				
 				// this.timeList[0].time = this.inTime;

+ 27 - 24
pages/parking/parking.vue

@@ -249,31 +249,34 @@
 								uni.hideLoading();
 								if(resobj.code==200){
 									that.vehicleNo =resobj.data.vehicleNo;
+									that.carImg =  resobj.data.url;
+									that.vehicleImage = resobj.data.url;
 									// this.carImg = 'data:image/png;base64,' + ret.imageBase64;
-									that.$u.api.tencentBase64Upload({
-										base64: resobj.data.url,
-										suffix: 'png'
-									})
-									.then(res=>{
-										that.carImg =  res.data.url;
-										console.log("IMG",that.carImg)
-										that.vehicleImage =  res.data.url;
-										that.$u.route({
-											type: 'redirectTo',
-											url: 'pages/getin/getin',
-											params: {
-												spaceId: that.spaceId,
-												spaceName:that.spaceName,
-												roadNo:that.roadNo,
-												vehicleNo:that.vehicleNo,
-												carImg:that.carImg,
-												vehicleImage:that.vehicleImage,
-												inTime:that.inTime,
-												placeStatus:that.placeStatus,
-												currentVehicleNo:that.currentVehicleNo
-											}
-										});
-									}).catch(err=>{
+									// that.$u.api.tencentBase64Upload({
+									// 	base64: resobj.data.url,
+									// 	suffix: 'png'
+									// })
+									// .then(res=>{
+									// 	that.carImg =  res.data.url;
+									// 	console.log("IMG",that.carImg)
+									// 	that.vehicleImage =  res.data.url;
+										
+									// }).catch(err=>{
+									// });
+									that.$u.route({
+										type: 'redirectTo',
+										url: 'pages/getin/getin',
+										params: {
+											spaceId: that.spaceId,
+											spaceName:that.spaceName,
+											roadNo:that.roadNo,
+											vehicleNo:that.vehicleNo,
+											carImg:that.carImg,
+											vehicleImage:that.vehicleImage,
+											inTime:that.inTime,
+											placeStatus:that.placeStatus,
+											currentVehicleNo:that.currentVehicleNo
+										}
 									});
 								}else{
 									that.$refs.uToast.show({