Browse Source

入场扫描优化

tianhui 3 years ago
parent
commit
687bca2c29
4 changed files with 33 additions and 30 deletions
  1. 1 1
      pages/getcarno/getcarno.vue
  2. 4 4
      pages/getin/getin.vue
  3. 4 4
      pages/getout/getout.vue
  4. 24 21
      pages/parking/parking.vue

+ 1 - 1
pages/getcarno/getcarno.vue

@@ -61,7 +61,7 @@
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {
-								'test': 'test'  // 上传附带参数
+								'isUpload': 1  // 上传附带参数
 							},
 							success: (res) => {
 								// 根据接口具体返回格式   赋值具体对应url

+ 4 - 4
pages/getin/getin.vue

@@ -491,7 +491,7 @@
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {
-								'isUpload': '1'  // 上传附带参数
+								'isUpload': 1  // 上传附带参数
 							},
 							success: (res) => {
 								// 根据接口具体返回格式   赋值具体对应url
@@ -506,9 +506,9 @@
 									that.vehicleNo = resobj.data.vehicleNo;
 									that.vehicleClor = resobj.data.vehicleClor;
 									that.vehicleImage =  resobj.data.url;
-									that.carImg = 'data:image/png;base64,' + resobj.data.imageBase64;
-									this.$u.api.tencentBase64Upload({
-										base64: resobj.data.imageBase64,
+									// that.carImg = 'data:image/png;base64,' + resobj.data.imageBase64;
+									that.$u.api.tencentBase64Upload({
+										base64: resobj.data.url,
 										suffix: 'png'
 									})
 								}else{

+ 4 - 4
pages/getout/getout.vue

@@ -352,7 +352,7 @@
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {
-								'isUpload': '1'  // 上传附带参数
+								'isUpload': 1  // 上传附带参数
 							},
 							success: (res) => {
 								// 根据接口具体返回格式   赋值具体对应url
@@ -367,9 +367,9 @@
 									that.confirmData.vehicleNo = resobj.data.vehicleNo;
 									that.confirmData.vehicleClor = resobj.data.vehicleClor;
 									that.confirmData.vehicleImage =  resobj.data.url;
-									that.confirmData.carImg =  'data:image/png;base64,' + resobj.data.imageBase64;
-									this.$u.api.tencentBase64Upload({
-										base64: resobj.data.imageBase64,
+									// that.confirmData.carImg =  'data:image/png;base64,' + resobj.data.imageBase64;
+									that.$u.api.tencentBase64Upload({
+										base64: resobj.data.url,
 										suffix: 'png'
 									})
 									console.log('that.confirmData',that.confirmData);

+ 24 - 21
pages/parking/parking.vue

@@ -241,37 +241,40 @@
 							filePath: tempFilePaths[0],
 							name: 'file',
 							formData: {
-								'test': 'test'  // 上传附带参数
+								'isUpload': 1  // 上传附带参数
 							},
 							success: (res) => {
+								console.log("res",res)
 								let resobj=eval("("+res.data+")");
 								uni.hideLoading();
 								if(resobj.code==200){
 									that.vehicleNo =resobj.data.vehicleNo;
 									// this.carImg = 'data:image/png;base64,' + ret.imageBase64;
-									this.$u.api.tencentBase64Upload({
-										base64: resobj.data.imageBase64,
+									that.$u.api.tencentBase64Upload({
+										base64: resobj.data.url,
 										suffix: 'png'
 									})
 									.then(res=>{
-											that.carImg =  res.data.url;
-											that.vehicleImage =  res.data.url;
-											this.$u.route({
-												type: 'redirectTo',
-												url: 'pages/getin/getin',
-												params: {
-													spaceId: this.spaceId,
-													spaceName:this.spaceName,
-													roadNo:this.roadNo,
-													vehicleNo:this.vehicleNo,
-													carImg:that.carImg,
-													vehicleImage:that.vehicleImage,
-													inTime:this.inTime,
-													placeStatus:this.placeStatus,
-													currentVehicleNo:this.currentVehicleNo
-												}
-											});
-									}).catch(err=>{});
+										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=>{
+									});
 								}else{
 									that.$refs.uToast.show({
 										title: resobj.msg,