specialDetail.vue 13 KB

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