提交代码

This commit is contained in:
zlwu committed 2025-08-10 21:39:49 +08:00
1 parent c79afe56e2
commit c54c823a8c
2 files changed
+522 -393

No files matched your search

+23 -3
View File
@@ -37,7 +37,7 @@
</view> </view>
</view> </view>
<view class="file-actions"> <view class="file-actions">
<!-- <u-button <u-button
type="primary" type="primary"
size="mini" size="mini"
plain plain
@@ -46,7 +46,7 @@
class="action-btn" class="action-btn"
> >
下载 下载
</u-button> --> </u-button>
<u-button <u-button
v-if="!disabled" v-if="!disabled"
type="error" type="error"
@@ -401,7 +401,27 @@ export default {
}); });
const downloadUrl = `/resource/oss/download/${file.ossId}`; const downloadUrl = `/resource/oss/download/${file.ossId}`;
const response = await downloadFile(downloadUrl); const response = await downloadFile(downloadUrl, file.name);
// const response = await downloadFile(downloadUrl, image.name);
if (response.statusCode === 200) {
uni.hideLoading();
uni.saveFile({
tempFilePath: response.tempFilePath,
success: function (res) {
uni.showToast({
title: '下载成功',
icon: 'success',
});
},
fail: function () {
uni.showToast({
title: '保存失败',
icon: 'none',
});
},
});
}
// 在移动端,文件会自动保存到本地 // 在移动端,文件会自动保存到本地
uni.hideLoading(); uni.hideLoading();
File diff suppressed because it is too large. Load diff