From 4ddfa807643c73ff90840b0b65a5118741e12b48 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期六, 09 五月 2026 18:06:13 +0800
Subject: [PATCH] 移动端维护

---
 components/attachment/index.vue |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/components/attachment/index.vue b/components/attachment/index.vue
index 3a7309d..b8d497c 100644
--- a/components/attachment/index.vue
+++ b/components/attachment/index.vue
@@ -120,14 +120,14 @@
           <!-- 绌虹姸鎬� -->
           <view class="empty" v-if="currentFileList.length === 0">
             <uni-icons type="info" size="24" color="#999" />
-            <text v-if="currentTab === 'base' || !showGradeSlip">鏆傛棤鍩虹闄勪欢</text>
+            <text v-if="currentTab === 'base' || !showGradeSlip">鏆傛棤闄勪欢</text>
             <text v-else-if="currentTab === 'grade'">鏆傛棤鎴愮哗鍗曢檮浠�</text>
           </view>
         </scroll-view>
 
         <!-- 鎿嶄綔鎸夐挳 -->
         <view class="popup-footer" v-if="!readonly">
-          <button class="btn" @click="chooseFile">娣诲姞{{ currentTab === 'grade' ? '鎴愮哗鍗�' : '鍩虹' }}闄勪欢</button>
+          <button class="btn" @click="chooseFile">娣诲姞</button>
           <button class="btn primary" @click="confirmUpload">纭涓婁紶</button>
         </view>
       </view>
@@ -451,6 +451,8 @@
       success: (res) => {
         if (res.statusCode === 200) {
           const data = JSON.parse(res.data);
+          console.log(data,'鏂囦欢');
+          
           if (data.code === 200) {
             resolve({
               ...data,
@@ -509,15 +511,16 @@
         file.status = 'uploading';
         const res = await uploadFile(file.file, 'base');
         Object.assign(file, {
-          url: res.fileName,
-          fileName: res.fileName,
+          url: res.url,
+          fileName: res.name,
           newFileName: res.newFileName,
           originalFilename: res.originalFilename,
-          status: 'success'
+          status: 'success',
+          size:res.size
         });
         emit("upload-base", file);
       } catch (error) {
-        console.error('鍩虹闄勪欢涓婁紶澶辫触:', error);
+        console.error('涓婁紶澶辫触:', error);
         file.status = 'error';
         uni.showToast({
           title: `鏂囦欢 ${file.name} 涓婁紶澶辫触`,

--
Gitblit v1.9.3