bding 1 年之前
父節點
當前提交
a936cd2933
共有 2 個文件被更改,包括 138 次插入56 次删除
  1. 41 1
      src/views/cygx/internalDetials.vue
  2. 97 55
      src/views/cygx/raiReportDtl.vue

+ 41 - 1
src/views/cygx/internalDetials.vue

@@ -17,6 +17,8 @@ const reportDetail = ref({});
 // 文字的ID
 const reportId = ref(0);
 
+const isBinding = ref(true);
+
 // 获取数据
 const reportSelectionDetail = async () => {
   const res = await inrernalApi.getProductInteriorDetail({
@@ -78,6 +80,21 @@ const handleLinkClick = (event) => {
   }
 };
 
+const pleaseGoLogin = () => {
+  Dialog.alert({
+    title: "标题",
+    message: "代码是写出来给人看的,附带能在机器上运行。",
+    showCancelButton: true,
+    confirmButtonColor: "#3385ff",
+  }).then((res) => {
+    if (res == "confirm") {
+      wx.miniProgram.navigateTo({
+        url: "/pageMy/login/login",
+      });
+    }
+  });
+};
+
 // 记录视频的点击
 const voiceHistory = async () => {
   const res = await inrernalApi.reportVoiceHistoryAdd({
@@ -111,6 +128,7 @@ const onClickHide = () => {
 // 页面加载渲染
 onMounted(async () => {
   if (route.query.id) {
+    isBinding.value = route.query.isBinding;
     let access_token = route.query.token || "";
     localStorage.setItem("access_token", access_token);
     reportId.value = +route.query.id;
@@ -132,7 +150,13 @@ onMounted(async () => {
       <span class="statement" @click="showTips = true">免责声明 </span>
     </div>
     <div id="report-content" class="content-abstract">摘要:{{ reportDetail.Abstract }}</div>
-    <div v-html="reportDetail.Body"></div>
+    <template v-if="isBinding">
+      <div v-html="reportDetail.Body"></div>
+      <div class="please-login" @click="pleaseGoLogin">请登录后查看更多内容</div>
+    </template>
+    <template v-else>
+      <div v-if="reportDetail.Body" v-html="reportDetail.Body.slice(0, 200)"></div>
+    </template>
     <dlg :showTips="showTips" type="产品内测" @hideDlg="showTips = false" />
     <van-dialog v-model:show="showDlg" closeOnClickOverlay :show-confirm-button="false" @cancel="onClickHide">
       <view class="content-dialog">
@@ -147,6 +171,22 @@ onMounted(async () => {
 
 <style lang="scss">
 .cygx_internal-detials {
+  .please-login {
+    position: fixed;
+    bottom: 100px;
+    left: 50%;
+    transform: translateX(-50%);
+    width: 556px;
+    height: 64px;
+    color: #fff;
+    font-size: 24px;
+    font-weight: 600;
+    background-color: #376cbb;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    border-radius: 9px;
+  }
   padding: 30px 34px;
   color: #333;
   font-size: 28px;

+ 97 - 55
src/views/cygx/raiReportDtl.vue

@@ -30,7 +30,7 @@
                   <p class="time">{{ reportInfo.PublishDate }}</p>
                 </div>
               </div>
-              <div @click="attentionBtn" class="is-follow" :class="reportInfo.IsFollow ? 'follow-cancel' : ''">
+              <div @click="attentionBtn" class="is-follow" :class="reportInfo.IsFollow ? 'follow-cancel' : ''" v-if="isBinding">
                 {{ reportInfo.IsFollow ? "取消关注" : "+ 关注" }}
               </div>
             </div>
@@ -39,42 +39,50 @@
           <div class="container-abstract">&nbsp;&nbsp;摘要:&nbsp;{{ reportInfo.Abstract }}</div>
         </div>
       </div>
-      <div class="report-link" v-if="fileLink">
-        报告全文:
-        <span style="color: #0808e5" @click="downloadFile">(PDF格式报告下载.pdf)</span>
-      </div>
-      <div class="detail-report" :class="reportInfo.IsResearch ? '' : 'detail-bottom'">
-        <div id="report-content" v-html="reportInfo.Body"></div>
-      </div>
-      <div class="deeperReport" @click="lookDeeperReport" v-if="reportInfo.ReportLink">查看报告链接</div>
-      <div class="host-collect" v-if="reportInfo.IsResearch && reportResearch.length">
-        <h4>相关热门收藏:</h4>
-        <div class="host-content" v-for="item in reportResearch" :key="item.ArticleId">
-          <p class="host-title" @click="goDetail(item)">{{ item.Title }}</p>
-          <div class="item-more">
-            <p>{{ item.PublishDate }}</p>
-            <div class="pv-ollect">
-              <div>
-                <img class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
-                {{ item.Pv }}
-              </div>
-              <div @click="collectClick(item)">
-                <img v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png" />
-                <img v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png" />
-                {{ item.CollectNum }}人收藏
+      <template v-if="isBinding">
+        <div class="report-link" v-if="fileLink">
+          报告全文:
+          <span style="color: #0808e5" @click="downloadFile">(PDF格式报告下载.pdf)</span>
+        </div>
+        <div class="detail-report" :class="reportInfo.IsResearch ? '' : 'detail-bottom'">
+          <div id="report-content" v-html="reportInfo.Body"></div>
+        </div>
+        <div class="deeperReport" @click="lookDeeperReport" v-if="reportInfo.ReportLink">查看报告链接</div>
+        <div class="host-collect" v-if="reportInfo.IsResearch && reportResearch.length">
+          <h4>相关热门收藏:</h4>
+          <div class="host-content" v-for="item in reportResearch" :key="item.ArticleId">
+            <p class="host-title" @click="goDetail(item)">{{ item.Title }}</p>
+            <div class="item-more">
+              <p>{{ item.PublishDate }}</p>
+              <div class="pv-ollect">
+                <div>
+                  <img class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
+                  {{ item.Pv }}
+                </div>
+                <div @click="collectClick(item)">
+                  <img v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png" />
+                  <img v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png" />
+                  {{ item.CollectNum }}人收藏
+                </div>
               </div>
             </div>
           </div>
         </div>
-      </div>
-      <div v-if="reportInfo.IsSpecialArticle" class="statement-content">
-        <p class="title">免责声明</p>
-        <p class="content">
-          本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。
-        </p>
-      </div>
+        <div v-if="reportInfo.IsSpecialArticle" class="statement-content">
+          <p class="title">免责声明</p>
+          <p class="content">
+            本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。
+          </p>
+        </div>
+      </template>
+      <template v-else>
+        <div class="detail-report" :class="reportInfo.IsResearch ? '' : 'detail-bottom'" v-if="reportInfo.Body">
+          <div id="report-content" v-html="reportInfo.Body.slice(0, 200)"></div>
+        </div>
+        <div class="please-login" @click="pleaseGoLogin">请登录后查看更多内容</div>
+      </template>
     </div>
-    <div class="btn-returntop">
+    <div class="btn-returntop" v-if="isBinding">
       <img src="~@/assets/cygx/returntop.png" @click="scrolltop" style="width: 40px" />
     </div>
     <div class="btn-freecharge" v-if="isShowFreeBtn && from_type == 'mpwechat'">
@@ -82,13 +90,12 @@
       <img @click="removeBton" class="remove-icon" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/free_%20remove.png" />
     </div>
     <!-- 底部悬浮固定 -->
-    <div class="fixed_cont" v-if="from_type == 'mpwechat'">
+    <div class="fixed_cont" v-if="from_type == 'mpwechat' && isBinding">
       <div class="handle-item" @click="quizBtn">
         <img src="@/assets/cygx/leaving_message.png" class="img_ico" />
         <div>留言</div>
       </div>
-      <div class="handle-item" v-if="reportInfo?.IsApplyAppointmentExpert" 
-      @click="appointment(reportInfo?.ArticleId)">
+      <div class="handle-item" v-if="reportInfo?.IsApplyAppointmentExpert" @click="appointment(reportInfo?.ArticleId)">
         <img src="@/assets/cygx/appointment-expert.png" class="img_ico" />
         <div>约访专家</div>
       </div>
@@ -124,6 +131,7 @@ const haveData = ref(false);
 const fileLink = ref(false);
 const showTips = ref(false);
 const contentBox = ref(null);
+const isBinding = ref(true);
 const isSendWx = ref("");
 
 /* 访谈接口 */
@@ -332,37 +340,41 @@ const quizBtn = () => {
   });
 };
 // 约访专家
-const appointment=(articleId)=>{
+const appointment = (articleId) => {
   console.log(articleId);
-  if(!articleId){
+  if (!articleId) {
     Toast("ArticleId 值错误");
-    return
+    return;
   }
   Dialog.confirm({
     message: "约访专家的请求会提醒您的对口销售,确定要发起吗?",
-    messageAlign:'left',
-    showCancelButton:true,
-    confirmButtonColor:'blue'
-  }).then(() => {
-    RaiApi.appointmentExpert({ArticleId:articleId}).then(res=>{
-      if (res.Ret === 200 || res.Ret === 403) {
-        Dialog.confirm({
-          message: "约访申请已提醒您的对口销售,请等待销售与您联系",
-          messageAlign:'left',
-          showConfirmButton:false,
-          cancelButtonText:'知道了'
-        }).then(() => {}).catch(()=>{})
-      }
+    messageAlign: "left",
+    showCancelButton: true,
+    confirmButtonColor: "blue",
+  })
+    .then(() => {
+      RaiApi.appointmentExpert({ ArticleId: articleId }).then((res) => {
+        if (res.Ret === 200 || res.Ret === 403) {
+          Dialog.confirm({
+            message: "约访申请已提醒您的对口销售,请等待销售与您联系",
+            messageAlign: "left",
+            showConfirmButton: false,
+            cancelButtonText: "知道了",
+          })
+            .then(() => {})
+            .catch(() => {});
+        }
+      });
     })
-  }).catch(()=>{})
-}
+    .catch(() => {});
+};
 /* 获取报告详情 */
 const getReport = (id, token, type) => {
   if (type == "mpwechat") {
     RaiApi.reportDtl({
       ArticleId: id,
       Authorization: token,
-      IsSendWx:isSendWx.value
+      IsSendWx: isSendWx.value,
     }).then((res) => {
       if (res.Ret === 200) {
         haveData.value = res.Data.HasPermission === 1 ? true : false;
@@ -423,13 +435,27 @@ const lookDeeperReport = () => {
     },
   });
 };
-
+const pleaseGoLogin = () => {
+  Dialog.alert({
+    title: "标题",
+    message: "代码是写出来给人看的,附带能在机器上运行。",
+    showCancelButton: true,
+    confirmButtonColor: "#3385ff",
+  }).then((res) => {
+    if (res == "confirm") {
+      wx.miniProgram.navigateTo({
+        url: "/pageMy/login/login",
+      });
+    }
+  });
+};
 onMounted(() => {
   if (route.query.id) {
     rerportId.value = +route.query.id;
     isSendWx.value = route.query.IsSendWx || "";
     from_type.value = route.query.fromType;
     let access_token = route.query.token || "";
+    isBinding.value = route.query.isBinding;
     localStorage.setItem("access_token", access_token);
     getReport(rerportId.value, access_token, from_type.value);
     userIsShowFreeButton();
@@ -455,4 +481,20 @@ const { reportInfo, reportResearch } = toRefs(state);
 
 <style lang="scss">
 @import "./index.scss";
+.please-login {
+  position: fixed;
+  bottom: 100px;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 556px;
+  height: 64px;
+  color: #fff;
+  font-size: 24px;
+  font-weight: 600;
+  background-color: #376cbb;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 9px;
+}
 </style>