瀏覽代碼

feat:未登录状态下预览引流文案更改

zhangsiya 10 月之前
父節點
當前提交
eda71c5733
共有 2 個文件被更改,包括 20 次插入5 次删除
  1. 9 2
      jydocs-mobile/src/views/details/details.vue
  2. 11 3
      jydocs-pc/src/views/Content.vue

+ 9 - 2
jydocs-mobile/src/views/details/details.vue

@@ -464,13 +464,20 @@ export default class extends Vue {
   get guideText () {
     // P620需求:1、未购买预览时,引流文案
     // 或者,购买豆丁文件加载时错误后,最多预览5页,最后的引流文案
-    let btnText = '下载文档阅读全文'
+    // 未登录
     if (!this.loginInfo) {
-      return '开通文库会员免费阅读全文'
+      // 精品
+      if (this.detailData.productType === 2) {
+        return `开通文库会员${this.detailData.docMemberDiscount}折下载文档阅读全文`
+      } else {
+        // 会员免费文档
+        return '开通文库会员免费阅读全文'
+      }
     }
     if (this.docLoadError) {
       return '下载文档阅读全文'
     }
+    let btnText = '下载文档阅读全文'
     if (this.isvipFree && this.buyed === 0 && this.isviper) { // 会员免费 未下载 会员
       btnText = '下载文档阅读全文'
     } else if ((this.power.freeDownload === 2 || this.power.freeDownload === 0) && this.isvipFree && this.buyed === 0 && !this.isviper) {

+ 11 - 3
jydocs-pc/src/views/Content.vue

@@ -330,13 +330,21 @@ export default {
     // P620需求:1、未购买预览时,引流文案
     // 或者,购买豆丁文件加载时错误后,最多预览5页,最后的引流文案
     guideText () {
-      let btnText = '下载文档阅读全文'
+      // 未登录
       if (!this.islogin) {
-        return '开通文库会员免费阅读全文'
+        // 精品
+        if (this.datas.productType === 2) {
+          return `开通文库会员${this.datas.docMemberDiscount}折下载文档阅读全文`
+        } else {
+        // 会员免费文档
+          return '开通文库会员免费阅读全文'
+        }
       }
-      if(this.docLoadError) {
+      // 预览加载错误直接展示该文案
+      if (this.docLoadError) {
         return '下载文档阅读全文'
       }
+      let btnText = '下载文档阅读全文'
       // 会员
       if (this.docsInfo?.docStatus > 0 || (this.buyed === 1 && this.datas.source === 2 && this.datas.docFileType !== 2)) {
         btnText = '下载文档阅读全文'