From fdd3687e392462822226fd4e0ffc20c92a1caaba Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 十一月 2026 16:08:30 +0800
Subject: [PATCH] refactor(app): 移除页面附件上传功能
---
src/pages/crm/clue/detail.vue | 33 +--------------------------------
1 files changed, 1 insertions(+), 32 deletions(-)
diff --git a/src/pages/crm/clue/detail.vue b/src/pages/crm/clue/detail.vue
index 713c062..8df4c15 100644
--- a/src/pages/crm/clue/detail.vue
+++ b/src/pages/crm/clue/detail.vue
@@ -144,36 +144,8 @@
},
});
}
- async function chooseFollowFile() {
- if (!state.accessToken || uploading.value) return;
- uni.chooseFile({
- count: 10 - followForm.blobIds.length,
- success: async result => {
- uploading.value = true;
- try {
- for (const file of result.tempFiles || []) {
- if (!file.path) continue;
- const attachment = await uploadCrmFile(state.accessToken!, file.path);
- followForm.blobIds.push(attachment.id);
- followForm.attachments.push(attachment);
- }
- } catch (error) {
- uni.showToast({
- title: error instanceof Error ? error.message : "闄勪欢涓婁紶澶辫触",
- icon: "none",
- });
- } finally {
- uploading.value = false;
- }
- },
- });
- }
function removeImage(index: number) {
followForm.picUrls.splice(index, 1);
- }
- function removeFile(index: number) {
- followForm.blobIds.splice(index, 1);
- followForm.attachments.splice(index, 1);
}
async function saveFollow() {
if (
@@ -356,10 +328,7 @@
@click="uni.previewImage({urls:followForm.picUrls,current:url})" /><text @click="removeImage(index)">脳</text>
</view>
</view>
- <view class="upload-head"><text>闄勪欢</text><text @click="chooseFollowFile">涓婁紶闄勪欢</text></view>
- <view v-for="(item,index) in followForm.attachments"
- :key="item.id"
- class="file-item"><text>{{item.name || `闄勪欢 #${item.id}`}}</text><text @click="removeFile(index)">鍒犻櫎</text></view><button class="primary"
+ <button class="primary"
:loading="saving || uploading"
@click="saveFollow">淇濆瓨璺熻繘</button>
</view>
--
Gitblit v1.9.3