123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517 |
- <template>
- <block>
- <view class="container reportDetail-container">
- <block v-if="haveAuth == 1">
- <web-view :src="strategyUrl + '&isBinding=' + isUserBindingPhoneNumber"> </web-view>
- </block>
- <view class="noauth-cont" v-else>
- <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
- <view class="noauth-title">暂无权限查看此文章</view>
- <view v-if="haveAuth == 6 || haveAuth == 7" class="tip">您可申请开通试用</view>
- <view class="tip" v-else> 点击提交申请,提醒对口销售为你开通试用 </view>
- <view class="btn-cont" @click="applyAuth"> 提交申请</view>
- <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
- </view>
- </view>
- <Loading />
- </block>
- </template>
- <script>
- import { Report, User, Reports, FreeButton } from "@/config/api.js";
- import freeCharge from "@/components/freeCharge";
- import { ficcReport } from "@/config/config";
- let app = getApp({ allowDefault: true });
- export default {
- data() {
- return {
- readTiem: 0,
- access_token: "", //用户标识
- reportInfo: "",
- id: "",
- linkurl: "",
- setIntervalTiem: null,
- fileLink: false,
- isCollection: false,
- isInterviewApply: false,
- isShowTip: false,
- showNav: false,
- haveAuth: 1,
- isSendWx: "",
- lableListForm: {
- CategoryName: "",
- FieldName: "",
- Frequency: "月度",
- SubCategoryName: "渠道新声",
- },
- shareTitle: "",
- };
- },
- components: {
- freeCharge,
- },
- computed: {
- strategyUrl() {
- let token = this.$db.get("access_token");
- let link = `?id=${this.id}&fromType=mpwechat&token=${token}`;
- return ficcReport + link;
- },
- },
- methods: {
- /* 获取详情 */
- getDetail() {
- Reports.getFiccYbReportDetails({
- ReportId: this.id,
- }).then((res) => {
- if (res.Ret === 200) {
- this.haveAuth = res.Data.HasPermission;
- this.reportInfo = res.Data;
- this.shareTitle = this.reportInfo.report_info.title;
- }
- });
- },
- /* 无权限申请开通权限 */
- applyAuth() {
- /* 区分是否是潜在用户 */
- this.haveAuth === 3 || this.haveAuth === 5
- ? User.applyTry({
- ApplyMethod: 3,
- TryType: "ficcreport",
- DetailId: this.id,
- }).then((res) => {
- if (res.Ret === 200) {
- uni.navigateTo({
- url: "/pageMy/applyResult/applyResult",
- });
- }
- })
- : this.haveAuth === 7
- ? uni.navigateTo({
- url: "/pageMy/applyTrial/applyTrial?tryType=ficcreport&detailId=" + this.id,
- })
- : uni.showModal({
- title: "",
- content: "您已经提交过申请了,请耐心等待",
- showCancel: false,
- confirmColor: "#365595",
- success: function (res) {},
- });
- },
- // 返回首頁
- backIndex() {
- uni.navigateBack({
- fail() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- });
- },
- /* 错误 */
- errorDetails() {
- uni.showModal({
- confirmText: "知道了",
- showCancel: false,
- confirmColor: "#376cbb",
- content: "网络不好,请刷新重试",
- success: (res) => {
- uni.navigateBack({
- fail() {
- uni.switchTab({
- url: "/pages/index/index",
- });
- },
- });
- },
- });
- },
- Search() {
- uni.navigateTo({ url: "/pages-search/indedxSearch/indedxSearch?source=报告详情页面" });
- },
- setDisableCapture() {
- wx.setVisualEffectOnCapture({
- visualEffect: "hidden",
- complete: (res) => {
- console.log(res);
- },
- });
- },
- closeDisableCapture() {
- wx.setVisualEffectOnCapture({
- visualEffect: "none",
- });
- },
- },
- async onShow() {
- this.readTiem = 0;
- this.setIntervalTiem = setInterval(() => {
- this.readTiem++;
- }, 1000);
- let page = getCurrentPages(); //查看路径
- if (page.length === 1) {
- this.getDetail();
- } else {
- // 跳转入口
- this.id > 0 && this.getDetail();
- }
- },
- onLoad(option) {
- uni.setNavigationBarTitle({
- title: "报告详情",
- });
- this.id = option.id ? +option.id : "";
- this.isSendWx = option.IsSendWx || "";
- if (!this.id && !this.id > 0) {
- this.errorDetails();
- }
- },
- /**
- * 用户点击分享
- */
- onShareAppMessage: function (res) {
- if (this.id) {
- return {
- title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.shareTitle,
- path: "/pages-ficc/reportDetail/reportDetail?id=" + this.id,
- success: (res) => {},
- fail: (err) => {},
- };
- }
- },
- onHide() {
- //页面退出
- if (this.id && this.id > 0) {
- clearInterval(this.setIntervalTiem);
- Reports.addStopTime({
- ArticleId: this.reportInfo.report_info.ArticleId,
- StopTime: this.readTiem,
- OutType: 2,
- Source: "MOBILE",
- }).then((res) => {});
- }
- this.closeDisableCapture();
- },
- onUnload() {
- if (this.id && this.id > 0) {
- //页面返回
- clearInterval(this.setIntervalTiem);
- Reports.addStopTime({
- ArticleId: this.reportInfo.report_info.ArticleId,
- StopTime: this.readTiem,
- OutType: 1,
- Source: "MOBILE",
- }).then((res) => {});
- }
- this.closeDisableCapture();
- },
- };
- </script>
- <style lang="scss" scoped>
- .reportDetail-container {
- background-color: #fff;
- .search-view {
- position: fixed;
- width: 100%;
- height: 60rpx;
- background: #fff;
- z-index: 99999;
- font-size: 24rpx;
- box-sizing: border-box;
- .search-view-box {
- display: flex;
- align-items: center;
- justify-content: center;
- background: #376cbb;
- color: #fff;
- height: 60rpx;
- z-index: 99999;
- }
- .search-icon {
- width: 147rpx;
- height: 40rpx;
- margin: 0 15rpx;
- z-index: 99999;
- }
- }
- .footer-con {
- position: fixed;
- z-index: 99999;
- bottom: 0;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- left: 0;
- width: 100%;
- background-color: #ffffff;
- display: flex;
- justify-content: space-around;
- height: 100rpx;
- border-top: 1px solid #dddddd;
- .handle-item {
- align-items: center;
- display: flex;
- flex-direction: column;
- justify-content: center;
- position: relative;
- z-index: 99999;
- .download-img {
- width: 44rpx;
- height: 44rpx;
- margin-bottom: 4rpx;
- }
- }
- }
- .footer-free-charge {
- .img {
- width: 156rpx;
- height: 156rpx;
- }
- .remove-icon {
- width: 31rpx;
- height: 31rpx;
- position: absolute;
- right: 0;
- top: 0;
- }
- }
- .noauth-cont {
- padding-top: 170rpx;
- 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;
- }
- }
- .product-introduction-box {
- background-color: $uni-bg-color;
- padding-top: 10rpx;
- margin-top: 60rpx;
- .product-introduction {
- padding: 60rpx 0 0 60rpx;
- background-color: white;
- .introduction-header {
- margin-bottom: 40rpx;
- display: flex;
- .introduction-header-left {
- background-color: #caaf8b;
- height: 90rpx;
- width: 14rpx;
- margin-right: 20rpx;
- }
- .introduction-header-right {
- text-align: left;
- .introduction-title-CN {
- font-weight: 500;
- font-size: 34rpx;
- color: #333333;
- line-height: 42rpx;
- margin-bottom: 8rpx;
- }
- .introduction-title-US {
- font-weight: 400;
- font-size: 28rpx;
- color: #c0c4cc;
- line-height: 42rpx;
- }
- }
- }
- .introduction-body {
- .introduction-body-box {
- text-align: left;
- margin-bottom: 40rpx;
- .body-row-content {
- margin-bottom: 40rpx;
- font-size: 34rpx;
- line-height: 48rpx;
- font-weight: 600;
- color: #caaf8b;
- .body-row-title {
- margin-left: 40rpx;
- }
- }
- .body-box-title {
- font-weight: 600;
- font-size: 34rpx;
- line-height: 48rpx;
- padding-left: 40rpx;
- position: relative;
- margin-bottom: 22rpx;
- &::before {
- content: "";
- height: 20rpx;
- width: 20rpx;
- background-color: #caaf8b;
- border-radius: 20rpx;
- position: absolute;
- left: 0;
- top: 16rpx;
- }
- }
- .introduction-body-row {
- margin-left: 40rpx;
- font-weight: 400;
- font-size: 26rpx;
- color: #333333;
- line-height: 36rpx;
- }
- .highHight-text {
- color: #caaf8b;
- }
- }
- }
- }
- }
- }
- .month_card {
- width: 100%;
- height: 565rpx;
- padding-left: -20rpx;
- }
- .btn-dl {
- background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
- color: #333 !important;
- margin: 30rpx auto !important;
- }
- .month-back {
- background: #f6f6f6 !important;
- color: #999 !important;
- }
- .moneh-text {
- text-align: center;
- width: 632rpx;
- margin: 0 auto 20rpx;
- color: #999999;
- }
- .research-noauth {
- color: #333;
- font-size: 36rpx;
- width: calc(100% + 80rpx);
- margin-left: -40rpx;
- .strong-text {
- display: inline-block;
- padding: 0 10rpx;
- font-weight: 500;
- }
- text:last-child {
- font-size: 32rpx;
- font-size: 34rpx;
- color: #999999;
- margin-top: 10rpx;
- }
- }
- }
- .no-binding {
- padding: 30rpx;
- background-color: #f0f1f5;
- .lable-content {
- display: flex;
- flex-wrap: wrap;
- .item {
- font-size: 24rpx;
- height: 34rpx;
- padding: 0 16rpx;
- display: flex;
- align-items: center;
- border: 1rpx solid #ccc;
- border-radius: 2rpx;
- margin-right: 20rpx;
- margin-bottom: 20rpx;
- }
- }
- .no-binding-content {
- width: 100%;
- background-color: #fff;
- padding: 40rpx 20rpx;
- .title {
- font-size: 34rpx;
- font-weight: 500;
- line-height: 48rpx;
- color: #333;
- }
- .tiem {
- font-size: 24rpx;
- color: #999999;
- margin: 20rpx 0;
- }
- .content {
- display: flex;
- .content-line {
- width: 4rpx;
- background-color: #333;
- margin-right: 20rpx;
- }
- .content-text {
- font-size: 34rpx;
- font-weight: 500;
- color: #333;
- }
- .describe {
- margin-top: 20rpx;
- }
- }
- }
- .please-login {
- margin: 50rpx auto 150rpx;
- width: 556rpx;
- height: 64rpx;
- color: #fff;
- font-size: 24rpx;
- font-weight: 600;
- background-color: #376cbb;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 9rpx;
- }
- }
- .noauth-title {
- font-size: 32rpx;
- font-weight: 600;
- margin-bottom: 15rpx;
- }
- </style>
|