noteAndViewpoint.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <template>
  2. <view class="container note-and-viewpoint" v-if="detailDataForm.HasPermission == 1">
  3. <zmm-watermark :watermark="watermarkText"></zmm-watermark>
  4. <view class="content-item">
  5. <view class="author-name">
  6. <view class="author-box">
  7. <view class="img-box">
  8. <image :src="detailDataForm.HeadImg" @click="goDetailPages"></image>
  9. </view>
  10. <text style="margin-left: 10rpx">{{ detailDataForm.NickName }}</text>
  11. </view>
  12. <view class="follow-content" @click="followAuthorHandler">{{ detailDataForm.IsFollowAuthor ? "取消关注" : "关注专栏" }}</view>
  13. </view>
  14. <view class="type-time">
  15. <view class="type"> {{ detailDataForm.Type == 1 ? "笔 记" : "观 点" }} </view>
  16. <view class="time">{{ detailDataForm.PublishTime }}</view>
  17. </view>
  18. <view class="title-item global_title"> {{ detailDataForm.Title }}</view>
  19. <view class="text-conten">
  20. <mp-html :content="isUserBindingPhoneNumber ? detailDataForm.Content : detailDataForm.Content.slice(0, 80)" />
  21. </view>
  22. <block v-if="isUserBindingPhoneNumber">
  23. <block v-if="detailDataForm.Docs && detailDataForm.Docs.length > 0">
  24. <view @click="goFilePages(item)" class="file-item text_oneLine" v-for="(item, index) in detailDataForm.Docs" :key="index">
  25. <image :src="item.DocIcon"></image>
  26. {{ item.DocName }}
  27. </view>
  28. </block>
  29. <view class="image-conten">
  30. <image v-for="key in dataProcessing(detailDataForm.ImgUrl)" :key="key" :src="key" @click="previewImageMediahandler(key)"></image>
  31. </view>
  32. <view class="lable-conten">
  33. <view class="item" v-for="key in dataProcessing(detailDataForm.Tags)" :key="key">{{ key }}</view>
  34. </view>
  35. </block>
  36. </view>
  37. <block v-if="isUserBindingPhoneNumber">
  38. <view class="statement-content" v-if="detailDataForm.Status == 3">
  39. <text>郑重声明:</text>
  40. 本文为用户投稿,用户在平台中发表的所有资料、言论等仅代表个人或嘉宾观点,与本网站、任何公司与任何机构立场无关。本平台对文中陈述、观点判断保持中立,不对所包含内容及数据的真实性、准确性、可靠性或完整性提供任何明示或暗示的保证。
  41. 股市波动与很多因素有关,任何用户或嘉宾的发言,都有其特定立场,投资决策是个人基于自己的研究分析所做的决定,本文章或会议目的在于事实、观点分享,不构成任何的投资建议。投资者应当自主进行投资决策,对投资者因依赖上述信息进行投资决策而导致的财产损失,本平台不承担法律责任。
  42. 本文章或会议未经本平台和作者的书面许可,任何机构和个人不得以任何形式转发、转载、翻版、复制、刊登、发表、修改、仿制或引用文章或会议的全部或部分内容。本平台对任何第三方的未经授权行为所产生的的影响不承担任何责任,同时保持实施法律行动的权利。
  43. </view>
  44. <view class="collect-conten">
  45. <image @click="collectHandler(2)" v-if="detailDataForm.IsCollect == 1" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/collected_icon.png"></image>
  46. <image @click="collectHandler(1)" v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/collect_ico.png"></image>
  47. {{ detailDataForm.IsCollect == 1 ? "已收藏" : "收藏" }}
  48. </view>
  49. </block>
  50. <view v-else class="please-login" @click="pleaseGoLogin">请登录后查看更多内容</view>
  51. <Loading />
  52. </view>
  53. <view class="noauth-cont" v-else>
  54. <block v-if="isSpecialArticle_report">
  55. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  56. <view class="tip" v-if="detailDataForm.HasPermission === 3">
  57. 需要升级行业套餐权限才可查看此报告,请联系对口销售
  58. <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
  59. </view>
  60. </block>
  61. <block v-else>
  62. <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
  63. <block v-if="detailDataForm.HasPermission !== 3">
  64. <view class="research-noauth">
  65. 暂无 <text class="strong-text">买方研选</text> 权限
  66. <text style="margin-bottom: 30rpx"> 您可申请开通试用 </text>
  67. </view>
  68. <view class="btn-cont" @click="applyAuth">{{ "立即申请" }} </view>
  69. </block>
  70. <view class="tip" v-if="detailDataForm.HasPermission === 3">
  71. <view class="research-noauth">
  72. 暂无 <text class="strong-text">买方研选</text> 权限
  73. <text> 点击提交申请,提醒对口销售为你开通试用 </text>
  74. </view>
  75. </view>
  76. <view v-if="detailDataForm.HasPermission === 3" class="btn-cont" @click="sellerApplyAuth"> 提交申请</view>
  77. <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
  78. <view class="product-introduction-box">
  79. <view class="product-introduction">
  80. <view class="introduction-header">
  81. <view class="introduction-header-left"></view>
  82. <view class="introduction-header-right">
  83. <view class="introduction-title-CN"> 产品介绍 </view>
  84. <view class="introduction-title-US"> Product Introduction </view>
  85. </view>
  86. </view>
  87. <view class="introduction-body">
  88. <view class="introduction-body-box">
  89. <view class="body-box-title"> 独家亮点 </view>
  90. <view class="introduction-body-row"><span class="highHight-text">低至1000元</span>起访谈优质专家</view>
  91. <view class="introduction-body-row">重点公司小范围交流<span class="highHight-text">破圈</span>参加</view>
  92. <view class="introduction-body-row"><span class="highHight-text">海量</span>调研过程及纪要共享</view>
  93. </view>
  94. <view class="introduction-body-box">
  95. <view class="body-box-title"> 优质资源 </view>
  96. <view class="introduction-body-row"><span class="highHight-text">500+</span>篇/年调研纪要更新,</view>
  97. <view class="introduction-body-row"><span class="highHight-text">300+</span>场/年海内外重点公司小范围交流,</view>
  98. <view class="introduction-body-row"><span class="highHight-text">100+</span>场/年热点线下调研,</view>
  99. <view class="introduction-body-row"><span class="highHight-text">30000+</span>名优质行业专家长期合作,</view>
  100. <view class="introduction-body-row"><span class="highHight-text">1000+</span>名优秀买方汇集,</view>
  101. </view>
  102. <view class="introduction-body-box">
  103. <view class="body-box-title" style="margin-bottom: 18rpx"> 服务报价 </view>
  104. <view class="body-row-content">
  105. <view class="body-row-title"> 3万/年 </view>
  106. <view class="introduction-body-row">含无限量调研纪要查阅</view>
  107. <view class="introduction-body-row"><span class="highHight-text">以及3次</span>公开专家访谈;</view>
  108. </view>
  109. <view class="body-row-content">
  110. <view class="body-row-title"> 5万/年 </view>
  111. <view class="introduction-body-row">含无限量调研纪要查阅</view>
  112. <view class="introduction-body-row"> <span class="highHight-text">以及15次</span>公开专家访谈<span class="highHight-text">或30次</span>重点公司、专家小范围交流; </view>
  113. </view>
  114. <view class="body-row-content" style="margin-bottom: 0">
  115. <view class="body-row-title"> 10万/年 </view>
  116. <view class="introduction-body-row">含无限量调研纪要查阅</view>
  117. <view class="introduction-body-row">
  118. <span class="highHight-text">以及40次</span>公开专家访谈 <span class="highHight-text">或80次</span>重点公司、专家小范围交流 <span class="highHight-text">或20次</span>私享专家一对一。
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </block>
  126. </view>
  127. </template>
  128. <script>
  129. import { purchaserApi, User } from "@/config/api";
  130. import zmmWatermark from "@/components/zmm-watermark/zmm-watermark.vue";
  131. let app = getApp();
  132. export default {
  133. data() {
  134. return {
  135. detailDataForm: "",
  136. detailId: 0,
  137. readTiem: 0,
  138. setIntervalTiem: null,
  139. watermarkText:''
  140. };
  141. },
  142. components:{zmmWatermark},
  143. methods: {
  144. previewImageMediahandler(key) {
  145. uni.previewImage({
  146. urls: [key], //查看图片的数组
  147. });
  148. },
  149. // 获取专栏详情
  150. async getDetaliData() {
  151. const res = await purchaserApi.yanxuanSpecialDetail({
  152. Id: this.detailId,
  153. });
  154. if (res.Ret === 200) {
  155. this.detailDataForm = res.Data;
  156. this.detailDataForm.HasPermission == 1 && this.setDisableCapture();
  157. this.watermarkText = `${this.$db.get("mobile")}`;
  158. console.log( this.watermarkText,'this.detailDataForm');
  159. let str = this.detailDataForm.Type == 1 ? "笔记" : "观点";
  160. wx.setNavigationBarTitle({
  161. title: `${str}详情`,
  162. });
  163. }
  164. },
  165. // 数据处理
  166. dataProcessing(item) {
  167. return item ? item.split(",") : [];
  168. },
  169. // 收藏
  170. async collectHandler(type) {
  171. await this.$store.dispatch("checkHandle");
  172. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  173. const res = await purchaserApi.yanxuanSpecialCollect({
  174. Id: this.detailDataForm.Id,
  175. Status: type,
  176. });
  177. if (res.Ret === 200) {
  178. this.$util.toast(res.Msg);
  179. this.getDetaliData();
  180. }
  181. }
  182. },
  183. // 去往预览文件
  184. goFilePages(item) {
  185. wx.downloadFile({
  186. // 示例 url,并非真实存在
  187. url: item.DocUrl,
  188. success: function (res) {
  189. const filePath = res.tempFilePath;
  190. wx.openDocument({
  191. filePath: filePath,
  192. });
  193. },
  194. });
  195. },
  196. goDetailPages() {
  197. uni.navigateTo({ url: "/pages-purchaser/columnDetail/columnDetail?id=" + this.detailDataForm.UserId });
  198. },
  199. /* 无权限申请开通权限 */
  200. applyAuth() {
  201. /* 区分是否是潜在用户 */
  202. this.detailDataForm.HasPermission === 2
  203. ? User.applyTry({
  204. ApplyMethod: 3,
  205. TryType: "YanxuanSpecial",
  206. DetailId: this.detailId,
  207. }).then((res) => {
  208. if (res.Ret === 200) {
  209. uni.navigateTo({
  210. url: "/pageMy/applyResult/applyResult",
  211. });
  212. }
  213. })
  214. : this.detailDataForm.HasPermission === 4
  215. ? uni.navigateTo({
  216. url: "/pageMy/applyTrial/applyTrial?tryType=YanxuanSpecial&detailId=" + this.detailId,
  217. })
  218. : uni.showModal({
  219. title: "",
  220. content: "您已经提交过申请了,请耐心等待",
  221. showCancel: false,
  222. confirmColor: "#365595",
  223. success: function (res) {},
  224. });
  225. },
  226. // 销售的立即申请
  227. sellerApplyAuth() {
  228. User.applyTry({
  229. TryType: "YanxuanSpecial",
  230. DetailId: this.detailId,
  231. }).then((res) => {
  232. if (res.Ret === 200) {
  233. uni.showModal({
  234. title: "",
  235. content: "提交申请成功,请耐心等待",
  236. showCancel: false,
  237. confirmColor: "#365595",
  238. success: function (res) {
  239. this.backIndex();
  240. },
  241. });
  242. }
  243. });
  244. },
  245. // 返回首頁
  246. backIndex() {
  247. uni.navigateBack({
  248. fail() {
  249. uni.switchTab({
  250. url: "/pages/index/index",
  251. });
  252. },
  253. });
  254. },
  255. // 关注作者
  256. async followAuthorHandler() {
  257. const res = await purchaserApi.yanxuanSpecialFollow({
  258. FollowUserId: this.detailDataForm.UserId,
  259. Status: this.detailDataForm.IsFollowAuthor ? 2 : 1,
  260. });
  261. if (res.Ret === 200) {
  262. this.detailDataForm.IsFollowAuthor = !this.detailDataForm.IsFollowAuthor;
  263. this.detailDataForm.IsFollowAuthor
  264. ? uni.showModal({
  265. title: "已关注专栏",
  266. content: "请关注【查研观向小助手】 公众号,及时获取专栏下内容更新提醒",
  267. confirmText: "知道了",
  268. showCancel: false,
  269. confirmColor: "#376cbb",
  270. })
  271. : uni.showToast({
  272. title: "已取消关注",
  273. icon: "none",
  274. duration: 2000,
  275. });
  276. }
  277. },
  278. setDisableCapture() {
  279. wx.setVisualEffectOnCapture({
  280. visualEffect: "hidden",
  281. complete: (res) => {
  282. console.log(res);
  283. },
  284. });
  285. },
  286. closeDisableCapture() {
  287. wx.setVisualEffectOnCapture({
  288. visualEffect: "none",
  289. });
  290. },
  291. },
  292. onLoad(options) {
  293. this.detailId = Number(options.id) || 0;
  294. },
  295. onShow() {
  296. this.detailId > 0 && this.getDetaliData();
  297. this.readTiem = 0;
  298. this.setIntervalTiem = setInterval(() => {
  299. this.readTiem++;
  300. }, 1000);
  301. },
  302. onHide() {
  303. //页面退出
  304. if (this.detailId && this.detailId > 0 && this.detailDataForm.HasPermission == 1) {
  305. clearInterval(this.setIntervalTiem);
  306. purchaserApi
  307. .YanxuanSpecialRecord({
  308. SpecialId: this.detailId,
  309. StopTime: this.readTiem,
  310. })
  311. .then((res) => {});
  312. }
  313. this.closeDisableCapture()
  314. },
  315. onUnload() {
  316. if (this.detailId && this.detailId > 0 && this.detailDataForm.HasPermission == 1) {
  317. //页面返回
  318. clearInterval(this.setIntervalTiem);
  319. purchaserApi
  320. .YanxuanSpecialRecord({
  321. SpecialId: this.detailId,
  322. StopTime: this.readTiem,
  323. })
  324. .then((res) => {});
  325. }
  326. this.closeDisableCapture()
  327. },
  328. /** 用户点击分享 */
  329. onShareAppMessage: function (res) {
  330. return {
  331. title: this.detailDataForm.Title,
  332. path: "/pages-purchaser/noteAndViewpoint/noteAndViewpoint?id=" + this.detailId,
  333. };
  334. },
  335. };
  336. </script>
  337. <style lang="scss" scope>
  338. .note-and-viewpoint {
  339. position: relative;
  340. padding: 30rpx;
  341. background: $uni-bg-color;
  342. .content-item {
  343. padding: 40rpx;
  344. background-color: #fff;
  345. .type-time {
  346. display: flex;
  347. align-items: center;
  348. justify-content: space-between;
  349. color: #666666;
  350. .type {
  351. width: 110rpx;
  352. height: 42rpx;
  353. line-height: 42rpx;
  354. text-align: center;
  355. border-radius: 38rpx;
  356. color: #928563;
  357. background-color: #fff6de;
  358. font-weight: 500;
  359. }
  360. }
  361. .title-item {
  362. margin: 10rpx 0 20rpx;
  363. line-height: 46rpx;
  364. }
  365. .file-item {
  366. width: 100%;
  367. height: 42rpx;
  368. margin: 20rpx 0;
  369. display: flex;
  370. align-items: center;
  371. background-color: #f8f8fa;
  372. color: #376cbb;
  373. image {
  374. margin-right: 15rpx;
  375. width: 27rpx;
  376. height: 27rpx;
  377. }
  378. }
  379. .text-conten {
  380. font-size: 32rpx;
  381. line-height: 44rpx;
  382. }
  383. .image-conten {
  384. display: flex;
  385. flex-wrap: wrap;
  386. image {
  387. width: 144rpx;
  388. height: 144rpx;
  389. margin-right: 20rpx;
  390. }
  391. }
  392. .lable-conten {
  393. display: flex;
  394. flex-wrap: wrap;
  395. margin: 20rpx 0;
  396. font-size: 24rpx;
  397. .item {
  398. display: flex;
  399. align-items: center;
  400. height: 34rpx;
  401. border-radius: 44rpx;
  402. padding: 0 35rpx;
  403. background-color: #f0f1f3;
  404. margin: 0 20rpx 20rpx 0;
  405. }
  406. }
  407. .author-name {
  408. display: flex;
  409. align-items: center;
  410. justify-content: space-between;
  411. margin-bottom: 50rpx;
  412. .author-box {
  413. display: flex;
  414. align-items: center;
  415. }
  416. .img-box {
  417. width: 48rpx;
  418. height: 48rpx;
  419. overflow: hidden;
  420. font-size: 28rpx;
  421. color: #333;
  422. image {
  423. width: 100%;
  424. height: 100%;
  425. }
  426. }
  427. .follow-content {
  428. display: flex;
  429. align-items: center;
  430. padding: 0 25rpx;
  431. height: 48rpx;
  432. border-radius: 150rpx;
  433. background-color: #376cbb;
  434. color: #fff;
  435. font-size: 24rpx;
  436. }
  437. }
  438. }
  439. .collect-conten {
  440. position: fixed;
  441. bottom: 0;
  442. left: 0;
  443. width: 100%;
  444. padding: 20rpx 0 10rpx;
  445. background-color: #fff;
  446. padding-bottom: constant(safe-area-inset-bottom);
  447. padding-bottom: env(safe-area-inset-bottom);
  448. display: flex;
  449. flex-direction: column;
  450. align-items: center;
  451. color: #666666;
  452. font-size: 24rpx;
  453. line-height: 28rpx;
  454. image {
  455. display: inline-block;
  456. flex-shrink: 0;
  457. width: 44rpx;
  458. height: 44rpx;
  459. }
  460. }
  461. .statement-content {
  462. margin-top: 20rpx;
  463. padding-bottom: 200rpx;
  464. font-size: 28rpx;
  465. line-height: 48rpx;
  466. color: #666;
  467. text {
  468. font-weight: 500;
  469. font-size: 34rpx;
  470. line-height: 48rpx;
  471. }
  472. }
  473. .please-login {
  474. margin: 50rpx auto 150rpx;
  475. width: 556rpx;
  476. height: 64rpx;
  477. color: #fff;
  478. font-size: 24rpx;
  479. font-weight: 600;
  480. background-color: #376cbb;
  481. display: flex;
  482. align-items: center;
  483. justify-content: center;
  484. border-radius: 9rpx;
  485. }
  486. }
  487. .noauth-cont {
  488. padding-top: 170rpx;
  489. padding-bottom: 100rpx;
  490. text-align: center;
  491. font-size: 28rpx;
  492. .noauth-ico {
  493. width: 365rpx;
  494. height: 229rpx;
  495. margin-bottom: 70rpx;
  496. }
  497. .tip {
  498. width: 532rpx;
  499. margin: 0 auto 100rpx;
  500. .contract {
  501. padding: 40rpx 90rpx 0;
  502. line-height: 44rpx;
  503. text {
  504. display: inline-block;
  505. }
  506. }
  507. }
  508. .btn-cont {
  509. width: 500rpx;
  510. height: 52rpx;
  511. background: $uni-color-new;
  512. color: #fff;
  513. font-size: 24rpx;
  514. font-weight: 600;
  515. border-radius: 8rpx;
  516. margin: 0 auto;
  517. text-align: center;
  518. line-height: 52rpx;
  519. &.back-btn {
  520. background: #e5efff !important;
  521. color: $uni-color-new;
  522. margin-top: 30rpx;
  523. }
  524. .btn_bg {
  525. width: 100%;
  526. height: 80rpx;
  527. position: absolute;
  528. left: 0;
  529. top: 0;
  530. }
  531. .btn-txt {
  532. width: 100%;
  533. position: absolute;
  534. z-index: 1;
  535. }
  536. }
  537. .product-introduction-box {
  538. background-color: $uni-bg-color;
  539. padding-top: 10rpx;
  540. margin-top: 60rpx;
  541. .product-introduction {
  542. padding: 60rpx 60rpx 0;
  543. background-color: white;
  544. .introduction-header {
  545. margin-bottom: 40rpx;
  546. display: flex;
  547. .introduction-header-left {
  548. background-color: #caaf8b;
  549. height: 90rpx;
  550. width: 14rpx;
  551. margin-right: 20rpx;
  552. }
  553. .introduction-header-right {
  554. text-align: left;
  555. .introduction-title-CN {
  556. font-weight: 500;
  557. font-size: 34rpx;
  558. color: #333333;
  559. line-height: 42rpx;
  560. margin-bottom: 8rpx;
  561. }
  562. .introduction-title-US {
  563. font-weight: 400;
  564. font-size: 28rpx;
  565. color: #c0c4cc;
  566. line-height: 42rpx;
  567. }
  568. }
  569. }
  570. .introduction-body {
  571. .introduction-body-box {
  572. text-align: left;
  573. margin-bottom: 40rpx;
  574. .body-row-content {
  575. margin-bottom: 40rpx;
  576. font-size: 34rpx;
  577. line-height: 48rpx;
  578. font-weight: 600;
  579. color: #caaf8b;
  580. .body-row-title {
  581. margin-left: 40rpx;
  582. }
  583. }
  584. .body-box-title {
  585. font-weight: 600;
  586. font-size: 34rpx;
  587. line-height: 48rpx;
  588. padding-left: 40rpx;
  589. position: relative;
  590. margin-bottom: 22rpx;
  591. &::before {
  592. content: "";
  593. height: 20rpx;
  594. width: 20rpx;
  595. background-color: #caaf8b;
  596. border-radius: 20rpx;
  597. position: absolute;
  598. left: 0;
  599. top: 16rpx;
  600. }
  601. }
  602. .introduction-body-row {
  603. margin-left: 40rpx;
  604. font-weight: 400;
  605. font-size: 26rpx;
  606. color: #333333;
  607. line-height: 36rpx;
  608. }
  609. .highHight-text {
  610. color: #caaf8b;
  611. }
  612. }
  613. }
  614. }
  615. }
  616. .research-noauth {
  617. color: #333;
  618. font-size: 36rpx;
  619. width: calc(100% + 80rpx);
  620. margin-left: -40rpx;
  621. .strong-text {
  622. display: inline-block;
  623. padding: 0 10rpx;
  624. font-weight: 500;
  625. }
  626. text:last-child {
  627. font-size: 32rpx;
  628. font-size: 34rpx;
  629. color: #999999;
  630. margin-top: 10rpx;
  631. }
  632. }
  633. }
  634. </style>