bding 1 рік тому
батько
коміт
24af2a81f3
2 змінених файлів з 15 додано та 21 видалено
  1. 6 0
      config/config.js
  2. 9 21
      reportPages/internalDetials/internalDetials.vue

+ 6 - 0
config/config.js

@@ -5,6 +5,7 @@ const env = wx.getAccountInfoSync().miniProgram;
 let baseUrl = "http://8.136.199.33:8500/api",
   pcUrl,
   reportLinkUrl,
+  intemalLinkUrl,
   reportStrategyUrl;
 
 if (env.envVersion === "develop") {
@@ -12,6 +13,7 @@ if (env.envVersion === "develop") {
   baseUrl = "http://8.136.199.33:8500/api";
   pcUrl = "https://cygxpctest.hzinsights.com/cygx_pc";
   reportLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/raiReportDtl";
+  intemalLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/internalDetials";
   reportStrategyUrl = "http://xcxh5test.hzinsights.com/xcx_h5/strategyReport";
 } else if (env.envVersion === "trial") {
   //体验版
@@ -25,6 +27,8 @@ if (env.envVersion === "develop") {
   reportLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/raiReportDtl"; //测试
   //reportLinkUrl = "https://details.hzinsights.com/raiReportDtl"; //生产
 
+  intemalLinkUrl = "http://xcxh5test.hzinsights.com/xcx_h5/internalDetials";
+
   reportStrategyUrl = "http://xcxh5test.hzinsights.com/xcx_h5/strategyReport"; //测试
   //reportStrategyUrl = "https://details.hzinsights.com/strategyReport"; //生产
 } else if (env.envVersion === "release") {
@@ -32,6 +36,7 @@ if (env.envVersion === "develop") {
   baseUrl = "https://cygx.hzinsights.com/api";
   pcUrl = "https://cygxpc.hzinsights.com/cygx_pc"; //生产
   reportLinkUrl = "https://details.hzinsights.com/raiReportDtl"; //生产
+  intemalLinkUrl = "https://details.hzinsights.com/internalDetials";//生产
   reportStrategyUrl = "https://details.hzinsights.com/strategyReport"; //生产
 }
 
@@ -40,6 +45,7 @@ module.exports = {
   pcUrl,
   reportLinkUrl,
   reportStrategyUrl,
+  intemalLinkUrl
 };
 
 // #ifdef H5

+ 9 - 21
reportPages/internalDetials/internalDetials.vue

@@ -2,27 +2,7 @@
   <block v-if="isUserBindingPhoneNumber">
     <block v-if="hasPermission === 1">
       <view class="container internal-detials" v-if="haveData">
-        <view class="report-content-title">{{ reportDetail.Title }}</view>
-        <view class="author-time">
-          <text>{{ reportDetail.Department }}</text>
-          <text>{{ reportDetail.PublishTime }}</text>
-        </view>
-        <view class="content-statement">
-          <text>注:请务必阅读</text>
-          <text class="statement" @click="isShowStatement = true">免责声明 </text>
-        </view>
-        <view class="content-abstract"> 摘要:{{ reportDetail.Abstract }}</view>
-        <statement :show="isShowStatement" />
-        <view>
-          <view
-            v-for="(item, index) in reportDetail.BodySlice"
-            :key="index"
-            @click="goIsTypeDetails(item)"
-            :style="{ color: item.Type > 1 && '#3385FF', 'word-wrap': 'break-word' }"
-          >
-            <mp-html :content="strFontSize(item.Body)" />
-          </view>
-        </view>
+        <web-view :src="linkurl + '?id=' + reportId + '&token=' + access_token"></web-view>
       </view>
       <view class="nodata" v-else>
         <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
@@ -53,6 +33,7 @@
 import { Reports } from "@/config/api.js";
 import statement from "@/reportPages/components/statement.vue";
 import NotHaveLogin from "@/components/notHaveLogin.vue";
+import { intemalLinkUrl } from "@/config/config.js";
 export default {
   data() {
     return {
@@ -62,8 +43,14 @@ export default {
       hasPermission: "",
       reportId: 0,
       titleTxT: "",
+      access_token: "",
     };
   },
+  computed: {
+    linkurl() {
+      return intemalLinkUrl;
+    },
+  },
   components: { statement, NotHaveLogin },
   methods: {
     async reportSelectionDetail() {
@@ -78,6 +65,7 @@ export default {
         uni.setNavigationBarTitle({
           title: this.titleTxT,
         });
+        this.access_token = this.access_token || this.$db.get("access_token");
       } else {
         this.haveData = false;
       }