themeActivity.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <view class="container theme-container">
  3. <view class="top-title" v-if="!type">
  4. <image class="img"/>
  5. <text>{{ contentLabel }}</text>
  6. </view>
  7. <!-- 活动列表 -->
  8. <view>
  9. <view class="collect-ul">
  10. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
  11. <view class="title-date" @click="goDetail(item)">
  12. <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  13. {{ item.ActivityTimeText }}
  14. </view>
  15. <view class="item-li">
  16. <view class="item-img" @click="goDetail(item)">
  17. <image :src="item.ImgUrl">
  18. <text v-if="item.ActiveState == 1" class="img-status begin">未开始</text>
  19. <text v-else-if="item.ActiveState == 2" class="img-status proceed">进行中</text>
  20. <text v-else class="img-status">已结束</text>
  21. <view class="img-type">
  22. <text style="white-space: nowrap;">
  23. {{item.ActivityTypeName}}
  24. </text>
  25. <view class="type-icn" v-if="item.IsShowSustainable">限免</view>
  26. </view>
  27. </view>
  28. <view class="item">
  29. <view class="item-text" @click="goDetail(item)">
  30. <text class="activity-title"> {{ item.ActivityName }} </text>
  31. <text class="text_twoLine" v-if="item.ActivityTypeName == '专家电话会' || item.ActivityTypeName == '专家线下沙龙'">专家背景:{{ item.Expert }} </text>
  32. <text class="text_twoLine" v-if="item.ActivityTypeName == '公司调研电话会' || item.ActivityTypeName == '公司线下调研'">嘉宾:{{ item.DistinguishedGuest }} </text>
  33. <text class="text_twoLine" v-if="item.ActivityTypeName == '分析师电话会' || item.ActivityTypeName == '分析师线下沙龙'">主讲人:{{ item.Speaker }}</text>
  34. </view>
  35. <block v-if="item.ActiveState == 1">
  36. <view class="bottom-box city" v-if="item.ActiveState == 1 && item.IsLimitPeople == 1 && item.ActivityTypeName == '公司调研电话会'">
  37. <view class="city-img">
  38. <image v-if="item.City" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png" />
  39. {{ item.City }}
  40. </view>
  41. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item.ActivityId)">我要报名</text>
  42. <text class="button" v-else @click="signupCancel(item.ActivityId, 2, item.ActivityTime)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  43. </view>
  44. <view class="bottom-box" v-else-if="item.ActivityType == 1">
  45. <view class="" style="width: 130rpx">
  46. <text v-if="item.ActivityTypeId == 1" @click="askingGo(item)">帮我代问</text>
  47. </view>
  48. <text @click="meetingReminderAdd(item.ActivityId)" v-if="item.IsCancelMeetingReminder == 0">会议提醒</text>
  49. <text @click="meetingReminderCancel(item.ActivityId)" v-else>取消提醒</text>
  50. <text class="button" v-if="item.IsSignup !== 1" @click="signupAdd(item.ActivityId, 1)">预约外呼</text>
  51. <text class="button" @click="signupCancel(item.ActivityId, 1, item.ActivityTime)" v-else>取消外呼</text>
  52. </view>
  53. <view class="bottom-box city" v-else>
  54. <view class="city-img">
  55. <image v-if="item.City" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png" />
  56. {{ item.City }}
  57. </view>
  58. <text class="button" v-if="item.IsSignup !== 1" @click="signupAdd(item.ActivityId, 3)">我要报名</text>
  59. <text class="button" v-else @click="signupCancel(item.ActivityId, 3, item.ActivityTime)">取消报名</text>
  60. </view>
  61. </block>
  62. </view>
  63. </view>
  64. </view>
  65. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  66. </view>
  67. <view class="select-box">
  68. <u-popup v-model="selectShow" mode="bottom">
  69. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  70. <view style="color: #2c83ff" @click="signupAdd('id', 1)">预约外呼</view>
  71. <view style="color: #2c83ff" @click="signupAdd('id', 2)">自主拨入</view>
  72. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  73. </u-popup>
  74. </view>
  75. <!-- 所有自定义弹框 -->
  76. <modalDialog
  77. :isShow="isShow"
  78. :signupType="signupType"
  79. :goFollow="goFollow"
  80. :signupStatus="signupStatus"
  81. :hasPermission="hasPermission"
  82. :jurisdictionList="jurisdictionList"
  83. :editIsShow="editIsShow"
  84. :isCancelShow="isCancelShow"
  85. :idTypeCancel="idTypeCancel"
  86. @cancelShowBtn="cancelEnsure"
  87. :countryCode="countryCode"
  88. :mobileEdit="mobileEdit"
  89. :goOnNextStep="goOnNextStep"
  90. :isShowhasPermission="isShowhasPermission"
  91. :applyForIsShow="applyForIsShow"
  92. :mailboxBinding="mailboxBinding"
  93. />
  94. </view>
  95. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  96. </view>
  97. </template>
  98. <script>
  99. import { activity, User } from "@/config/api.js";
  100. import { Throttle } from "@/config/util.js";
  101. import modalDialog from "@/components/modalDialog.vue";
  102. import myMixin from "../components/index.js";
  103. import myActivityMixin from "../components/indexActivity.js";
  104. import areaCode from "@/activityPages/components/areaCode.vue";
  105. export default {
  106. mixins: [myMixin, myActivityMixin],
  107. data() {
  108. return {
  109. hasPermission: "", //是否有权限
  110. contentImg: "",
  111. contentLabel: "",
  112. label: "",
  113. type:"",
  114. permissionIds:'',
  115. whichDay:'',
  116. };
  117. },
  118. components: {
  119. areaCode,
  120. modalDialog,
  121. },
  122. methods: {
  123. async getActivityList() {
  124. const res = await activity.getActivityListNew({
  125. PageSize: this.pageSize,
  126. CurrentIndex: this.page_no,
  127. Label: this.type ? '' : this.label,
  128. ActiveState: 1,
  129. ActivityTypeId:this.type ? this.label : '',
  130. ChartPermissionIds: this.permissionIds,
  131. WhichDay: this.whichDay,
  132. });
  133. if (res.Ret === 200) {
  134. if(this.type) {
  135. uni.setNavigationBarTitle({
  136. title: this.type
  137. });
  138. }
  139. this.contentImg = res.Data.ImgUrl;
  140. this.contentLabel = res.Data.Label;
  141. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  142. if (this.page_no === 1) {
  143. this.collectList = res.Data.List || [];
  144. if (this.refresh) {
  145. uni.stopPullDownRefresh();
  146. this.refresh = false;
  147. }
  148. } else {
  149. this.collectList = this.collectList.concat(res.Data.List);
  150. }
  151. }
  152. },
  153. //获取是否需要填写区号接口
  154. countryCcode() {
  155. User.countryCcode().then((res) => {
  156. if (res.Ret == 200) {
  157. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode;
  158. }
  159. });
  160. },
  161. },
  162. onLoad(option) {
  163. this.label = option.title
  164. this.type = option.type
  165. this.permissionIds = option.permissionIds || ""
  166. this.whichDay = option.whichDay || ""
  167. this.getActivityList();
  168. this.countryCcode();
  169. },
  170. onShow() {
  171. this.$store.dispatch("checkHandle")
  172. },
  173. /* 触底 */
  174. onReachBottom: Throttle(function () {
  175. if (this.status === "nomore") return;
  176. this.status = "loading";
  177. this.page_no++;
  178. this.getActivityList();
  179. }),
  180. /* 下拉刷新 */
  181. onPullDownRefresh: Throttle(function () {
  182. this.page_no = 1;
  183. this.refresh = true;
  184. this.getActivityList();
  185. }),
  186. /** 用户点击分享 */
  187. onShareAppMessage: function (res) {
  188. return {
  189. title: this.type || this.label,
  190. path: "/activityPages/themeActivity/themeActivity?title=" + this.label + "&permissionIds=" + this.permissionIds + "&whichDay="+ this.whichDay,
  191. };
  192. },
  193. };
  194. </script>
  195. <style lang="scss" scoped>
  196. .theme-container {
  197. background: #f7f7f7;
  198. padding-bottom: 30rpx;
  199. position: relative;
  200. .top-title {
  201. position: sticky;
  202. top: 0;
  203. z-index: 99;
  204. background-color: #fff;
  205. display: flex;
  206. align-items: center;
  207. height: 96rpx;
  208. color: #3385ff;
  209. font-size: 30rpx;
  210. .img {
  211. width: 38rpx;
  212. height: 38rpx;
  213. }
  214. }
  215. .collect-ul{
  216. padding-top: 10rpx;
  217. }
  218. }
  219. @import "../components/indexActivity.scss";
  220. </style>