|
@@ -25,6 +25,10 @@ const reportContent = ref('')
|
|
|
const isFollowed = ref(false)
|
|
|
const authorInfo=ref(null)
|
|
|
const isLogin=ref(true)
|
|
|
+const productId = route.query.productId
|
|
|
+const isSubscribe=ref(true)
|
|
|
+const isFree=ref(true)
|
|
|
+const subscribeStatus = ref('')//expired --过期 unSubscribe--未订阅 subscribed--订阅中
|
|
|
const riskLevelStatus=ref('')//expired过期的 unTest未测评 unMatch风险等级不匹配
|
|
|
const headImgStyle = ref([])
|
|
|
const endImgStyle = ref([])
|
|
@@ -51,9 +55,10 @@ function handleLoadContent() {
|
|
|
}
|
|
|
async function getReportInfo() {
|
|
|
//获取研报详情
|
|
|
- if (!reportId) return
|
|
|
+ if (!reportId || !productId) return
|
|
|
const res = await apiReport.getReportDetail({
|
|
|
- reportId: reportId
|
|
|
+ reportId: reportId,
|
|
|
+ productId: productId
|
|
|
})
|
|
|
if (res.Ret === 200 && res.ErrCode === 0) {
|
|
|
const { detail, authorInfo } = res.data
|
|
@@ -66,7 +71,9 @@ async function getReportInfo() {
|
|
|
layoutBaseInfo.value['研报标题'] = reportInfo.value.title
|
|
|
layoutBaseInfo.value['研报作者'] = reportInfo.value.author
|
|
|
layoutBaseInfo.value['创建时间'] = reportInfo.value.publishTime
|
|
|
-
|
|
|
+ isSubscribe.value=res.data.isSubscribe
|
|
|
+ isFree.value=res.data.isFree
|
|
|
+ subscribeStatus.value=res.data.subscribeStatus
|
|
|
getAuthorFollowState()
|
|
|
nextTick(() => {
|
|
|
handlePreviewImgs()
|
|
@@ -177,6 +184,12 @@ function handleGoTestRisk(){
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+//跳转购买
|
|
|
+function goPrimary(){
|
|
|
+ wx.miniProgram.reLaunch({
|
|
|
+ url: `/pages-order/payPage/index?id=${productId.value}`
|
|
|
+ })
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -351,6 +364,35 @@ function handleGoTestRisk(){
|
|
|
</template>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="no-auth-wrap" v-else-if="!isSubscribe && !isFree">
|
|
|
+ <div class="opcity-box"></div>
|
|
|
+ <div class="content-box subscribe-box">
|
|
|
+ <img class="icon subscribe" src="@/assets/imgs/lock.png" alt="" />
|
|
|
+ <div class="text" v-if="subscribeStatus==='expired'">您的权限已过期<br>若需继续查看可点击【立即订阅】</div>
|
|
|
+ <div class="text" v-if="subscribeStatus==='unSubscribe'">您暂无阅读权限<br>若感兴趣请点击【立即订阅】</div>
|
|
|
+ <!-- <div class="text" v-if="subscribeStatus==='unMatch'">您的风险等级无法查看此内容<br>请查看其他内容</div> -->
|
|
|
+ <!-- <t-button
|
|
|
+ theme="primary"
|
|
|
+ block
|
|
|
+ @click="handleGoTestRisk"
|
|
|
+ >风险测评</t-button
|
|
|
+ > -->
|
|
|
+ <div class="pay-btn">
|
|
|
+ <div class="pay-btn-confirm">
|
|
|
+ <div class="pay-btn-money">
|
|
|
+ <span>合计</span>
|
|
|
+ <span class="pay">¥{{ reportInfo.price }}</span>
|
|
|
+ </div>
|
|
|
+ <t-button
|
|
|
+ class="btn"
|
|
|
+ theme="primary"
|
|
|
+ block
|
|
|
+ @click="goPrimary"
|
|
|
+ >提交订单</t-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 免责声明 -->
|
|
|
<disclaimers-wrap v-model:show="isShowMZSM" />
|
|
|
</template>
|
|
@@ -542,15 +584,71 @@ function handleGoTestRisk(){
|
|
|
}
|
|
|
.content-box {
|
|
|
background-color: #fff;
|
|
|
- padding-bottom: 200px;
|
|
|
+ padding-bottom: 240px;
|
|
|
text-align: center;
|
|
|
color: var(--primary-color);
|
|
|
}
|
|
|
+ .subscribe-box {
|
|
|
+ padding-bottom: 0;
|
|
|
+ }
|
|
|
|
|
|
.icon {
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+ .subscribe {
|
|
|
+ width: 50%;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ }
|
|
|
+ .pay-btn {
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 16px;
|
|
|
+ padding: 60px 40px 40px 40px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: center;
|
|
|
+ // position: absolute;
|
|
|
+ // bottom: 0;
|
|
|
+ .pay-btn-cancel {
|
|
|
+ color: #0078E8;
|
|
|
+ font-size: 28px;
|
|
|
+ }
|
|
|
+ .pay-btn-confirm{
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: center;
|
|
|
+ .pay-btn-money {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 32px;
|
|
|
+ text-align: right;
|
|
|
+ color: #999999;
|
|
|
+ margin-right: 20px;
|
|
|
+ .pay{
|
|
|
+ font-size: 36px;
|
|
|
+ color: #e54d42;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+
|
|
|
+ width: 40%;
|
|
|
+ border-radius: 80px;
|
|
|
+ }
|
|
|
+ // button {
|
|
|
+ // margin: 0;
|
|
|
+ // width: 268px;
|
|
|
+ // height: 80px;
|
|
|
+ // line-height: 80px;
|
|
|
+ // border-radius: 80px;
|
|
|
+ // background-color: #0078E8;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|