|
@@ -10,22 +10,31 @@ const route = useRoute()
|
|
|
|
|
|
// 获取系统配置
|
|
// 获取系统配置
|
|
let systemConfig = null
|
|
let systemConfig = null
|
|
|
|
+const telephoneNum = ref('')
|
|
function getSystemConfig() {
|
|
function getSystemConfig() {
|
|
apiCommon.systemConfig().then(res => {
|
|
apiCommon.systemConfig().then(res => {
|
|
if (res.Ret === 200) {
|
|
if (res.Ret === 200) {
|
|
systemConfig = res.Data
|
|
systemConfig = res.Data
|
|
- console.log(res.Data);
|
|
|
|
|
|
+ systemConfig.forEach(item => {
|
|
|
|
+ if (item.ConfKey === 'ServicePhone') {
|
|
|
|
+ telephoneNum.value = item.ConfVal
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
getSystemConfig()
|
|
getSystemConfig()
|
|
|
|
|
|
|
|
+const isLogin = ref(false)
|
|
|
|
+const TrialExpired = ref(false)
|
|
// 获取用户信息
|
|
// 获取用户信息
|
|
let userInfo = null
|
|
let userInfo = null
|
|
async function getUserInfo() {
|
|
async function getUserInfo() {
|
|
const res = await apiUser.userInfo()
|
|
const res = await apiUser.userInfo()
|
|
if (res.Ret === 200) {
|
|
if (res.Ret === 200) {
|
|
userInfo = res.Data
|
|
userInfo = res.Data
|
|
|
|
+ isLogin.value = userInfo.LoginStatus === 0
|
|
|
|
+ TrialExpired.value = userInfo.TrialExpired
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -33,10 +42,6 @@ async function getUserInfo() {
|
|
|
|
|
|
const reportId = route.query.reportid
|
|
const reportId = route.query.reportid
|
|
const reportInfo = ref(null)
|
|
const reportInfo = ref(null)
|
|
-const reportContent = ref('')
|
|
|
|
-const reportStatus = ref(0)//1已过期,2没有该品种权限,3没有权限,4有权限,5未绑定
|
|
|
|
-const reportCollected = ref(false)//报告是否收藏
|
|
|
|
-const isBind=ref(false)
|
|
|
|
const headImgStyle=ref([])
|
|
const headImgStyle=ref([])
|
|
const endImgStyle=ref([])
|
|
const endImgStyle=ref([])
|
|
const layoutBaseInfo=ref({
|
|
const layoutBaseInfo=ref({
|
|
@@ -51,11 +56,8 @@ async function getReportInfo() {
|
|
})
|
|
})
|
|
if (res.Ret === 200) {
|
|
if (res.Ret === 200) {
|
|
reportInfo.value = res.Data.Report
|
|
reportInfo.value = res.Data.Report
|
|
- reportStatus.value = res.Data.Status
|
|
|
|
- reportCollected.value = res.Data.IsCollect || false
|
|
|
|
- isBind.value=res.Data.IsSignIn
|
|
|
|
- headImgStyle.value=res.Data.Report.HeadResource.Style?JSON.parse(res.Data.Report.HeadResource.Style):[]
|
|
|
|
- endImgStyle.value=res.Data.Report.EndResource.Style?JSON.parse(res.Data.Report.EndResource.Style):[]
|
|
|
|
|
|
+ headImgStyle.value=res.Data.Report.HeadResource?.Style?JSON.parse(res.Data.Report.HeadResource.Style):[]
|
|
|
|
+ endImgStyle.value=res.Data.Report.EndResource?.Style?JSON.parse(res.Data.Report.EndResource.Style):[]
|
|
layoutBaseInfo.value['研报标题']=res.Data.Report.Title
|
|
layoutBaseInfo.value['研报标题']=res.Data.Report.Title
|
|
layoutBaseInfo.value['研报作者']=res.Data.Report.Author
|
|
layoutBaseInfo.value['研报作者']=res.Data.Report.Author
|
|
layoutBaseInfo.value['创建时间']=res.Data.Report.PublishTime
|
|
layoutBaseInfo.value['创建时间']=res.Data.Report.PublishTime
|
|
@@ -74,27 +76,23 @@ async function getReportInfo() {
|
|
});
|
|
});
|
|
|
|
|
|
await getUserInfo()
|
|
await getUserInfo()
|
|
- if (res.Data.Status === 4) {
|
|
|
|
- let htmlStr=''
|
|
|
|
- if(reportInfo.value.HasChapter===1){//章节报告
|
|
|
|
- const arr=reportInfo.value.ChapterContent||[]
|
|
|
|
- arr.forEach(i=>{
|
|
|
|
- const str=`<div class="chapter-item-wrap"><div class="chapter-title"><h3 class="chapter-title-text">${i.Title}</h3></div></div><div>${i.Content}</div>`
|
|
|
|
- htmlStr=htmlStr+str
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- htmlStr=reportInfo.value.Content
|
|
|
|
- }
|
|
|
|
- if (userInfo.Status === 2 && userInfo.HasPermission === '私有权限') {
|
|
|
|
- htmlStr=modifyReportContentIframeData(htmlStr)
|
|
|
|
- htmlStr=formatIframeData(htmlStr)
|
|
|
|
- }else{
|
|
|
|
- htmlStr = modifyReportContentIframeData(htmlStr)
|
|
|
|
- }
|
|
|
|
- splitReportContent(htmlStr)
|
|
|
|
- } else {//无权限
|
|
|
|
- reportContent.value = modifyReportContentIframeData(reportInfo.value.ContentSub)
|
|
|
|
|
|
+ let htmlStr=''
|
|
|
|
+ if(reportInfo.value.HasChapter===1){//章节报告
|
|
|
|
+ const arr=reportInfo.value.ChapterContent||[]
|
|
|
|
+ arr.forEach(i=>{
|
|
|
|
+ const str=`<div class="chapter-item-wrap"><div class="chapter-title"><h3 class="chapter-title-text">${i.Title}</h3></div></div><div>${i.Content}</div>`
|
|
|
|
+ htmlStr=htmlStr+str
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ htmlStr=reportInfo.value.Content
|
|
|
|
+ }
|
|
|
|
+ if (userInfo.Status === 2 && userInfo.HasPermission === '私有权限') {
|
|
|
|
+ htmlStr=modifyReportContentIframeData(htmlStr)
|
|
|
|
+ htmlStr=formatIframeData(htmlStr)
|
|
|
|
+ }else{
|
|
|
|
+ htmlStr = modifyReportContentIframeData(htmlStr)
|
|
}
|
|
}
|
|
|
|
+ splitReportContent(htmlStr)
|
|
|
|
|
|
// 智能研报将富文本盒子高度设置为自动
|
|
// 智能研报将富文本盒子高度设置为自动
|
|
if(res.Data.Report.ReportLayout===2){
|
|
if(res.Data.Report.ReportLayout===2){
|
|
@@ -143,29 +141,16 @@ function handleLoadContent(){
|
|
renderContentList.value=renderContentList.value.concat(contentTotals.slice(page*pageSize,(page+1)*pageSize))
|
|
renderContentList.value=renderContentList.value.concat(contentTotals.slice(page*pageSize,(page+1)*pageSize))
|
|
}
|
|
}
|
|
|
|
|
|
-// 打电话按钮显示
|
|
|
|
-const callShow = ref(false)
|
|
|
|
-const phoneList = ref([])
|
|
|
|
-function handleCallShow() {
|
|
|
|
- callShow.value = true
|
|
|
|
- phoneList.value = userInfo.SellerDepartmentPhone || []
|
|
|
|
- console.log(phoneList.value);
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-function visiblechange(val) {
|
|
|
|
- callShow.value = false
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// 拨打电话
|
|
// 拨打电话
|
|
-function handleCallPhone(tel) {
|
|
|
|
- visiblechange()
|
|
|
|
- // if (!tel) {
|
|
|
|
- // systemConfig.forEach(item => {
|
|
|
|
- // if (item.ConfKey === 'ServicePhone') {
|
|
|
|
- // tel = item.ConfVal
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
|
|
+function handleCallPhone() {
|
|
|
|
+ let tel = ''
|
|
|
|
+ if (!tel) {
|
|
|
|
+ systemConfig.forEach(item => {
|
|
|
|
+ if (item.ConfKey === 'ServicePhone') {
|
|
|
|
+ tel = item.ConfVal
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
var phoneLink = 'tel:' + tel;
|
|
var phoneLink = 'tel:' + tel;
|
|
var link = document.createElement('a');
|
|
var link = document.createElement('a');
|
|
@@ -176,18 +161,6 @@ function handleCallPhone(tel) {
|
|
link.click();
|
|
link.click();
|
|
}
|
|
}
|
|
|
|
|
|
-// 点击收藏
|
|
|
|
-async function handleCollect() {
|
|
|
|
- const res = reportCollected.value ? await apiReport.reportCollectCancel({ ReportId: Number(reportId) }) : await apiReport.reportCollect({ ReportId: Number(reportId) })
|
|
|
|
- if (res.Ret === 200) {
|
|
|
|
- Message.success(reportCollected.value ? '取消收藏成功' : '收藏成功')
|
|
|
|
- reportCollected.value = !reportCollected.value
|
|
|
|
- // 通知更新收藏列表
|
|
|
|
- wx.miniProgram.postMessage({
|
|
|
|
- data: 'refreshCollectList'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
|
|
// 显示免责声明
|
|
// 显示免责声明
|
|
const isShowMZSM = ref(false)
|
|
const isShowMZSM = ref(false)
|
|
@@ -267,10 +240,10 @@ function handleTips () {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
- <div class="report-detail-page" v-if="reportInfo">
|
|
|
|
|
|
+ <div class="report-detail-page" v-if="reportInfo" :class="isLogin || TrialExpired ? 'fixation' : ''">
|
|
<!-- 智能研报有版头版尾 -->
|
|
<!-- 智能研报有版头版尾 -->
|
|
- <div class="html-head-img-box" v-if="reportInfo.HeadResource.ImgUrl">
|
|
|
|
- <img :src="reportInfo.HeadResource.ImgUrl" alt="" style="display:block;width:100%">
|
|
|
|
|
|
+ <div class="html-head-img-box" v-if="reportInfo?.HeadResource?.ImgUrl">
|
|
|
|
+ <img :src="reportInfo.HeadResource?.ImgUrl" alt="" style="display:block;width:100%">
|
|
<div
|
|
<div
|
|
class="head-layout-item"
|
|
class="head-layout-item"
|
|
v-for="item in headImgStyle"
|
|
v-for="item in headImgStyle"
|
|
@@ -290,12 +263,12 @@ function handleTips () {
|
|
{{ layoutBaseInfo[item.value] }}
|
|
{{ layoutBaseInfo[item.value] }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="time-box" style="text-align:right;" v-if="reportInfo.HeadResource.ImgUrl">
|
|
|
|
|
|
+ <div class="time-box" style="text-align:right;" v-if="reportInfo.HeadResource?.ImgUrl">
|
|
<span>如有内容疑问 请查看 </span>
|
|
<span>如有内容疑问 请查看 </span>
|
|
<span class="btn" @click="isShowMZSM = true">免责声明</span>
|
|
<span class="btn" @click="isShowMZSM = true">免责声明</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <template v-if="!reportInfo.HeadResource.ImgUrl&&!reportInfo.EndResource.ImgUrl">
|
|
|
|
|
|
+ <template v-if="!reportInfo.HeadResource?.ImgUrl&&!reportInfo.EndResource?.ImgUrl">
|
|
<div class="title-box">{{ reportInfo.Title }}</div>
|
|
<div class="title-box">{{ reportInfo.Title }}</div>
|
|
<div class="author-box">{{ reportInfo.Author }}</div>
|
|
<div class="author-box">{{ reportInfo.Author }}</div>
|
|
<div class="time-box">
|
|
<div class="time-box">
|
|
@@ -305,26 +278,20 @@ function handleTips () {
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<div class="des-box" v-if="reportInfo.Abstract">
|
|
<div class="des-box" v-if="reportInfo.Abstract">
|
|
- <svg-icon name="icon01"></svg-icon>
|
|
|
|
- <div>{{ reportInfo.Abstract }}</div>
|
|
|
|
|
|
+ <!-- <svg-icon name="icon01"></svg-icon> -->
|
|
|
|
+ <span class="des-title">摘要:</span>
|
|
|
|
+ <span>{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}{{ reportInfo.Abstract }}</span>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
id="rich-content"
|
|
id="rich-content"
|
|
class="report-content-box rich-content"
|
|
class="report-content-box rich-content"
|
|
- v-html="reportContent"
|
|
|
|
- v-if="reportStatus !== 4"
|
|
|
|
- />
|
|
|
|
- <div
|
|
|
|
- id="rich-content"
|
|
|
|
- class="report-content-box rich-content"
|
|
|
|
- v-else
|
|
|
|
>
|
|
>
|
|
<div v-for="item in renderContentList" :key="item" v-html="item"></div>
|
|
<div v-for="item in renderContentList" :key="item" v-html="item"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 拼接版尾 -->
|
|
<!-- 拼接版尾 -->
|
|
- <div class="html-end-img-box" v-if="reportInfo.EndResource.ImgUrl">
|
|
|
|
- <img :src="reportInfo.EndResource.ImgUrl" alt="" style="display:block;width:100%">
|
|
|
|
|
|
+ <div class="html-end-img-box" v-if="reportInfo.EndResource?.ImgUrl">
|
|
|
|
+ <img :src="reportInfo.EndResource?.ImgUrl" alt="" style="display:block;width:100%">
|
|
<div
|
|
<div
|
|
class="head-layout-item"
|
|
class="head-layout-item"
|
|
v-for="item in endImgStyle"
|
|
v-for="item in endImgStyle"
|
|
@@ -345,13 +312,6 @@ function handleTips () {
|
|
</div>
|
|
</div>
|
|
<!-- 右侧悬浮操作栏 -->
|
|
<!-- 右侧悬浮操作栏 -->
|
|
<div class="right-fix-box">
|
|
<div class="right-fix-box">
|
|
- <!-- 收藏 -->
|
|
|
|
- <svg-icon
|
|
|
|
- @click="handleCollect"
|
|
|
|
- class="item collect-icon"
|
|
|
|
- :name="reportCollected ? 'collected' : 'collect'"
|
|
|
|
- v-if="reportStatus === 4 && userInfo?.Status === 2"
|
|
|
|
- />
|
|
|
|
<!-- 返回顶部 -->
|
|
<!-- 返回顶部 -->
|
|
<div class="item back-top-img">
|
|
<div class="item back-top-img">
|
|
<svg-icon
|
|
<svg-icon
|
|
@@ -363,53 +323,34 @@ function handleTips () {
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 无权限 -->
|
|
|
|
- <div class="no-auth-wrap" v-if="reportInfo&&reportStatus !== 4">
|
|
|
|
|
|
+ <!-- 未绑定 -->
|
|
|
|
+ <div class="no-auth-wrap" v-if="isLogin">
|
|
<div class="opcity-box"></div>
|
|
<div class="opcity-box"></div>
|
|
<div class="content-box">
|
|
<div class="content-box">
|
|
<img class="icon" src="@/assets/imgs/lock-img.png" alt="" />
|
|
<img class="icon" src="@/assets/imgs/lock-img.png" alt="" />
|
|
- <div class="text" v-if="reportStatus === 3">
|
|
|
|
- 您暂无权限查看,<br />请申请认证!
|
|
|
|
- </div>
|
|
|
|
- <div class="text" v-if="reportStatus === 2">
|
|
|
|
- 您暂无该品种权限,<br />请联系客服人员开通!
|
|
|
|
- </div>
|
|
|
|
- <div class="text" v-if="reportStatus === 1">
|
|
|
|
- 您的权限已过期,<br />请联系客服人员开通!
|
|
|
|
|
|
+ <div class="text">
|
|
|
|
+ 为了优化您的用户体验<br />请登录后查看更多信息!
|
|
</div>
|
|
</div>
|
|
<t-button
|
|
<t-button
|
|
- v-if="reportStatus !== 3"
|
|
|
|
- theme="primary"
|
|
|
|
- block
|
|
|
|
- style="width: 300px; margin: 30px auto"
|
|
|
|
- @click="handleCallShow"
|
|
|
|
- >立即联系</t-button
|
|
|
|
- >
|
|
|
|
- <t-button
|
|
|
|
- v-else
|
|
|
|
theme="primary"
|
|
theme="primary"
|
|
- block
|
|
|
|
- style="width: 300px; margin: 30px auto"
|
|
|
|
- @click="handleApplyCertification"
|
|
|
|
- >申请认证</t-button
|
|
|
|
|
|
+ shape="round"
|
|
|
|
+ style="width: 300px; margin: 30px auto; background: linear-gradient(270deg, #BB5B29 0%, #E09056 100%);"
|
|
|
|
+ @click="handleGoLogin"
|
|
|
|
+ >去登陆</t-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 未绑定 -->
|
|
|
|
- <div class="no-auth-wrap" v-if="reportInfo&&reportStatus === 5&&!isBind">
|
|
|
|
|
|
+ <!-- 无权限 -->
|
|
|
|
+ <div class="no-auth-wrap" v-else-if="TrialExpired">
|
|
<div class="opcity-box"></div>
|
|
<div class="opcity-box"></div>
|
|
<div class="content-box">
|
|
<div class="content-box">
|
|
<img class="icon" src="@/assets/imgs/lock-img.png" alt="" />
|
|
<img class="icon" src="@/assets/imgs/lock-img.png" alt="" />
|
|
<div class="text">
|
|
<div class="text">
|
|
- 为了优化您的用户体验<br />请登录后查看更多信息!
|
|
|
|
|
|
+ 您的报告查看权限已到期,如有需要<br />请联系客户经理开通权限
|
|
|
|
+ </div>
|
|
|
|
+ <div class="num" @click="handleCallPhone()">
|
|
|
|
+ {{telephoneNum}}
|
|
</div>
|
|
</div>
|
|
- <t-button
|
|
|
|
- theme="primary"
|
|
|
|
- block
|
|
|
|
- style="width: 300px; margin: 30px auto"
|
|
|
|
- @click="handleGoLogin"
|
|
|
|
- >去登陆</t-button
|
|
|
|
- >
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 免责声明 -->
|
|
<!-- 免责声明 -->
|
|
@@ -422,15 +363,6 @@ function handleTips () {
|
|
@confirm="handleTips"
|
|
@confirm="handleTips"
|
|
>
|
|
>
|
|
</t-dialog>
|
|
</t-dialog>
|
|
- <t-popup
|
|
|
|
- :visible="callShow"
|
|
|
|
- placement="bottom"
|
|
|
|
- @visiblechange="visiblechange"
|
|
|
|
- >
|
|
|
|
- <div class="call-box">
|
|
|
|
- <div class="phone-item" v-for="(item, index) in phoneList" :key="index" @click="handleCallPhone(item)">{{ item }}</div>
|
|
|
|
- </div>
|
|
|
|
- </t-popup>
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -448,18 +380,32 @@ function handleTips () {
|
|
color: var(--text-color-grey);
|
|
color: var(--text-color-grey);
|
|
.btn {
|
|
.btn {
|
|
float: right;
|
|
float: right;
|
|
- color: var(--primary-color);
|
|
|
|
|
|
+ color: #D49633;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.des-box {
|
|
.des-box {
|
|
- background-color: #f8f8f8;
|
|
|
|
|
|
+ background-color: #FEF9F4;
|
|
padding: 20px;
|
|
padding: 20px;
|
|
margin: 20px 0;
|
|
margin: 20px 0;
|
|
- display: flex;
|
|
|
|
- gap: 0 10px;
|
|
|
|
color: var(--text-color-sub);
|
|
color: var(--text-color-sub);
|
|
font-size: var(--font-size-small);
|
|
font-size: var(--font-size-small);
|
|
line-height: 36px;
|
|
line-height: 36px;
|
|
|
|
+ position: relative;
|
|
|
|
+ &::before {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ content: '';
|
|
|
|
+ display: block;
|
|
|
|
+ height: 100%;
|
|
|
|
+ width: 1px;
|
|
|
|
+ background-color: #BC6031;
|
|
|
|
+ }
|
|
|
|
+ .des-title {
|
|
|
|
+ font-size: 30px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #666666;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.report-content-box {
|
|
.report-content-box {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
@@ -558,6 +504,10 @@ function handleTips () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.fixation {
|
|
|
|
+ height: 100vh;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
.no-auth-wrap {
|
|
.no-auth-wrap {
|
|
position: fixed;
|
|
position: fixed;
|
|
left: 0;
|
|
left: 0;
|
|
@@ -573,10 +523,21 @@ function handleTips () {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
.content-box {
|
|
.content-box {
|
|
|
|
+ --td-button-primary-border-color: #D49633;
|
|
|
|
+ --td-button-primary-active-bg-color:#BB5B29;
|
|
|
|
+ --td-button-primary-active-border-color:#BB5B29;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
padding-bottom: 200px;
|
|
padding-bottom: 200px;
|
|
text-align: center;
|
|
text-align: center;
|
|
- color: var(--primary-color);
|
|
|
|
|
|
+ color: #D49633;
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 28px;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ }
|
|
|
|
+ .num {
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ font-size: 32px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.icon {
|
|
.icon {
|