|
@@ -4,9 +4,9 @@
|
|
|
<img src="http://cn-file.17pdf.com/website/common/ic_notice.svg" class="align-middle">
|
|
|
<div class="text-container">
|
|
|
<span class="text">
|
|
|
- 转档后的文件支持在云端保留24小时,<span v-if="userInfo?.memberInfo.subscriberType === 1">会员尊享5G容量,</span>请在24小时内下载文件至本地永久保存
|
|
|
+ 转档后的文件支持在云端保留24小时,<span v-if="userInfo?.subscriberType === 1">会员尊享5G容量,</span>请在24小时内下载文件至本地永久保存
|
|
|
</span>
|
|
|
- <span v-if="userInfo?.memberInfo.subscriberType === 1" class="vip tip">
|
|
|
+ <span v-if="userInfo?.subscriberType === 1" class="vip tip">
|
|
|
<img src="http://cn-file.17pdf.com/website/common/ic_info.svg" alt="">
|
|
|
<div class="tip-text">
|
|
|
若已有文件大小超出5G,将按转档时间计算(从最近一次转档往过去推算),即保留最近的5G容量文件,超出部分文件将不再保留
|
|
@@ -17,7 +17,8 @@
|
|
|
<h1 class="text-48px text-opacity-100 font-500 text-[#3333] mt-48px mb-10px text-center">文件转换器</h1>
|
|
|
<h2 class="text-20px text-center text-[#666] mt-20px font-normal">PDF文件格式转换器,一键转档,支持批量转换,精准快速。</h2>
|
|
|
<div class="text-center mb-80px">
|
|
|
- <a class="mt-20px text-[#4D4D4D] text-16px font-600 inline-flex items-center leading-22px hover:text-$btn-color-primary hover:underline"
|
|
|
+ <a
|
|
|
+class="mt-20px text-[#4D4D4D] text-16px font-600 inline-flex items-center leading-22px hover:text-$btn-color-primary hover:underline"
|
|
|
href="https://www.compdf.com/pdf-conversion-sdk?utm_source=anroidapp&utm_medium=17pdfweb&utm_campaign=pdfsdk" target="_blank">由 ComPDFKit Conversion SDK 提供技术支持
|
|
|
<svg class="ml-8px" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
<path d="M6 12.9567L10.714 8.24261L6 3.52856" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
@@ -35,7 +36,7 @@
|
|
|
<a class="text-[#ff4f4f] no-underline leading-normal" @click="handlerBuy('ticket')">充值</a>
|
|
|
</span>
|
|
|
<div class="need-volume float-right right-48px text-16px text-[#666] leading-48px mr-20px">
|
|
|
- 所需券:<span class="text-[#0dd299] text-16px" :class="{'text-red-500': requiredCoupon > userInfo !== null ? userInfo.memberInfo.points : 0 }">{{ requiredCoupon }}券</span> / 剩余券:<span class="text-[#0dd299] text-16px">{{ userInfo?.memberInfo.points > 0 ? userInfo.memberInfo.points : 0 }}券</span>
|
|
|
+ 所需券:<span class="text-[#0dd299] text-16px" :class="{'text-red-500': requiredCoupon > userInfo?.points}">{{ requiredCoupon }}券</span> / 剩余券:<span class="text-[#0dd299] text-16px">{{ userInfo?.points }}券</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="transfer-panel">
|
|
@@ -50,7 +51,7 @@
|
|
|
点击从电脑上传文件或把文件拖到这里
|
|
|
<p class="text-14px">(支持PDF to Word、PPT、Excel、TXT、JPG/PNG无限次数转换)</p>
|
|
|
</div>
|
|
|
- <table class="table table-hover w-[100%] max-w-[100%]" id="table-fileinput">
|
|
|
+ <table id="table-fileinput" class="table table-hover w-[100%] max-w-[100%]">
|
|
|
<thead v-show="fileList.length > 0">
|
|
|
<tr class="h-40px bg-[#eee]">
|
|
|
<th class="!w-[5.5%]"></th>
|
|
@@ -63,15 +64,15 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody v-show="fileList.length > 0" class="file-preview-thumbnails cursor-default">
|
|
|
- <tr v-for="(item, index) in fileList" :key="index" class="file-preview-frame explorer-frame kv-preview-thumb w-100px h-38px hover:bg-[#f5f5f5]" id="preview-1668340925733-0" data-fileindex="0" data-template="pdf" title="test.pdf">
|
|
|
+ <tr v-for="(item, index) in fileList" id="preview-1668340925733-0" :key="index" class="file-preview-frame explorer-frame kv-preview-thumb w-100px h-38px hover:bg-[#f5f5f5]" data-fileindex="0" data-template="pdf" title="test.pdf">
|
|
|
<td class="file-details-cell">{{ index+1 }}</td>
|
|
|
<td class="file-details-cell !text-left">
|
|
|
<div class="explorer-caption max-w-260px truncate block text-[#777]" title="test.pdf">{{ item.name }}</div>
|
|
|
</td>
|
|
|
<td class="file-details-cell text-[#999]">{{ getfilesize(item.size) }}</td>
|
|
|
- <td class="file-details-cell points">{{ userInfo?.memberInfo.subscriberType === 1 ? 0 : item.price }}</td>
|
|
|
+ <td class="file-details-cell points">{{ userInfo.subscriberType === 1 ? 0 : item.price }}</td>
|
|
|
<td class="file-details-cell select w-106px">
|
|
|
- <select v-if="item.status !== 6" class="transfer-select appearance-none" v-model="item.output" @change="changeOutput(item, index)">
|
|
|
+ <select v-if="item.status !== 6" v-model="item.output" class="transfer-select appearance-none" @change="changeOutput(item, index)">
|
|
|
<option value="png">PNG</option>
|
|
|
<option value="xlsx">XLSX</option>
|
|
|
<option value="pptx">PPTX</option>
|
|
@@ -106,10 +107,11 @@
|
|
|
<div class="input-group-btn relative text-0px whitespace-nowrap !flex">
|
|
|
<div tabindex="500" class="btn btn-file" :class="{'btn-file-left' : fileList.length > 0}">
|
|
|
<div class="add-file" :class="{'add-file-left':(fileList.length > 0)}">{{ fileList.length > 0 ? '添加文件' : '' }}</div>
|
|
|
- <input name="file" id="fileinput-explorer" ref="file" @change="addFile($event)" accept=".pdf" title="上传文件" type="file" multiple=""
|
|
|
- class="absolute top-0 right-0 p-0 m-0 min-w-[100%] h-[100%] w-90px text-right opacity-0 bg-none bg-repeat bg-scroll block outline-none border-0 cursor-pointer"/>
|
|
|
+ <input
|
|
|
+id="fileinput-explorer" ref="file" name="file" accept=".pdf" title="上传文件" type="file" multiple="" class="absolute top-0 right-0 p-0 m-0 min-w-[100%] h-[100%] w-90px text-right opacity-0 bg-none bg-repeat bg-scroll block outline-none border-0 cursor-pointer"
|
|
|
+ @change="addFile($event)"/>
|
|
|
</div>
|
|
|
- <div v-if="fileList.length > 0" @click="deleteAllFile" class="inline-block ml-30px bg-white border border-[#ff4f4f] boder-solid text-16px py-7px px-18px rounded-4px mt-4px cursor-pointer text-[#ff4f4f] leading-normal hover:bg-[#ff4f4f] hover:text-white">清空</div>
|
|
|
+ <div v-if="fileList.length > 0" class="inline-block ml-30px bg-white border border-[#ff4f4f] boder-solid text-16px py-7px px-18px rounded-4px mt-4px cursor-pointer text-[#ff4f4f] leading-normal hover:bg-[#ff4f4f] hover:text-white" @click="deleteAllFile">清空</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -118,7 +120,7 @@
|
|
|
|
|
|
<div class="transfer-btn mt-30px h-64px text-center">
|
|
|
<div class="cursor-not-allowed inline-block">
|
|
|
- <span @click="createFileMission" :class="{'disabledBtn' : !checkbox || !changeFileFlag }" class="btn transfer-start-btn bg-[#ff524f] text-20px py-0 px-150px rounded-4px h-60px w-386px text-white hover:bg-[#f34545]">
|
|
|
+ <span :class="{'disabledBtn' : !checkbox || !changeFileFlag }" class="btn transfer-start-btn bg-[#ff524f] text-20px py-0 px-150px rounded-4px h-60px w-386px text-white hover:bg-[#f34545]" @click="createFileMission">
|
|
|
<a class="text-white leading-60px">{{ !changeFileFlag ? '转换中...' : '开始转换' }}</a>
|
|
|
<span v-if="!changeFileFlag" class="loading"></span>
|
|
|
</span>
|
|
@@ -138,7 +140,7 @@
|
|
|
<div class="modal-dialog verifi-dialog w-480px h-426px my-50px" role="document">
|
|
|
<div class="modal-content relative bg-white rounded-6px border border-solid border-[rgba(0,0,0,0.2)] outline-0 bg-clip-padding ring-[rgba(0,0,0/50%)] ring-offseet-3px ring-9px md:ring-offset-5 md:ring-15px">
|
|
|
<div class="">
|
|
|
- <button type="button" id="verifi-close" class="close pompt_close py-5px px-10px outline-none" data-dismiss="modal" aria-label="Close">
|
|
|
+ <button id="verifi-close" type="button" class="close pompt_close py-5px px-10px outline-none" data-dismiss="modal" aria-label="Close">
|
|
|
<span aria-hidden="true">×</span>
|
|
|
</button>
|
|
|
</div>
|
|
@@ -158,7 +160,7 @@
|
|
|
<div class="file_num w-[100%] h-120px text-center text-white leading-120px text-30px mb-76px">
|
|
|
17PDF Reader,当前已转换了<span class="text-32px"> 1,859,726 </span> 个文件
|
|
|
</div>
|
|
|
- <div class="pdf_converter clear w-[80%] my-0 mx-auto" id="more_type">
|
|
|
+ <div id="more_type" class="pdf_converter clear w-[80%] my-0 mx-auto">
|
|
|
<div class="package_type">
|
|
|
<h3 class="text-24px text-[#333] font-normal mx-0 mt-0 mb-49px h-30px leading-30px">会员专享格式</h3>
|
|
|
<ul class="flex justify-center w-[100%] min-w-340px p-0 mt-0 mb-10">
|
|
@@ -297,7 +299,22 @@ export default {
|
|
|
changeSucesssFileList: []
|
|
|
}
|
|
|
},
|
|
|
- middleware: 'user',
|
|
|
+ // middleware: 'user',
|
|
|
+ head() {
|
|
|
+ return {
|
|
|
+ title: 'PDF转换器免费在线转档',
|
|
|
+ meta: [
|
|
|
+ {
|
|
|
+ hid: 'description',
|
|
|
+ content: '17PDF Reader免费提供在线PDF格式转换文件转档服务,支持PDF转word,PDF转doc,PDF转PPT,PDF转png,PDF转html,PDF转epub,PDF转xls,psd转ai等。轻松拖曳,一键转档,批量转换,支持多种常用格式相互转档。先进的转换引擎,极速转换,精准度高达99.99%。',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'keywords',
|
|
|
+ content: '格式转换,文件转档,pdf convert,converter, word to pdf'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState([
|
|
|
'userInfo'
|
|
@@ -327,9 +344,9 @@ export default {
|
|
|
// 阻止发生默认行为
|
|
|
event.preventDefault();
|
|
|
const array = event.target.files
|
|
|
- let defaultPrice = await this.getFilePrice('pdf', 'docx')
|
|
|
+ const defaultPrice = await this.getFilePrice('pdf', 'docx')
|
|
|
for (let i = 0; i < array.length; i++) {
|
|
|
- let fileObj = {
|
|
|
+ const fileObj = {
|
|
|
name: array[i].name,
|
|
|
size: array[i].size,
|
|
|
price: defaultPrice,
|
|
@@ -355,14 +372,14 @@ export default {
|
|
|
},
|
|
|
// 改变要转换的格式
|
|
|
async changeOutput (item, index) {
|
|
|
- let price = await this.getFilePrice(item.input, item.output)
|
|
|
+ const price = await this.getFilePrice(item.input, item.output)
|
|
|
this.$set(this.fileList[index], 'price', price)
|
|
|
this.$set(this.fileList[index], 'output', item.output)
|
|
|
},
|
|
|
// 计算文件大小函数(保留两位小数),Size为字节大小
|
|
|
getfilesize (size) {
|
|
|
if (!size) return ""
|
|
|
- var num = 1024.00 //byte
|
|
|
+ const num = 1024.00 // byte
|
|
|
if (size < num) {
|
|
|
return size + "B"
|
|
|
}
|
|
@@ -403,23 +420,23 @@ export default {
|
|
|
// 转档第一步,根据文件列表创建任务和插入文件信息
|
|
|
createFileMission () {
|
|
|
// if (this.fileList.length === 0) return
|
|
|
- // let points = this.userInfo.memberInfo.points
|
|
|
- // if (this.requiredCoupon > points) {
|
|
|
- // alert('券数不足,请充值')
|
|
|
- // return
|
|
|
- // }
|
|
|
- let filterFileList = this.fileList.filter(function(item){
|
|
|
+ const points = this.userInfo.points
|
|
|
+ if (this.requiredCoupon > points) {
|
|
|
+ alert('券数不足,请充值')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const filterFileList = this.fileList.filter(function(item){
|
|
|
return item.status !== 6
|
|
|
})
|
|
|
console.log(filterFileList)
|
|
|
let fileArr = []
|
|
|
for (let i = 0; i < filterFileList.length; i++) {
|
|
|
- let file = {}
|
|
|
- file['sourceType'] = 0
|
|
|
- file['size'] = filterFileList[i].size
|
|
|
- file['input'] = 'pdf'
|
|
|
- file['output'] = filterFileList[i].output
|
|
|
- file['filename'] = filterFileList[i].name
|
|
|
+ const file = {}
|
|
|
+ file.sourceType = 0
|
|
|
+ file.size = filterFileList[i].size
|
|
|
+ file.input = 'pdf'
|
|
|
+ file.output = filterFileList[i].output
|
|
|
+ file.filename = filterFileList[i].name
|
|
|
fileArr[i] = file;
|
|
|
}
|
|
|
fileArr = JSON.stringify(fileArr)
|
|
@@ -437,7 +454,7 @@ export default {
|
|
|
}
|
|
|
this.$axios('/mission/create', config).then((res) => {
|
|
|
if(res.code === 200) {
|
|
|
- let missionFiles = res.result.missionFilePoJos
|
|
|
+ const missionFiles = res.result.missionFilePoJos
|
|
|
console.log(missionFiles)
|
|
|
for (let i = 0; i < missionFiles.length; i++) {
|
|
|
this.changeFileStatus(missionFiles[i].fileName, 2)
|
|
@@ -545,7 +562,7 @@ export default {
|
|
|
this.$axios.post('/mission/queryFileStatus', formData, config).then((res) => {
|
|
|
console.log('获取文件状态')
|
|
|
if(res.code === 200) {
|
|
|
- let getFileList = res.result[0].missionFilePoJos
|
|
|
+ const getFileList = res.result[0].missionFilePoJos
|
|
|
console.log(getFileList)
|
|
|
let changeSucesssNum = 0
|
|
|
for (let i = 0; i < getFileList.length; i++) {
|