wangxy 1 settimana fa
parent
commit
324e05c5a2
2 ha cambiato i file con 18 aggiunte e 5 eliminazioni
  1. 9 5
      pages/admin/Hetong/Hetong.vue
  2. 9 0
      pages/admin/Hetong/HetongInfo.vue

+ 9 - 5
pages/admin/Hetong/Hetong.vue

@@ -29,6 +29,12 @@
 				<writeSign @getBase64="getBase64"></writeSign>
 			</view>
 		</uni-popup>
+		
+		<!-- 加载提示 -->
+		<view class="loading-overlay" v-if="isLoading">
+			<view class="loading-spinner"></view>
+			<text class="loading-text">加载中...</text>
+		</view>
 	</view>
 </template>
 
@@ -44,9 +50,9 @@
   import {throttleAdvanced} from "@/utils/common.js"
 	const tId = ref(null)
 	const info = ref({})
-	const show = ref(false)
 	const popupRef = ref(null)
 	const imgList = ref([])
+	const isLoading = ref(true)
 
 	function goUpPage() {
 		uni.navigateBack()
@@ -68,10 +74,8 @@
 		httpApi.getHetongInfo({id:tId.value}).then(res => {
 			info.value = res.data;
 			imgList.value = res.data.base64List;
-			setTimeout(() => {
-				console.log('xianshi')
-				show.value = true;
-			}, 3000)
+		}).finally(() => {
+			isLoading.value = false;
 		})
 	}
 

+ 9 - 0
pages/admin/Hetong/HetongInfo.vue

@@ -28,6 +28,12 @@
 	  			<writeSign @getBase64="getBase64"></writeSign>
 	  	</view>
 	  </uni-popup>
+	  
+	  <!-- 加载提示 -->
+	  <view class="loading-overlay" v-if="isLoading">
+	  	<view class="loading-spinner"></view>
+	  	<text class="loading-text">加载中...</text>
+	  </view>
     </view>
 </template>
 
@@ -48,6 +54,7 @@ const info = ref({})
 const show = ref(false)
 const popupRef = ref(null)
 const imgList = ref([])
+const isLoading = ref(true)
 
 onLoad((options) => {
   tId.value = options.id;
@@ -62,6 +69,8 @@ function init() {
   httpApi.getHetongInfo({id: tId.value}).then(res => {
 	info.value = res.data;
   imgList.value = res.data.base64List;
+  }).finally(() => {
+	  isLoading.value = false;
   })
 }