specialDetail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  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 });
  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. });
  142. if (res.Ret === 200) {
  143. this.currentPages();
  144. this.modalShow(res);
  145. if (res.Data.SignupStatus == 1) {
  146. this.detailData.IsSignup = 1;
  147. }
  148. }
  149. },
  150. // 已预报名、就是不感兴趣
  151. beNotInterested() {
  152. uni.showModal({
  153. content: "您要取消此次专研调研的预报名吗?",
  154. confirmColor: "#3385FF",
  155. cancelColor: "#606266",
  156. success: async (res) => {
  157. if (res.confirm) {
  158. const res = await activity.postSpecialSignupAdd({
  159. ActivityId: this.detailData.ActivityId,
  160. });
  161. if (res.Ret === 200) {
  162. this.detailData.IsSignup = 0;
  163. this.currentPages();
  164. }
  165. }
  166. },
  167. });
  168. },
  169. // 控制列表页面的状态
  170. currentPages() {
  171. let pages = getCurrentPages();
  172. let prevPage = pages[pages.length - 2];
  173. let path = prevPage.$page.fullPath;
  174. if (path == "/activityPages/specialResearchPage/specialResearchPage") {
  175. const index = prevPage.$vm.collectList.findIndex((item) => item.ActivityId == this.id);
  176. prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup;
  177. }
  178. },
  179. // 查看行程的事件
  180. lookImg() {
  181. uni.previewImage({
  182. urls: [this.detailData.TripImgLink], //查看图片的数组
  183. });
  184. },
  185. //新调研通知
  186. async specialFollow() {
  187. if (this.specialIsFollow) {
  188. uni.showModal({
  189. content: "您要取消【专项调研】新活动通知吗?",
  190. confirmColor: "#3385FF",
  191. cancelColor: "#606266",
  192. success: async (res) => {
  193. if (res.confirm) {
  194. const res = await activity.postSpecialFollow();
  195. if (res.Ret === 200) {
  196. this.specialIsFollow = !this.specialIsFollow;
  197. }
  198. }
  199. },
  200. });
  201. } else {
  202. const res = await activity.postSpecialFollow();
  203. if (res.Ret === 200) {
  204. this.specialIsFollow = !this.specialIsFollow;
  205. this.specialGoFollowShow = true;
  206. }
  207. }
  208. },
  209. },
  210. onLoad(option) {
  211. this.id = option.id || "";
  212. },
  213. async onShow() {
  214. await this.$store.dispatch("checkHandle");
  215. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  216. //已授权已绑定
  217. this.getActivityDetail();
  218. }
  219. },
  220. /**
  221. * 用户点击分享
  222. */
  223. onShareAppMessage: function (res) {
  224. return {
  225. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "活动详情",
  226. path: "/activityPages/specialDetail/specialDetail?id=" + this.id,
  227. success: (res) => {},
  228. fail: (err) => {},
  229. };
  230. },
  231. };
  232. </script>
  233. <style lang="scss" scoped>
  234. .special-detail {
  235. padding-bottom: 100rpx;
  236. .top-notice-special {
  237. height: 96rpx;
  238. padding-right: 20rpx;
  239. background-color: #fe9000;
  240. position: relative;
  241. .notice {
  242. width: 80%;
  243. }
  244. .inform-btn {
  245. position: absolute;
  246. right: 20rpx;
  247. top: 50%;
  248. transform: translateY(-50%);
  249. width: 147rpx;
  250. height: 40rpx;
  251. background: #ffffff;
  252. border-radius: 4rpx;
  253. text-align: center;
  254. line-height: 40rpx;
  255. font-size: 24rpx;
  256. color: #ff9e58;
  257. }
  258. }
  259. .notice {
  260. height: 60rpx;
  261. width: 100%;
  262. }
  263. .choose-limit {
  264. position: relative;
  265. display: flex;
  266. align-items: center;
  267. // margin-left: 20rpx;
  268. image {
  269. width: 93rpx;
  270. height: 38rpx;
  271. }
  272. .limit-img {
  273. position: absolute;
  274. top: -13rpx;
  275. right: -30rpx;
  276. width: 46rpx;
  277. height: 26rpx;
  278. }
  279. }
  280. .content {
  281. padding: 34rpx 34rpx 0rpx;
  282. margin-bottom: -20rpx;
  283. color: #333333;
  284. font-size: 28rpx;
  285. position: relative;
  286. view {
  287. padding-left: 20rpx;
  288. }
  289. text {
  290. line-height: 80rpx;
  291. padding-left: 20rpx;
  292. }
  293. .phone {
  294. padding: 0;
  295. display: inline-block;
  296. color: #2c83ff;
  297. }
  298. .reminder-item {
  299. position: absolute;
  300. top: 0;
  301. right: 0;
  302. width: 204rpx;
  303. height: 118rpx;
  304. z-index: 9;
  305. .item {
  306. width: 100%;
  307. height: 100%;
  308. }
  309. .reminder {
  310. position: absolute;
  311. top: 0rpx;
  312. right: 0rpx;
  313. width: 28rpx;
  314. height: 28rpx;
  315. z-index: 10;
  316. padding: 10rpx 10rpx 20rpx 20rpx;
  317. }
  318. }
  319. .dialog-title {
  320. width: 682rpx;
  321. padding: 20rpx;
  322. background: #f2f2f2;
  323. opacity: 0.8;
  324. text-align: center;
  325. font-size: 30rpx;
  326. font-weight: bold;
  327. margin-bottom: 30rpx;
  328. color: #000;
  329. }
  330. .brackets-title {
  331. padding-left: 20rpx;
  332. }
  333. .city-box {
  334. display: flex;
  335. align-items: center;
  336. text {
  337. padding: 0;
  338. }
  339. .city {
  340. display: flex;
  341. color: #2088ff;
  342. align-items: center;
  343. image {
  344. width: 27rpx;
  345. height: 32rpx;
  346. margin-right: 12rpx;
  347. }
  348. }
  349. }
  350. }
  351. .light-hint {
  352. color: #999;
  353. font-size: 24rpx;
  354. }
  355. .network {
  356. margin-bottom: 30rpx;
  357. padding: 0 !important;
  358. display: flex;
  359. .network-left {
  360. width: 160rpx;
  361. text-align-last: justify;
  362. text-align: justify;
  363. }
  364. .network-right {
  365. width: 480rpx;
  366. }
  367. .network-zoom {
  368. .text_zoom {
  369. width: 100%;
  370. word-break: break-all;
  371. color: #333333;
  372. }
  373. view {
  374. padding: 0 !important;
  375. margin: 0 !important;
  376. }
  377. .copy-zoom {
  378. display: inline-block;
  379. padding: 5rpx 17rpx !important;
  380. border-radius: 34rpx;
  381. background-color: #ebf4ff;
  382. font-size: 24rpx;
  383. color: #2c83ff;
  384. margin: 0 10rpx;
  385. margin-top: 30rpx;
  386. }
  387. }
  388. .network-link {
  389. width: 520rpx !important;
  390. view {
  391. padding: 0 !important;
  392. margin: 0 !important;
  393. width: 100%;
  394. display: flex;
  395. justify-content: space-between;
  396. :first-child {
  397. width: 350rpx;
  398. }
  399. .copy-link {
  400. padding: 5rpx 17rpx !important;
  401. border-radius: 34rpx;
  402. background-color: #ebf4ff;
  403. font-size: 24rpx;
  404. color: #2c83ff;
  405. }
  406. }
  407. }
  408. }
  409. .look-Trip {
  410. width: 100%;
  411. text-align: center;
  412. font-size: 28rpx;
  413. color: #3385ff;
  414. font-weight: 500;
  415. }
  416. .interest-btn {
  417. width: 100%;
  418. text-align: center;
  419. text {
  420. width: 318rpx;
  421. height: 67rpx;
  422. background: #3385ff;
  423. font-size: 28rpx;
  424. color: #fff;
  425. font-weight: 500;
  426. border-radius: 4rpx;
  427. line-height: 67rpx;
  428. margin: 90rpx auto 40rpx;
  429. }
  430. }
  431. }
  432. </style>