mySchedulepage.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view class="container activity-content">
  3. <view class="collect-ul" v-if="haveData">
  4. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
  5. <view class="title-date" @click="goDetail(item)">
  6. <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  7. {{ item.ActivityTimeText }}
  8. <view class="audio-back" v-if="item.AudioLink" @click.stop="audioPlayBack(item)">
  9. <image
  10. class="audio-img"
  11. :src="
  12. curVoiceId === item.ActivityId && !curAudioPaused
  13. ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop.png'
  14. : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group.png'
  15. "
  16. ></image>
  17. 回放
  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 class="img-status">已结束</text>
  26. <view class="img-type">
  27. <image :src="item.ImgUrlText" mode=""></image>
  28. </view>
  29. </view>
  30. <view class="item">
  31. <view class="item-text" @click="goDetail(item)">
  32. <text class="activity-title"> {{ item.ActivityName }} </text>
  33. <text class="text_twoLine" v-if="item.Expert">专家背景:{{ item.Expert }} </text>
  34. <text class="text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
  35. <text class="text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
  36. </view>
  37. <block v-if="item.ActiveState == 1">
  38. <view :class="['bottom-box', item.ActivityTypeId == 1 && item.IsLimitPeople == 0 && 'expert-item', item.City && 'city']">
  39. <view class="city-img" v-if="item.City">
  40. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  41. {{ item.City }}
  42. </view>
  43. <view style="display: flex">
  44. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId == 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  45. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  46. <text v-if="item.IsShowMeetingReminder" @click="meetingReminderAdd(item.ActivityId, item.IsCancelMeetingReminder)">
  47. {{ item.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  48. </text>
  49. <view v-if="item.IsShowHelpSsk" style="width: 130rpx">
  50. <text @click="askingGo(item)">帮我带问</text>
  51. </view>
  52. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId != 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  53. <block v-if="item.IsShowSignup">
  54. <block v-if="item.IsCClassMeeting">
  55. <text class="button" @click="signupIsAddOfCancel(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  56. </block>
  57. <block v-else>
  58. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item.ActivityId)">我要报名</text>
  59. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  60. </block>
  61. </block>
  62. </view>
  63. </view>
  64. </block>
  65. <block v-else>
  66. <view class="bottom-box city" v-if="item.City">
  67. <view class="city-img">
  68. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  69. {{ item.City }}
  70. </view>
  71. </view>
  72. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  73. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  74. </view>
  75. </block>
  76. </view>
  77. </view>
  78. </view>
  79. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  80. </view>
  81. <view class="nodata" v-if="!haveData">
  82. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  83. <text>{{ tabsActive == 0 ? "暂时没有符合条件的活动" : "暂无我的日程" }}</text>
  84. </view>
  85. <!-- 所有自定义弹框 -->
  86. <modalDialog
  87. :isShow="isShow"
  88. :signupType="signupType"
  89. :goFollow="goFollow"
  90. :signupStatus="signupStatus"
  91. :hasPermission="hasPermission"
  92. :jurisdictionList="jurisdictionList"
  93. :editIsShow="editIsShow"
  94. :isCancelShow="isCancelShow"
  95. :idTypeCancel="idTypeCancel"
  96. @cancelShowBtn="cancelEnsure"
  97. :countryCode="countryCode"
  98. :mobileEdit="mobileEdit"
  99. :goOnNextStep="goOnNextStep"
  100. :isShowhasPermission="isShowhasPermission"
  101. :applyForIsShow="applyForIsShow"
  102. :mailboxBinding="mailboxBinding"
  103. />
  104. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  105. <audioModule :showAudioPop.sync="showAudioPop" />
  106. </view>
  107. </template>
  108. <script>
  109. import { activity } from "@/config/api.js";
  110. import { Throttle } from "@/config/util.js";
  111. import myActivityMixin from "@/activityPages/components/indexActivity.js";
  112. import modalDialog from "@/components/modalDialog.vue";
  113. import freeCharge from "@/components/freeCharge";
  114. import audioModule from "@/components/audioModule/index";
  115. let app = getApp();
  116. export default {
  117. mixins: [myActivityMixin],
  118. components: {
  119. modalDialog,
  120. freeCharge,
  121. audioModule,
  122. },
  123. data() {
  124. return {
  125. collectTypeList: [],
  126. haveData: true,
  127. whichDay: "",
  128. listChartPermission: [],
  129. listChartPermissionInit: [],
  130. chartPermissionIds: "",
  131. isShowJurisdiction: false, //
  132. isGetJurisdiction: 0,
  133. isrefresh: true,
  134. activityTypeId: "",
  135. showAudioPop: false,
  136. };
  137. },
  138. computed: {
  139. curVoiceId() {
  140. //当前正在播放的音频id
  141. return this.$store.state.audioBg.activityId;
  142. },
  143. curAudioPaused() {
  144. //当前音频是否暂停状态
  145. return this.$store.state.audioBg.paused;
  146. },
  147. },
  148. methods: {
  149. //
  150. async getActivityList() {
  151. const res = await activity.getScheduleList({ PageSize: this.pageSize, CurrentIndex: this.page_no });
  152. if (res.Ret === 200) {
  153. this.contentImg = res.Data.ImgUrl;
  154. this.contentLabel = res.Data.Label;
  155. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  156. if (this.page_no === 1) {
  157. this.collectList = res.Data.List || [];
  158. this.haveData = this.collectList.length ? true : false;
  159. if (this.refresh) {
  160. uni.stopPullDownRefresh();
  161. this.refresh = false;
  162. }
  163. } else {
  164. this.collectList = this.collectList.concat(res.Data.List);
  165. }
  166. }
  167. },
  168. //点击了回放
  169. audioPlayBack(item) {
  170. // 判断是否为同一个音频
  171. if (this.$store.state.audioBg.activityId == item.ActivityId) {
  172. if (this.globalBgAudioManager.paused) {
  173. this.globalBgAudioManager.play();
  174. } else {
  175. this.globalBgAudioManager.pause();
  176. }
  177. } else {
  178. this.showAudioPop = true;
  179. this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  180. }
  181. },
  182. },
  183. //load
  184. onLoad(option) {
  185. this.getActivityList();
  186. },
  187. async onShow() {
  188. await this.$store.dispatch("checkHandle", "noGO");
  189. },
  190. /* 触底 */
  191. onReachBottom: Throttle(function () {
  192. if (this.status === "nomore") return;
  193. this.status = "loading";
  194. this.page_no++;
  195. this.getActivityList();
  196. }),
  197. /* 下拉刷新 */
  198. onPullDownRefresh: Throttle(function () {
  199. this.page_no = 1;
  200. this.refresh = true;
  201. this.getActivityList();
  202. }),
  203. };
  204. </script>
  205. <style scoped lang="scss">
  206. .activity-content {
  207. background-color: #f7f7f7;
  208. padding-bottom: 90rpx;
  209. position: relative;
  210. padding-top: 20rpx;
  211. .nodata_ico {
  212. width: 374rpx;
  213. height: 288rpx;
  214. }
  215. .title-date {
  216. position: relative;
  217. .audio-back {
  218. position: absolute;
  219. right: 0;
  220. top: 50%;
  221. transform: translateY(-50%);
  222. width: 99rpx;
  223. height: 39rpx;
  224. font-size: 24rpx;
  225. color: #fff;
  226. display: flex;
  227. align-items: center;
  228. background-color: #3385ff;
  229. border-radius: 20rpx;
  230. .audio-img {
  231. width: 30rpx;
  232. height: 30rpx;
  233. margin: 0 5rpx;
  234. }
  235. }
  236. }
  237. }
  238. @import "@/activityPages/components/indexActivity.scss";
  239. </style>