specialResearchPage.vue 8.3 KB

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