123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- <template>
- <block>
- <block v-if="hasPermission === 1">
- <view class="container internal-detials" v-if="haveData">
- <web-view :src="linkurl + '?id=' + reportId + '&token=' + access_token + '&isBinding=' + isUserBindingPhoneNumber"></web-view>
- </view>
- <view class="nodata" v-else>
- <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/report_loading_icon.png" class="nodata_img"></image>
- <view class="nodata-tip">正在努力编辑中,请耐心等待...</view>
- </view>
- </block>
- <view class="noauth-cont" v-else-if="hasPermission == 3 || hasPermission == 4">
- <block v-if="!isShowAlert">
- <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
- <block>
- <view class="tip">您暂无权限查看此文章内容,若想查看可以申请开通哦</view>
- <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
- </block>
- <view class="btn-cont back-btn" @click="backIndex"> 返回首页 </view>
- </block>
- <block v-else>
- <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
- <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
- <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
- <view class="btn-cont month-back" @click="backIndex"> 返回</view>
- </block>
- </view>
- <Loading />
- </block>
- </template>
- <script>
- import { Reports } from "@/config/api.js";
- import statement from "@/reportPages/components/statement.vue";
- import { intemalLinkUrl } from "@/config/config.js";
- export default {
- data() {
- return {
- reportDetail: {},
- isShowStatement: false,
- haveData: true,
- hasPermission: "",
- reportId: 0,
- titleTxT: "",
- access_token: "",
- };
- },
- computed: {
- linkurl() {
- return intemalLinkUrl;
- },
- },
- components: { statement },
- methods: {
- async reportSelectionDetail() {
- const res = await Reports.getProductInteriorDetail({
- ProductInteriorId: this.reportId,
- });
- if (res.Ret === 200) {
- this.hasPermission = res.Data.HasPermission;
- this.reportDetail = res.Data.Detail;
- this.haveData = this.reportDetail ? true : false;
- this.titleTxT = this.reportDetail.ColumnName;
- uni.setNavigationBarTitle({
- title: this.titleTxT,
- });
- this.access_token = this.access_token || this.$db.get("access_token");
- } else {
- this.haveData = false;
- }
- },
- /* 无权限申请开通权限 */
- applyAuth() {
- this.hasPermission === 4
- ? uni.navigateTo({
- url: "/pageMy/applyTrial/applyTrial?tryType=ProductInterior&detailId=" + this.id,
- })
- : uni.showModal({
- title: "",
- content: "您已经提交过申请了,请耐心等待",
- showCancel: false,
- confirmColor: "#365595",
- success: function (res) {
- uni.navigateBack({
- fail() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- });
- },
- });
- },
- // 去往不同的详情页
- goIsTypeDetails(item) {
- if (item.Type == 1) return;
- switch (item.Type) {
- case 2:
- uni.navigateTo({
- url: "/pageMy/reportDetail/reportDetail?id=" + item.SourceId,
- });
- break;
- case 3:
- uni.navigateTo({
- url: "/activityPages/activityDetail/activityDetail?id=" + item.SourceId,
- });
- break;
- case 4:
- uni.navigateTo({
- url: "/reportPages/IndustryReport/IndustryReport?id=" + item.SourceId,
- });
- break;
- default:
- "";
- }
- },
- // 返回首頁
- backIndex() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- },
- onLoad(options) {
- this.reportId = Number(options.id) || "";
- this.reportId > 0 && this.reportSelectionDetail();
- },
- onShareAppMessage() {
- return {
- title: this.titleTxT,
- path: "/reportPages/internalDetials/internalDetials?id=" + this.reportId,
- };
- },
- };
- </script>
- <style lang="scss" scoped>
- .internal-detials {
- padding: 30rpx 34rpx;
- color: #333;
- font-size: 28rpx;
- .author-time {
- display: flex;
- justify-content: space-between;
- line-height: 39rpx;
- margin: 25rpx 0 35rpx;
- }
- .content-statement {
- display: flex;
- color: #707070;
- .statement {
- margin-left: 10rpx;
- color: #376cbb;
- }
- }
- .content-abstract {
- position: relative;
- margin: 30rpx 0 20rpx;
- text-indent: 0.5em;
- line-height: 50rpx;
- padding-bottom: 30rpx;
- border-bottom: 1rpx dashed #ececec;
- &::before {
- content: "";
- width: 4rpx;
- height: 28rpx;
- position: absolute;
- top: 11rpx;
- left: 0;
- background-color: #376cbb;
- }
- // .abstract {
- // display: inline-block;
- // }
- }
- .nodata-tip {
- color: #999;
- font-size: 30rpx;
- }
- }
- .noauth-cont {
- padding-top: 150rpx;
- text-align: center;
- font-size: 28rpx;
- .noauth-ico {
- width: 365rpx;
- height: 229rpx;
- margin-bottom: 70rpx;
- }
- .tip {
- width: 532rpx;
- margin: 0 auto 100rpx;
- .contract {
- padding: 40rpx 90rpx 0;
- line-height: 44rpx;
- text {
- display: inline-block;
- }
- }
- }
- .btn-cont {
- width: 500rpx;
- height: 52rpx;
- background: $uni-color-new;
- color: #fff;
- font-size: 24rpx;
- font-weight: 600;
- border-radius: 8rpx;
- margin: 0 auto;
- text-align: center;
- line-height: 52rpx;
- &.back-btn {
- background: #E5EFFF !important;
- color: $uni-color-new;
- margin-top: 30rpx;
- }
- .btn_bg {
- width: 100%;
- height: 80rpx;
- position: absolute;
- left: 0;
- top: 0;
- }
- .btn-txt {
- width: 100%;
- position: absolute;
- z-index: 1;
- }
- }
- }
- </style>
|