提交代码
This commit is contained in:
1 parent
c79afe56e2
commit
c54c823a8c
2 files changed
+522
-393
No files matched your search
@@ -37,7 +37,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="file-actions">
|
||||
<!-- <u-button
|
||||
<u-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
plain
|
||||
@@ -46,7 +46,7 @@
|
||||
class="action-btn"
|
||||
>
|
||||
下载
|
||||
</u-button> -->
|
||||
</u-button>
|
||||
<u-button
|
||||
v-if="!disabled"
|
||||
type="error"
|
||||
@@ -401,7 +401,27 @@ export default {
|
||||
});
|
||||
|
||||
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();
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user