Explorar el Código

产品内测 ok

bding hace 1 año
padre
commit
0b3f1d1f1f
Se han modificado 4 ficheros con 240 adiciones y 26 borrados
  1. 6 0
      src/api/cygx/api.js
  2. 5 0
      src/router/cygx/index.js
  3. 30 26
      src/views/cygx/dlg.vue
  4. 199 0
      src/views/cygx/internalDetials.vue

+ 6 - 0
src/api/cygx/api.js

@@ -64,3 +64,9 @@ export const FreeButton = {
     return post("/article/collect", params, 0);
   },
 };
+/* 产品内测 详情 */
+export const inrernalApi = {
+  getProductInteriorDetail: (params) => {
+    return get("/product_interior/detail", params, 0);
+  },
+};

+ 5 - 0
src/router/cygx/index.js

@@ -9,6 +9,11 @@ export const cygxRoutes = [
     name: "strategyReport",
     component: () => import("@/views/cygx/strategyReport.vue"),
   },
+  {
+    path: "/internalDetials",
+    name: "internalDetials",
+    component: () => import("@/views/cygx/internalDetials.vue"),
+  },
   {
     path: "/cygx",
     name: "cygx",

+ 30 - 26
src/views/cygx/dlg.vue

@@ -2,10 +2,7 @@
   <div class="container-dlg" v-if="showTips">
     <div class="text">
       <h1>免责声明</h1>
-      <p >
-        本文为用户投稿,用户在平台中发表的所有资料、言论等仅代表个人观点,与本平台立场无关,不对您构成任何投资建议。本平台对文中陈述、观点判断保持中立,不对所包含内容及数据的真实性、准确性、可靠性或完整性提供任何明示或暗示的保证。请读者仅作参考,并请自行承担全部责任。
-      </p>
-      <!-- <template>
+      <template v-if="type === '产品内测'">
         <p>1、本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。</p>
         <p>
           2、本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。
@@ -14,7 +11,10 @@
           3、报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。
         </p>
         <p>4、在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。</p>
-      </template> -->
+      </template>
+      <p v-else>
+        本文为用户投稿,用户在平台中发表的所有资料、言论等仅代表个人观点,与本平台立场无关,不对您构成任何投资建议。本平台对文中陈述、观点判断保持中立,不对所包含内容及数据的真实性、准确性、可靠性或完整性提供任何明示或暗示的保证。请读者仅作参考,并请自行承担全部责任。
+      </p>
       <p class="hide-tips" @click="isHide">知道了</p>
     </div>
   </div>
@@ -31,6 +31,10 @@ const props = defineProps({
   reportInfo: {
     type: Object,
   },
+  type: {
+    type: String,
+    default: "",
+  },
 });
 
 const emit = defineEmits(["hideDlg"]);
@@ -53,8 +57,8 @@ const isHide = () => {
   display: flex;
   align-items: center;
   justify-content: center;
-  @media screen and (min-width:790px) {
-    padding: 0px 30PX;
+  @media screen and (min-width: 790px) {
+    padding: 0px 30px;
     width: 1200px;
     top: 0;
     left: 50%;
@@ -64,30 +68,30 @@ const isHide = () => {
     width: 100%;
     background-color: #fff;
     border-radius: 20px;
-    @media screen and (min-width:790px) {
-    width: 50%;
-    border-radius: 20PX;
-  }
-  h1 {
+    @media screen and (min-width: 790px) {
+      width: 50%;
+      border-radius: 20px;
+    }
+    h1 {
       padding-top: 30px;
       text-align: center;
       font: 32px "PingFang-SC-Regular";
       color: #333;
       text-align: center;
       margin-bottom: 17px;
-    @media screen and (min-width:790px) {
-    padding-top: 15PX;
-     margin-bottom: 17PX;
-    font: 16PX "PingFang-SC-Regular";
-    }
+      @media screen and (min-width: 790px) {
+        padding-top: 15px;
+        margin-bottom: 17px;
+        font: 16px "PingFang-SC-Regular";
+      }
     }
     p {
       padding: 0 30px;
       font-size: 26px;
-       @media screen and (min-width:790px) {
-    padding: 0 15PX;
-      font-size: 14PX;
-    }
+      @media screen and (min-width: 790px) {
+        padding: 0 15px;
+        font-size: 14px;
+      }
     }
     .hide-tips {
       margin-top: 20px;
@@ -97,11 +101,11 @@ const isHide = () => {
       text-align: center;
       border-top: 1px solid #eaeaea;
       cursor: pointer;
-    @media screen and (min-width:790px) {
-      margin-top: 10PX;
-      font-size: 14PX;
-      line-height: 40PX;
-    }
+      @media screen and (min-width: 790px) {
+        margin-top: 10px;
+        font-size: 14px;
+        line-height: 40px;
+      }
     }
   }
 }

+ 199 - 0
src/views/cygx/internalDetials.vue

@@ -0,0 +1,199 @@
+<script setup>
+import { ref, onMounted } from "vue";
+import { useRoute } from "vue-router";
+import { inrernalApi } from "@/api/cygx/api.js";
+import dlg from "./dlg.vue";
+// 路由
+const route = useRoute();
+
+// 免责声明弹框
+const showTips = ref(false);
+
+// 数据的初始
+const reportDetail = ref({});
+
+// 文字的ID
+const reportId = ref(0);
+
+// 获取数据
+const reportSelectionDetail = async () => {
+  const res = await inrernalApi.getProductInteriorDetail({
+    ProductInteriorId: reportId.value,
+  });
+  if (res.Ret === 200) {
+    reportDetail.value = res.Data.Detail;
+  }
+};
+
+//  获取标签
+const addLinkClickListeners = () => {
+  // 获取所有的A标签
+  const linkElements = document.querySelectorAll("a");
+  linkElements.forEach((linkElement) => {
+    linkElement.addEventListener("click", handleLinkClick);
+  });
+  // 获取所有的img标签
+  const imageElements = document.querySelectorAll("img");
+  imageElements.forEach((imageElement) => {
+    imageElement.addEventListener("click", handleImageClick);
+  });
+};
+
+// 处理a标签的点击事件
+const handleLinkClick = (event) => {
+  event.preventDefault();
+  const linkHref = event.target.innerText;
+  if (!linkHref) return;
+
+  const number = linkHref.match(/\d+$/)[0];
+  const routerToItem = reportDetail.value.BodySlice.find((item) => number == item.SourceId);
+
+  switch (routerToItem.Type) {
+    case 2:
+      wx.miniProgram.navigateTo({
+        url: "/pageMy/reportDetail/reportDetail?id=" + routerToItem.SourceId,
+      });
+      break;
+    case 3:
+      wx.miniProgram.navigateTo({
+        url: "/activityPages/activityDetail/activityDetail?id=" + routerToItem.SourceId,
+      });
+      break;
+    case 4:
+      wx.miniProgram.navigateTo({
+        url: "/reportPages/IndustryReport/IndustryReport?id=" + routerToItem.SourceId,
+      });
+      break;
+    default:
+      "";
+  }
+};
+
+// 处理img标签的点击事件
+const handleImageClick = (event) => {
+  const imgArray = [];
+  const srcTag = event.target.getAttribute("src");
+
+  if (srcTag) {
+    const reportImages = document.querySelectorAll("img");
+    reportImages.forEach((image) => {
+      const itemSrc = image.getAttribute("src");
+      imgArray.push(itemSrc);
+    });
+
+    wx.previewImage({ current: srcTag, urls: imgArray });
+  }
+};
+// 页面加载渲染
+onMounted(async () => {
+  if (route.query.id) {
+    let access_token = route.query.token || "";
+    localStorage.setItem("access_token", access_token);
+    reportId.value = +route.query.id
+    await reportSelectionDetail();
+    addLinkClickListeners();
+  }
+});
+</script>
+
+<template>
+  <div class="cygx_internal-detials">
+    <div class="report-content-title">{{ reportDetail.Title }}</div>
+    <div class="author-time">
+      <span>{{ reportDetail.Department }}</span>
+      <span>{{ reportDetail.PublishTime }}</span>
+    </div>
+    <div class="content-statement">
+      <span>注:请务必阅读</span>
+      <span class="statement" @click="showTips = true">免责声明 </span>
+    </div>
+    <div id="report-content" class="content-abstract">摘要:{{ reportDetail.Abstract }}</div>
+    <div v-html="reportDetail.Body"></div>
+    <dlg :showTips="showTips" type="产品内测" @hideDlg="showTips = false" />
+  </div>
+</template>
+
+<style lang="scss">
+.cygx_internal-detials {
+  padding: 30px 34px;
+  color: #333;
+  font-size: 28px;
+  .author-time {
+    display: flex;
+    justify-content: space-between;
+    line-height: 39px;
+    margin: 25px 0 35px;
+  }
+  .content-statement {
+    display: flex;
+    color: #707070;
+    .statement {
+      margin-left: 10px;
+      color: #3385ff;
+    }
+  }
+  .report-content-title {
+    font-weight: 500;
+    font-size: 36px;
+    line-height: 50px;
+    color: #333333;
+  }
+  .content-abstract {
+    position: relative;
+    margin: 30px 0 20px;
+    text-indent: 0.5em;
+    line-height: 50px;
+    padding-bottom: 30px;
+    border-bottom: 1px dashed #ececec;
+    &::before {
+      content: "";
+      width: 4px;
+      height: 28px;
+      position: absolute;
+      top: 11px;
+      left: 0;
+      background-color: #3385ff;
+    }
+  }
+  .nodata-tip {
+    color: #999;
+    font-size: 30px;
+  }
+  word-break: break-all;
+  p,
+  span {
+    font-size: 32px !important;
+    line-height: 1.6 !important;
+  }
+  p {
+    background-color: rgba(255, 255, 255, 0) !important;
+  }
+  img {
+    width: 100% !important;
+  }
+  a {
+    color: #3385ff;
+  }
+  iframe {
+    width: 100% !important;
+  }
+  table {
+    border-collapse: collapse;
+    width: 100% !important;
+    margin-left: 0 !important;
+  }
+  tr td,
+  th {
+    border: 1px solid #333;
+  }
+  pre {
+    width: 100%;
+    overflow-y: auto;
+    overflow-x: hidden;
+    outline: none;
+    border: 0;
+    white-space: pre-wrap;
+    word-break: normal;
+  }
+}
+</style>