htc 10 months ago
parent
commit
93a40130ce
2 changed files with 17 additions and 22 deletions
  1. 12 17
      pagesHouse/Verification/check.vue
  2. 5 5
      pagesHouse/Verification/checkApp.vue

+ 12 - 17
pagesHouse/Verification/check.vue

@@ -34,7 +34,7 @@
 						身份证 {{i.touristCode|handle(3)}}
 					</view>
 				</view>
-				<u-icon name="minus-circle" size="36" color="#FEA400" @tap="jian(item)"
+				<u-icon name="minus-circle" size="36" color="#FEA400" @tap="jian(index)"
 					v-if="i.remark!='book'"></u-icon>
 			</view>
 		</view>
@@ -84,9 +84,6 @@
 			this.boatNo = opt.boatNo || '';
 			this.getOrderInfo();
 			this.getTypes();
-			console.log(tuomin())
-			//获取上次核销缓存
-
 		},
 		filters: {
 			handle(val, type) {
@@ -113,7 +110,6 @@
 					merchantId: this.merchantId,
 					boatNo: this.boatNo
 				}).then(res => {
-					console.log(res.data)
 					if (res.data.code == 0) {
 						this.orderInfo = res.data.data;
 						this.keyName = this.orderInfo.playDate + this.orderInfo.playTime + this.boatNo;
@@ -146,25 +142,21 @@
 				sendData.merchantId = this.orderInfo.merchantId;
 				sendData.orderType = this.orderInfo.orderType;
 				sendData.type = type;
-				sendData.writeOffCode = result;
-				console.log(sendData)
-
+				sendData.boatNo = this.boatNo;
+				if(type==0) sendData.writeOffCode = result;
+				else if(type==1){
+					sendData.touristCode = encrypt(result);
+					sendData.touristName = name;
+				} 
 				this.$api.post('/scenic/api/order/scanCode', sendData).then(res => {
-					console.log(res.data)
 					if (res.data.code == 0) {
 						if (this.data.findIndex((item) => {
 								return item.touristCode == res.data.data.touristCode
 							}) > -1) {
 							this.$showToast('该核验码已扫')
 						} else {
-							// "id": 0,
-							// 		"orderCode": "",
-							// 		"remark": "",
-							// 		"touristCode": "",
-							// 		"touristName": ""
-
-							res.data.data.touristCode = encrypt(res.data.data.touristCode);
-							res.data.data.touristName = encrypt(res.data.data.touristName)
+							res.data.data.touristCode = res.data.data.touristCode;
+							res.data.data.touristName = res.data.data.touristName
 							let json = {
 								id: res.data.data.id,
 								orderCode:res.data.data.orderCode,
@@ -208,6 +200,9 @@
 					}
 				})
 				uni.removeStorageSync(this.keyName);
+			},
+			jian(index){
+				if(this.data.length>index) this.data.splice(index,1);
 			}
 		}
 	}

+ 5 - 5
pagesHouse/Verification/checkApp.vue

@@ -94,7 +94,6 @@
 			this.boatNo = opt.boatNo || '';
 			this.getOrderInfo();
 			this.getTypes();
-			//获取上次核销缓存
 
 			this.initSDK();
 			globalEvent.addEventListener('readInfo', function(e) {
@@ -181,23 +180,24 @@
 				sendData.merchantId = this.orderInfo.merchantId;
 				sendData.orderType = this.orderInfo.orderType;
 				sendData.type = type;
+				sendData.boatNo = this.boatNo;
 				if(type==0) sendData.writeOffCode = result;
 				else if(type==1){
-					sendData.touristCode = result;
+					sendData.touristCode = encrypt(result);
 					sendData.touristName = name;
 				} 
 
 				this.$api.post('/scenic/api/order/scanCode', sendData).then(res => {
 					if (res.data.code == 0) {
 						if (this.data.findIndex((item) => {
-								return item.touristCode == encrypt(res.data.data.touristCode)
+								return item.touristCode == res.data.data.touristCode
 							}) > -1) {
 								let mg = '该核验码已扫';
 								if(type==1) mg = '该身份证已扫';
 							this.$showToast(mg);
 						} else {
-							res.data.data.touristCode = encrypt(res.data.data.touristCode);
-							res.data.data.touristName = encrypt(res.data.data.touristName)
+							res.data.data.touristCode = res.data.data.touristCode;
+							res.data.data.touristName = res.data.data.touristName
 							let json = {
 								id: res.data.data.id,
 								orderCode:res.data.data.orderCode,