|
@@ -119,8 +119,8 @@
|
|
<a-popconfirm title="确定删除该资源?" @confirm="deleteRecord(record)">
|
|
<a-popconfirm title="确定删除该资源?" @confirm="deleteRecord(record)">
|
|
<a>删除</a>
|
|
<a>删除</a>
|
|
</a-popconfirm>
|
|
</a-popconfirm>
|
|
- <div class="read_txt" @click="readPdf(record.uploadFile)">
|
|
|
|
- {{ isRead(record.uploadFile) }}
|
|
|
|
|
|
+ <div class="read_txt" @click="readPdf(record.linkAddress)">
|
|
|
|
+ {{ isRead(record.fileType) }}
|
|
</div>
|
|
</div>
|
|
<a-button type="link" @click="auditBook(record)">审核</a-button>
|
|
<a-button type="link" @click="auditBook(record)">审核</a-button>
|
|
</a-space>
|
|
</a-space>
|
|
@@ -493,11 +493,11 @@ const cuerrchange = (page) => {
|
|
};
|
|
};
|
|
const isRead = (file) => {
|
|
const isRead = (file) => {
|
|
if (file) {
|
|
if (file) {
|
|
- var index = file.lastIndexOf('.');
|
|
|
|
- //获取后缀
|
|
|
|
- var ext = file.substr(index + 1);
|
|
|
|
- console.log(ext);
|
|
|
|
- if (ext == 'pdf' || ext == 'PDF') {
|
|
|
|
|
|
+ // var index = file.lastIndexOf('.');
|
|
|
|
+ // //获取后缀
|
|
|
|
+ // var ext = file.substr(index + 1);
|
|
|
|
+ // console.log(ext);
|
|
|
|
+ if (file == 'pdf' || file == 'PDF') {
|
|
return '立即阅读';
|
|
return '立即阅读';
|
|
} else {
|
|
} else {
|
|
return '立即下载';
|
|
return '立即下载';
|
|
@@ -509,6 +509,7 @@ const isRead = (file) => {
|
|
|
|
|
|
const readPdf = (file) => {
|
|
const readPdf = (file) => {
|
|
window.open(file);
|
|
window.open(file);
|
|
|
|
+ console.log(file)
|
|
};
|
|
};
|
|
// 分页查询参数
|
|
// 分页查询参数
|
|
const queryList = () => {
|
|
const queryList = () => {
|