reportDetail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. <template>
  2. <block>
  3. <view class="container reportDetail-container">
  4. <block v-if="haveAuth === 1">
  5. <!-- 链接地址 -->
  6. <web-view :src="linkurl + '?id=' + id + '&fromType=mpwechat&token=' + access_token + '&IsSendWx=' + isSendWx + '&isBinding=' + isUserBindingPhoneNumber"></web-view>
  7. </block>
  8. <view class="noauth-cont" v-else-if="haveAuth === 2 || haveAuth === 3 || haveAuth === 4 || haveAuth === 5">
  9. <block v-if="isSpecialArticle_report">
  10. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  11. <view class="tip" v-if="haveAuth === 3">
  12. 需要升级行业套餐权限才可查看此报告,请联系对口销售
  13. <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
  14. </view>
  15. </block>
  16. <block v-else>
  17. <block v-if="!isShowAlert">
  18. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  19. <block v-if="haveAuth !== 3">
  20. <view v-if="reportInfo.IsResearch" class="research-noauth">
  21. 暂无 <text class="strong-text">买方研选</text> 权限
  22. <text style="margin-bottom: 30rpx"> 您可申请开通试用 </text>
  23. </view>
  24. <view class="tip" v-else>您暂无权限查看此报告内容,若想查看可以申请开通对应的试用权限</view>
  25. <view class="btn-cont" @click="applyAuth">{{ isShowAlert ? "立即上传" : "立即申请" }} </view>
  26. </block>
  27. <view class="tip" v-if="haveAuth === 3">
  28. <view v-if="reportInfo.IsResearch" class="research-noauth">
  29. 暂无 <text class="strong-text">买方研选</text> 权限
  30. <text> 点击提交申请,提醒对口销售为你开通试用 </text>
  31. </view>
  32. <block v-else>
  33. 您暂无权限查看此报告内容
  34. <view class="contract">
  35. 若想查看可以联系对口销售
  36. <text @click="callPhone(reportInfo.SellerMobile)">
  37. {{ reportInfo.SellerName }}:<text style="color: #d4bf86">{{ reportInfo.SellerMobile }}</text>
  38. </text>
  39. </view>
  40. <view>申请开通对应的试用权限</view>
  41. </block>
  42. </view>
  43. <view v-if="haveAuth === 3" class="btn-cont" @click="sellerApplyAuth"> {{ isShowText ? "提交申请" : "立即申请" }}</view>
  44. <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
  45. <view class="product-introduction-box" v-if="reportInfo.IsResearch">
  46. <view class="product-introduction">
  47. <view class="introduction-header">
  48. <view class="introduction-header-left"></view>
  49. <view class="introduction-header-right">
  50. <view class="introduction-title-CN"> 产品介绍 </view>
  51. <view class="introduction-title-US"> Product Introduction </view>
  52. </view>
  53. </view>
  54. <view class="introduction-body">
  55. <view class="introduction-body-box">
  56. <view class="body-box-title"> 独家亮点 </view>
  57. <view class="introduction-body-row"><span class="highHight-text">市场低价访谈优质专家 </span></view>
  58. <view class="introduction-body-row">重点公司小范围交流<span class="highHight-text">破圈</span>参加</view>
  59. <view class="introduction-body-row"><span class="highHight-text">海量</span>调研过程及纪要共享</view>
  60. </view>
  61. <view class="introduction-body-box">
  62. <view class="body-box-title"> 优质资源 </view>
  63. <view class="introduction-body-row"><span class="highHight-text">500+</span>篇/年调研纪要更新</view>
  64. <view class="introduction-body-row"><span class="highHight-text">300+</span>场/年海内外重点公司小范围交流</view>
  65. <view class="introduction-body-row"><span class="highHight-text">100+</span>场/年热点线下调研</view>
  66. <view class="introduction-body-row"><span class="highHight-text">30000+</span>名优质行业专家长期合作</view>
  67. </view>
  68. <view class="introduction-body-box">
  69. <view class="body-box-title" style="margin-bottom: 18rpx"> 服务报价 </view>
  70. <view class="body-row-content">
  71. <view class="body-row-title"> 订阅包:3万/年 </view>
  72. <view class="introduction-body-row">无限量调研纪要及常规研选专栏查阅,公开活动参与</view>
  73. </view>
  74. <view class="body-row-content">
  75. <view class="body-row-title"> 扣点包:5万/年 </view>
  76. <view class="introduction-body-row">低至2000元/场专家、同业访谈</view>
  77. <view class="introduction-body-row">1000元/场重点公司小范围交流</view>
  78. </view>
  79. <view style="font-size: 26rpx">欢迎联系买方研选,了解更多服务详情,获取试用体验</view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </block>
  85. <block v-else>
  86. <text class="moneh-text"> 上传名片并填写简单信息,24小时内我们会为您开通一个月的免费月卡 </text>
  87. <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/month_card.png" class="month_card" alt="" />
  88. <view class="btn-cont btn-dl" @click="applyAuth"> 立即上传 </view>
  89. <view class="btn-cont month-back" @click="backIndex"> 返回</view>
  90. </block>
  91. </block>
  92. </view>
  93. </view>
  94. <Loading />
  95. </block>
  96. </template>
  97. <script>
  98. import { Report, User, Reports, FreeButton } from "@/config/api.js";
  99. import { reportLinkUrl } from "@/config/config";
  100. import notHaveLogin from "@/components/notHaveLogin.vue";
  101. export default {
  102. components: { notHaveLogin },
  103. data() {
  104. return {
  105. access_token: "", //用户标识
  106. reportInfo: "",
  107. id: "",
  108. readTiem: 0,
  109. setIntervalTiem: null,
  110. isShowAlert: false,
  111. haveAuth: 1,
  112. isSpecialArticle_report: false,
  113. isSendWx: "",
  114. };
  115. },
  116. computed: {
  117. linkurl() {
  118. return reportLinkUrl;
  119. },
  120. isShowText() {
  121. return this.haveAuth === 3 && this.reportInfo.IsResearch;
  122. },
  123. },
  124. methods: {
  125. /* 获取详情 */
  126. getDetail() {
  127. Report.reportDtl({
  128. ArticleId: this.id,
  129. PageRouter: this.$store.state.pageRouterReport,
  130. IsSendWx: this.isSendWx,
  131. }).then((res) => {
  132. if (res.Ret === 200) {
  133. this.$store.commit("setRouterReport", "报告详情");
  134. uni.setNavigationBarTitle({
  135. title: res.Data.Detail.IsSummary == 1 ? "纪要详情" : "报告详情",
  136. });
  137. this.haveAuth = res.Data.HasPermission;
  138. this.haveAuth == 1 && this.setDisableCapture();
  139. this.isShowWriter = res.Data.IsShow;
  140. this.isSpecialArticle_report = res.Data.IsSpecialArticle;
  141. this.reportInfo = res.Data.Detail;
  142. if (res.Data.HasPermission === 1) {
  143. //有访问权限
  144. if (res.Data.Detail.IsNeedJump) {
  145. uni.redirectTo({
  146. url: "/pageMy/reportPage/reportPage?id=" + this.id + "&IsSendWx=" + this.isSendWx,
  147. });
  148. }
  149. this.access_token = this.access_token || this.$db.get("access_token");
  150. this.$store.dispatch("statistics", { PageType: "ReportParticulars", DetailId: this.id + "" });
  151. }
  152. }
  153. });
  154. },
  155. /* 无权限申请开通权限 */
  156. applyAuth() {
  157. /* 区分是否是潜在用户 */
  158. this.haveAuth === 2
  159. ? User.applyTry({
  160. ApplyMethod: 3,
  161. TryType: "Article",
  162. DetailId: this.id,
  163. }).then((res) => {
  164. if (res.Ret === 200) {
  165. uni.navigateTo({
  166. url: "/pageMy/applyResult/applyResult",
  167. });
  168. }
  169. })
  170. : this.haveAuth === 4
  171. ? uni.navigateTo({
  172. url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
  173. })
  174. : uni.showModal({
  175. title: "",
  176. content: "您已经提交过申请了,请耐心等待",
  177. showCancel: false,
  178. confirmColor: "#365595",
  179. success: function (res) {},
  180. });
  181. },
  182. // 销售的立即申请
  183. sellerApplyAuth() {
  184. User.applyTry({
  185. TryType: "Article",
  186. DetailId: this.id,
  187. }).then((res) => {
  188. if (res.Ret === 200) {
  189. uni.showModal({
  190. title: "",
  191. content: "提交申请成功,请耐心等待",
  192. showCancel: false,
  193. confirmColor: "#365595",
  194. success: function (res) {
  195. this.backIndex();
  196. },
  197. });
  198. }
  199. });
  200. },
  201. // 返回首頁
  202. backIndex() {
  203. uni.navigateBack({
  204. fail() {
  205. uni.switchTab({
  206. url: "/pages/index/index",
  207. });
  208. },
  209. });
  210. },
  211. // 拨打电话
  212. callPhone(num) {
  213. uni.makePhoneCall({
  214. phoneNumber: num,
  215. });
  216. },
  217. /* 申请访谈 */
  218. applyHandle() {
  219. // 申请访谈
  220. !this.reportInfo.IsInterviewApply &&
  221. this.$util.modal("", "专家访谈申请会提交给您的对口销售,销售会线下与您取得联系,确定申请吗?", () => {
  222. this.interviewApi();
  223. });
  224. // 取消申请访谈 区分状态 '待邀请','待访谈','已完成','已取消'
  225. if (this.reportInfo.IsInterviewApply) {
  226. // this.reportInfo.InterviewApplyStatus
  227. this.$util.modal(
  228. "",
  229. this.reportInfo.InterviewApplyStatus == "待访谈"
  230. ? "当前无法取消访谈,若有疑问,请联系对口销售"
  231. : this.reportInfo.InterviewApplyStatus == "待邀请"
  232. ? "您要取消此次访谈申请吗?"
  233. : "该访谈已完成",
  234. () => {
  235. this.reportInfo.InterviewApplyStatus == "待邀请"
  236. ? this.interviewApi()
  237. : this.reportInfo.InterviewApplyStatus == "待访谈"
  238. ? uni.makePhoneCall({
  239. phoneNumber: "18767183922",
  240. })
  241. : "";
  242. }
  243. );
  244. }
  245. },
  246. /* 访谈接口 */
  247. interviewApi() {
  248. Report.applyRpt({
  249. ArticleId: this.id,
  250. }).then((res) => {
  251. this.reportInfo.IsInterviewApply = !this.reportInfo.IsInterviewApply;
  252. });
  253. },
  254. /* 收藏 */
  255. collectHandle() {
  256. Report.collectRpt({
  257. ArticleId: this.id,
  258. PageRouter: this.$store.state.pageRouterReport,
  259. }).then((res) => {
  260. this.reportInfo.IsCollect = !this.reportInfo.IsCollect;
  261. this.$util.toast(res.Msg);
  262. });
  263. },
  264. /* 错误 */
  265. errorDetails() {
  266. uni.showModal({
  267. confirmText: "知道了",
  268. showCancel: false,
  269. confirmColor: "#376cbb",
  270. content: "网络不好,请刷新重试",
  271. success: (res) => {
  272. uni.navigateBack({
  273. fail() {
  274. uni.switchTab({
  275. url: "/pages/index/index",
  276. });
  277. },
  278. });
  279. },
  280. });
  281. },
  282. // 获取权限弹窗是否展示免费月卡接口
  283. async userIsShowAlert() {
  284. const res = await FreeButton.userIsShowAlert();
  285. if (res.Ret === 200) {
  286. this.isShowAlert = res.Data.IsShow;
  287. }
  288. },
  289. /* 跳转研选 */
  290. goRouterResearch(type) {
  291. if (type == "介绍") {
  292. uni.navigateTo({
  293. url: "/pages-purchaser/productIntroduction/productIntroduction",
  294. });
  295. } else {
  296. uni.navigateTo({
  297. url: "/pages-purchaser/ProductQuotation/ProductQuotation",
  298. });
  299. }
  300. },
  301. setDisableCapture() {
  302. wx.setVisualEffectOnCapture({
  303. visualEffect: "hidden",
  304. complete: (res) => {
  305. console.log(res);
  306. },
  307. });
  308. },
  309. closeDisableCapture() {
  310. wx.setVisualEffectOnCapture({
  311. visualEffect: "none",
  312. });
  313. },
  314. },
  315. async onShow() {
  316. this.readTiem = 0;
  317. this.setIntervalTiem = setInterval(() => {
  318. this.readTiem++;
  319. }, 1000);
  320. let page = getCurrentPages(); //查看路径
  321. if (page.length === 1) {
  322. if (!this.$store.state.isAuth && !this.$store.state.isBind && this.id > 0) this.getDetail();
  323. } else {
  324. // 跳转入口
  325. this.id > 0 && this.getDetail();
  326. }
  327. },
  328. onLoad(option) {
  329. this.id = option.id ? +option.id : "";
  330. this.isSendWx = option.IsSendWx || "";
  331. if (!this.id && !this.id > 0) {
  332. this.errorDetails();
  333. }
  334. // 免费送月卡
  335. // this.userIsShowAlert();
  336. },
  337. /**
  338. * 用户点击分享
  339. */
  340. onShareAppMessage: function (res) {
  341. if (this.id) {
  342. return {
  343. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.reportInfo.Title,
  344. path: "/pageMy/reportDetail/reportDetail?id=" + this.id,
  345. success: (res) => {},
  346. fail: (err) => {},
  347. };
  348. }
  349. },
  350. onHide() {
  351. //页面退出
  352. if (this.id && this.id > 0) {
  353. clearInterval(this.setIntervalTiem);
  354. Reports.addStopTime({
  355. ArticleId: this.id,
  356. StopTime: this.readTiem,
  357. OutType: 2,
  358. Source: "MOBILE",
  359. }).then((res) => {});
  360. }
  361. this.closeDisableCapture()
  362. },
  363. onUnload() {
  364. if (this.id && this.id > 0) {
  365. //页面返回
  366. clearInterval(this.setIntervalTiem);
  367. Reports.addStopTime({
  368. ArticleId: this.id,
  369. StopTime: this.readTiem,
  370. OutType: 1,
  371. Source: "MOBILE",
  372. }).then((res) => {});
  373. }
  374. this.closeDisableCapture()
  375. },
  376. };
  377. </script>
  378. <style lang="scss" scoped>
  379. .reportDetail-container {
  380. background-color: #fff;
  381. padding: 20rpx 0 134rpx;
  382. .report-top {
  383. color: #999999;
  384. .report-title {
  385. color: #4a4a4a;
  386. font-size: 34rpx;
  387. }
  388. .report_desc {
  389. display: flex;
  390. justify-content: space-between;
  391. align-items: center;
  392. margin: 20rpx 0;
  393. }
  394. .tip {
  395. color: #586eb5;
  396. display: inline;
  397. }
  398. }
  399. .detail-report {
  400. padding: 40rpx 0;
  401. }
  402. .statement {
  403. max-width: 670rpx;
  404. max-height: 900rpx;
  405. line-height: 42rpx;
  406. overflow-y: auto;
  407. padding: 40rpx;
  408. }
  409. .fixed_cont {
  410. width: 100%;
  411. // height: 114rpx;
  412. padding: 10rpx 0;
  413. position: fixed;
  414. bottom: 0;
  415. left: 0;
  416. z-index: 99999;
  417. display: flex;
  418. justify-content: center;
  419. align-items: center;
  420. flex-direction: row;
  421. background-color: #fff;
  422. box-shadow: 0 -3rpx 6rpx rgba($color: #6a6a6a, $alpha: 0.16);
  423. .handle-item {
  424. font-size: 24rpx;
  425. color: #d0cfd5;
  426. text-align: center;
  427. margin-right: 130rpx;
  428. &:last-child {
  429. margin-right: 0;
  430. }
  431. .img_ico {
  432. width: 56rpx;
  433. height: 54rpx;
  434. margin: 0 auto;
  435. }
  436. }
  437. .button-item {
  438. background-color: transparent;
  439. line-height: normal;
  440. }
  441. }
  442. .noauth-cont {
  443. padding-top: 170rpx;
  444. text-align: center;
  445. font-size: 28rpx;
  446. .noauth-ico {
  447. width: 365rpx;
  448. height: 229rpx;
  449. margin-bottom: 70rpx;
  450. }
  451. .tip {
  452. width: 532rpx;
  453. margin: 0 auto 100rpx;
  454. .contract {
  455. padding: 40rpx 90rpx 0;
  456. line-height: 44rpx;
  457. text {
  458. display: inline-block;
  459. }
  460. }
  461. }
  462. .btn-cont {
  463. width: 500rpx;
  464. height: 52rpx;
  465. background: $uni-color-new;
  466. color: #fff;
  467. font-size: 24rpx;
  468. font-weight: 600;
  469. border-radius: 8rpx;
  470. margin: 0 auto;
  471. text-align: center;
  472. line-height: 52rpx;
  473. &.back-btn {
  474. background: #e5efff !important;
  475. color: $uni-color-new;
  476. margin-top: 30rpx;
  477. }
  478. .btn_bg {
  479. width: 100%;
  480. height: 80rpx;
  481. position: absolute;
  482. left: 0;
  483. top: 0;
  484. }
  485. .btn-txt {
  486. width: 100%;
  487. position: absolute;
  488. z-index: 1;
  489. }
  490. }
  491. .product-introduction-box {
  492. background-color: $uni-bg-color;
  493. padding-top: 10rpx;
  494. margin-top: 60rpx;
  495. .product-introduction {
  496. padding: 60rpx 0 0 60rpx;
  497. background-color: white;
  498. .introduction-header {
  499. margin-bottom: 40rpx;
  500. display: flex;
  501. .introduction-header-left {
  502. background-color: #caaf8b;
  503. height: 90rpx;
  504. width: 14rpx;
  505. margin-right: 20rpx;
  506. }
  507. .introduction-header-right {
  508. text-align: left;
  509. .introduction-title-CN {
  510. font-weight: 500;
  511. font-size: 34rpx;
  512. color: #333333;
  513. line-height: 42rpx;
  514. margin-bottom: 8rpx;
  515. }
  516. .introduction-title-US {
  517. font-weight: 400;
  518. font-size: 28rpx;
  519. color: #c0c4cc;
  520. line-height: 42rpx;
  521. }
  522. }
  523. }
  524. .introduction-body {
  525. .introduction-body-box {
  526. text-align: left;
  527. margin-bottom: 40rpx;
  528. .body-row-content {
  529. margin-bottom: 40rpx;
  530. font-size: 34rpx;
  531. line-height: 48rpx;
  532. font-weight: 600;
  533. color: #caaf8b;
  534. .body-row-title {
  535. margin-left: 40rpx;
  536. }
  537. }
  538. .body-box-title {
  539. font-weight: 600;
  540. font-size: 34rpx;
  541. line-height: 48rpx;
  542. padding-left: 40rpx;
  543. position: relative;
  544. margin-bottom: 22rpx;
  545. &::before {
  546. content: "";
  547. height: 20rpx;
  548. width: 20rpx;
  549. background-color: #caaf8b;
  550. border-radius: 20rpx;
  551. position: absolute;
  552. left: 0;
  553. top: 16rpx;
  554. }
  555. }
  556. .introduction-body-row {
  557. margin-left: 40rpx;
  558. font-weight: 400;
  559. font-size: 26rpx;
  560. color: #333333;
  561. line-height: 36rpx;
  562. }
  563. .highHight-text {
  564. color: #caaf8b;
  565. }
  566. }
  567. }
  568. }
  569. }
  570. }
  571. .month_card {
  572. width: 100%;
  573. height: 565rpx;
  574. padding-left: -20rpx;
  575. }
  576. .btn-dl {
  577. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  578. color: #333 !important;
  579. margin: 30rpx auto !important;
  580. }
  581. .month-back {
  582. background: #f6f6f6 !important;
  583. color: #999 !important;
  584. }
  585. .moneh-text {
  586. text-align: center;
  587. width: 632rpx;
  588. margin: 0 auto 20rpx;
  589. color: #999999;
  590. }
  591. .research-noauth {
  592. color: #333;
  593. font-size: 36rpx;
  594. width: calc(100% + 80rpx);
  595. margin-left: -40rpx;
  596. .strong-text {
  597. display: inline-block;
  598. padding: 0 10rpx;
  599. font-weight: 500;
  600. }
  601. text:last-child {
  602. font-size: 32rpx;
  603. font-size: 34rpx;
  604. color: #999999;
  605. margin-top: 10rpx;
  606. }
  607. }
  608. // .research-btn {
  609. // display: flex;
  610. // align-items: center;
  611. // font-size: 32rpx;
  612. // width: 546rpx;
  613. // height: 78rpx;
  614. // margin: 30rpx auto;
  615. // background: #f8f8fa;
  616. // border-radius: 4rpx;
  617. // padding-left: 40rpx;
  618. // /* 字体/333 */
  619. // image {
  620. // width: 40rpx;
  621. // height: 40rpx;
  622. // margin-right: 10rpx;
  623. // }
  624. // }
  625. }
  626. </style>