修复messageBox的bug
This commit is contained in:
parent
8966176ae1
commit
c367e575af
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@ -1 +1 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站</title><script defer="defer" src="/js/chunk-vendors.f51d2f94.js"></script><script defer="defer" src="/js/app.0014e3dc.js"></script><link href="/css/chunk-vendors.c52e575a.css" rel="stylesheet"><link href="/css/app.cbc57ab2.css" rel="stylesheet"></head><body><noscript><strong>抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。</strong></noscript><div id="app"></div></body></html>
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>NEU小站</title><script defer="defer" src="/js/chunk-vendors.f51d2f94.js"></script><script defer="defer" src="/js/app.72c49f64.js"></script><link href="/css/chunk-vendors.c52e575a.css" rel="stylesheet"><link href="/css/app.cbc57ab2.css" rel="stylesheet"></head><body><noscript><strong>抱歉,NEU小站无法在没有 JavaScript 的情况下正常工作。请启用 JavaScript 以继续。</strong></noscript><div id="app"></div></body></html>
|
File diff suppressed because one or more lines are too long
2
dist/js/940.705f02e8.js
vendored
Normal file
2
dist/js/940.705f02e8.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/js/940.8c63eb5f.js
vendored
2
dist/js/940.8c63eb5f.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.0014e3dc.js
vendored
2
dist/js/app.0014e3dc.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.72c49f64.js
vendored
Normal file
2
dist/js/app.72c49f64.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -63,7 +63,8 @@ import { defineAsyncComponent } from 'vue';
|
||||
// import VuePdfEmbed from 'vue-pdf-embed'
|
||||
import Cookies from 'js-cookie'
|
||||
import login from '@/utils/login.js'
|
||||
import messageBox from '@/utils/messageBox.js'
|
||||
import messageBox from '@/utils/messageBox.js'
|
||||
import barMessage from '@/utils/barMessage.js'
|
||||
|
||||
export default {
|
||||
name: 'Attachment',
|
||||
@ -72,6 +73,7 @@ export default {
|
||||
import('vue-pdf-embed')
|
||||
),
|
||||
},
|
||||
inject: ['barMessage'],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
@ -154,7 +156,7 @@ export default {
|
||||
},
|
||||
async openPreview() {
|
||||
if(!this.token) {
|
||||
this.$barMessage.error('您未登录,无法预览文件!');
|
||||
barMessage.error('您未登录,无法预览文件!');
|
||||
return;
|
||||
}
|
||||
// 再次检查权限,防止绕过按钮限制
|
||||
@ -234,7 +236,7 @@ export default {
|
||||
if (this.isLocked) {
|
||||
e.preventDefault();
|
||||
if (!this.token) {
|
||||
this.$barMessage.error('您未登录,无法下载加密文件!');
|
||||
barMessage.error('您未登录,无法下载加密文件!');
|
||||
} else {
|
||||
// 首先检查用户是否有可用的密钥
|
||||
fetch('https://newfront.xn--xhq44jb2fzpc.com/download/get-encrypt', {
|
||||
@ -292,7 +294,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
// 用户没有密钥
|
||||
this.$barMessage.error('您没有可用的密钥,向本站投稿以获取密钥。');
|
||||
barMessage.error('您没有可用的密钥,向本站投稿以获取密钥。');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@ -310,7 +312,7 @@ export default {
|
||||
|
||||
// 检查下载条件
|
||||
if(!this.token) {
|
||||
this.$barMessage.error('您未登录,无法下载文件!');
|
||||
barMessage.error('您未登录,无法下载文件!');
|
||||
return;
|
||||
}
|
||||
fetch('https://newfront.xn--xhq44jb2fzpc.com/download/check-download', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user