|
@@ -29,6 +29,19 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 无权限 -->
|
|
|
+ <view class="no-auth-box" v-if="!info.auth_ok">
|
|
|
+ <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix"></image>
|
|
|
+ <view class="apply-box" v-if="info.permission_check.type=='apply'">
|
|
|
+ <view>您暂无权限查看报告,若想查看请申请开通</view>
|
|
|
+ <view class="btn" @click="handleGoApply">立即申请</view>
|
|
|
+ </view>
|
|
|
+ <view class="apply-box" v-else>
|
|
|
+ <view>您暂无权限查看报告 </view>
|
|
|
+ <view>若想查看请联系对口销售:{{info.permission_check.name}}</view>
|
|
|
+ <view class="btn" @click="handleContact">立即联系</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 报告详情 -->
|
|
@@ -39,7 +52,8 @@
|
|
|
<text>{{formatTime(info.report_info.publish_time)}}</text>
|
|
|
</view>
|
|
|
<view class="flex audio-wrap">
|
|
|
- <image src="" mode="aspectFill"/>
|
|
|
+ <image style="opacity:0.3" src="./static/audio-pause.png" mode="aspectFill" v-if="!info.auth_ok"/>
|
|
|
+ <image src="./static/audio-pause.png" mode="aspectFill" v-else/>
|
|
|
<view>
|
|
|
<view>{{info.report_info.video_name}}</view>
|
|
|
<view style="color:#999999">{{info.report_info.video_play_seconds|formatVoiceTime}}</view>
|
|
@@ -51,12 +65,26 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="rich-content">
|
|
|
- <mp-html :content="info.report_info.content"/>
|
|
|
+ <mp-html :content="info.report_info.content" v-if="info.auth_ok" />
|
|
|
+ <mp-html :content="info.report_info.content_sub" v-else />
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 无权限 -->
|
|
|
+ <view class="no-auth-wrap" v-if="!info.auth_ok">
|
|
|
+ <view class="apply-box" v-if="info.permission_check.type=='apply'">
|
|
|
+ <view>您暂无权限查看报告,若想查看请申请开通</view>
|
|
|
+ <view class="btn" @click="handleGoApply">立即申请</view>
|
|
|
+ </view>
|
|
|
+ <view class="apply-box" v-else>
|
|
|
+ <view>您暂无权限查看报告 </view>
|
|
|
+ <view>若想查看请联系对口销售:{{info.permission_check.name}}</view>
|
|
|
+ <view class="btn" @click="handleContact">立即联系</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 返回顶部 -->
|
|
|
<image v-if="" @click="handleBackTop" class="back-top-img" src="./static/back-top.png" mode="aspectFill"/>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
|
|
|
<!-- 免责声明 -->
|
|
|
<van-popup :show="showDisclaimers" @close="showDisclaimers=false" round closeable>
|
|
@@ -68,6 +96,18 @@
|
|
|
<view style="margin-bottom:10rpx">4、在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。</view>
|
|
|
</view>
|
|
|
</van-popup>
|
|
|
+
|
|
|
+ <!-- 申请提示弹窗 -->
|
|
|
+ <van-popup :show="pupData.show" @close="pupData.show=false" :close-on-click-overlay="false">
|
|
|
+ <view class="global-pup">
|
|
|
+ <view class="content">
|
|
|
+ <rich-text :nodes="pupData.content"></rich-text>
|
|
|
+ </view>
|
|
|
+ <view class="flex bot">
|
|
|
+ <view @click="pupData.show=false">知道了</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </van-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -75,42 +115,74 @@
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
moment.locale('zh-cn');
|
|
|
import {apiReportDetail} from '@/api/report'
|
|
|
+import {apiApplyPermission} from '@/api/user'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
showDisclaimers:false,//显示免责声明
|
|
|
- html:'<h1>Hello World!</h1>',
|
|
|
reportId:0,
|
|
|
info:null,
|
|
|
- chapterList:[]
|
|
|
+ chapterList:[],
|
|
|
+ pupData:{
|
|
|
+ show:false,
|
|
|
+ content:'',//弹窗html字符串
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.reportId=options.reportId
|
|
|
this.getDetail()
|
|
|
},
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.getDetail()
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ }, 1500);
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ //获取报告详情
|
|
|
async getDetail(){
|
|
|
const res=await apiReportDetail({report_id:Number(this.reportId)})
|
|
|
if(res.code===200){
|
|
|
this.info=res.data
|
|
|
this.chapterList=res.data.report_chapter_list
|
|
|
uni.setNavigationBarTitle({ title: res.data.report_info.classify_name_first })
|
|
|
+ if(!res.data.auth_ok){
|
|
|
+ // 获取详情如果为联系销售根据判断条件是否主动申请一次
|
|
|
+ if(this.info.permission_check.type=='contact'&&!this.info.permission_check.customer_info.has_apply){
|
|
|
+ if(this.info.permission_check.customer_info.status=='冻结'||(this.info.permission_check.customer_info.status=='试用'&&this.info.permission_check.customer_info.is_suspend==1)){
|
|
|
+ apiApplyPermission({
|
|
|
+ company_name:this.info.permission_check.customer_info.company_name,
|
|
|
+ real_name:this.info.permission_check.customer_info.name,
|
|
|
+ source:4,
|
|
|
+ from_page:'报告详情'
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.code===200){
|
|
|
+ console.log('主动申请成功');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
+ //返回顶部
|
|
|
handleBackTop(){
|
|
|
uni.pageScrollTo({ scrollTop: 0 })
|
|
|
},
|
|
|
|
|
|
+ //跳转章节详情
|
|
|
goChapterDetail(item){
|
|
|
uni.navigateTo({ url: '/pages-report/chapterDetail?chapterId='+item.report_chapter_id })
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
+ // 格式化时间
|
|
|
formatTime(time){
|
|
|
return moment(time).format('YYYY-MM-DD HH:mm:ss')
|
|
|
},
|
|
|
|
|
|
+ // 格式化章节列表时间
|
|
|
formatChapterTime(time,type){
|
|
|
if(type==='day'){
|
|
|
return moment(time).format('DD')
|
|
@@ -124,7 +196,43 @@ export default {
|
|
|
if(type==='year-month-day'){
|
|
|
return moment(time).format('YYYY-MM-DD')
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 联系销售
|
|
|
+ handleContact(){
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: this.info.permission_check.mobile
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ //点击申请
|
|
|
+ async handleGoApply(){
|
|
|
+ if(this.info.permission_check.type=='apply'){
|
|
|
+ if(this.info.permission_check.customer_info.has_apply){// 已经申请过
|
|
|
+ this.pupData.show=true
|
|
|
+ this.pupData.content=`<p>您已提交过申请,请耐心等待</p>`
|
|
|
+ }else{
|
|
|
+ if(!this.info.permission_check.customer_info.status||this.info.permission_check.customer_info.status!='流失'){
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages-applyPermission/applyPermission?source=4&from_page=报告详情"
|
|
|
+ })
|
|
|
+ }else{//主动调一次申请权限接口
|
|
|
+ const res=await apiApplyPermission({
|
|
|
+ company_name:this.info.permission_check.customer_info.company_name,
|
|
|
+ real_name:this.info.permission_check.customer_info.name,
|
|
|
+ source:4,
|
|
|
+ from_page:'报告详情'
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ this.pupData.show=true
|
|
|
+ this.pupData.content=`<p>申请已提交</p><p>请等待销售人员与您联系</p>`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -155,7 +263,6 @@ export default {
|
|
|
width: 110rpx;
|
|
|
height: 110rpx;
|
|
|
display: block;
|
|
|
- background-color: rgb(233, 230, 230);
|
|
|
margin-right: 16rpx;
|
|
|
}
|
|
|
}
|
|
@@ -185,6 +292,29 @@ export default {
|
|
|
font-size: 32rpx;
|
|
|
}
|
|
|
|
|
|
+ .no-auth-wrap{
|
|
|
+ min-height: 200rpx;
|
|
|
+ background: linear-gradient(360deg, #FFFFFF 60%, rgba(255, 255, 255, 0) 88%);
|
|
|
+ position: relative;
|
|
|
+ top: -150rpx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #E3B377;
|
|
|
+ .apply-box{
|
|
|
+ padding-top: 250rpx;
|
|
|
+ }
|
|
|
+ .btn{
|
|
|
+ width: 100%;
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: auto;
|
|
|
+ line-height: 80rpx;
|
|
|
+ background-color: #E6B77D;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 100rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.back-top-img{
|
|
|
position: fixed;
|
|
|
z-index: 99;
|
|
@@ -238,7 +368,7 @@ export default {
|
|
|
margin-top: -50rpx;
|
|
|
border-top-left-radius: 40rpx;
|
|
|
border-top-right-radius: 40rpx;
|
|
|
- min-height: 200rpx;
|
|
|
+ min-height: 100rpx;
|
|
|
background-color: #fff;
|
|
|
position: relative;
|
|
|
z-index: 2;
|
|
@@ -282,6 +412,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .no-auth-box{
|
|
|
+ text-align: center;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #E3B377;
|
|
|
+ img{
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 50rpx;
|
|
|
+ }
|
|
|
+ .btn{
|
|
|
+ width: 90%;
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: auto;
|
|
|
+ line-height: 80rpx;
|
|
|
+ background-color: #E6B77D;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 100rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|