|
@@ -10,22 +10,31 @@ const route = useRoute()
|
|
|
|
|
|
// 获取系统配置
|
|
|
let systemConfig = null
|
|
|
+const telephoneNum = ref('')
|
|
|
function getSystemConfig() {
|
|
|
apiCommon.systemConfig().then(res => {
|
|
|
if (res.Ret === 200) {
|
|
|
systemConfig = res.Data
|
|
|
- console.log(res.Data);
|
|
|
+ systemConfig.forEach(item => {
|
|
|
+ if (item.ConfKey === 'ServicePhone') {
|
|
|
+ telephoneNum.value = item.ConfVal
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
getSystemConfig()
|
|
|
|
|
|
+const isLogin = ref(false)
|
|
|
+const TrialExpired = ref(false)
|
|
|
// 获取用户信息
|
|
|
let userInfo = ref(null)
|
|
|
async function getUserInfo() {
|
|
|
const res = await apiUser.userInfo()
|
|
|
if (res.Ret === 200) {
|
|
|
userInfo.value = res.Data
|
|
|
+ isLogin.value = userInfo.LoginStatus === 0
|
|
|
+ TrialExpired.value = userInfo.User.TrialExpired
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -33,9 +42,6 @@ async function getUserInfo() {
|
|
|
|
|
|
const reportId = route.query.reportid
|
|
|
const reportInfo = ref(null)
|
|
|
-const reportContent = ref('')
|
|
|
-const reportStatus = ref(0)//1已过期,2没有该品种权限,3没有权限,4有权限,5未绑定
|
|
|
-const reportCollected = ref(false)//报告是否收藏
|
|
|
const isBind=ref(false)
|
|
|
async function getReportInfo() {
|
|
|
if (!reportId) return
|
|
@@ -44,8 +50,6 @@ async function getReportInfo() {
|
|
|
})
|
|
|
if (res.Ret === 200) {
|
|
|
reportInfo.value = res.Data.Report
|
|
|
- reportStatus.value = res.Data.Status
|
|
|
- reportCollected.value = res.Data.IsCollect || false
|
|
|
isBind.value=res.Data.IsSignIn
|
|
|
|
|
|
// 设置分享文案
|
|
@@ -59,29 +63,16 @@ async function getReportInfo() {
|
|
|
}
|
|
|
getReportInfo()
|
|
|
|
|
|
-// 打电话按钮显示
|
|
|
-const callShow = ref(false)
|
|
|
-const phoneList = ref([])
|
|
|
-function handleCallShow() {
|
|
|
- callShow.value = true
|
|
|
- phoneList.value = userInfo.value.SellerDepartmentPhone || []
|
|
|
- console.log(phoneList.value);
|
|
|
-
|
|
|
-}
|
|
|
-function visiblechange(val) {
|
|
|
- callShow.value = false
|
|
|
-}
|
|
|
// 拨打电话
|
|
|
function handleCallPhone(tel) {
|
|
|
- visiblechange()
|
|
|
- // let tel = userInfo.value.SellerPhone
|
|
|
- // if (!tel) {
|
|
|
- // systemConfig.forEach(item => {
|
|
|
- // if (item.ConfKey === 'ServicePhone') {
|
|
|
- // tel = item.ConfVal
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
+ let tel = userInfo.value.SellerPhone
|
|
|
+ if (!tel) {
|
|
|
+ systemConfig.forEach(item => {
|
|
|
+ if (item.ConfKey === 'ServicePhone') {
|
|
|
+ tel = item.ConfVal
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
var phoneLink = 'tel:' + tel;
|
|
|
var link = document.createElement('a');
|
|
@@ -92,19 +83,6 @@ function handleCallPhone(tel) {
|
|
|
link.click();
|
|
|
}
|
|
|
|
|
|
-// 点击收藏
|
|
|
-async function handleCollect() {
|
|
|
- const res = reportCollected.value ? await apiReport.pdfReportCollectCancel({ ReportPdfId: Number(reportId) }) : await apiReport.pdfReportCollect({ ReportPdfId: Number(reportId) })
|
|
|
- if (res.Ret === 200) {
|
|
|
- Message.success(reportCollected.value ? '取消收藏成功' : '收藏成功')
|
|
|
- reportCollected.value = !reportCollected.value
|
|
|
- // 通知更新收藏列表
|
|
|
- wx.miniProgram.postMessage({
|
|
|
- data: 'refreshCollectList'
|
|
|
- });
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
// 显示免责声明
|
|
|
const isShowMZSM = ref(false)
|
|
|
|
|
@@ -135,27 +113,11 @@ function handleGoLogin(){
|
|
|
url:`/pages/login/index?redirectUrl=${redirectUrl}`
|
|
|
})
|
|
|
}
|
|
|
-const isTips = ref(false)
|
|
|
-const tipsMsg = ref('')
|
|
|
-// 申请认证
|
|
|
-function handleApplyCertification() {
|
|
|
- apiUser.userApplyPermission().then(res=>{
|
|
|
- if(res.Ret===200){
|
|
|
- isTips.value = true
|
|
|
- tipsMsg.value = res.Msg
|
|
|
- } else {
|
|
|
- Message.error(res.Msg)
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
-function handleTips () {
|
|
|
- isTips.value = false
|
|
|
-}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div :class="['report-detail-page',reportStatus !== 4||(reportStatus === 5&&!isBind)?'report-detail_hidden':'']" v-if="reportInfo">
|
|
|
+ <div :class="['report-detail-page', isLogin || TrialExpired ? 'report-detail_hidden' : '']" v-if="reportInfo">
|
|
|
<div class="title-box">{{ reportInfo.Title }}</div>
|
|
|
<div class="author-box">{{ reportInfo.Author }}</div>
|
|
|
<div class="time-box">
|
|
@@ -163,100 +125,59 @@ function handleTips () {
|
|
|
<span class="btn" @click="isShowMZSM = true">免责声明</span>
|
|
|
</div>
|
|
|
<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}}</span>
|
|
|
</div>
|
|
|
<div class="report-content-box rich-content">
|
|
|
<preview-PDF :url="reportInfo.PdfUrl"/>
|
|
|
</div>
|
|
|
<!-- 右侧悬浮操作栏 -->
|
|
|
<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">
|
|
|
- <svg-icon
|
|
|
- name="backtop"
|
|
|
+ <img
|
|
|
+ src="@/assets/imgs/backtop.png"
|
|
|
+ alt=""
|
|
|
v-show="showToTop"
|
|
|
@click="handleBackTop"
|
|
|
class="back-top-img"
|
|
|
- />
|
|
|
+ >
|
|
|
</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="content-box">
|
|
|
<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>
|
|
|
<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"
|
|
|
block
|
|
|
style="width: 300px; margin: 30px auto"
|
|
|
- @click="handleApplyCertification"
|
|
|
- >申请认证</t-button
|
|
|
+ @click="handleGoLogin"
|
|
|
+ >去登陆</t-button
|
|
|
>
|
|
|
</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="content-box">
|
|
|
<img class="icon" src="@/assets/imgs/lock-img.png" alt="" />
|
|
|
<div class="text">
|
|
|
- 为了优化您的用户体验<br />请登录后查看更多信息!
|
|
|
+ 您的报告查看权限已到期,如有需要<br />请联系客户经理开通权限
|
|
|
+ </div>
|
|
|
+ <div class="num" @click="handleCallPhone()">
|
|
|
+ {{telephoneNum}}
|
|
|
</div>
|
|
|
- <t-button
|
|
|
- theme="primary"
|
|
|
- block
|
|
|
- style="width: 300px; margin: 30px auto"
|
|
|
- @click="handleGoLogin"
|
|
|
- >去登陆</t-button
|
|
|
- >
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 免责声明 -->
|
|
|
<disclaimers-wrap v-model:show="isShowMZSM" />
|
|
|
- <t-dialog
|
|
|
- :visible="isTips"
|
|
|
- title="提示"
|
|
|
- :content="tipsMsg"
|
|
|
- confirm-btn="知道了"
|
|
|
- @confirm="handleTips"
|
|
|
- >
|
|
|
- </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>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -278,14 +199,28 @@ function handleTips () {
|
|
|
}
|
|
|
}
|
|
|
.des-box {
|
|
|
- background-color: #f8f8f8;
|
|
|
+ background-color: #FEF9F4;
|
|
|
padding: 20px;
|
|
|
margin: 20px 0;
|
|
|
- display: flex;
|
|
|
- gap: 0 10px;
|
|
|
color: var(--text-color-sub);
|
|
|
font-size: var(--font-size-small);
|
|
|
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;
|
|
|
+ }
|
|
|
}
|
|
|
.right-fix-box {
|
|
|
position: fixed;
|
|
@@ -322,10 +257,21 @@ function handleTips () {
|
|
|
);
|
|
|
}
|
|
|
.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;
|
|
|
padding-bottom: 200px;
|
|
|
text-align: center;
|
|
|
- color: var(--primary-color);
|
|
|
+ color: #D49633;
|
|
|
+ .text {
|
|
|
+ font-size: 28px;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ .num {
|
|
|
+ margin-top: 20px;
|
|
|
+ font-size: 32px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.icon {
|