From 244d89b41c0e0e995d38f635a126a0959b9ba25b Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期二, 25 六月 2024 18:16:42 +0800
Subject: [PATCH] 问题处理

---
 policy/scodePage/scodePage.vue |   46 +++++++++++++++++++++++++++-------------------
 1 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/policy/scodePage/scodePage.vue b/policy/scodePage/scodePage.vue
index 813ed64..9940bcd 100644
--- a/policy/scodePage/scodePage.vue
+++ b/policy/scodePage/scodePage.vue
@@ -11,18 +11,24 @@
 		<image src="/static/policy/back.png" mode="widthFix" class="back-image"></image>
 		<view class="page-box">
 			<view class="code-hint">
-				<view>
-					<image src="/static/policy/success.png" mode="widthFix"></image>
-					<!-- <image src="/static/policy/error.png" mode="widthFix"></image> -->
-					<text>鎴愬姛-缁跨爜</text>
-					<!-- <text>澶辫触-绾㈢爜</text> -->
-				</view>
-				<view class="hint">
-					鍙姝や紒涓氳繘琛屾牳鏌�
-				</view>
-				<view class="hint">
-					璇锋牳鏌ヤ紒涓氫俊鎭�
-				</view>
+				<template v-if="color == 'green'">
+					<view>
+						<image src="/static/policy/success.png" mode="widthFix"></image>
+						<text>鎴愬姛-缁跨爜</text>
+					</view>
+					<view class="hint">
+						鍙姝や紒涓氳繘琛屾牳鏌�
+					</view>
+				</template>
+				<template  v-if="color == 'red'">
+					<view >
+						<image src="/static/policy/error.png" mode="widthFix"></image>
+						<text>澶辫触-绾㈢爜</text>
+					</view>
+					<view class="hint">
+						璇锋牳鏌ヤ紒涓氫俊鎭�
+					</view>
+				</template>
 			</view>
 			<!-- 浜岀淮鐮� -->
 			<view class="qrcode">
@@ -70,7 +76,7 @@
 								<text>鐢宠鏃堕棿锛�</text>{{item.applyTime}}
 							</view>
 							<view class="button-entery">
-								<view class="button" @click="doScanOrder(item.orderId)">纭鎵ф硶</view>
+								<view class="button" v-if="item.isSelect" @click="doScanOrder(item.orderId, index)">纭鎵ф硶</view>
 							</view>
 						</view>
 					</swiper-item>
@@ -92,7 +98,8 @@
 				uqrcodeImage: '',
 				list: [],
 				userInfo: {},
-				color: ''
+				color: '',
+				
 			}
 		},
 		onReady() {
@@ -103,13 +110,13 @@
 			
 			this.getInfo()
 		},
-		onShow() {
-		
-		},
 		methods: {
 			getScanList(companyCode){
 				getScanList({companyCode}).then(val => {
-					this.list = val.data.data
+					this.list = val.data.data.map(item => {
+						item['isSelect'] = true
+						return item
+					})
 					if(this.list.length) {
 						this.color = 'green'
 					} else {
@@ -131,13 +138,14 @@
 					this.userInfo = val.data.data
 				})
 			},
-			doScanOrder(item) {
+			doScanOrder(item, index) {
 				doScanOrder(item).then(val => {
 					if(val.data.code == 200) {
 						uni.showToast({
 							title: '纭鎵ф硶鎴愬姛',
 							icon: 'none'
 						})
+						this.list[index].isSelect = false
 					}
 				})
 			}

--
Gitblit v1.9.1