Pārlūkot izejas kodu

feat:上传loading

ljc 18 stundas atpakaļ
vecāks
revīzija
0c6d931bc0

+ 9 - 3
components/cwg-file-picker-wrapper.vue

@@ -474,23 +474,29 @@ const handleFile = async (fileData) => {
   }
 }
 const startUpload = async () => {
+  uni.showToast({
+    title: 'Loading...',
+    icon: 'loading',
+    duration: 10000000,
+    mask: true
+  })
 
   const files = tempFileQueue.value
 
   tempFileQueue.value = []
 
   for (const file of files) {
-
     // APP base64
     if (file.base64) {
       await uploadBase64(file)
     }
-
-    // H5 正常文件
     else {
+      // H5 正常文件
       await uploadFile(file)
     }
   }
+
+  uni.hideToast()
 }
 
 const uploadFile = async (fileItem) => {

+ 14 - 0
pages/activities/index.vue

@@ -351,6 +351,9 @@
                             </view>
                         </view>
                     </view>
+                    <view v-if="isEmpty" class="mt-4">
+                      <cwg-empty-state />
+                    </view>
                 </view>
             </view>
         </view>
@@ -1078,6 +1081,17 @@ const showMonthlyActivity2026 = computed(() => {
     return now >= target
 })
 
+// 没有活动
+const isEmpty = computed(()=>{
+  return !monthlyGiveActivity.value &&
+        !surplusGiveActivity.value &&
+        !dollarActivity.value &&
+        !tableDataNoWorriesFlag.value &&
+        !tableDataGive.value &&
+        !tableDataGive.value.length &&
+        !tableData.value &&
+        !tableData.value.length
+})
 // ==================== 工具方法 ====================
 // 根据key获取活动数据
 const getActivityShowsItem = (key)=> {

+ 2 - 2
pages/mine/improveImmediately.vue

@@ -247,7 +247,7 @@
                     :delIcon="fileListID1.status != 2" :fileMediatype="'all'" uploadUrl="/custom/file/upload/1"
                     :baseUrl="updateUrl" :imageWidth="150" :imageHeight="150" :showPreviewDelete="false"
                     :canDelete="false" :uploadError="false" :showProgress="false" :showError="false"
-                    :image-styles="imageStyle" @update:modelValue="(val) => handleFileUpdate(val, '1')"
+                    :image-styles="imageStyle"
                     customClass="avatar-uploader">
                   </cwg-file-picker-wrapper>
                   <!--                  <view v-else>-->
@@ -269,7 +269,7 @@
                     :delIcon="fileListID2.status != 2" :fileMediatype="'all'" uploadUrl="/custom/file/upload/2"
                     :baseUrl="updateUrl" :imageWidth="150" :imageHeight="150" :showPreviewDelete="false"
                     :canDelete="false" :uploadError="false" :showProgress="false" :canChoose="true" :showError="false"
-                    :image-styles="imageStyle" @update:modelValue="(val) => handleFileUpdate(val, '2')"
+                    :image-styles="imageStyle"
                     customClass="avatar-uploader">
                   </cwg-file-picker-wrapper>
                 </uni-col>