specialResearchPage.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="container special-research">
  3. <view class="top-notice">
  4. <view class="notice">
  5. <van-notice-bar color="#FFFFFF" background="#FE9000" :text="wholeShowListData.ActivitySpecialExplain" />
  6. </view>
  7. <view class="inform-btn" @click="specialFollow">{{ specialIsFollow ? "取消通知" : "新调研通知" }}</view>
  8. </view>
  9. <!-- 活动列表 -->
  10. <view>
  11. <view class="collect-ul">
  12. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
  13. <view class="title-date" @click="goDetail(item)">
  14. <text :class="item.SpecialType == 1 ? '' : 'xianxia'">{{ item.SpecialType == 1 ? "线上" : "线下" }}</text>
  15. <view class="city-img" v-if="item.City">
  16. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  17. {{ item.City }}
  18. </view>
  19. </view>
  20. <view class="item-li">
  21. <view class="item-img" @click="goDetail(item)">
  22. <image :src="item.ImgUrl"> </image>
  23. <text v-if="item.ActiveState == 1" class="img-status begin">未开始</text>
  24. <text v-else-if="item.ActiveState == 2" class="img-status proceed">进行中</text>
  25. <text v-else-if="item.ActiveState == 0 && item.TripStatus == 2" class="img-status">已结束</text>
  26. </view>
  27. <view class="item">
  28. <view class="item-text" @click="goDetail(item)">
  29. <text class="activity-title"> {{ item.ResearchTheme }} </text>
  30. <view style="display: flex" class="text_twoLine" v-if="item.TripStatus == 2">
  31. <text style="flex-shrink: 0"> 活动时间:</text>
  32. <text> {{ item.ActivityTimeTextByDay }}</text>
  33. </view>
  34. <text class="text_twoLine" v-else>预期时间:{{ item.ActivityTimeText }} </text>
  35. </view>
  36. <view class="bottom-box">
  37. <view class="" style="width: 130rpx"> </view>
  38. <text @click="lookImg(item)">行程安排</text>
  39. <block v-if="item.TripStatus == 2">
  40. <text v-if="item.ActiveState == 1" class="button" @click="applyOfcancel(item)">{{ item.IsTrip == 0 ? "我要报名" : "取消报名" }}</text>
  41. </block>
  42. <block v-else>
  43. <text class="button" v-if="item.IsSignup !== 1" @click="interest(item)">感兴趣</text>
  44. <text class="button" @click="beNotInterested(item)" v-else>已预报名</text>
  45. </block>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="reminder-item">
  50. <image v-if="item.TripStatus == 1" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/Y_apply.png"></image>
  51. <image v-if="item.TripStatus == 2" class="item" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/confirm_XC.png"></image>
  52. <image v-if="item.Explain" @click="reminderTextHandler(item)" class="reminder" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/reminder_icon.png"></image>
  53. </view>
  54. </view>
  55. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  56. </view>
  57. <view class="select-box"> </view>
  58. <!-- 所有自定义弹框 -->
  59. </view>
  60. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  61. <u-modal
  62. v-model="specialGoFollowShow"
  63. :content-style="{ fontSize: '32rpx' }"
  64. :show-cancel-button="show_cancel_button"
  65. confirm-text="知道了"
  66. :show-confirm-button="show_confirm_button"
  67. :show-title="false"
  68. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  69. :confirm-style="{ fontWeight: '700' }"
  70. :mask-close-able="specialIsHintShow"
  71. @confirm="ininModalHandler"
  72. @cancel="ininModalHandler"
  73. >
  74. <view class="slot-content">
  75. <block v-if="specialPopupMsg">
  76. <text>{{ specialAccounts }}</text>
  77. <text class="light-hint">{{ specialPopupMsg }}</text>
  78. </block>
  79. <rich-text v-else :nodes="specialAccounts"></rich-text>
  80. </view>
  81. </u-modal>
  82. </view>
  83. </template>
  84. <script>
  85. import { activity, User } from "@/config/api.js";
  86. import { Throttle } from "@/config/util.js";
  87. import freeCharge from "@/components/freeCharge";
  88. import specialMixins from "../components/specialMixins";
  89. export default {
  90. data() {
  91. return {
  92. page_no: 1,
  93. pageSize: 10,
  94. collectList: [],
  95. status: "loadmore",
  96. refresh: false, //正在下拉
  97. loadText: {
  98. loadmore: "上拉加载更多",
  99. loading: "加载中",
  100. nomore: "已经到底了",
  101. },
  102. };
  103. },
  104. mixins: [specialMixins],
  105. components: {
  106. freeCharge,
  107. },
  108. methods: {
  109. // 获取事件
  110. async getActivityList() {
  111. const res = await activity.getSpecialList({
  112. PageSize: this.pageSize,
  113. CurrentIndex: this.page_no,
  114. });
  115. if (res.Ret === 200) {
  116. this.specialIsFollow = res.Data.IsFollow;
  117. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  118. if (this.page_no === 1) {
  119. this.collectList = res.Data.List || [];
  120. if (this.refresh) {
  121. uni.stopPullDownRefresh();
  122. this.refresh = false;
  123. }
  124. } else {
  125. this.collectList = this.collectList.concat(res.Data.List);
  126. }
  127. }
  128. },
  129. // 查看行程的事件
  130. lookImg(item) {
  131. this.getRecordTracking(this.$store.state.pageRouterActivity, { ActivityId: item.ActivityId, Source: "查看行程" });
  132. uni.previewImage({
  133. urls: [item.TripImgLink], //查看图片的数组
  134. });
  135. },
  136. // 去往详情页面
  137. goDetail(item) {
  138. this.$store.dispatch("checkHandle", "/activityPages/specialDetail/specialDetail?id=" + item.ActivityId);
  139. },
  140. // 点击感兴趣
  141. async interest(item) {
  142. const res = await activity.postSpecialSignupAdd({
  143. ActivityId: item.ActivityId,
  144. PageRouter: this.$store.state.pageRouterActivity,
  145. });
  146. if (res.Ret === 200) {
  147. this.modalShow(res);
  148. if (res.Data.SignupStatus == 1) {
  149. item.IsSignup = 1;
  150. }
  151. }
  152. },
  153. // 已预报名、就是不感兴趣
  154. beNotInterested(item) {
  155. uni.showModal({
  156. content: "您要取消此次专研调研的预报名吗?",
  157. confirmColor: "#3385FF",
  158. cancelColor: "#606266",
  159. success: async (res) => {
  160. if (res.confirm) {
  161. const res = await activity.postSpecialSignupAdd({
  162. ActivityId: item.ActivityId,
  163. PageRouter: this.$store.state.pageRouterActivity,
  164. });
  165. if (res.Ret === 200) {
  166. item.IsSignup = 0;
  167. }
  168. }
  169. },
  170. });
  171. },
  172. // 新调研通知
  173. async specialFollow() {
  174. this.show_confirm_button = true;
  175. if (this.specialIsFollow) {
  176. uni.showModal({
  177. content: "您要取消【专项调研】新活动通知吗?",
  178. confirmColor: "#3385FF",
  179. cancelColor: "#606266",
  180. success: async (res) => {
  181. if (res.confirm) {
  182. const res = await activity.postSpecialFollow();
  183. if (res.Ret === 200) {
  184. this.specialIsFollow = !this.specialIsFollow;
  185. }
  186. }
  187. },
  188. });
  189. } else {
  190. const res = await activity.postSpecialFollow();
  191. if (res.Ret === 200) {
  192. this.show_cancel_button = true;
  193. this.specialIsFollow = !this.specialIsFollow;
  194. this.specialGoFollowShow = true;
  195. }
  196. }
  197. },
  198. },
  199. onLoad(option) {
  200. this.getActivityList();
  201. },
  202. onShow() {
  203. this.$store.commit("setRouterReport", "专项调研列表");
  204. this.$store.commit("setRouterActivity", "专项调研列表");
  205. this.$store.dispatch("checkHandle");
  206. },
  207. /* 触底 */
  208. onReachBottom: Throttle(function () {
  209. if (this.status === "nomore") return;
  210. this.status = "loading";
  211. this.page_no++;
  212. this.getActivityList();
  213. }),
  214. /* 下拉刷新 */
  215. onPullDownRefresh: Throttle(function () {
  216. this.page_no = 1;
  217. this.refresh = true;
  218. this.getActivityList();
  219. }),
  220. /** 用户点击分享 */
  221. onShareAppMessage: function (res) {
  222. return {
  223. title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费试用月卡!" : "专项产业调研",
  224. path: "/activityPages/specialResearchPage/specialResearchPage",
  225. };
  226. },
  227. };
  228. </script>
  229. <style lang="scss" scoped>
  230. .special-research {
  231. background: #f7f7f7;
  232. padding-bottom: 30rpx;
  233. position: relative;
  234. .top-notice {
  235. position: sticky;
  236. top: 0;
  237. z-index: 99;
  238. background-color: #fe9000;
  239. display: flex;
  240. align-items: center;
  241. height: 60rpx;
  242. padding-right: 20rpx;
  243. overflow: hidden;
  244. .notice {
  245. width: 80%;
  246. }
  247. .inform-btn {
  248. width: 147rpx;
  249. height: 40rpx;
  250. background: #ffffff;
  251. border-radius: 4rpx;
  252. text-align: center;
  253. line-height: 40rpx;
  254. font-size: 24rpx;
  255. color: #ff9e58;
  256. }
  257. }
  258. .collect-ul {
  259. padding-top: 10rpx;
  260. }
  261. .city-img {
  262. display: flex;
  263. align-items: center;
  264. image {
  265. width: 27rpx;
  266. height: 32rpx;
  267. margin-right: 12rpx;
  268. }
  269. }
  270. }
  271. @import "@/components/activity/indexActivity.scss";
  272. </style>