mySchedulepage.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. {{ curVoiceId === item.ActivityId && !curAudioPaused ? "暂停" : "回放" }}
  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. <text v-if="item.IsShowDetails" @click="goDetail(item)" class="button">查看详情</text>
  54. <block v-if="item.IsShowSignup">
  55. <block v-if="item.IsCClassMeeting">
  56. <text class="button" @click="signupIsAddOfCancel(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  57. </block>
  58. <block v-else>
  59. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item.ActivityId)">我要报名</text>
  60. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  61. </block>
  62. </block>
  63. </view>
  64. </view>
  65. </block>
  66. <block v-else>
  67. <view class="bottom-box city" v-if="item.City">
  68. <view class="city-img">
  69. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  70. {{ item.City }}
  71. </view>
  72. </view>
  73. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  74. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  75. </view>
  76. </block>
  77. </view>
  78. </view>
  79. </view>
  80. <u-loadmore :status="status" icon-type="flower" :load-text="loadText" margin-top="20" v-if="totalPage > 1" />
  81. </view>
  82. <view class="nodata" v-if="!haveData">
  83. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  84. <text>{{ tabsActive == 0 ? "暂时没有符合条件的活动" : "暂无我的日程" }}</text>
  85. </view>
  86. <!-- 所有自定义弹框 -->
  87. <modalDialog
  88. :isShow="isShow"
  89. :signupType="signupType"
  90. :goFollow="goFollow"
  91. :signupStatus="signupStatus"
  92. :hasPermission="hasPermission"
  93. :jurisdictionList="jurisdictionList"
  94. :editIsShow="editIsShow"
  95. :isCancelShow="isCancelShow"
  96. :idTypeCancel="idTypeCancel"
  97. @cancelShowBtn="cancelEnsure"
  98. :countryCode="countryCode"
  99. :mobileEdit="mobileEdit"
  100. :goOnNextStep="goOnNextStep"
  101. :isShowhasPermission="isShowhasPermission"
  102. :applyForIsShow="applyForIsShow"
  103. :mailboxBinding="mailboxBinding"
  104. />
  105. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  106. <view v-if="showAudioBox">
  107. <audioModule :showAudioPop.sync="showAudioPop" />
  108. </view>
  109. </view>
  110. </template>
  111. <script>
  112. import { activity } from "@/config/api.js";
  113. import { Throttle } from "@/config/util.js";
  114. import myActivityMixin from "@/activityPages/components/indexActivity.js";
  115. import modalDialog from "@/components/modalDialog.vue";
  116. import freeCharge from "@/components/freeCharge";
  117. import audioModule from "@/components/audioModule/index";
  118. let app = getApp();
  119. export default {
  120. mixins: [myActivityMixin],
  121. components: {
  122. modalDialog,
  123. freeCharge,
  124. audioModule,
  125. },
  126. data() {
  127. return {
  128. collectTypeList: [],
  129. haveData: true,
  130. whichDay: "",
  131. listChartPermission: [],
  132. listChartPermissionInit: [],
  133. chartPermissionIds: "",
  134. isShowJurisdiction: false, //
  135. isGetJurisdiction: 0,
  136. isrefresh: true,
  137. activityTypeId: "",
  138. showAudioPop: false,
  139. };
  140. },
  141. computed: {
  142. curVoiceId() {
  143. //当前正在播放的音频id
  144. return this.$store.state.audioBg.activityId;
  145. },
  146. curAudioPaused() {
  147. //当前音频是否暂停状态
  148. return this.$store.state.audioBg.paused;
  149. },
  150. showAudioBox() {
  151. return this.$store.state.audioBg.parseIntShow;
  152. },
  153. },
  154. methods: {
  155. //
  156. async getActivityList() {
  157. const res = await activity.getScheduleList({ PageSize: this.pageSize, CurrentIndex: this.page_no });
  158. if (res.Ret === 200) {
  159. this.contentImg = res.Data.ImgUrl;
  160. this.contentLabel = res.Data.Label;
  161. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  162. if (this.page_no === 1) {
  163. this.collectList = res.Data.List || [];
  164. this.haveData = this.collectList.length ? true : false;
  165. if (this.refresh) {
  166. uni.stopPullDownRefresh();
  167. this.refresh = false;
  168. }
  169. } else {
  170. this.collectList = this.collectList.concat(res.Data.List);
  171. }
  172. }
  173. },
  174. //点击了回放
  175. // audioPlayBack(item) {
  176. // // 判断是否为同一个音频
  177. // if (this.$store.state.audioBg.activityId == item.ActivityId) {
  178. // if (this.globalBgAudioManager.paused) {
  179. // this.globalBgAudioManager.play();
  180. // } else {
  181. // this.globalBgAudioManager.pause();
  182. // }
  183. // } else {
  184. // this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  185. // }
  186. // this.showAudioPop = true;
  187. // },
  188. //点击了回放
  189. async audioPlayBack(item) {
  190. if (!item.BackAudioPlay) {
  191. const res = await activity.getActivityDetail({
  192. ActivityId: item.ActivityId,
  193. });
  194. if (res.Ret === 200) {
  195. item.BackAudioPlay = res.Data;
  196. }
  197. }
  198. this.hasPermission = item.BackAudioPlay.HasPermission;
  199. this.jurisdictionList.ActivityId = item.BackAudioPlay.ActivityId;
  200. if (this.hasPermission == 1) {
  201. this.$store.commit("audioBg/parseIntAudio", true);
  202. // 判断是否为同一个音频
  203. if (this.$store.state.audioBg.activityId == item.ActivityId) {
  204. if (this.globalBgAudioManager.paused) {
  205. this.globalBgAudioManager.play();
  206. } else {
  207. this.globalBgAudioManager.pause();
  208. }
  209. } else {
  210. this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  211. }
  212. this.showAudioPop = true;
  213. } else if (this.hasPermission == 2) {
  214. this.jurisdictionList.SellerMobile = item.BackAudioPlay.SellerMobile;
  215. this.jurisdictionList.SellerName = item.BackAudioPlay.SellerName;
  216. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  217. this.isShowhasPermission = true;
  218. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  219. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  220. this.applyForIsShow = true;
  221. }
  222. },
  223. },
  224. //load
  225. onLoad(option) {
  226. this.getActivityList();
  227. },
  228. async onShow() {
  229. await this.$store.dispatch("checkHandle", "noGO");
  230. this.$store.commit("audioBg/parseIntAudio", true);
  231. },
  232. onHide() {
  233. this.$store.commit("audioBg/parseIntAudio", false);
  234. },
  235. /* 触底 */
  236. onReachBottom: Throttle(function () {
  237. if (this.status === "nomore") return;
  238. this.status = "loading";
  239. this.page_no++;
  240. this.getActivityList();
  241. }),
  242. /* 下拉刷新 */
  243. onPullDownRefresh: Throttle(function () {
  244. this.page_no = 1;
  245. this.refresh = true;
  246. this.getActivityList();
  247. }),
  248. };
  249. </script>
  250. <style scoped lang="scss">
  251. .activity-content {
  252. background-color: #f7f7f7;
  253. padding-bottom: 90rpx;
  254. position: relative;
  255. padding-top: 20rpx;
  256. .nodata_ico {
  257. width: 374rpx;
  258. height: 288rpx;
  259. }
  260. .title-date {
  261. position: relative;
  262. .audio-back {
  263. position: absolute;
  264. right: 0;
  265. top: 50%;
  266. transform: translateY(-50%);
  267. width: 99rpx;
  268. height: 39rpx;
  269. font-size: 24rpx;
  270. color: #fff;
  271. display: flex;
  272. align-items: center;
  273. background-color: #3385ff;
  274. border-radius: 20rpx;
  275. padding-left: 4rpx;
  276. .audio-img {
  277. width: 30rpx;
  278. height: 30rpx;
  279. margin: 0 5rpx;
  280. }
  281. }
  282. }
  283. }
  284. @import "@/activityPages/components/indexActivity.scss";
  285. </style>