specialDetail.vue 12 KB

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