Kaynağa Gözat

文件大小展示

TANGSHIZHE 4 yıl önce
ebeveyn
işleme
b6a3ed099f

+ 1 - 1
jydocs-mobile/src/views/purchase/purchase.vue

@@ -13,7 +13,7 @@
           <div class="docs_other">
             <!-- <div class="docs_auther">贡献者:张三</div> -->
             <div class="docs_download">
-              <span>{{response.downTimes}}次下载</span> | 共{{response.docPageSize}}页 | {{response.docFileSize}}K
+              <span>{{response.downTimes}}次下载</span> | 共{{response.docPageSize}}页 | {{response.docFileSize}}
             </div>
             <div class="docs_money"><span class="docs_num">{{response.price}}</span> 剑鱼币</div>
           </div>

+ 3 - 2
jydocs-pc/src/views/purchase/purchase.vue

@@ -26,7 +26,7 @@
                 <div class="doc_in_actions">
                   <span class="doc_download">{{response.downTimes}}次下载</span>
                   <span class="doc_pages"> | 共{{response.docPageSize}}页 | </span>
-                  <span class="doc_readhot">{{response.docFileSize}}k</span>
+                  <span class="doc_readhot">{{response.docFileSize}}</span>
                 </div>
               </div>
               <div class="doc_abstract">
@@ -73,6 +73,7 @@
 <script>
 import { checkbox, input } from 'element-ui'
 import { getDocPays, getJYchannel, getDetails, getBindPhone } from '../../api/modules/purchase'
+import { formatSize } from '../../utils/globalFunctions'
 
 export default {
   name: 'purchasePage',
@@ -115,7 +116,7 @@ export default {
           this.response.docName = item.docName
           this.response.price = item.price
           this.response.downTimes = item.downTimes
-          this.response.docFileSize = item.docFileSize
+          this.response.docFileSize = formatSize(item.docFileSize)
           this.response.docPageSize = item.docPageSize
           this.response.previewImgId = item.previewImgId
           this.response.docSummary = item.docSummary