Răsfoiți Sursa

更新了文章详情

bding 4 ani în urmă
părinte
comite
aa9fef3ea0
4 a modificat fișierele cu 131 adăugiri și 10 ștergeri
  1. 1 1
      config/index.js
  2. 1 1
      config/prod.test.env.js
  3. 4 1
      src/api/api.js
  4. 125 7
      src/view/rai_pj/raiReportDtl.vue

+ 1 - 1
config/index.js

@@ -13,7 +13,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable:{
     	'/api': {
-    		target:'http://8.136.199.33:8101', // 接口的域名
+    		target:'http://8.136.199.33:8500', // 接口的域名
     		// secure:false,  // 如果是https接口,需要配置这个参数
     		changeOrigin:true, // 如果接口跨域,需要进行这个参数配置
     		pathRewrite:{

+ 1 - 1
config/prod.test.env.js

@@ -2,7 +2,7 @@
 module.exports = {
 	NODE_ENV: '"test"',
   // API_ROOT:'"http://rddpweb.brilliantstart.cn/api"',  //测试环境
-  API_ROOT:'"http://8.136.199.33:8101/api"',  //测试环境
+  API_ROOT:'"http://8.136.199.33:8500/api"',  //测试环境
   Domain:'"brilliantstart.cn"',
   linkurl:'"http://share.brilliantstart.cn"',
 };

+ 4 - 1
src/api/api.js

@@ -61,6 +61,9 @@ export const RaiApi = {
   reportDtl: params => {
     return http.axiosget('/article/detail',params)
   },
+  reportDtlTwo: params => {
+    return http.axiosget('/tactics/detail',params)
+  },
   /* 查看报告 */
   lookReport: params => {
     return http.axiosget('/article/look/detail',params)
@@ -73,4 +76,4 @@ export const RaiApi = {
 	applyRpt: params => {
 		return http.axiospost('/article/interview/apply',params,1)
 	}
-}
+}

+ 125 - 7
src/view/rai_pj/raiReportDtl.vue

@@ -6,9 +6,21 @@
 				<span class="author">{{reportInfo.Department}}</span>
 				<span>{{reportInfo.PublishDate}}</span>
 			</div>
+      <div class="seller-list">
+        <span>联系人:</span>
+        <span v-for="(item,index) in reportInfo.SellerList" :key="index">
+          {{item.SellerName}}({{item.SellerMobile}})&nbsp;&nbsp;
+        </span>
+      </div>
 			<div>
 				注:请务必阅读<span class="tip" @click="showTips"> &nbsp;免责声明</span>
 			</div>
+      <div class="container-text">
+        <div class="container">
+           <i class="blue-box"></i><span class="text-box">摘要:</span>
+        </div>
+            <span v-html="reportInfo.Abstract" class="content-html"></span>
+      </div>
 		</div>
 		<div class="detail-report">
 			<div id="report-content" v-html="reportInfo.Body"></div>
@@ -43,6 +55,7 @@
 </template>
 
 <script>
+//http://192.168.1.155:2000/raiReportDtl?id=3927&token=20ec44c7fe0e02ff597c324406ce49ca7c23d1b788556a5a8b743b266e897d81&fromType=mpwechat
 import { RaiApi } from "@/api/api.js"
 import { Dialog,Toast  } from 'vant';
 export default {
@@ -68,14 +81,17 @@ export default {
 		/* 获取报告详情 */
 		getReport(id,token,type) {
 			if(type == 'mpwechat') {
+        console.log('mpwechat');
 				RaiApi.reportDtl({
 					ArticleId: id,
 					Authorization: token
 				}).then(res => {
+					console.log(res);
 					if(res.Ret === 200) {
 						this.haveData = res.Data.HasPermission === 1 ? true : false
 						if(res.Data.HasPermission === 1) { //有访问权限
 							this.reportInfo = res.Data.Detail;
+              console.log(this.reportInfo,'------');
 							$(document).on('click', '#report-content img',function(event) {
 								let imgArray = [];
 								let src_tag = $(this).attr('src');
@@ -96,6 +112,7 @@ export default {
 					ArticleIdMd5: id,
 				}).then(res => {
 					if(res.Ret === 200) {
+						console.log(res);
 						this.haveData = res.Data.HasPermission === 1 ? true : false;
 						if(res.Data.HasPermission === 1) { //有访问权限
 							this.reportInfo = res.Data.Detail;
@@ -115,11 +132,65 @@ export default {
 					}
 				})
 			}
-		
+
+		},
+    /* 获取报告的文章详情 */
+    getReportTwo(id,token,type) {
+			if(type == 'mpwechat') {
+				RaiApi.reportDtlTwo({
+					ArticleId: id,
+					Authorization: token
+				}).then(res => {
+					console.log(res);
+					if(res.Ret === 200) {
+						this.haveData = res.Data.HasPermission === 1 ? true : false
+						if(res.Data.HasPermission === 1) { //有访问权限
+							this.reportInfo = res.Data.Detail;
+							$(document).on('click', '#report-content img',function(event) {
+								let imgArray = [];
+								let src_tag = $(this).attr('src');
+								let parent_tag = $(this).parent();
+								if (src_tag && !parent_tag.attr('href')) {
+									$('#report-content img').each(function(index, el) {
+											let itemSrc = $(this).attr('src');
+											imgArray.push(itemSrc);
+									});
+									wx.previewImage({current:src_tag,urls:imgArray});
+								}
+							});
+						}
+					}
+				})
+			}else {
+				RaiApi.lookReport({
+					ArticleIdMd5: id,
+				}).then(res => {
+					if(res.Ret === 200) {
+						console.log(res);
+						this.haveData = res.Data.HasPermission === 1 ? true : false;
+						if(res.Data.HasPermission === 1) { //有访问权限
+							this.reportInfo = res.Data.Detail;
+							$(document).on('click', '#report-content img',function(event) {
+								let imgArray = [];
+								let src_tag = $(this).attr('src');
+								let parent_tag = $(this).parent();
+								if (src_tag && !parent_tag.attr('href')) {
+									$('#report-content img').each(function(index, el) {
+											let itemSrc = $(this).attr('src');
+											imgArray.push(itemSrc);
+									});
+									wx.previewImage({current:src_tag,urls:imgArray});
+								}
+							});
+						}
+					}
+				})
+			}
+
 		},
 		/* 访谈申请 */
 		applyHandle() {
-			!this.reportInfo.IsInterviewApply 
+			!this.reportInfo.IsInterviewApply
 			&& Dialog.confirm({
 					title: '',
 					message: '专家访谈申请会提交给您的对口销售,销售会线下与您取得联系,确定申请吗?',
@@ -200,15 +271,26 @@ export default {
 		this.resetCss()
 	},
 	mounted() {
+    // console.log(this.$route.query);
 		document.title = '纪要详情';
 		if(this.$route.query.id) {
 			this.id = this.$route.query.id
 			this.from_type = this.$route.query.fromType;
+      // console.log(	this.from_type );
 			let access_token = this.$route.query.token || '';
 			localStorage.setItem('access_token',access_token)
 			this.getReport(this.id,access_token,this.from_type)
-		}
-		// this.getReport(3526,'49ca03822497d26a3943d5084ed59130e912a1e03f39de845be94ad87e94248c')
+      // console.log(123);
+		}else if(this.$route.query.idReport) {
+      console.log(this.$route.query.idReport);
+      this.id = this.$route.query.idReport
+			this.from_type = this.$route.query.fromType;
+      // console.log(	this.from_type );
+			let access_token = this.$route.query.token || '';
+			localStorage.setItem('access_token',access_token)
+			this.getReportTwo(this.id,access_token,this.from_type)
+    }
+		// this.getReport(3927,'20ec44c7fe0e02ff597c324406ce49ca7c23d1b788556a5a8b743b266e897d81')
 		this.checkUa()
 	},
 }
@@ -223,6 +305,10 @@ export default {
 	.van-button__content {
 		font-size: 17px !important;
 	}
+}
+.seller-list {
+  font-size: .56rem;
+  margin-bottom: .8rem;
 }
  .van-dialog--round-button .van-dialog__footer{
 	border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
@@ -245,8 +331,9 @@ export default {
 	box-sizing: border-box;
 	background-color: #fff;
 	padding: 0.4rem 0.68rem 4rem;
-	font-size: 0.64rem;
+	font-size:.56rem;
 	.report-top {
+
 		color: #999999;
 		.report-title {
 			color: #4A4A4A;
@@ -260,9 +347,40 @@ export default {
 			margin: 0.4rem 0;
 		}
 		.tip {
-			color: #586EB5;
+			color: #2f7afa;
 			display: inline;
 		}
+    .container-text {
+      margin-top: .8rem;
+      line-height: .88rem;
+      padding-bottom: .8rem;
+      border-bottom: .04rem dashed #999999;
+      .container {
+        display: flex;
+        .blue-box {
+       margin-right:.2rem;
+			width: .16rem;
+			height: .88rem;
+			background-color: #3385FF;
+		}
+		.text-box {
+			font-size: .64rem;
+      height: .88rem;
+      line-height: .88rem;
+			color: #333;
+		}
+      }
+     .content-html {
+       margin-top: .1rem;
+      display: inline-block;
+      padding-left:.36rem !important;
+      color: #333333 !important;
+      font-size: .64rem !important;
+      line-height: 1rem !important;
+      letter-spacing:.12rem !important;
+    }
+    }
+
 	}
 	.detail-report {
 		padding: 0.4rem 0;
@@ -304,4 +422,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>