noteAndViewpoint.vue 20 KB

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