Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

wangkaiyue 4 жил өмнө
parent
commit
1381bed815

+ 1 - 1
jydocs-mobile/src/api/ajax.ts

@@ -13,7 +13,7 @@ const $ajax = axios.create({
 /* 拦截器 */
 $ajax.interceptors.request.use(config => {
   // 在请求发送之前做一些事
-  console.log('--发送之前--', config)
+  // console.log('--发送之前--', config)
   if (config.method === 'post' || config.method === 'POST') {
     if (typeof config.data !== 'string') {
       config.data = qs.stringify(config.data)

BIN
jydocs-mobile/src/assets/icon/down-blue.png


BIN
jydocs-mobile/src/assets/icon/down-grey.png


+ 3 - 2
jydocs-mobile/src/components/Recharge.vue

@@ -6,7 +6,7 @@
                     <img :src="detailData.previewImgId" class="thumbnail_img" alt="">
                 </div>
                 <div class="recharge_t_right">
-                    <div class="t_right_name">{{detailData.docName}}</div>
+                    <div class="t_right_name van-multi-ellipsis--l2">{{detailData.docName}}</div>
                     <div class="t_right_active">
                         <span>{{detailData.price}}剑鱼币</span>
                         <span>共{{detailData.docPageSize}}页</span>
@@ -78,6 +78,7 @@ export default class extends Vue {
             display: flex;
             justify-content: flex-start;
             align-items: center;
+            height: 100%;
             .thumbnail{
                 width: 48px;
                 height: 60px;
@@ -92,7 +93,7 @@ export default class extends Vue {
                 flex-direction: column;
                 justify-content: space-between;
                 width: 250px;
-                height: 60px;
+                height: 80px;
                 .t_right_name{
                     color: #171826;
                     font-size: 15px;

+ 8 - 10
jydocs-mobile/src/components/docs-card/Card.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="doc-container van-hairline--bottom" @click="clickCard">
-    <div class="docs-card oneline" :class="highlightKey.length === 0 ? '' : 'highlight'" v-if="cardType === 'oneline'" key="docs-card">
+    <div class="docs-card oneline" v-if="cardType === 'oneline'" key="docs-card">
       <div class="docs-header flex-r-c center">
         <van-icon :name="docTypeIcon" />
         <div class="d-title flex van-ellipsis" v-html="hightLightTitle"></div>
         <Price :price="price" />
       </div>
     </div>
-    <div class="docs-card image flex-r-c" :class="highlightKey.length === 0 ? '' : 'highlight'" v-else-if="cardType === 'image'" key="docs-card">
+    <div class="docs-card image flex-r-c" v-else-if="cardType === 'image'" key="docs-card">
       <div class="image-container">
         <img v-lazy="imageSrc" />
         <van-icon class="doc-type-icon" :name="docTypeIcon" />
@@ -32,7 +32,7 @@
         </div>
       </div>
     </div>
-    <div class="docs-card" :class="highlightKey.length === 0 ? '' : 'highlight'" v-else key="docs-card">
+    <div class="docs-card" v-else key="docs-card">
       <div class="docs-header flex-r-c">
         <van-icon :name="docTypeIcon" />
         <div class="d-title flex van-ellipsis" v-html="hightLightTitle"></div>
@@ -129,13 +129,11 @@ export default class DocsCard extends Vue {
     }
   }
 
-  &.highlight {
-    .docs-desc,
-    .d-title {
-      ::v-deep {
-        em {
-          color: $color_main;
-        }
+  .docs-desc,
+  .d-title {
+    ::v-deep {
+      em {
+        color: $color_main;
       }
     }
   }

+ 1 - 1
jydocs-mobile/src/components/docs-card/Price.vue

@@ -35,7 +35,7 @@ export default class Price extends Vue {
     font-size: 14px;
     color: #ff3a20;
     &.bought {
-      color: $color_main;
+      color: #686868;
     }
   }
 }

+ 19 - 4
jydocs-mobile/src/views/Home.vue

@@ -4,7 +4,7 @@
     <div class="new-group base-group">
       <div class="title-group flex-r-c center left">
         <span></span>
-        <h5>最新文档</h5>
+        <h5 class="module-title">最新文档</h5>
       </div>
       <div class="list-group flex-c-c">
         <van-skeleton class="van-loading-skeleton line-style" :row="5" :loading="showLoading.new">
@@ -26,7 +26,7 @@
     <div class="hot-group base-group">
       <div class="title-group flex-r-c center left">
         <span></span>
-        <h5>热门下载</h5>
+        <h5 class="module-title">热门下载</h5>
       </div>
       <div class="list-group flex-c-c">
         <van-skeleton class="van-loading-skeleton line-style" :row="5" :loading="showLoading.hot">
@@ -48,7 +48,7 @@
     <div class="keep-group base-group">
       <div class="title-group flex-r-c center left">
         <span></span>
-        <h5>精选推荐</h5>
+        <h5 class="module-title">精选推荐</h5>
       </div>
       <div class="list-group card-group flex-c-c">
         <van-skeleton avatar avatar-shape="square" class="van-loading-skeleton card-style"
@@ -148,13 +148,22 @@ export default class extends Vue {
   padding-bottom: 40px;
   box-sizing: border-box;
 
+  .module-title {
+    font-size: 18px;
+    font-weight: normal;
+    line-height: 26px;
+    color: #171826;
+  }
+
   .d-title {
     font-size: 14px;
     line-height: 20px;
+    color: #171826;
   }
   .price-text {
     font-size: 13px;
     line-height: 28px;
+    color: #5F5E64;
   }
 
   ::v-deep .van-loading-skeleton {
@@ -288,12 +297,18 @@ export default class extends Vue {
       margin-bottom: 4px;
       box-sizing: border-box;
       color: #171826;
-      font-family: PingFang SC;
       font-size: 18px;
       line-height: 26px;
       letter-spacing: 0px;
       text-align: left;
 
+      h5 {
+        color: #171826;
+        font-size: 18px;
+        line-height: 26px;
+        letter-spacing: 0px;
+      }
+
       span {
         display: inline-block;
         width: 3px;

+ 4 - 6
jydocs-mobile/src/views/Search.vue

@@ -23,7 +23,7 @@
           @click="sortAndSearch(item, index)"
         >
           <span class="s-i-label">{{ item.label }}</span>
-          <van-icon name="down" class="s-i-icon" />
+          <van-icon :name="'diy-down-' + (item.active ? 'blue' : 'grey')" class="s-i-icon" />
         </div>
       </div>
     </div>
@@ -43,7 +43,6 @@
             :title="item.docName"
             :desc="item.docSummary"
             :docType="item.docFileType"
-            :highlightKey="highlightKey"
             :price="item.price"
             :subInfo="calcSubInfo(item)"
             @onClick="toDocDetail(item)"
@@ -147,10 +146,6 @@ export default class extends Vue {
     })
   }
 
-  get highlightKey () {
-    return this.listState.value.split(/\s+/)
-  }
-
   created () {
     this.restored = this.reStoreState()
     if (!this.restored) {
@@ -337,6 +332,9 @@ export default class extends Vue {
 }
 </script>
 <style scoped lang="scss">
+@include diy-icon('down-grey', 16, 16);
+@include diy-icon('down-blue', 16, 16);
+
 .pages--search {
   background-color: #F5F6F7;
   box-sizing: border-box;

+ 71 - 66
jydocs-mobile/src/views/details/details.vue

@@ -1,15 +1,13 @@
 <template>
-    <div class="details-p">
-        <div class="tops">
-          <div class="word">
-            <i class="word01" :class="'van-icon van-icon-diy-' + fileType(detailData.docFileType)"></i>
-          </div>
-          {{detailData.docName}}
+    <div class="details-p" ref="sContent"  @scroll="showMorePage">
+        <div class="top-title-group flex-r-c">
+          <van-icon :name="'diy-' + fileType(detailData.docFileType)"></van-icon>
+          <div class="flex">{{detailData.docName}}</div>
         </div>
         <div class="middles">
             <h3>摘要</h3>
             <p>{{detailData.docSummary}}</p>
-            <div class="continue" v-show="buyed == 0">全文共{{detailData.docPageSize}}页,<span @click="continued">继续阅读<van-icon name="arrow-down" size="18" /></span></div>
+            <div class="continue" v-show="buyed == 0">全文共{{detailData.docPageSize}}页,<span @click="uploaded">阅读全文<van-icon name="arrow-down" size="18" /></span></div>
         </div>
         <van-sticky :offset-top="Offset" @scroll="stickyScroll" v-show="buyed == 1">
           <div class="head-tip" :class="{'is-fixed':fixed}">
@@ -17,11 +15,12 @@
                 <van-icon class="word01" :name="'diy-' + fileType(detailData.docFileType)" />
                 <span class="flex">{{detailData.docName}}</span>
               </h3>
-<!--              <span class="pages"><i id="page_num"></i> / <i id="page_count"></i></span>-->
+<!--              <span class="pages"><i id="page_num"></i> / <i>{{detailData.docPageSize}}</i></span>-->
           </div>
         </van-sticky>
         <div class="botts" v-show="buyed == 1">
-            <pdf  v-for="i in pdfPage.pageNum" :key="i"  :src="pdfPage.url" :page="i"></pdf>
+            <pdf  v-for="i in getPageNum"
+                  :key="i"  :src="pdfPage.url" :page="i"></pdf>
         </div>
         <van-goods-action>
             <van-goods-action-icon class="no-icon">
@@ -103,14 +102,6 @@ export default class extends Vue {
   buyed = 0
   flag = false
   pdfh5 = null
-  pdfDocument: any
-  config: any = {
-    PAGE_TO_VIEW: 0,
-    SCALE: 0,
-    CMAP_URL: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.6.347/cmaps/',
-    CMAP_PACKED: true,
-    workerSrc: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.6.347/build/pdf.worker.min.js'
-  }
 
   pData: any = {
     heightList: []
@@ -126,31 +117,16 @@ export default class extends Vue {
     }
   }
 
+  showPageNum = 2
+  showPageNumT: any = ''
+
   created () {
     this.docIds = this.$route.params.id
     this.onList()
   }
 
-  mounted () {
-    // 监听滚轮
-    window.addEventListener('scroll', this.initHeight)
-  }
-
-  destroyed () { // 移除监听
-    window.removeEventListener('scroll', this.initHeight)
-  }
-
-  initHeight () {
-    const top = window.scrollY
-    // console.log(top)
-    let base = 0
-    for (let i = 0; i < this.pData.heightList.length; i++) {
-      base += this.pData.heightList[i]
-      if (top <= base) {
-        this.updateText({ type: 'num', value: i + 1 })
-        break
-      }
-    }
+  get getPageNum () {
+    return this.showPageNum
   }
 
   get Offset () {
@@ -162,9 +138,31 @@ export default class extends Vue {
     }
   }
 
+  getMorePage () {
+    if (this.showPageNum < this.pdfPage.pageNum) {
+      if (this.showPageNum + 2 <= this.pdfPage.pageNum) {
+        this.showPageNum = this.showPageNum + 2
+      } else {
+        this.showPageNum = this.pdfPage.pageNum
+      }
+    }
+  }
+
+  showMorePage () {
+    const tDom = this.$refs.sContent as HTMLDivElement
+    const beBottom = tDom.scrollHeight - tDom.clientHeight - tDom.scrollTop
+    if (beBottom <= 200) {
+      clearTimeout(this.showPageNumT)
+      this.showPageNumT = setTimeout(() => {
+        this.getMorePage()
+      }, 300)
+    }
+  }
+
   getNumPages (url: string) {
     const loadingTask = pdf.createLoadingTask(url)
     loadingTask.promise.then((pdf: any) => {
+      console.log(pdf)
       this.pdfPage.url = loadingTask
       this.pdfPage.pageNum = pdf.numPages
     }).catch((err: any) => {
@@ -190,6 +188,7 @@ export default class extends Vue {
   }
 
   updateText (data: any) {
+    // console.log(data)
     switch (data.type) {
       case 'count': {
         ;(document.getElementById('page_count') as HTMLDivElement).textContent = data.value
@@ -203,16 +202,6 @@ export default class extends Vue {
   }
 
   stickyScroll (data: any) {
-    const tops = data.scrollTop
-    // console.log(this.$parent.$el.scrollTop)
-    let base = 0
-    for (let i = 0; i < this.pData.heightList.length; i++) {
-      base += this.pData.heightList[i]
-      if (tops <= base) {
-        this.updateText({ type: 'num', value: i + 1 })
-        break
-      }
-    }
     if (data.isFixed) {
       this.fixed = true
     } else {
@@ -276,10 +265,6 @@ export default class extends Vue {
     }, 1000)
   }
 
-  continued () {
-    this.uploaded()
-  }
-
   uploaded () {
     if (this.buyed === 1) {
       this.getDown({ docId: this.docIds }).then((res: any) => {
@@ -324,27 +309,46 @@ export default class extends Vue {
 @include diy-icon('guanzhu', 20, 20);
 @include diy-icon('iconJianYu', 24, 24);
 .details-p {
+    height: 100%;
+    overflow: scroll;
     padding-bottom: 80px;
     box-sizing: border-box;
-    .tops {
+  .top-title-group {
+    padding: 24px 16px;
+    box-sizing: border-box;
+    background-color: #fff;
+    color: #171826;
+    font-size: 20px;
+    line-height: 30px;
+    letter-spacing: 0px;
+    text-align: left;
+    .van-icon {
+      margin-right: 8px;
+    }
+  }
+    .de-tops {
+        min-height: 70px;
         display: flex;
-        flex-direction: initial;
-        height: auto;
-        min-height: auto;
         background: #fff;
-        padding: 24px 16px;
-        color: #171826;
-        font-weight: 500;
-        font-size: 20px;
-        line-height: 30px;
+        padding: 0 16px;
         .word {
           display: flex;
-        }
-        .word01 {
-          display: flex;
-          width: 24px;
           height: 24px;
           margin-right: 8px;
+          padding-top: 24px;
+          .word-imgs {
+            display: flex;
+            width: 24px;
+            height: 24px;
+          }
+        }
+        .sp-text {
+          display: flex;
+          flex-wrap: wrap;
+          padding: 24px 0;
+          color: #171826;
+          font-size: 20px;
+          line-height: 30px;
         }
     }
     .middles {
@@ -382,8 +386,8 @@ export default class extends Vue {
     }
     .head-tip {
         width: auto;
-        height: 40px;
-        background: #fcfcfc;
+        height: 0;
+        background: #fff;
         display: flex;
         justify-content: flex-end;
         align-items: center;
@@ -423,6 +427,7 @@ export default class extends Vue {
         }
     }
     .is-fixed {
+        height: 40px;
         justify-content: space-between;
     }
     .botts {

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

@@ -169,15 +169,13 @@ export default class extends Vue {
   // 文档信息
   async getWordInfor () {
     this.getDetails({ docId: this.sessioninfor.query }).then((res: any) => {
-      console.log(res)
       const item = res.data.detail
       if (res.error_code === 0) {
-        this.response = item
+        Object.assign(this.response, item)
       }
     })
 
     this.getListDetail({ B: true }).then((res: any) => {
-      console.log(res)
       if (res.error_code === 0) {
         this.response.balance = res.data.points.balance
       }
@@ -185,7 +183,6 @@ export default class extends Vue {
 
     // 获取绑定的手机号
     this.getAccountInfo().then((res: any) => {
-      console.log(res)
       this.tel = res.data.phone
     })
   }

+ 3 - 3
jydocs-mobile/vue.config.js

@@ -46,19 +46,19 @@ module.exports = {
     disableHostCheck: true,
     proxy: {
       '^/jydocs': {
-        target: 'https://web2-jytest.jydev.jianyu360.com',
+        target: 'https://app2-jytest.jydev.jianyu360.com',
         // target: 'http://192.168.20.180:821',
         changeOrigin: true,
         logLevel: 'debug'
       },
       '^/jypay': {
         // target: 'https://web2-jytest.jydev.jianyu360.com',
-        target: 'http://192.168.20.145:86',
+        target: 'https://app2-jytest.jydev.jianyu360.com',
         changeOrigin: true,
         logLevel: 'debug'
       },
       '^/jyintegral': {
-        target: 'http://web2-jytest.jydev.jianyu360.com',
+        target: 'https://app2-jytest.jydev.jianyu360.com',
         // target: 'http://192.168.20.145:820',
         changeOrigin: true,
         logLevel: 'debug'

+ 62 - 0
jydocs-mobile/yarn.lock

@@ -1587,11 +1587,21 @@ ajv@^6.12.5:
     json-schema-traverse "^0.4.1"
     uri-js "^4.2.2"
 
+alloyfinger@^0.1.16:
+  version "0.1.16"
+  resolved "https://registry.npm.taobao.org/alloyfinger/download/alloyfinger-0.1.16.tgz#8d5d46073cf1fedba5f446e666bc4b3925b8b8b5"
+  integrity sha1-jV1GBzzx/tul9EbmZrxLOSW4uLU=
+
 alphanum-sort@^1.0.0:
   version "1.0.2"
   resolved "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
   integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=
 
+amdefine@>=0.0.4:
+  version "1.0.1"
+  resolved "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
+  integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=
+
 ansi-colors@^3.0.0:
   version "3.2.4"
   resolved "https://registry.npm.taobao.org/ansi-colors/download/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf"
@@ -1823,6 +1833,11 @@ async@^2.6.2:
   dependencies:
     lodash "^4.17.14"
 
+async@~0.2.6:
+  version "0.2.10"
+  resolved "https://registry.npm.taobao.org/async/download/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
+  integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E=
+
 asynckit@^0.4.0:
   version "0.4.0"
   resolved "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -3268,6 +3283,11 @@ cyclist@^1.0.1:
   resolved "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
   integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
 
+dandy@:
+  version "0.0.5"
+  resolved "https://registry.npm.taobao.org/dandy/download/dandy-0.0.5.tgz#4a229f73330723ab0598a9bd569d8110c19241b7"
+  integrity sha1-SiKfczMHI6sFmKm9Vp2BEMGSQbc=
+
 dargs@^4.0.1:
   version "4.1.0"
   resolved "https://registry.npm.taobao.org/dargs/download/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"
@@ -6679,6 +6699,13 @@ opn@^5.5.0:
   dependencies:
     is-wsl "^1.1.0"
 
+optimist@~0.3.5:
+  version "0.3.7"
+  resolved "https://registry.npm.taobao.org/optimist/download/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9"
+  integrity sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=
+  dependencies:
+    wordwrap "~0.0.2"
+
 optionator@^0.8.3:
   version "0.8.3"
   resolved "https://registry.npm.taobao.org/optionator/download/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
@@ -8389,6 +8416,13 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
   resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
   integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM=
 
+source-map@~0.1.7:
+  version "0.1.43"
+  resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
+  integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=
+  dependencies:
+    amdefine ">=0.0.4"
+
 spdx-correct@^3.0.0:
   version "3.1.1"
   resolved "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"
@@ -8966,6 +9000,14 @@ tough-cookie@~2.5.0:
     psl "^1.1.28"
     punycode "^2.1.1"
 
+transformjs@^0.0.4:
+  version "0.0.4"
+  resolved "https://registry.npm.taobao.org/transformjs/download/transformjs-0.0.4.tgz#417be04a47a9add032e3e433d8a40f9266e524d2"
+  integrity sha1-QXvgSkeprdAy4+Qz2KQPkmblJNI=
+  dependencies:
+    dandy ""
+    uglify-js "2.4.12"
+
 trim-newlines@^1.0.0:
   version "1.0.0"
   resolved "https://registry.npm.taobao.org/trim-newlines/download/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
@@ -9124,6 +9166,16 @@ typescript@~3.9.3:
   resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
   integrity sha1-mNYApevcOPQMsndSLxLcgA6eJfo=
 
+uglify-js@2.4.12:
+  version "2.4.12"
+  resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-2.4.12.tgz?cache=0&sync_timestamp=1616976072884&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-2.4.12.tgz#2354d9659f85330c1e3e2910f8acd77fe14bb4a8"
+  integrity sha1-I1TZZZ+FMwwePikQ+KzXf+FLtKg=
+  dependencies:
+    async "~0.2.6"
+    optimist "~0.3.5"
+    source-map "~0.1.7"
+    uglify-to-browserify "~1.0.0"
+
 uglify-js@3.4.x:
   version "3.4.10"
   resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1598213312680&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f"
@@ -9137,6 +9189,11 @@ uglify-js@^3.1.4:
   resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.10.2.tgz?cache=0&sync_timestamp=1598213312680&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.10.2.tgz#8cfa1209fd04199cc8a7f9930ddedb30b0f1912d"
   integrity sha1-jPoSCf0EGZzIp/mTDd7bMLDxkS0=
 
+uglify-to-browserify@~1.0.0:
+  version "1.0.2"
+  resolved "https://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+  integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc=
+
 unicode-canonical-property-names-ecmascript@^1.0.4:
   version "1.0.4"
   resolved "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
@@ -9677,6 +9734,11 @@ wordwrap@^1.0.0:
   resolved "https://registry.npm.taobao.org/wordwrap/download/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
   integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
 
+wordwrap@~0.0.2:
+  version "0.0.3"
+  resolved "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
+  integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
+
 worker-farm@^1.7.0:
   version "1.7.0"
   resolved "https://registry.npm.taobao.org/worker-farm/download/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8"

+ 8 - 1
jydocs-pc/public/index.html

@@ -27,7 +27,14 @@
       <link href='https://web2-jytest.jydev.jianyu360.com/pccss/public-nav-1200.css?v=6302' rel="stylesheet" type="text/css"/>
     <% } %>
   </head>
-  <body>
+  <style>
+    .docs-app {
+      margin: 0 auto;
+      width: 1200px;
+      max-width: 1200px;
+    }
+  </style>
+  <body style="background-color: #fff;">
     <noscript>
       <strong>We're sorry but app1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
     </noscript>

+ 1 - 1
jydocs-pc/src/api/mock/detail.json

@@ -10,7 +10,7 @@
       "price": 359,
       "docFileSize": 387,
       "docPageSize": 5,
-      "tags": "法律法规,行政法规",
+      "tags": "招标,测试,行业报告,1,2,3,4,行政法规",
       "uploadDate": "2021-03-17 15:46:04",
       "viewTimes": 55,
       "downTimes": 6,

BIN
jydocs-pc/src/assets/images/icon/down-blue.png


BIN
jydocs-pc/src/assets/images/icon/down-grey.png


+ 22 - 12
jydocs-pc/src/components/doc-item-card/Card.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="docs-card-container" @click="clickCard">
-    <div class="docs-card hover flex-r-c" :class="highlightKey.length === 0 ? '' : 'highlight'" v-if="cardType === 'oneline'" key="docs-card">
+    <div class="docs-card hover flex-r-c" v-if="cardType === 'oneline'" key="docs-card">
       <div class="docs-card-header flex-r-c flex">
         <span class="card-title-icon" :class="docTypeIcon"></span>
         <span class="card-title flex" v-html="hightLightTitle"></span>
@@ -17,7 +17,7 @@
         </slot>
       </div>
     </div>
-    <div class="docs-card hover flex-r-c" :class="highlightKey.length === 0 ? '' : 'highlight'" v-else-if="cardType === 'image'" key="docs-card">
+    <div class="docs-card hover flex-r-c" v-else-if="cardType === 'image'" key="docs-card">
       <div class="image-container">
         <el-image :src="imageSrc" lazy></el-image>
         <span class="doc-type-icon" :class="docTypeIcon"></span>
@@ -40,7 +40,7 @@
         </div>
       </div>
     </div>
-    <div class="docs-card hover" :class="highlightKey.length === 0 ? '' : 'highlight'" v-else key="docs-card">
+    <div class="docs-card hover" v-else key="docs-card">
       <div class="docs-card-header flex-r-c left">
         <span class="card-title-icon" :class="docTypeIcon"></span>
         <span class="card-title flex" v-html="hightLightTitle"></span>
@@ -97,7 +97,7 @@ export default {
       default: ''
     },
     docType: {
-      type: String,
+      type: [String, Number],
       default: 'pdf'
     },
     subInfo: {
@@ -148,20 +148,30 @@ export default {
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style lang="scss" scoped>
 .docs-card {
+  position: relative;
   width: 100%;
   padding: 18px;
   font-size: 14px;
   line-height: 24px;
-  border-bottom: 1px solid rgba($color: #000, $alpha: 0.05);
+  // border-bottom: 1px solid rgba($color: #000, $alpha: 0.05);
   cursor: pointer;
+  border-radius: 8px;
+  overflow: hidden;
+  &:after {
+    content: '';
+    position: absolute;
+    bottom: 0;
+    left: 18px;
+    width: calc(100% - 36px);
+    height: 1px;
+    background-color: rgba($color: #000, $alpha: 0.05);
+  }
 
-  &.highlight {
-    .card-desc,
-    .card-title {
-      ::v-deep {
-        em {
-          color: $color-text--highlight;
-        }
+  .card-desc,
+  .card-title {
+    ::v-deep {
+      em {
+        color: $color-text--highlight;
       }
     }
   }

+ 1 - 1
jydocs-pc/src/components/doc-item-card/Price.vue

@@ -21,7 +21,7 @@ export default {
 .price-container {
   display: flex;
   align-items: center;
-  @include diy-icon("iconLogoLight");
+  @include diy-icon("iconLogoLight", 22, 22);
 
   .p-r {
     margin-left: 4px;

+ 137 - 107
jydocs-pc/src/components/recommend.vue

@@ -1,27 +1,26 @@
 <template>
-  <div class="c-recommend">
-    <div class="r-bott">
-        <h3>相关推荐</h3>
-        <div class="docs" v-for="item in recomes" :key="item.docId">
-            <div class="imgs" @click="detailClick(item.docId)">
-                <img :src="item.previewImgId" alt="">
-                <i class="el-icon-jy-word"></i>
-            </div>
-            <div class="conts">
-                <h5 @click="detailClick(item.docId)">{{item.docName}}</h5>
-                <div class="d-tip">
-                    <p>{{item.downTimes}}次下载</p>
-                    <div class="d-page">
-                      <p>共{{item.docPageSize}}页</p>
-                      <el-divider direction="vertical"></el-divider>
-                      <p>{{item.docFileSize}}</p>
-                    </div>
+<!-- <div class="r-rec" id="recTop" :class="{'rec-active': fixedRec}"> -->
+<div class="r-rec" id="recTop">
+    <h3>相关推荐</h3>
+    <div class="docs" v-for="item in recomes" :key="item.docId">
+        <div class="imgs" @click="detailClick(item.docId)">
+            <img :src="item.previewImgId" alt="">
+            <i class="el-icon-jy-word"></i>
+        </div>
+        <div class="conts">
+            <h5 @click="detailClick(item.docId)">{{item.docName}}</h5>
+            <div class="d-tip">
+                <p>{{item.downTimes}}次下载</p>
+                <div class="d-page">
+                  <p>共{{item.docPageSize}}页</p>
+                  <el-divider direction="vertical"></el-divider>
+                  <p>{{item.docFileSize}}</p>
                 </div>
-                <div class="r-coin"><i class="el-icon-jy-iconJianYu"></i><span>{{item.price}}</span></div>
             </div>
+            <div class="r-coin"><i class="el-icon-jy-iconJianYu"></i><span>{{item.price}}</span></div>
         </div>
     </div>
-  </div>
+</div>
 </template>
 
 <script>
@@ -30,10 +29,37 @@ export default {
   props: {
     recomes: {}
   },
+  data () {
+    return {
+      fixedRec: false
+    }
+  },
   components: {
     [Divider.name]: Divider
   },
+  mounted () {
+    // 监听滚轮
+    window.addEventListener('scroll', this.initH)
+  },
+  destroyed () { // 移除监听
+    window.removeEventListener('scroll', this.initH)
+  },
   methods: {
+    initH () {
+      this.$nextTick(() => {
+        const heights = document.getElementById('recTop')
+        this.offsetTop = heights.offsetTop
+        const scrollTops = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
+        if (scrollTops >= this.offsetTop) {
+          this.fixedRec = true
+          if (scrollTops <= 583) {
+            this.fixedRec = false
+          }
+        } else {
+          this.fixedRec = false
+        }
+      })
+    },
     detailClick (ids) {
       const routeUrl = this.$router.resolve({
         name: 'content',
@@ -47,95 +73,99 @@ export default {
 
 <style lang="scss" scoped>
 @include diy-icon('iconJianYu', 18, 18);
-.c-recommend {
-  .r-bott {
-      min-height: 448px;
-      border-radius: 4px;
-      background: #fff;
-      margin-top: 16px;
-      padding: 15px 12px;
-      h3 {
-          color: #686868;
-          font-size: 16px;
-          line-height: 24px;
-          font-weight: 500;
-          margin-top: 0;
-          margin-bottom: 13px;
-      }
-      .docs {
-          display: flex;
-          .imgs {
-              height: 110px;
-              display: table;
-              position: relative;
-              border-radius: 4px;
-              border: 1px solid #ECECEC;
-              cursor: pointer;
-              img {
-                  width: 78px;
-                  // height: 112px;
-                  border: 0;
-              }
-              i {
-                  position: absolute;
-                  right: 0;
-                  bottom: 0;
-              }
-          }
-          .conts {
-              margin-left: 8px;
-              h5 {
-                  margin: 0;
-                  font-size: 14px;
-                  line-height: 24px;
-                  font-weight: 500;
-                  display: -webkit-box;
-                  -webkit-line-clamp:2;
-                  overflow: hidden;
-                  text-overflow: ellipsis;
-                  -webkit-box-orient: vertical;
-                  cursor: pointer;
-              }
-              p {
-                  margin: 0;
-                  color: #999999;
-                  font-size: 12px;
-                  line-height: 20px;
-              }
-              .d-tip {
-                  display: flex;
-                  flex-direction: column;
-                  .el-divider--vertical {
-                      height: 0.8em;
-                      margin: 0 2px;
-                  }
-                  .d-page {
-                    display: flex;
-                    flex-direction: initial;
-                    align-items: center;
-                  }
-                  p {
-                      padding: 0 2px;
-                  }
-              }
-              .r-coin {
+.rec-active {
+  position: fixed;
+  top: 0;
+  z-index: 9;
+}
+.r-rec {
+    width: 264px;
+    min-height: 448px;
+    border-radius: 4px;
+    background: #fff;
+    margin-top: 16px;
+    padding: 15px 12px;
+    h3 {
+        color: #686868;
+        font-size: 16px;
+        line-height: 24px;
+        font-weight: 500;
+        margin-top: 0;
+        margin-bottom: 13px;
+    }
+    .docs {
+        display: flex;
+        .imgs {
+            height: 110px;
+            display: table;
+            position: relative;
+            border-radius: 4px;
+            border: 1px solid #ECECEC;
+            cursor: pointer;
+            img {
+                width: 78px;
+                // height: 112px;
+                border: 0;
+            }
+            i {
+                position: absolute;
+                right: 0;
+                bottom: 0;
+            }
+        }
+        .conts {
+            margin-left: 8px;
+            h5 {
+                margin: 0;
+                font-size: 14px;
+                line-height: 24px;
+                font-weight: 500;
+                display: -webkit-box;
+                -webkit-line-clamp:2;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                -webkit-box-orient: vertical;
+                cursor: pointer;
+            }
+            p {
+                margin: 0;
+                color: #999999;
+                font-size: 12px;
+                line-height: 20px;
+            }
+            .d-tip {
+                display: flex;
+                flex-direction: column;
+                .el-divider--vertical {
+                    height: 0.8em;
+                    margin: 0 2px;
+                }
+                .d-page {
                   display: flex;
+                  flex-direction: initial;
                   align-items: center;
-                  margin-top: 2px;
-                  i {
-                    width:18px;
-                    height:18px;
-                  }
-                  span {
-                      font-size: 14px;
-                      color: #FF3A20;
-                  }
-              }
-          }
-      }
-      .docs:not(:last-child) {
-        margin-bottom: 16px;
-      }
-  }
+                }
+                p {
+                    padding: 0 2px;
+                }
+            }
+            .r-coin {
+                display: flex;
+                align-items: center;
+                margin-top: 2px;
+                i {
+                  width:18px;
+                  height:18px;
+                }
+                span {
+                    font-size: 14px;
+                    color: #FF3A20;
+                }
+            }
+        }
+    }
+    .docs:not(:last-child) {
+      margin-bottom: 16px;
+    }
 }
 </style>

+ 60 - 31
jydocs-pc/src/views/Content.vue

@@ -8,9 +8,9 @@
               </div>
                 {{datas.docName}}
             </h3>
-            <div class="tips">
+            <div class="cd-tips">
                 <ul>
-                    <li class="tags" v-for="item in datas.tags" :key="item">{{item}}</li>
+                    <li class="li-tags" v-for="item in getContentTags" :key="item">{{item}}</li>
                     <li>{{datas.viewTimes}}次浏览<el-divider direction="vertical"></el-divider></li>
                     <li>{{datas.downTimes}}次下载<el-divider direction="vertical"></el-divider></li>
                     <li>共{{datas.docPageSize}}页<el-divider direction="vertical"></el-divider></li>
@@ -42,14 +42,14 @@
         <div class="middles" :class="{'actives':buyed == 0, 'actives1':lineShow == 1}">
             <h3>摘要</h3>
             <p>{{datas.docSummary}}</p>
-            <div class="continue" v-show="buyed == 0">全文共{{datas.docPageSize}}页,<span @click="continued">继续阅读<i class="el-icon-arrow-down"></i></span></div>
+            <div class="continue" v-show="buyed == 0">全文共{{datas.docPageSize}}页,<span @click="continued">阅读全文<i class="el-icon-arrow-down"></i></span></div>
         </div>
         <div class="head-tip" id="fixedTop" :class="{'is-fixed':fixed}">
               <h3 v-show="fixed">
               <i :class="'el-icon-jy-' + fileType(datas.docFileType)"></i>
               <span>{{datas.docName}}</span>
               </h3>
-              <span class="pages"><i id="page_num"></i> / <i id="page_count"></i></span>
+              <span class="pages"><i>{{page_num}}</i> / <i>{{page_count}}</i></span>
         </div>
         <div class="bottoms" id="colWidth" v-show="buyed == 1">
             <div class="page">
@@ -89,8 +89,9 @@
 <script>
 import { Button, Tooltip, Divider, Message } from 'element-ui'
 import { getDetails, getShow, getRecommend, getDown, getAdverse, getCoin, getAdd, getRemove } from '../api/modules/detail'
-import { formatSize, dateFormatter } from '@/utils/'
+import { formatSize, dateFormatter, recoveryPageData } from '@/utils/'
 import vRecommend from '@/components/recommend'
+import { getSearchTag } from '../api/modules/home'
 export default {
   components: {
     [Button.name]: Button,
@@ -114,6 +115,8 @@ export default {
       offsetTop: 0,
       offsetWidth: 0,
       colWidth: 0,
+      page_num: 0,
+      page_count: 0,
       redShow: false,
       lineShow: false,
       fixed: false,
@@ -128,7 +131,8 @@ export default {
       },
       pData: {
         heightList: []
-      }
+      },
+      tabs: []
     }
   },
   created () {
@@ -142,10 +146,36 @@ export default {
     // 监听滚轮
     window.addEventListener('scroll', this.initHeight)
   },
+  beforeMount () {
+    this.tabs = recoveryPageData('jy-docs-search-tags-pc')
+    this.getTags()
+  },
   destroyed () { // 移除监听
     window.removeEventListener('scroll', this.initHeight)
   },
+  computed: {
+    getContentTags () {
+      const a = new Set(this.datas.tags)
+      const b = new Set(this.tabs.map(v => v.type))
+      const arr = Array.from(new Set([...b].filter(x => a.has(x))))
+
+      const oldArr = Array.from(a)
+      arr.forEach(v => {
+        oldArr.splice(oldArr.indexOf(v), 1)
+      })
+      const nArr = arr.concat(oldArr)
+      return nArr.splice(0, 3)
+    }
+  },
   methods: {
+    setTop () {
+      this.$nextTick(() => {
+        // 获取到达页面顶端的值
+        const heights = document.getElementById('fixedTop')
+        // this.offsetTop = heights.offsetTop
+        this.offsetTop = heights.getBoundingClientRect().top
+      })
+    },
     initHeight () {
       // 获取页面滚动距离
       const scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
@@ -162,11 +192,11 @@ export default {
     updateText ({ type, value = '' }) {
       switch (type) {
         case 'count': {
-          document.querySelector('#page_count').textContent = value
+          this.page_count = value
           break
         }
         case 'num': {
-          document.querySelector('#page_num').textContent = value
+          this.page_num = value
           break
         }
       }
@@ -188,8 +218,6 @@ export default {
       })
     },
     init () {
-      console.log(this.conts.data)
-      // Loading document.
       pdfjsLib.GlobalWorkerOptions.workerSrc = this.config.workerSrc
       const loadingTask = pdfjsLib.getDocument({
         url: this.conts.data,
@@ -198,7 +226,6 @@ export default {
       })
       loadingTask.promise.then((pdfDocument) => {
         this.pdfDocument = pdfDocument
-        console.log(this.pdfDocument.numPages)
         this.updateText({ type: 'count', value: this.pdfDocument.numPages })
         this.updateText({ type: 'num', value: 1 })
         for (let i = 0; i < this.pdfDocument.numPages; i++) {
@@ -238,7 +265,7 @@ export default {
               this.btnName = '立即充值'
               this.redShow = true
             } else {
-              this.btnName = '立即兑换'
+              this.btnName = '下载文档'
               this.redShow = false
               this.lineShow = true
             }
@@ -254,14 +281,27 @@ export default {
         })
       })
     },
+    getTags () {
+      getSearchTag().then(res => {
+        if (!res.data.error_msg.length) {
+          this.tabs = res.data.data.map(v => {
+            return {
+              type: v,
+              label: v
+            }
+          })
+          sessionStorage.setItem('jy-docs-search-tags-pc', JSON.stringify(this.tabs))
+        }
+      })
+    },
     details () {
       getDetails({ docId: this.docIds, from: this.$route.query.from }).then(res => {
         if (res.data.error_code === 0) {
           this.datas = res.data.data.detail
           this.datas.docFileSize = formatSize(this.datas.docFileSize)
-          this.datas.uploadDate = dateFormatter(this.datas.uploadDate, 'yyyy-MM-dd')
+          this.datas.uploadDate = dateFormatter(this.datas.uploadDate.replace(/-/g, '/'), 'yyyy/MM/dd')
           this.datas.docSummary = this.datas.docSummary.split('').length >= 500 ? this.datas.docSummary + '...' : this.datas.docSummary
-          this.datas.tags = this.datas.tags.split(',').slice(0, 3)
+          this.datas.tags = this.datas.tags.split(',')
           this.buyed = res.data.data.status
           if (this.buyed === 1) {
             document.getElementById('fixedTop').style.display = 'block'
@@ -285,15 +325,6 @@ export default {
         this.adsUrl = res.data.data
       })
     },
-    setTop () {
-      this.$nextTick(() => {
-        // 获取到达页面顶端的值
-        const heights = document.getElementById('fixedTop')
-        // this.offsetTop = heights.offsetTop
-        this.offsetTop = heights.getBoundingClientRect().top
-        console.log(this.offsetTop)
-      })
-    },
     shoucang () {
       console.log(this.collectd)
       if (this.collectd === 0) {
@@ -395,7 +426,7 @@ export default {
                   margin-top: 5px;
               }
           }
-          .tips {
+          .cd-tips {
               display: flex;
               justify-content: space-between;
               padding: 12px 0;
@@ -410,8 +441,11 @@ export default {
                       display: flex;
                       list-style-type: none;
                       align-items: center;
+                      color: #686868;
+                      font-size: 14px;
+                      line-height: 24px;
                   }
-                  .tags {
+                  .li-tags {
                       padding: 2px 8px;
                       border-radius: 4px;
                       background: rgba(44, 167, 227, 0.08);
@@ -421,11 +455,6 @@ export default {
                       text-align: center;
                       margin-right: 8px;
                   }
-                  li:not(.tags, .coin) {
-                      color: #686868;
-                      font-size: 14px;
-                      line-height: 24px;
-                  }
                   .no-line {
                       border-right: none !important;
                   }
@@ -462,7 +491,7 @@ export default {
               display: flex;
               justify-content: space-between;
               align-items: center;
-              .el-button {
+              ::v-deep .el-button {
                   width: 132px;
                   height: 36px;
                   padding: 7px 34px 8px 34px;

+ 10 - 6
jydocs-pc/src/views/Search.vue

@@ -8,10 +8,10 @@
           v-for="(item, index) in sortTypeList"
           :key="index"
           @click="sortAndSearch(item, index)"
-          :class="{ active: item.active }"
+          :class="{ active: item.active, reverse: item.sort }"
         >
           <span class="sort-text">{{ item.label }}</span>
-          <span class="sort-icon" :class="item.sort ? 'el-icon-top' : 'el-icon-bottom'"></span>
+          <span class="sort-icon" :class="'el-icon-jy-' + (item.active ? 'down-blue' : 'down-grey')"></span>
         </span>
       </div>
       <div class="search-result-list" v-loading="listState.loading">
@@ -22,7 +22,6 @@
           :desc="item.docSummary + '...'"
           :docType="item.docFileType"
           :price="item.price"
-          :highlightKey="highlightKey"
           :subInfo="calcSubInfo(item)"
           @onClick="toDocDetail(item)"
         />
@@ -104,9 +103,6 @@ export default {
       return this.sortTypeList.find(item => {
         return item.active
       })
-    },
-    highlightKey () {
-      return this.searchQuery.text.split(/\s+/)
     }
   },
   methods: {
@@ -202,6 +198,9 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+@include diy-icon('down-grey', 18, 18);
+@include diy-icon('down-blue', 18, 18);
+
 .search-container {
   padding-top: 48px;
 }
@@ -228,6 +227,11 @@ export default {
       .sort-icon {
         color: #aaa;
       }
+      &.reverse {
+        .sort-icon {
+          transform: rotate(180deg);
+        }
+      }
       &.active {
         .sort-text,
         .sort-icon {

+ 17 - 5
jydocs-pc/src/views/UserCollections.vue

@@ -15,7 +15,7 @@
           @onClick="toDocDetail(item)"
         >
           <template slot="price">
-            <div class="highlight-text" v-if="item.Cost === '已购买'">已购买</div>
+            <div class="bought" v-if="item.Cost === '已购买'">已购买</div>
             <Price v-else :price="item.Cost" />
           </template>
         </doc-card>
@@ -92,10 +92,12 @@ export default {
     },
     toDocDetail (item) {
       const { DocId: id } = item
-      this.$router.push({
-        name: 'content',
-        params: { id }
-      })
+      // this.$router.push({
+      //   name: 'content',
+      //   params: { id }
+      // })
+      window.open(`../content/${id}`) // 打开新窗口
+      // window.open(`${process.env.VUE_APP_BASE_URL}/content/${id}`) // 打开新窗口
     },
     onPageChange (p) {
       this.listState.pageNum = p
@@ -145,6 +147,16 @@ export default {
     .user-d-list {
       border-top: 1px solid transparent;
       min-height: 500px;
+      ::v-deep {
+        .docs-card {
+          margin-left: -18px;
+          box-sizing: content-box;
+          width: 1200px;
+        }
+      }
+    }
+    .bought {
+      color: #686868;
     }
     .u-d-h-r {
       display: inline-block;

+ 19 - 6
jydocs-pc/src/views/UserDocs.vue

@@ -92,10 +92,12 @@ export default {
     },
     toDocDetail (item) {
       const { DocId: id } = item
-      this.$router.push({
-        name: 'content',
-        params: { id }
-      })
+      // this.$router.push({
+      //   name: 'content',
+      //   params: { id }
+      // })
+      window.open(`../content/${id}`) // 打开新窗口
+      // window.open(`${process.env.VUE_APP_BASE_URL}/content/${id}`) // 打开新窗口
     },
     onPageChange (p) {
       this.listState.pageNum = p
@@ -145,14 +147,25 @@ export default {
     .user-d-list {
       border-top: 1px solid transparent;
       min-height: 500px;
+      ::v-deep {
+        .docs-card {
+          margin-left: -18px;
+          box-sizing: content-box;
+          width: 1200px;
+        }
+      }
+    }
+    .bought {
+      color: #686868;
     }
     .u-d-h-r {
       display: inline-block;
-      width: 170px;
+      width: 155px;
       .u-d-h-item {
         display: inline-block;
-        width: 50%;
+        width: 55%;
         &.size {
+          width: 45%;
           text-align: center;
         }
       }

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

@@ -60,7 +60,7 @@
           </div>
         </div>
         <div class="doc_agreement">
-          <el-checkbox v-model="checked" @change="checkBtn()">我已阅读并同意<a href="/front/staticPage/serviceterms.html" class="agree_link">《剑鱼标讯线上购买与服务条款》</a></el-checkbox>
+          <el-checkbox v-model="checked" @change="checkBtn()">我已阅读并同意<a target="_blank" href="/front/staticPage/serviceterms.html" class="agree_link">《剑鱼标讯线上购买与服务条款》</a></el-checkbox>
         </div>
         <div class="doc_surepur">
           <button class="btnsure" @click="setExhange()" :disabled="!this.btnChecked" id="btnsure">确定兑换</button>

+ 2 - 2
jydocs-pc/vue.config.js

@@ -9,8 +9,8 @@ module.exports = {
     disableHostCheck: true,
     proxy: {
       '^/jydocs': {
-        // target: 'http://web2-jytest.jydev.jianyu360.com',
-        target: 'http://192.168.20.180:821',
+        target: 'http://web2-jytest.jydev.jianyu360.com',
+        // target: 'http://192.168.20.180:821',
         changeOrigin: true,
         logLevel: 'debug',
         pathRewrite: {