Browse Source

转档功能,消费记录,转档记录,SDK介绍等问题

wzl 2 years ago
parent
commit
bc788f185b

BIN
assets/images/pricing_mobile/pic_bg.png


+ 1 - 0
layouts/components/NavBar.vue

@@ -162,6 +162,7 @@ export default {
     handlerLogout() {
       localStorage.removeItem('token')
       localStorage.removeItem('userInfo')
+      localStorage.removeItem('file')
       this.$store.commit('setUser', {})
       removeToken('Token')
       this.$store.commit('DEL_TOKEN', '')

+ 5 - 5
layouts/components/footer-bar2.vue

@@ -36,14 +36,14 @@
             <li class="text-[16px] mt-24px <tiny:mt-0 <tiny:mx-0 <tiny:mb-15px">
               <a
                 href="/pricing"
-                class="caret-opacity-50 text-[#fff] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
+                class="caret-opacity-50 text-[#ffffff7f] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
                 >订阅服务</a
               >
             </li>
             <li class="text-[16px] mt-24px <tiny:mt-0 <tiny:mx-0 <tiny:mb-15px">
               <a
                 href="/sdk"
-                class="caret-opacity-50 text-[#fff] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
+                class="caret-opacity-50 text-[#ffffff7f] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
                 >SDK介绍</a
               >
             </li>
@@ -72,21 +72,21 @@
             <li class="text-[16px] mt-24px <tiny:mt-0 <tiny:mx-0 <tiny:mb-15px">
               <a
                 href="/question"
-                class="caret-opacity-50 text-[#fff] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
+                class="caret-opacity-50 text-[#ffffff7f] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
                 >常见问题</a
               >
             </li>
             <li class="text-[16px] mt-24px <tiny:mt-0 <tiny:mx-0 <tiny:mb-15px">
               <a
                 href="/privacy"
-                class="caret-opacity-50 text-[#fff] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
+                class="caret-opacity-50 text-[#ffffff7f] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
                 >隐私政策</a
               >
             </li>
             <li class="text-[16px] mt-24px <tiny:mt-0 <tiny:mx-0 <tiny:mb-15px">
               <a
                 href="/terms"
-                class="caret-opacity-50 text-[#fff] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
+                class="caret-opacity-50 text-[#ffffff7f] no-underline transition-all duration-500 <tiny:text-[14px] <tiny:text-[#ffffff66] <tiny:leading-[17px]"
                 >服务协议</a
               >
             </li>

+ 5 - 7
layouts/userCenter.vue

@@ -6,7 +6,7 @@
  * @LastEditTime: 2022-11-11 19:18:14
 -->
 <template>
-  <div class="font-primary">
+  <div class="font-primary min-w-1200px">
     <Navbar></Navbar>
     <div class="flex mt-50px px-[10%] mb-30px justify-between">
       <div class="w-[27%] min-w-260px px-24px pb-80px mb-20px bg-[#fafafa]">
@@ -42,17 +42,15 @@
 
         <ul class="menus-ul">
           <li class="my_convert" :class="{active: $route.path === '/members/me/expenses'}">
-            <a href="/members/me/expenses" class='myexpenses'>
-              我的转档
-            </a>
+            <nuxt-link to="/members/me/expenses" class='myexpenses'>我的转档</nuxt-link>
           </li>
           <li class='my_pricing' :class="{active: $route.path === '/members/me/points'}">
-            <a href="/members/me/points">消费记录</a>
+            <nuxt-link to="/members/me/points">消费记录</nuxt-link>
             <ul :class="{active: $route.path === '/members/me/points'}">
               <li >
-                <a :class="{active: $route.path === '/members/me/points'}" href="/members/me/points" class='mypoints'>
+                <nuxt-link :class="{active: $route.path === '/members/me/points'}" to="/members/me/points" class='mypoints'> 
                   转换券购买
-                </a>
+                </nuxt-link>
               </li>
             </ul>
           </li>

+ 27 - 0
locales/en.json

@@ -0,0 +1,27 @@
+{
+  "info":{
+    "top":"17Member",
+    "describe":"Join to unlock more expanded features",
+    "pricing":"Subscribed",
+    "weixin":"Wechat",
+    "zhifubao":"Alipay",
+    "main":"Features",
+    "month":" Month",
+    "months":"Months",
+    "discount":"60% OFF",
+    "removeAD":"Remove Ads",
+    "explainAD":"Ads free to make page viewing safer and faster, reducing battery usage, offering a light reading experience.",
+    "exchange":"Convert Free",
+    "explainExchange":"PDF to Word, PPT, Excel, TXT, JPG/PNG are supported without any restriction.",
+    "trial":"Free Trial",
+    "login":"Login",
+    "subscription":"Subscribe Now",
+    "renew":"Re-subscribe Now",
+    "server":"《Service Terms》",
+    "and":"and",
+    "privacy":"《Privacy Policy》",
+    "know":"Get It",
+    "thank":"Thanks for your support!",
+    "pleace":"Please resubscribe after membership expires."
+  }
+}

+ 26 - 0
locales/zh-cn.json

@@ -0,0 +1,26 @@
+{
+  "info":{
+    "top":"17会员",
+    "describe":"加入会员立即解锁更多高级功能",
+    "pricing":"17会员订阅",
+    "weixin":"微信支付",
+    "zhifubao":"支付宝支付",
+    "main":"主要功能",
+    "month":"个月",
+    "months":"个月",
+    "removeAD":"移除广告",
+    "explainAD":"PDF Reader会员拥有移除广告特权,尊享纯净版客户端,办公全程无干扰",
+    "exchange":"免费无限转换格式",
+    "explainExchange":"支持PDF to Word、PPT、Excel、TXT、JPG/PNG无限次数转换,高效稳定",
+    "login":"登录",
+    "subscription":"立即订阅",
+    "trial":"免费试用",
+    "renew":"立即续订",
+    "server":"《服务协议》",
+    "and":"及",
+    "privacy":"《隐私协议》",
+    "know":"我知道了",
+    "thank":"感谢您的支持!",
+    "pleace":"请在会员到期后续费"
+  }
+}

+ 176 - 80
pages/converter.vue

@@ -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.memberInfo.subscriberType === 1">会员尊享5G容量,</span>请在24小时内下载文件至本地永久保存
         </span>
-        <span v-if="userInfo?.memberInfo.subscriberType === 1" class="vip tip">
+        <span v-if="userInfo.memberInfo.subscriberType === 1" class="vip tip">
           <img src="http://cn-file.17pdf.com/website/common/ic_info.svg" alt="">
           <div class="tip-text">
             若已有文件大小超出5G,将按转档时间计算(从最近一次转档往过去推算),即保留最近的5G容量文件,超出部分文件将不再保留
@@ -32,7 +32,7 @@
           </button>
           <div class="recharge py-0 px-[10%] h-48px mx-0 mt-24px mb-14px absolute right-0 -top-70px z-2">
             <span class="recharge-btn float-right bg-white border border-[#ff4f4f] boder-solid text-16px py-7px px-18px rounded-4px mt-4px cursor-pointer hover:bg-[#ff4f4f]">
-              <a class="text-[#ff4f4f] no-underline leading-normal">充值</a>
+              <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.memberInfo.points}">{{ requiredCoupon }}券</span> / 剩余券:<span class="text-[#0dd299] text-16px">{{ userInfo.memberInfo.points }}券</span>
@@ -53,29 +53,25 @@
                       <table class="table table-hover w-[100%] max-w-[100%]" id="table-fileinput">
                         <thead v-show="fileList.length > 0">
                           <tr class="h-40px bg-[#eee]">
-                            <th></th>
-                            <th class="!text-left">文档名</th>
-                            <th>大小</th>
-                            <th>所需券</th>
-                            <th>转为</th>
-                            <th>状态</th>
-                            <th class="uploading_status hidden">状态</th>
-                            <th></th>
+                            <th class="!w-[5.5%]"></th>
+                            <th class="!text-left w-[26.5%]">文档名</th>
+                            <th class="!w-[17%]">大小</th>
+                            <th class="!w-[13%]">所需券</th>
+                            <th class="!w-[9.5%]">转为</th>
+                            <th class="!w-[23%]">状态</th>
+                            <th class="!w-[4.5%]"></th>
                           </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">
-                            <td class="kv-file-content hide">
-                              <embed class="kv-preview-data" src="blob:https://17pdf.com/324d1d91-3d7c-4ad7-ab0a-49a3ea411d9f" width="100px" height="38px" type="application/pdf">
-                            </td>
                             <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">{{ item.price }}</td>
+                            <td class="file-details-cell points">{{ userInfo.memberInfo.flag === 1 ? 0 : item.price }}</td>
                             <td class="file-details-cell select w-106px">
-                              <select class="transfer-select appearance-none" v-model="item.output" @change="changeOutput(item, index)">
+                              <select v-if="item.status !== 6" class="transfer-select appearance-none" v-model="item.output" @change="changeOutput(item, index)">
                                 <option value="png">PNG</option>
                                 <option value="xlsx">XLSX</option>
                                 <option value="pptx">PPTX</option>
@@ -83,9 +79,10 @@
                                 <option value="txt">TXT</option>
                                 <option value="jpg">JPG</option>
                               </select>
+                              <span v-else>{{ item.output }}</span>
                             </td>
-                            <td class="file-details-cell state text-14px text-[#878787]" state="">{{ fileStatus(item, index) }}</td>
-                            <td class="file-details-cell upload_status hidden" data-space="13005282">未上传</td>
+                            <td class="file-details-cell state text-14px text-[#878787]" v-html="fileStatus(item, index)"></td>
+                            <!-- <td v-else class="file-details-cell state text-14px text-red-500">转换失败<img src="/converter/menu_ic_pdfconvert.png" @click="rechangeFile" /></td> -->
                             <td class="file-actions-cell w-50px p-0">
                               <div class="file-actions text-center">
                                 <div class="file-footer-buttons" @click="deleteFile(index)">
@@ -106,13 +103,13 @@
                     </div>
                   </div>
                   <div class="input-group file-caption-main w-[100%] -top-450px relative table border-separate">
-                    <div class="input-group-btn relative text-0px whitespace-nowrap">
+                    <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"/>
-                        <span v-if="fileList.length > 0" @click="deleteAllFile" class="relative 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">清空</span>
                       </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>
                   </div>
                 </div>
@@ -173,17 +170,13 @@
             </li>
             <li>
               <a href="/converter">
-                <img
-                  src="/converter/ic_pdf_ppt.png"
-                />
+                <img src="/converter/ic_pdf_ppt.png"/>
                 <span>PDF to PowerPoint</span>
               </a>
             </li>
             <li>
               <a href="/converter">
-                <img
-                  src="/converter/ic_pdf_execl.png"
-                />
+                <img src="/converter/ic_pdf_execl.png"/>
                 <span>PDF to EXCEL</span>
               </a>
             </li>
@@ -295,8 +288,13 @@ export default {
   data () {
     return {
       fileList: [],
+      uniqFileArr: [],
       checkbox: true,
-      changeFileFlag: true
+      changeFileFlag: true,
+      uploadNum: 0,
+      getFileStatusTimer: null,
+      changeSucesssNumTotal: 0,
+      changeSucesssFileList: []
     }
   },
   middleware: 'user',
@@ -313,10 +311,17 @@ export default {
       return total
     }
   },
-  created () {
-    console.log(this.userInfo)
+  mounted () {
+    if (localStorage.getItem('file') !== null) {
+      this.fileList = JSON.parse(localStorage.getItem('file'))
+    }
   },
   methods: {
+    // 充值弹框
+    handlerBuy(type) {
+      this.$store.commit('OPEN_LOGIN', true)
+      this.$store.commit('SET_INTERFACE', type)
+    },
     // 添加文件
     async addFile (event) {
       // 阻止发生默认行为
@@ -333,16 +338,13 @@ export default {
           status: 0
         }
         this.fileList.push(fileObj)
+        this.uniqFileArr.push(array[i])
       }
-      console.log(this.fileList)
+      console.log('fileList:', this.fileList)
+      console.log('uniqFileArr:', this.uniqFileArr)
     },
     // 查询文件所需券数
     async getFilePrice (input, output) {
-      // let formData = new FormData()
-      // for (const file of array) {
-      //   formData.append('file',file)
-      //   console.log(file)
-      // }
       let price = 0
       await this.$axios.get(`/convertType/getConvertTypeList?input=${input}&output=${output}`).then((res) => {
         if(res.code === 200) {
@@ -359,55 +361,71 @@ export default {
     },
     // 计算文件大小函数(保留两位小数),Size为字节大小
     getfilesize (size) {
-        if (!size) return ""
-        var num = 1024.00 //byte
-        if (size < num) {
-          return size + "B"
-        }
-        if (size < Math.pow(num, 2)) {
-          return (size / num).toFixed(2) + "K"
-        }
-        if (size < Math.pow(num, 3)) {
-          return (size / Math.pow(num, 2)).toFixed(2) + "M"
-        }
-        if (size < Math.pow(num, 4)) {
-          return (size / Math.pow(num, 3)).toFixed(2) + "G"
-        }
-        else {
-          return (size / Math.pow(num, 4)).toFixed(2) + "T"
-        }
+      if (!size) return ""
+      var num = 1024.00 //byte
+      if (size < num) {
+        return size + "B"
+      }
+      if (size < Math.pow(num, 2)) {
+        return (size / num).toFixed(2) + "K"
+      }
+      if (size < Math.pow(num, 3)) {
+        return (size / Math.pow(num, 2)).toFixed(2) + "M"
+      }
+      if (size < Math.pow(num, 4)) {
+        return (size / Math.pow(num, 3)).toFixed(2) + "G"
+      }
+      else {
+        return (size / Math.pow(num, 4)).toFixed(2) + "T"
+      }
     },
     // 删除文件
     deleteFile (index) {
-      this.fileList.splice(index,1)
+      this.fileList.splice(index, 1)
+      this.uniqFileArr.splice(index-this.changeSucesssNumTotal, 1)
+      this.changeSucesssFileList = []
+      localStorage.removeItem('file')
+      this.fileList.forEach(item => {
+        if (item.status === 6) {
+          this.changeSucesssFileList.push(item)
+        }
+      })
+      localStorage.setItem('file', JSON.stringify(this.changeSucesssFileList))
     },
+    // 清空
     deleteAllFile () {
       this.fileList = []
+      this.uniqFileArr = []
+      this.changeFileStatus('all', 5)
+      this.changeSucesssFileList = []
+      localStorage.removeItem('file')
     },
     // 转档第一步,根据文件列表创建任务和插入文件信息
     createFileMission () {
       // if (this.fileList.length === 0) return
       let points = this.userInfo.memberInfo.points
       if (this.requiredCoupon > points) {
-        alert('券数不足')
+        alert('券数不足,请充值')
         return
       }
+      let filterFileList = this.fileList.filter(function(item){
+        return item.status !== 6
+      })
+      console.log(filterFileList)
       let fileArr = []
-      for (let i = 0; i < this.fileList.length; i++) {
+      for (let i = 0; i < filterFileList.length; i++) {
         let file = {}
         file['sourceType'] = 0
-        file['size'] = this.fileList[i].size
+        file['size'] = filterFileList[i].size
         file['input'] = 'pdf'
-        file['output'] = this.fileList[i].output
-        file['filename'] = this.fileList[i].name
+        file['output'] = filterFileList[i].output
+        file['filename'] = filterFileList[i].name
         fileArr[i] = file;
       }
-      let arrLen = fileArr.length
-      console.log(fileArr)
       fileArr = JSON.stringify(fileArr)
       console.log(fileArr)
       this.changeFileFlag = false
-      this.changeFileStatus(arrLen, 1)
+      this.changeFileStatus('all', 1)
       const config = {
         method: 'post',
         url: '/mission/create',
@@ -419,21 +437,35 @@ export default {
       }
       this.$axios('/mission/create', config).then((res) => {
         if(res.code === 200) {
-          console.log('changeFile_first', res)
-          // this.uploadFile(res.result.missionFilePoJos.missionId)
+          let missionFiles = res.result.missionFilePoJos
+          console.log(missionFiles)
+          for (let i = 0; i < missionFiles.length; i++) {
+            this.changeFileStatus(missionFiles[i].fileName, 2)
+            this.uploadFile(this.uniqFileArr[i], missionFiles[i].id, res.result.id)
+          }
         } else {
           this.changeFileFlag = true
-          this.changeFileStatus(arrLen, 5)
+          this.changeFileStatus('all', 5)
         }
       })
     },
     // 修改文件状态
-    changeFileStatus (len, status) {
-      for (let i = 0; i < len; i++) {
-        this.fileList[i].status = status
+    changeFileStatus (fileName, status) {
+      if (fileName === 'all') {
+        this.fileList.forEach(item => {
+          if (item.status !== 6) {
+            this.$set(item, 'status', status)
+          }
+        })
+      } else {
+        this.fileList.forEach(item => {
+          if (item.name === fileName) {
+            this.$set(item, 'status', status)
+          }
+        })
       }
     },
-    // 文件状态: 0未转换,1上传中,2上传完成,3转换中,4转换成功,5转换失败
+    // 文件状态: 0未转换,1上传中,2上传完成,3转换中,4转换成功,5转换失败,6已转档
     fileStatus (item, index) {
       switch (item.status) {
         case 0:
@@ -450,36 +482,98 @@ export default {
           return '转换中'
         case 4:
           this.$set(this.fileList[index], 'status', 4)
-          return '转换成功'
+          return '<span style="color: orange">转换成功</span>'
         case 5:
           this.$set(this.fileList[index], 'status', 5)
-          return '转换失败'
+          return '<span style="color: red">转换失败</span>'
+        case 6:
+          this.$set(this.fileList[index], 'status', 6)
+          return `<a href="${item.path}" style="color: #0dd299">下载</a>`
       }
     },
     // 转档第二步,上传文件
-    uploadFile (missionId) {
-      const file = this.fileObj
+    uploadFile (file, id, missionId) {
+      console.log(file)
       const formData = new FormData()
       formData.append('file', file)
+      formData.append('missionFileId', id)
       const config = {
         headers: {
           'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime()
         }
       }
-      console.log("文件存在"+file)
       this.$axios.post('/missionFile/upload', formData, config).then((res) => {
+        console.log('上传文件')
         if(res.code === 200) {
-          console.log('upload_success_response', res)
-          // this.convertFile(missionId)
+          this.changeFileStatus(file.name, 3)
+          this.uploadNum++
+          console.log(this.uploadNum)
+          if (this.uploadNum === this.uniqFileArr.length) {
+            this.convertFile(file.name, missionId)
+          }
+        } else {
+          this.changeFileFlag = true
+          this.changeFileStatus(file.name, 5)
         }
       })
     },
     // 转档第三步,开始转档
-    convertFile (missionId) {
-      this.$axios.post('/mission/convertFile', missionId).then((res) => {
+    convertFile (file, missionId) {
+      const formData = new FormData()
+      formData.append('missionId', missionId)
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data;boundary = ' + new Date().getTime()
+        }
+      }
+      this.$axios.post('/mission/convertFile', formData, config).then((res) => {
+        console.log('开始转档')
+        if(res.code === 200) {
+          this.changeFileStatus('all', 4)
+          this.getFileStatusTimer = window.setInterval(() => {
+            setTimeout(this.getFileStatus(formData, config), 0)
+          }, 3000)
+        } else {
+          this.uploadNum = 0
+          this.changeFileStatus('all', 5)
+          this.changeFileFlag = true
+        }
+      })
+    },
+    // 转档最后一步,轮询文件状态和下载链接
+    getFileStatus (formData, config) {
+      this.$axios.post('/mission/queryFileStatus', formData, config).then((res) => {
+        console.log('获取文件状态')
         if(res.code === 200) {
-          console.log('convertFile_success_response', res)
+          let getFileList = res.result[0].missionFilePoJos
+          console.log(getFileList)
+          let changeSucesssNum = 0
+          for (let i = 0; i < getFileList.length; i++) {
+            if (getFileList[i].status === 2) {
+              this.changeFileStatus(getFileList[i].fileName, 6)
+              changeSucesssNum++
+              this.fileList.forEach(item => {
+                if (item.name === getFileList[i].fileName) {
+                  this.$set(item, 'path', getFileList[i].path)
+                  this.changeSucesssFileList.push(item)
+                }
+              })
+            }
+          }
+          if (changeSucesssNum === getFileList.length) {
+            clearInterval(this.getFileStatusTimer)
+            this.getFileStatusTimer = null
+            this.changeSucesssNumTotal += changeSucesssNum
+            this.uniqFileArr = []
+          }
+          console.log(this.fileList)
+          console.log('changeSucesssFileList:', this.changeSucesssFileList)
+          localStorage.setItem('file', JSON.stringify(this.changeSucesssFileList))
+        } else {
+          this.uploadNum = 0
+          this.changeFileStatus('all', 5)
         }
+        this.changeFileFlag = true
       })
     }
   }
@@ -621,7 +715,6 @@ export default {
     white-space: nowrap;
   }
   .input-group-addon, .input-group-btn {
-    width: 1%;
     white-space: nowrap;
     vertical-align: middle;
   }
@@ -659,7 +752,6 @@ export default {
     box-shadow: none;
   }
   .btn-file {
-    display: flex !important;
     position: relative;
     overflow: hidden;
     margin: 0;
@@ -883,5 +975,9 @@ export default {
   .download_code {
     box-shadow: 0px 1px 5px rgb(0 0 0 / 12%);
   }
+  .file-details-cell.state img {
+    display: inline-block;
+    cursor: pointer;
+  }
 }
 </style>

+ 150 - 11
pages/members/me/expenses.vue

@@ -25,18 +25,23 @@
     <div class="py-15px">
       <p class="text-[20px] leading-28px text-[#333]">我的转档</p>
       <div class="mt-10px mb-16px">
-        <button class="btn btn-download">下载</button>
-        <button class="btn btn-delete">删除</button>
+        <button class="btn btn-download" @click="downloadFiles" :disabled="isDownload">下载</button>
+        <button class="btn btn-delete" @click="deleteChangeFileRecord" :disabled="isDelete">删除</button>
       </div>
     </div>
 
-    <el-table :data="tableData">
-      <el-table-column type="selection" width="40"></el-table-column>
-      <el-table-column label="格式转换" ></el-table-column>
-      <el-table-column label="目标文件" ></el-table-column>
-      <el-table-column label="文件大小" ></el-table-column>
-      <el-table-column label="消耗券数" ></el-table-column>
-      <el-table-column label="状态" ></el-table-column>
+    <el-table :data="tableData" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="50"></el-table-column>
+      <el-table-column prop="format" label="格式转换" ></el-table-column>
+      <el-table-column prop="fileName" label="目标文件" ></el-table-column>
+      <el-table-column prop="size" label="文件大小" ></el-table-column>
+      <el-table-column prop="price" label="消耗券数" ></el-table-column>
+      <el-table-column prop="status" label="状态" width="120px"></el-table-column>
+      <el-table-column prop="path" label="" width="50px">
+        <template slot-scope="scope">
+          <a v-if="scope.row.path" :href="scope.row.path" class="downloadBtn"></a>
+        </template>
+      </el-table-column>
       <!-- 表格无数据显示 -->
       <div slot="empty">
         <div class="table-empty"></div>
@@ -44,6 +49,13 @@
         <p class="leading-20px mt-8px mb-100px text-14px" style="color:rgba(0,0,0,0.38)">每一分钱都花在了刀刃上</p>
       </div>
     </el-table>
+    <el-pagination
+      class="text-center mt-50px"
+      background
+      layout="prev, pager, next"
+      :total="totalNum"
+      @current-change="handleCurrentChange">
+    </el-pagination>
   </div>
 </template>
 
@@ -52,9 +64,28 @@ import { mapState } from 'vuex'
 export default {
   layout: 'userCenter',
   middleware: ['auth','user'],
+  head() {
+    return {
+      title: '17PDF Reader - 个人中心',
+      meta: [
+        {
+          name: 'keywords',
+          content: 'PDFReader,pdfreader,17PDF Reader,pdf软件,PDF阅读器,文件扫描'
+        },
+        {
+          hid: 'description',
+          content: '17PDF Reader是行走的PDF阅读器和文件扫描仪,并提供免费的PDF文件格式转换工具,支持pdf转word,pdf转doc,pdf转ppt,pdf转图片等。17PDF Reader被用户誉为“亚洲的Adobe”,拥有自主产权的PDF核心技术,为商务精英、教育族群及企业提供全方位的PDF文件解决方案。'
+        },
+      ]
+    }
+  },
   data() {
     return {
-      tableData:[]
+      tableData:[],
+      tableDataSelection: [],
+      totalNum: 0,
+      isDownload: true,
+      isDelete: true
     }
   },
   computed: {
@@ -62,10 +93,108 @@ export default {
       'userInfo',
     ]),
   },
+  created () {
+    this.getChangeFileRecord(1)
+  },
+  methods: {
+    // 用户转档记录分页查询
+    getChangeFileRecord (page) {
+      this.$axios.get(`/missionFile/page?page=${page}`).then((res) => {
+        if(res.code === 200) {
+          this.tableData = res.result.list
+          this.totalNum = res.result.total
+          for (let i = 0; i < this.tableData.length; i++) {
+            this.tableData[i].size = this.getfilesize(this.tableData[i].size)
+            this.tableData[i].status = this.getFileStatus(this.tableData[i].status)
+            this.$set(this.tableData[i], 'format', this.getFormat(this.tableData[i].inputType, this.tableData[i].outputType))
+          }
+        }
+      })
+    },
+    // 计算文件大小函数(保留两位小数),Size为字节大小
+    getfilesize (size) {
+      if (!size) return ""
+      var num = 1024.00 //byte
+      if (size < num) {
+        return size + "B"
+      }
+      if (size < Math.pow(num, 2)) {
+        return (size / num).toFixed(2) + "K"
+      }
+      if (size < Math.pow(num, 3)) {
+        return (size / Math.pow(num, 2)).toFixed(2) + "M"
+      }
+      if (size < Math.pow(num, 4)) {
+        return (size / Math.pow(num, 3)).toFixed(2) + "G"
+      }
+      else {
+        return (size / Math.pow(num, 4)).toFixed(2) + "T"
+      }
+    },
+    // 判断文件状态
+    getFileStatus (status) {
+      switch (status) {
+        case 0:
+          return '转档中'
+        case 1:
+          return '转档中'
+        case 2:
+          return '转档成功'
+        case 3:
+          return '转档失败'
+        case 4:
+          return '转档成功'
+      }
+    },
+    // 格式转换
+    getFormat (input, output) {
+      return input.toUpperCase() + '-->' + output.toUpperCase()
+    },
+    handleSelectionChange(val) {
+      this.tableDataSelection = val
+      this.isDelete = false
+      for (const file of this.tableDataSelection) {
+        console.log(file.status)
+        if (file.status === '转档中' || file.status === '转档失败') {
+          this.isDownload = true
+        } else {
+          this.isDownload = false
+        }
+      }
+    },
+    // 删除转档记录
+    deleteChangeFileRecord () {
+      var data = new FormData()
+      for (const file of this.tableDataSelection) {
+        data.append('ids', file.id)
+      }
+      const config = {
+        headers: {
+          'Content-Type': 'multipart/form-data;'
+        }
+      }
+      this.$axios.post('/missionFile/delete', data, config).then((res) => {
+        if(res.code === 200) {
+          this.getChangeFileRecord(1)
+          this.isDelete = true
+        }
+      })
+    },
+    handleCurrentChange(val) {
+      this.getChangeFileRecord(val)
+    },
+    downloadFiles () {
+      for (const file of this.tableDataSelection) {
+        if (file.status !== 2 || file.status !== 4) {
+          this.isDownload = true
+        }
+      }
+    }
+  }
 }
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 .expenses-date-tips {
   display: flex;
   align-items: center;
@@ -149,4 +278,14 @@ export default {
   height: 200px;
   background: url(http://cn-file.17pdf.com/website/members/pic_noconsumption.png) no-repeat center center;
 }
+.el-table__row:hover .downloadBtn {
+  display: inline-block;
+  width: 13px;
+  height: 13px;
+  background: url(http://cn-file.17pdf.com/website/members/ic_download_gray.svg) center no-repeat;
+}
+.btn-download:disabled,.btn-delete:disabled {
+  opacity: 0.5;
+  pointer-events: none;
+}
 </style>

+ 26 - 7
pages/members/me/points.vue

@@ -11,17 +11,17 @@
       <p class="py-15px text-20px leading-28px">转换券购买记录</p>
     </div>
     <el-table :data="tableData">
-      <el-table-column label="类目" ></el-table-column>
-      <el-table-column label="金额" ></el-table-column>
+      <el-table-column label="类目" prop="totalPoints"></el-table-column>
+      <el-table-column label="金额" prop="price"></el-table-column>
       <el-table-column label="订单编号" ></el-table-column>
-      <el-table-column label="时间" ></el-table-column>
+      <el-table-column label="时间" prop="startDate"></el-table-column>
       <!-- 表格无数据显示 -->
       <div slot="empty">
         <div class="table-empty"></div>
         <p class="text-14px" style="color:rgba(0,0,0,0.54)">没有任何消费记录</p>
         <p class="leading-20px mt-8px mb-100px text-14px" style="color:rgba(0,0,0,0.38)">每一分钱都花在了刀刃上</p>
       </div>
-    </el-table>   
+    </el-table>
   </div>
 
 </template>
@@ -29,12 +29,30 @@
 <script>
 export default {
   layout: 'userCenter',
-  middleware: ['auth','user'],
+  middleware: ['auth', 'user'],
   data() {
     return {
-      tableData:[]
+      tableData: []
     }
-  }
+  },
+  mounted() {
+    this.$axios.get("/members/getMemberInfo").then((res) => {
+      if (res.code === 200) {
+        console.log(res.result)
+        let change = []
+        res.result.pricingList.forEach(item => {
+          console.log("数据",item)
+          let totalPoints = item.totalPoints + "张转换劵"
+          let price="¥"+item.price+".0"
+          let id= ''
+          let startDate=item.startDate
+          let all={totalPoints,price,id,startDate}
+          change.push(all)
+        });
+        this.tableData=change
+      }
+    })
+  },
 }
 </script>
 
@@ -47,6 +65,7 @@ export default {
     font-weight: normal;
   }
 }
+
 .table-empty {
   margin-top: 50px;
   height: 200px;

File diff suppressed because it is too large
+ 2181 - 82
pages/pricing.vue


File diff suppressed because it is too large
+ 625 - 622
pages/privacy.vue


+ 6 - 6
pages/question.vue

@@ -6,7 +6,7 @@
                 <ul class="mb-10px">
                     <a href="#reading">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="reading" :class="{ active: '#reading' == ins.hash }" @click=" active('#reading')">
                             文件阅读
                         </li>
@@ -14,7 +14,7 @@ class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fa
 
                     <a href="#management">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="management" :class="{ active: '#management' == ins.hash}"
                             @click=" active('#management')">
                             文件管理
@@ -24,14 +24,14 @@ class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fa
 
                     <a href="#note">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="note" :class="{ active: '#note' == ins.hash}" @click=" active('#note')">
                             文件注释
                         </li>
                     </a>
                     <a href="#scan">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="scan" :class="{ active: '#scan' == ins.hash}" @click=" active('#scan')">
                             文件扫描
                         </li>
@@ -40,7 +40,7 @@ class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fa
 
                     <a href="#convert">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="convert" :class="{ active: '#convert' == ins.hash}" @click=" active('#convert')">
                             格式转换
                         </li>
@@ -48,7 +48,7 @@ class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fa
 
                     <a href="#payment">
                         <li
-class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[fafafa] cursor-pointer"
+class=" w-192px h-48px leading-[48px] text-center text-[#333] text-[16px] bg-[#fafafa] cursor-pointer"
                             value="payment" :class="{ active: '#payment' == ins.hash}" @click=" active('#payment')">
                             支付问题
                         </li>

+ 19 - 33
pages/resetPsw.vue

@@ -6,13 +6,10 @@
       >
         <div class="logo p-0">
           <!-- 此处a需不需要改 -->
-          <a
-            href="https://17pdf.com"
-            class="text-[#666] text-[24px] no-underline bg-transparent"
-          >
+          <nuxt-link to="/" class="text-[#666] text-[24px] no-underline bg-transparent">
             <span class="logo-img m-0 py-20px pl-170px"></span>
             <span>17PDF Reader</span>
-          </a>
+          </nuxt-link>
         </div>
       </nav>
     </div>
@@ -21,28 +18,18 @@
         <div class="px-15px mx-auto sm:w-750px">
           <div class="row mx-[-15px]">
             <div class="col-md-3 relative min-h-1px px-15px"></div>
-            <div
-              class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto"
-            >
-              <h2
-                class="text-center text-[#00bbd3] text-[30px] mb-32px text-center mt-20px leading-[1.1] font-medium"
-              >
+            <div class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto">
+              <h2 class="text-center text-[#00bbd3] text-[30px] mb-32px text-center mt-20px leading-[1.1] font-medium">
                 设置新密码
               </h2>
             </div>
           </div>
           <div class="row form-wrapper mx-[-15px]">
             <div class="col-md-3 relative min-h-1px px-15px"></div>
-            <div
-              class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto"
-            >
-              <h3
-                v-show="showError"
-                class="warning text-[24px] mt-20px mb-10px font-medium laeding-[1.1]"
-              >
+            <div class="col-md-6 relative min-h-1px px-15px tiny:w-[70%] tiny:my-0 tiny:mx-auto">
+              <h3 v-show = " showError " class="warning text-[24px] mt-20px mb-10px font-medium laeding-[1.1]">
                 密码重置失败,请确认两次密码一致!
-              </h3>
-         
+              </h3>         
                 <input type="hidden" name="_method" value="put" /><input
                   type="hidden"
                   name="authenticity_token"
@@ -102,18 +89,10 @@
             </h4>
             <ul class="p-0 mt-0 mb-10px">
               <li class="list-none text-[16px] mt-24px">
-                <a
-                  href="https://17pdf.com"
-                  class="opacity-30 text-[#fff] no-underline bg-transparent"
-                  >产品</a
-                >
+                <nuxt-link to="/" class="opacity-30 text-[#fff] no-underline bg-transparent">产品</nuxt-link>
               </li>
               <li class="list-none text-[16px] mt-24px">
-                <a
-                  href="https://17pdf.com/sdk"
-                  class="opacity-30 text-[#fff] no-underline bg-transparent"
-                  >SDK介绍</a
-                >
+                <nuxt-link to="/sdk" class="opacity-30 text-[#fff] no-underline bg-transparent">SDK介绍</nuxt-link>
               </li>
             </ul>
           </div>
@@ -180,11 +159,11 @@
           </div>
         </div>
         <p class="text-muted text-[14px] text-[#777] mb-10px mt-0 mx-0">
-          <a target="_blank" href="https://17pdf.com/terms" class="text-muted"
+          <a target="_blank" href="/terms" class="text-muted"
             >服务条款</a
           >
           |
-          <a target="_blank" href="https://17pdf.com/privacy" class="text-muted"
+          <a target="_blank" href="/privacy" class="text-muted"
             >隐私政策</a
           >
           | ©2022 Kdanmobile All Rights Reserved.
@@ -200,7 +179,14 @@
 <script>
 import qs from 'qs'
 export default {
-  layout: 'custom',
+  layout(){
+    return 'custom'
+  },
+  head(){
+    return {
+      title:'17PDF Reader - 账号管理'
+    }
+  },
   data() {
     return {
       confirm_newPassword: '',

+ 18 - 3
pages/sdk.vue

@@ -7,7 +7,7 @@
             <div class="txt">
             <h1>SDK</h1>
             <h2 class="sub_title">iOS Android Mac<br />跨平台整合核心功能</h2>
-            <div class="btns"><span class="btn-primary trail-btn" @click="handlerApplyUse">申请试用</span><span class="buy-btn" @click="handlerApplyUse">申请报价</span></div>
+            <div class="btns"><span class="btn-primary trail-btn" @click="handlerApplyUse()">申请试用</span><span class="buy-btn" @click="handlerApplyUse">申请报价</span></div>
           </div>
         </div>
       </div>
@@ -191,7 +191,7 @@
     <ul v-show="active !== 0" class="index">
       <li v-for="idx in 6" :key="idx" :class="{active: active===idx}" @click="handlerToSection(idx)"></li>
     </ul>
-    <no-ssr>
+    <client-only>
       <el-dialog 
         :visible.sync="modalViable"
         :close-on-click-modal="false"
@@ -201,7 +201,7 @@
       >
         <sdk-form ref="sdkForm"></sdk-form>
       </el-dialog>
-    </no-ssr>
+    </client-only>
   </div>
 </template>
 
@@ -217,6 +217,21 @@ export default {
       active: 0,
     }
   },
+  head() {
+    return {
+      title: 'PDF文件解决方案核心功能SDK跨平台集成',
+      meta: [
+        {
+          name: 'keywords',
+          content: 'PDF SDK,PDF library, pdf开发包,pdf kit'
+        },
+        {
+        hid: 'description',
+        content: '17PDF Reader提供跨平台整合PDF阅读器核心功能到你的App中, 文件阅读、文件注释、文件扫描、数字签名、水印、OCR、文本编辑、表单填写、文件合并、文件分割等各种功能集成,让你的工具更强大!'
+       },
+      ]
+    }
+  },
   mounted() {
     let num=1; let prev; let next;
     const infoMoves = document.querySelectorAll('.info_move')

File diff suppressed because it is too large
+ 176 - 174
pages/terms.vue


BIN
static/converter/menu_ic_pdfconvert.png


BIN
static/favicon.ico