specialDetail.vue 12 KB

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