reportDetail.vue 21 KB

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