reportDetail.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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: false,
  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.isShowWriter = res.Data.IsShow;
  139. this.isSpecialArticle_report = res.Data.IsSpecialArticle;
  140. this.reportInfo = res.Data.Detail;
  141. if (res.Data.HasPermission === 1) {
  142. //有访问权限
  143. if (res.Data.Detail.IsNeedJump) {
  144. uni.redirectTo({
  145. url: "/pageMy/reportPage/reportPage?id=" + this.id + "&IsSendWx=" + this.isSendWx,
  146. });
  147. }
  148. this.access_token = this.access_token || this.$db.get("access_token");
  149. this.$store.dispatch("statistics", { PageType: "ReportParticulars", DetailId: this.id + "" });
  150. }
  151. }
  152. });
  153. },
  154. /* 无权限申请开通权限 */
  155. applyAuth() {
  156. /* 区分是否是潜在用户 */
  157. this.haveAuth === 2
  158. ? User.applyTry({
  159. ApplyMethod: 3,
  160. TryType: "Article",
  161. DetailId: this.id,
  162. }).then((res) => {
  163. if (res.Ret === 200) {
  164. uni.navigateTo({
  165. url: "/pageMy/applyResult/applyResult",
  166. });
  167. }
  168. })
  169. : this.haveAuth === 4
  170. ? uni.navigateTo({
  171. url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
  172. })
  173. : uni.showModal({
  174. title: "",
  175. content: "您已经提交过申请了,请耐心等待",
  176. showCancel: false,
  177. confirmColor: "#365595",
  178. success: function (res) {},
  179. });
  180. },
  181. // 销售的立即申请
  182. sellerApplyAuth() {
  183. User.applyTry({
  184. TryType: "Article",
  185. DetailId: this.id,
  186. }).then((res) => {
  187. if (res.Ret === 200) {
  188. uni.showModal({
  189. title: "",
  190. content: "提交申请成功,请耐心等待",
  191. showCancel: false,
  192. confirmColor: "#365595",
  193. success: function (res) {
  194. this.backIndex();
  195. },
  196. });
  197. }
  198. });
  199. },
  200. // 返回首頁
  201. backIndex() {
  202. uni.navigateBack({
  203. fail() {
  204. uni.switchTab({
  205. url: "/pages/index/index",
  206. });
  207. },
  208. });
  209. },
  210. // 拨打电话
  211. callPhone(num) {
  212. uni.makePhoneCall({
  213. phoneNumber: num,
  214. });
  215. },
  216. /* 申请访谈 */
  217. applyHandle() {
  218. // 申请访谈
  219. !this.reportInfo.IsInterviewApply &&
  220. this.$util.modal("", "专家访谈申请会提交给您的对口销售,销售会线下与您取得联系,确定申请吗?", () => {
  221. this.interviewApi();
  222. });
  223. // 取消申请访谈 区分状态 '待邀请','待访谈','已完成','已取消'
  224. if (this.reportInfo.IsInterviewApply) {
  225. // this.reportInfo.InterviewApplyStatus
  226. this.$util.modal(
  227. "",
  228. this.reportInfo.InterviewApplyStatus == "待访谈"
  229. ? "当前无法取消访谈,若有疑问,请联系对口销售"
  230. : this.reportInfo.InterviewApplyStatus == "待邀请"
  231. ? "您要取消此次访谈申请吗?"
  232. : "该访谈已完成",
  233. () => {
  234. this.reportInfo.InterviewApplyStatus == "待邀请"
  235. ? this.interviewApi()
  236. : this.reportInfo.InterviewApplyStatus == "待访谈"
  237. ? uni.makePhoneCall({
  238. phoneNumber: "18767183922",
  239. })
  240. : "";
  241. }
  242. );
  243. }
  244. },
  245. /* 访谈接口 */
  246. interviewApi() {
  247. Report.applyRpt({
  248. ArticleId: this.id,
  249. }).then((res) => {
  250. this.reportInfo.IsInterviewApply = !this.reportInfo.IsInterviewApply;
  251. });
  252. },
  253. /* 收藏 */
  254. collectHandle() {
  255. Report.collectRpt({
  256. ArticleId: this.id,
  257. PageRouter: this.$store.state.pageRouterReport,
  258. }).then((res) => {
  259. this.reportInfo.IsCollect = !this.reportInfo.IsCollect;
  260. this.$util.toast(res.Msg);
  261. });
  262. },
  263. /* 错误 */
  264. errorDetails() {
  265. uni.showModal({
  266. confirmText: "知道了",
  267. showCancel: false,
  268. confirmColor: "#376cbb",
  269. content: "网络不好,请刷新重试",
  270. success: (res) => {
  271. uni.navigateBack({
  272. fail() {
  273. uni.switchTab({
  274. url: "/pages/index/index",
  275. });
  276. },
  277. });
  278. },
  279. });
  280. },
  281. // 获取权限弹窗是否展示免费月卡接口
  282. async userIsShowAlert() {
  283. const res = await FreeButton.userIsShowAlert();
  284. if (res.Ret === 200) {
  285. this.isShowAlert = res.Data.IsShow;
  286. }
  287. },
  288. /* 跳转研选 */
  289. goRouterResearch(type) {
  290. if (type == "介绍") {
  291. uni.navigateTo({
  292. url: "/pages-purchaser/productIntroduction/productIntroduction",
  293. });
  294. } else {
  295. uni.navigateTo({
  296. url: "/pages-purchaser/ProductQuotation/ProductQuotation",
  297. });
  298. }
  299. },
  300. },
  301. async onShow() {
  302. this.readTiem = 0;
  303. this.setIntervalTiem = setInterval(() => {
  304. this.readTiem++;
  305. }, 1000);
  306. let page = getCurrentPages(); //查看路径
  307. if (page.length === 1) {
  308. if (!this.$store.state.isAuth && !this.$store.state.isBind && this.id > 0) this.getDetail();
  309. } else {
  310. // 跳转入口
  311. this.id > 0 && this.getDetail();
  312. }
  313. },
  314. onLoad(option) {
  315. this.id = option.id ? +option.id : "";
  316. this.isSendWx = option.IsSendWx || "";
  317. if (!this.id && !this.id > 0) {
  318. this.errorDetails();
  319. }
  320. // 免费送月卡
  321. // this.userIsShowAlert();
  322. },
  323. /**
  324. * 用户点击分享
  325. */
  326. onShareAppMessage: function (res) {
  327. if (this.id) {
  328. return {
  329. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : this.reportInfo.Title,
  330. path: "/pageMy/reportDetail/reportDetail?id=" + this.id,
  331. success: (res) => {},
  332. fail: (err) => {},
  333. };
  334. }
  335. },
  336. onHide() {
  337. //页面退出
  338. if (this.id && this.id > 0) {
  339. clearInterval(this.setIntervalTiem);
  340. Reports.addStopTime({
  341. ArticleId: this.id,
  342. StopTime: this.readTiem,
  343. OutType: 2,
  344. Source: "MOBILE",
  345. }).then((res) => {});
  346. }
  347. },
  348. onUnload() {
  349. if (this.id && this.id > 0) {
  350. //页面返回
  351. clearInterval(this.setIntervalTiem);
  352. Reports.addStopTime({
  353. ArticleId: this.id,
  354. StopTime: this.readTiem,
  355. OutType: 1,
  356. Source: "MOBILE",
  357. }).then((res) => {});
  358. }
  359. },
  360. };
  361. </script>
  362. <style lang="scss" scoped>
  363. .reportDetail-container {
  364. background-color: #fff;
  365. padding: 20rpx 0 134rpx;
  366. .report-top {
  367. color: #999999;
  368. .report-title {
  369. color: #4a4a4a;
  370. font-size: 34rpx;
  371. }
  372. .report_desc {
  373. display: flex;
  374. justify-content: space-between;
  375. align-items: center;
  376. margin: 20rpx 0;
  377. }
  378. .tip {
  379. color: #586eb5;
  380. display: inline;
  381. }
  382. }
  383. .detail-report {
  384. padding: 40rpx 0;
  385. }
  386. .statement {
  387. max-width: 670rpx;
  388. max-height: 900rpx;
  389. line-height: 42rpx;
  390. overflow-y: auto;
  391. padding: 40rpx;
  392. }
  393. .fixed_cont {
  394. width: 100%;
  395. // height: 114rpx;
  396. padding: 10rpx 0;
  397. position: fixed;
  398. bottom: 0;
  399. left: 0;
  400. z-index: 99999;
  401. display: flex;
  402. justify-content: center;
  403. align-items: center;
  404. flex-direction: row;
  405. background-color: #fff;
  406. box-shadow: 0 -3rpx 6rpx rgba($color: #6a6a6a, $alpha: 0.16);
  407. .handle-item {
  408. font-size: 24rpx;
  409. color: #d0cfd5;
  410. text-align: center;
  411. margin-right: 130rpx;
  412. &:last-child {
  413. margin-right: 0;
  414. }
  415. .img_ico {
  416. width: 56rpx;
  417. height: 54rpx;
  418. margin: 0 auto;
  419. }
  420. }
  421. .button-item {
  422. background-color: transparent;
  423. line-height: normal;
  424. }
  425. }
  426. .noauth-cont {
  427. padding-top: 170rpx;
  428. text-align: center;
  429. font-size: 28rpx;
  430. .noauth-ico {
  431. width: 365rpx;
  432. height: 229rpx;
  433. margin-bottom: 70rpx;
  434. }
  435. .tip {
  436. width: 532rpx;
  437. margin: 0 auto 100rpx;
  438. .contract {
  439. padding: 40rpx 90rpx 0;
  440. line-height: 44rpx;
  441. text {
  442. display: inline-block;
  443. }
  444. }
  445. }
  446. .btn-cont {
  447. width: 500rpx;
  448. height: 52rpx;
  449. background: $uni-color-new;
  450. color: #fff;
  451. font-size: 24rpx;
  452. font-weight: 600;
  453. border-radius: 8rpx;
  454. margin: 0 auto;
  455. text-align: center;
  456. line-height: 52rpx;
  457. &.back-btn {
  458. background: #e5efff !important;
  459. color: $uni-color-new;
  460. margin-top: 30rpx;
  461. }
  462. .btn_bg {
  463. width: 100%;
  464. height: 80rpx;
  465. position: absolute;
  466. left: 0;
  467. top: 0;
  468. }
  469. .btn-txt {
  470. width: 100%;
  471. position: absolute;
  472. z-index: 1;
  473. }
  474. }
  475. .product-introduction-box {
  476. background-color: $uni-bg-color;
  477. padding-top: 10rpx;
  478. margin-top: 60rpx;
  479. .product-introduction {
  480. padding: 60rpx 0 0 60rpx;
  481. background-color: white;
  482. .introduction-header {
  483. margin-bottom: 40rpx;
  484. display: flex;
  485. .introduction-header-left {
  486. background-color: #caaf8b;
  487. height: 90rpx;
  488. width: 14rpx;
  489. margin-right: 20rpx;
  490. }
  491. .introduction-header-right {
  492. text-align: left;
  493. .introduction-title-CN {
  494. font-weight: 500;
  495. font-size: 34rpx;
  496. color: #333333;
  497. line-height: 42rpx;
  498. margin-bottom: 8rpx;
  499. }
  500. .introduction-title-US {
  501. font-weight: 400;
  502. font-size: 28rpx;
  503. color: #c0c4cc;
  504. line-height: 42rpx;
  505. }
  506. }
  507. }
  508. .introduction-body {
  509. .introduction-body-box {
  510. text-align: left;
  511. margin-bottom: 40rpx;
  512. .body-row-content {
  513. margin-bottom: 40rpx;
  514. font-size: 34rpx;
  515. line-height: 48rpx;
  516. font-weight: 600;
  517. color: #caaf8b;
  518. .body-row-title {
  519. margin-left: 40rpx;
  520. }
  521. }
  522. .body-box-title {
  523. font-weight: 600;
  524. font-size: 34rpx;
  525. line-height: 48rpx;
  526. padding-left: 40rpx;
  527. position: relative;
  528. margin-bottom: 22rpx;
  529. &::before {
  530. content: "";
  531. height: 20rpx;
  532. width: 20rpx;
  533. background-color: #caaf8b;
  534. border-radius: 20rpx;
  535. position: absolute;
  536. left: 0;
  537. top: 16rpx;
  538. }
  539. }
  540. .introduction-body-row {
  541. margin-left: 40rpx;
  542. font-weight: 400;
  543. font-size: 26rpx;
  544. color: #333333;
  545. line-height: 36rpx;
  546. }
  547. .highHight-text {
  548. color: #caaf8b;
  549. }
  550. }
  551. }
  552. }
  553. }
  554. }
  555. .month_card {
  556. width: 100%;
  557. height: 565rpx;
  558. padding-left: -20rpx;
  559. }
  560. .btn-dl {
  561. background: linear-gradient(253deg, #fcf3e9 0%, #eedec8 100%) !important;
  562. color: #333 !important;
  563. margin: 30rpx auto !important;
  564. }
  565. .month-back {
  566. background: #f6f6f6 !important;
  567. color: #999 !important;
  568. }
  569. .moneh-text {
  570. text-align: center;
  571. width: 632rpx;
  572. margin: 0 auto 20rpx;
  573. color: #999999;
  574. }
  575. .research-noauth {
  576. color: #333;
  577. font-size: 36rpx;
  578. width: calc(100% + 80rpx);
  579. margin-left: -40rpx;
  580. .strong-text {
  581. display: inline-block;
  582. padding: 0 10rpx;
  583. font-weight: 500;
  584. }
  585. text:last-child {
  586. font-size: 32rpx;
  587. font-size: 34rpx;
  588. color: #999999;
  589. margin-top: 10rpx;
  590. }
  591. }
  592. // .research-btn {
  593. // display: flex;
  594. // align-items: center;
  595. // font-size: 32rpx;
  596. // width: 546rpx;
  597. // height: 78rpx;
  598. // margin: 30rpx auto;
  599. // background: #f8f8fa;
  600. // border-radius: 4rpx;
  601. // padding-left: 40rpx;
  602. // /* 字体/333 */
  603. // image {
  604. // width: 40rpx;
  605. // height: 40rpx;
  606. // margin-right: 10rpx;
  607. // }
  608. // }
  609. }
  610. </style>