|
@@ -320,22 +320,25 @@ export default {
|
|
this.attachment.file = file
|
|
this.attachment.file = file
|
|
// downUrl: 原始url
|
|
// downUrl: 原始url
|
|
// fileUrl: 下载地址
|
|
// fileUrl: 下载地址
|
|
- const { downUrl, fileUrl } = await this.getAttachmentInfo(file)
|
|
|
|
|
|
+ const result = await this.getAttachmentInfo(file)
|
|
|
|
+ if (result) {
|
|
|
|
+ const { downUrl, fileUrl } = result
|
|
|
|
|
|
- let skipRefresh = false
|
|
|
|
- // 定制化用户不展示提示和留资
|
|
|
|
- if (IsCustomTopNet.value) {
|
|
|
|
- skipRefresh = true
|
|
|
|
- }
|
|
|
|
|
|
+ let skipRefresh = false
|
|
|
|
+ // 定制化用户不展示提示和留资
|
|
|
|
+ if (IsCustomTopNet.value) {
|
|
|
|
+ skipRefresh = true
|
|
|
|
+ }
|
|
|
|
|
|
- if (!skipRefresh) {
|
|
|
|
- this.refreshResourcePackCount()
|
|
|
|
- }
|
|
|
|
|
|
+ if (!skipRefresh) {
|
|
|
|
+ this.refreshResourcePackCount()
|
|
|
|
+ }
|
|
|
|
|
|
- if (downUrl && fileUrl) {
|
|
|
|
- location.href = fileUrl
|
|
|
|
- } else {
|
|
|
|
- console.log('获取附件fid失败')
|
|
|
|
|
|
+ if (downUrl && fileUrl) {
|
|
|
|
+ location.href = fileUrl
|
|
|
|
+ } else {
|
|
|
|
+ console.log('获取附件fid失败')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async getAttachmentInfo(file) {
|
|
async getAttachmentInfo(file) {
|