specialDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. <template>
  2. <view class="container special-detail">
  3. <view class="" v-if="haveAuth == 1">
  4. <view class="top-notice-special">
  5. <view class="notice">
  6. <van-notice-bar color="#FFFFFF" background="#FE9000" text="专项调研行程持续更新中,满五家即开团,欢迎点击感兴趣预报名" />
  7. </view>
  8. <view class="inform-btn" @click="specialFollow">{{ specialIsFollow ? "取消通知" : "新调研通知" }}</view>
  9. </view>
  10. <view class="content">
  11. <view class="dialog-title" :class="1 == 1 ? 'brackets-title' : ''">{{ detailData.ResearchTheme }}</view>
  12. <view class="network">
  13. <view class="network-left">活动类型:</view>
  14. <view class="network-right">{{ detailData.ActivityTypeName }}</view>
  15. </view>
  16. <view class="network">
  17. <view class="network-left">所属行业:</view>
  18. <view class="network-right">{{ detailData.ChartPermissionName }}</view>
  19. </view>
  20. <view class="network" v-if="detailData.TripStatus == 2">
  21. <view class="network-left">开始时间:</view>
  22. <view class="network-right">{{ detailData.ActivityTimeTextByDay }}</view>
  23. </view>
  24. <view class="network" v-else>
  25. <view class="network-left">预期时间:</view>
  26. <view class="network-right">{{ detailData.ActivityTimeText }}</view>
  27. </view>
  28. <view class="network">
  29. <view class="network-left">调研形式:</view>
  30. <view class="network-right">
  31. {{ detailData.SpecialType == 1 ? "线上" : "线下" }}
  32. <block v-if="detailData.SpecialType == 2">({{ detailData.City }})</block>
  33. </view>
  34. </view>
  35. <block v-if="detailData.IndustrialName || detailData.IndustrialSubjectName">
  36. <view class="network">
  37. <view class="network-left">产业名称:</view>
  38. <view class="network-right">{{ detailData.IndustrialName }}</view>
  39. </view>
  40. <view class="network">
  41. <view class="network-left">相关公司:</view>
  42. <view class="network-right">{{ detailData.IndustrialSubjectName }}</view>
  43. </view>
  44. </block>
  45. <block v-else>
  46. <view class="network">
  47. <view class="network-left">相关主题:</view>
  48. <view class="network-right">{{ detailData.Label }}</view>
  49. </view>
  50. </block>
  51. <view class="reminder-item">
  52. <image v-if="detailData.TripStatus == 1" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Y_apply.png"></image>
  53. <image v-if="detailData.TripStatus == 2" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC.png"></image>
  54. <image v-if="detailData.Explain" @click="reminderTextHandler(detailData)" class="reminder" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/reminder_icon.png"></image>
  55. </view>
  56. </view>
  57. <view class="" style="height: 50rpx"></view>
  58. <view class="look-Trip" @click="lookImg">
  59. 查看行程安排
  60. <van-icon name="arrow" />
  61. </view>
  62. <view class="interest-btn">
  63. <block v-if="detailData.TripStatus == 2">
  64. <text v-if="detailData.ActiveState == 1" class="button" @click="applyOfcancel(detailData)">
  65. {{ detailData.IsTrip == 0 ? `我要报名(${detailData.TripNum}/${detailData.LimitPeopleNum})` : "取消报名" }}
  66. </text>
  67. </block>
  68. <block v-else>
  69. <text class="button" v-if="detailData.IsSignup !== 1" @click="interest">感兴趣</text>
  70. <text class="button" @click="beNotInterested" v-else>已预报名</text>
  71. </block>
  72. </view>
  73. </view>
  74. <!-- 权限部分 -->
  75. <view v-else>
  76. <jurisdiction :idAct="id" :jurisdictionList="jurisdictionList"></jurisdiction>
  77. </view>
  78. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  79. <u-modal
  80. v-model="specialGoFollowShow"
  81. :content-style="{ fontSize: '32rpx' }"
  82. :show-cancel-button="show_cancel_button"
  83. confirm-text="知道了"
  84. :show-confirm-button="show_confirm_button"
  85. :show-title="false"
  86. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  87. :confirm-style="{ fontWeight: '700' }"
  88. :mask-close-able="specialIsHintShow"
  89. @confirm="ininModalHandler"
  90. @cancel="ininModalHandler"
  91. >
  92. <view class="slot-content">
  93. <block v-if="specialPopupMsg">
  94. <text>{{ specialAccounts }}</text>
  95. <text class="light-hint">{{ specialPopupMsg }}</text>
  96. </block>
  97. <rich-text v-else :nodes="specialAccounts"></rich-text>
  98. </view>
  99. </u-modal>
  100. </view>
  101. </template>
  102. <script>
  103. import { activity, User } from "@/config/api.js";
  104. import jurisdiction from "../activityDetail/jurisdiction/components.vue";
  105. import freeCharge from "@/components/freeCharge";
  106. import specialMixins from "../components/specialMixins";
  107. let app = getApp({ allowDefault: true });
  108. export default {
  109. data() {
  110. return {
  111. id: "",
  112. detailData: {},
  113. haveAuth: "",
  114. specialIsFollow: false,
  115. jurisdictionList: {},
  116. };
  117. },
  118. components: {
  119. jurisdiction,
  120. freeCharge,
  121. },
  122. mixins: [specialMixins],
  123. methods: {
  124. // 获取详情
  125. async getActivityDetail() {
  126. const res = await activity.getSpecialDetailList({ ActivityId: this.id, PageRouter: this.$store.state.pageRouterActivity });
  127. if (res.Ret == 200) {
  128. this.specialIsFollow = res.Data.IsFollow;
  129. this.haveAuth = res.Data.HasPermission;
  130. this.jurisdictionList = res.Data;
  131. this.jurisdictionList.Type = "专项调研";
  132. if (res.Data.HasPermission == 1) {
  133. this.detailData = res.Data.Detail;
  134. }
  135. }
  136. },
  137. //感兴趣
  138. async interest() {
  139. const res = await activity.postSpecialSignupAdd({
  140. ActivityId: this.detailData.ActivityId,
  141. PageRouter: this.$store.state.pageRouterActivity,
  142. });
  143. if (res.Ret === 200) {
  144. this.currentPages();
  145. this.modalShow(res);
  146. if (res.Data.SignupStatus == 1) {
  147. this.detailData.IsSignup = 1;
  148. }
  149. }
  150. },
  151. // 已预报名、就是不感兴趣
  152. beNotInterested() {
  153. uni.showModal({
  154. content: "您要取消此次专研调研的预报名吗?",
  155. confirmColor: "#3385FF",
  156. cancelColor: "#606266",
  157. success: async (res) => {
  158. if (res.confirm) {
  159. const res = await activity.postSpecialSignupAdd({
  160. ActivityId: this.detailData.ActivityId,
  161. PageRouter: this.$store.state.pageRouterActivity,
  162. });
  163. if (res.Ret === 200) {
  164. this.detailData.IsSignup = 0;
  165. this.currentPages();
  166. }
  167. }
  168. },
  169. });
  170. },
  171. // 控制列表页面的状态
  172. currentPages() {
  173. let pages = getCurrentPages();
  174. let prevPage = pages[pages.length - 2];
  175. let path = prevPage.$page.fullPath;
  176. if (path == "/activityPages/specialResearchPage/specialResearchPage") {
  177. const index = prevPage.$vm.collectList.findIndex((item) => item.ActivityId == this.id);
  178. prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup;
  179. }
  180. },
  181. // 查看行程的事件
  182. lookImg() {
  183. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: this.detailData.ActivityId, Source: "查看行程" });
  184. uni.previewImage({
  185. urls: [this.detailData.TripImgLink], //查看图片的数组
  186. });
  187. },
  188. //新调研通知
  189. async specialFollow() {
  190. if (this.specialIsFollow) {
  191. uni.showModal({
  192. content: "您要取消【专项调研】新活动通知吗?",
  193. confirmColor: "#3385FF",
  194. cancelColor: "#606266",
  195. success: async (res) => {
  196. if (res.confirm) {
  197. const res = await activity.postSpecialFollow();
  198. if (res.Ret === 200) {
  199. this.specialIsFollow = !this.specialIsFollow;
  200. }
  201. }
  202. },
  203. });
  204. } else {
  205. const res = await activity.postSpecialFollow();
  206. if (res.Ret === 200) {
  207. this.specialIsFollow = !this.specialIsFollow;
  208. this.specialGoFollowShow = true;
  209. }
  210. }
  211. },
  212. },
  213. onLoad(option) {
  214. this.id = option.id || "";
  215. },
  216. async onShow() {
  217. await this.$store.dispatch("checkHandle");
  218. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  219. //已授权已绑定
  220. this.getActivityDetail();
  221. }
  222. },
  223. /**
  224. * 用户点击分享
  225. */
  226. onShareAppMessage: function (res) {
  227. return {
  228. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "活动详情",
  229. path: "/activityPages/specialDetail/specialDetail?id=" + this.id,
  230. success: (res) => {},
  231. fail: (err) => {},
  232. };
  233. },
  234. };
  235. </script>
  236. <style lang="scss" scoped>
  237. .special-detail {
  238. padding-bottom: 100rpx;
  239. .top-notice-special {
  240. height: 96rpx;
  241. padding-right: 20rpx;
  242. background-color: #fe9000;
  243. position: relative;
  244. .notice {
  245. width: 80%;
  246. }
  247. .inform-btn {
  248. position: absolute;
  249. right: 20rpx;
  250. top: 50%;
  251. transform: translateY(-50%);
  252. width: 147rpx;
  253. height: 40rpx;
  254. background: #ffffff;
  255. border-radius: 4rpx;
  256. text-align: center;
  257. line-height: 40rpx;
  258. font-size: 24rpx;
  259. color: #ff9e58;
  260. }
  261. }
  262. .notice {
  263. height: 60rpx;
  264. width: 100%;
  265. }
  266. .choose-limit {
  267. position: relative;
  268. display: flex;
  269. align-items: center;
  270. // margin-left: 20rpx;
  271. image {
  272. width: 93rpx;
  273. height: 38rpx;
  274. }
  275. .limit-img {
  276. position: absolute;
  277. top: -13rpx;
  278. right: -30rpx;
  279. width: 46rpx;
  280. height: 26rpx;
  281. }
  282. }
  283. .content {
  284. padding: 34rpx 34rpx 0rpx;
  285. margin-bottom: -20rpx;
  286. color: #333333;
  287. font-size: 28rpx;
  288. position: relative;
  289. view {
  290. padding-left: 20rpx;
  291. }
  292. text {
  293. line-height: 80rpx;
  294. padding-left: 20rpx;
  295. }
  296. .phone {
  297. padding: 0;
  298. display: inline-block;
  299. color: #2c83ff;
  300. }
  301. .reminder-item {
  302. position: absolute;
  303. top: 0;
  304. right: 0;
  305. width: 204rpx;
  306. height: 118rpx;
  307. z-index: 9;
  308. .item {
  309. width: 100%;
  310. height: 100%;
  311. }
  312. .reminder {
  313. position: absolute;
  314. top: 0rpx;
  315. right: 0rpx;
  316. width: 28rpx;
  317. height: 28rpx;
  318. z-index: 10;
  319. padding: 10rpx 10rpx 20rpx 20rpx;
  320. }
  321. }
  322. .dialog-title {
  323. width: 682rpx;
  324. padding: 20rpx;
  325. background: #f2f2f2;
  326. opacity: 0.8;
  327. text-align: center;
  328. font-size: 30rpx;
  329. font-weight: bold;
  330. margin-bottom: 30rpx;
  331. color: #000;
  332. }
  333. .brackets-title {
  334. padding-left: 20rpx;
  335. }
  336. .city-box {
  337. display: flex;
  338. align-items: center;
  339. text {
  340. padding: 0;
  341. }
  342. .city {
  343. display: flex;
  344. color: #2088ff;
  345. align-items: center;
  346. image {
  347. width: 27rpx;
  348. height: 32rpx;
  349. margin-right: 12rpx;
  350. }
  351. }
  352. }
  353. }
  354. .light-hint {
  355. color: #999;
  356. font-size: 24rpx;
  357. }
  358. .network {
  359. margin-bottom: 30rpx;
  360. padding: 0 !important;
  361. display: flex;
  362. .network-left {
  363. width: 160rpx;
  364. text-align-last: justify;
  365. text-align: justify;
  366. }
  367. .network-right {
  368. width: 480rpx;
  369. }
  370. .network-zoom {
  371. .text_zoom {
  372. width: 100%;
  373. word-break: break-all;
  374. color: #333333;
  375. }
  376. view {
  377. padding: 0 !important;
  378. margin: 0 !important;
  379. }
  380. .copy-zoom {
  381. display: inline-block;
  382. padding: 5rpx 17rpx !important;
  383. border-radius: 34rpx;
  384. background-color: #ebf4ff;
  385. font-size: 24rpx;
  386. color: #2c83ff;
  387. margin: 0 10rpx;
  388. margin-top: 30rpx;
  389. }
  390. }
  391. .network-link {
  392. width: 520rpx !important;
  393. view {
  394. padding: 0 !important;
  395. margin: 0 !important;
  396. width: 100%;
  397. display: flex;
  398. justify-content: space-between;
  399. :first-child {
  400. width: 350rpx;
  401. }
  402. .copy-link {
  403. padding: 5rpx 17rpx !important;
  404. border-radius: 34rpx;
  405. background-color: #ebf4ff;
  406. font-size: 24rpx;
  407. color: #2c83ff;
  408. }
  409. }
  410. }
  411. }
  412. .look-Trip {
  413. width: 100%;
  414. text-align: center;
  415. font-size: 28rpx;
  416. color: #3385ff;
  417. font-weight: 500;
  418. }
  419. .interest-btn {
  420. width: 100%;
  421. text-align: center;
  422. text {
  423. width: 318rpx;
  424. height: 67rpx;
  425. background: #3385ff;
  426. font-size: 28rpx;
  427. color: #fff;
  428. font-weight: 500;
  429. border-radius: 4rpx;
  430. line-height: 67rpx;
  431. margin: 90rpx auto 40rpx;
  432. }
  433. }
  434. }
  435. </style>