Browse Source

二维码变灰

gcz 1 year ago
parent
commit
0413b0b3ef
1 changed files with 16 additions and 8 deletions
  1. 16 8
      center/orderdetails.vue

+ 16 - 8
center/orderdetails.vue

@@ -140,8 +140,8 @@
 					<view class="item">座位:{{singleInfo.seatName}}</view>
 					<view class="item">状态:{{singleInfo.qrcodeStatus|filterSingleState}}</view>
 				</view>
-				<view class="singleQrcode" :style="{opacity:singleInfo.qrcodeStatus===0?'1':'0.3'}">
-					<ayQrcode ref="singleqrcode" :modal="singleModalQr" :url="singleQrContent" @hideQrcode="hideSingleQrcode" :height="180" :width="180" />
+				<view class="singleQrcode" :class="{disabled:singleInfo.qrcodeStatus!==0}" >
+					<ayQrcode ref="singleqrcode" :modal="singleModalQr" :themeColor="singleInfo.qrcodeStatus===0?'#333333':'#BCBCBC'" :url="singleQrContent" @hideQrcode="hideSingleQrcode" :height="180" :width="180" />
 				</view>
 				<view class="order-num" :class="{'del-line':singleInfo.qrcodeStatus!==0}">取票号:{{singleInfo.qrcodeNo}}</view>
 			</view>
@@ -330,10 +330,12 @@
 				this.showSingleQR = true;
 				this.singleInfo = item;
 				
-				this.singleQrContent = {};
-				this.singleQrContent.qrcode = item.qrcodeNo;
-				this.singleQrContent.time = Date.now();
-				this.singleQrContent = JSON.stringify(this.singleQrContent);
+				// this.singleQrContent = {};
+				// this.singleQrContent.qrcode = item.qrcodeNo;
+				// this.singleQrContent.time = Date.now();
+				// this.singleQrContent = JSON.stringify(this.singleQrContent);
+				
+				// this.singleQrContent = item.qrcodeNo
 				that.showSingleQrcode();//一加载生成二维码
 			},
 			// 展示二维码
@@ -870,9 +872,15 @@
 		}
 	}
 	.singleQrcode{
-		width: 160px;
-		height: 160px;
+		width: 180px;
+		height: 180px;
 		margin: 24rpx auto 54rpx;
+		position: relative;
+		&.disabled{
+			// /deep/ .canvas-qrcode{
+			// 	opacity: 0.3;
+			// }
+		}
 	}
 }
 </style>