mySchedulepage.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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)">我要报名</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. <view class="select-box">
  106. <u-popup v-model="selectShow" mode="bottom">
  107. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  108. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 1)">预约外呼</view>
  109. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 2)">自主拨入</view>
  110. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  111. </u-popup>
  112. </view>
  113. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  114. <view v-if="showAudioBox">
  115. <audioModule :showAudioPop.sync="showAudioPop" />
  116. </view>
  117. </view>
  118. </template>
  119. <script>
  120. import { activity } from "@/config/api.js";
  121. import { Throttle } from "@/config/util.js";
  122. import myActivityMixin from "@/components/activity/indexActivity.js";
  123. import modalDialog from "@/components/modalDialog.vue";
  124. import freeCharge from "@/components/freeCharge";
  125. import audioModule from "@/components/audioModule/index";
  126. let app = getApp();
  127. export default {
  128. mixins: [myActivityMixin],
  129. components: {
  130. modalDialog,
  131. freeCharge,
  132. audioModule,
  133. },
  134. data() {
  135. return {
  136. collectTypeList: [],
  137. haveData: true,
  138. whichDay: "",
  139. listChartPermission: [],
  140. listChartPermissionInit: [],
  141. chartPermissionIds: "",
  142. isShowJurisdiction: false, //
  143. isGetJurisdiction: 0,
  144. isrefresh: true,
  145. activityTypeId: "",
  146. showAudioPop: false,
  147. selectShow: false,
  148. };
  149. },
  150. computed: {
  151. curVoiceId() {
  152. //当前正在播放的音频id
  153. return this.$store.state.audioBg.activityId;
  154. },
  155. curAudioPaused() {
  156. //当前音频是否暂停状态
  157. return this.$store.state.audioBg.paused;
  158. },
  159. showAudioBox() {
  160. return this.$store.state.audioBg.parseIntShow;
  161. },
  162. },
  163. methods: {
  164. //
  165. async getActivityList() {
  166. const res = await activity.getScheduleList({ PageSize: this.pageSize, CurrentIndex: this.page_no });
  167. if (res.Ret === 200) {
  168. this.contentImg = res.Data.ImgUrl;
  169. this.contentLabel = res.Data.Label;
  170. this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
  171. if (this.page_no === 1) {
  172. this.collectList = res.Data.List || [];
  173. this.haveData = this.collectList.length ? true : false;
  174. if (this.refresh) {
  175. uni.stopPullDownRefresh();
  176. this.refresh = false;
  177. }
  178. } else {
  179. this.collectList = this.collectList.concat(res.Data.List);
  180. }
  181. }
  182. },
  183. //点击了回放
  184. // audioPlayBack(item) {
  185. // // 判断是否为同一个音频
  186. // if (this.$store.state.audioBg.activityId == item.ActivityId) {
  187. // if (this.globalBgAudioManager.paused) {
  188. // this.globalBgAudioManager.play();
  189. // } else {
  190. // this.globalBgAudioManager.pause();
  191. // }
  192. // } else {
  193. // this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  194. // }
  195. // this.showAudioPop = true;
  196. // },
  197. //点击了回放
  198. async audioPlayBack(item) {
  199. if (!item.BackAudioPlay) {
  200. const res = await activity.getActivityDetail({
  201. ActivityId: item.ActivityId,
  202. });
  203. if (res.Ret === 200) {
  204. item.BackAudioPlay = res.Data;
  205. }
  206. }
  207. this.hasPermission = item.BackAudioPlay.HasPermission;
  208. this.jurisdictionList.ActivityId = item.BackAudioPlay.ActivityId;
  209. if (this.hasPermission == 1) {
  210. this.$store.commit("audioBg/parseIntAudio", true);
  211. // 判断是否为同一个音频
  212. if (this.$store.state.audioBg.activityId == item.ActivityId) {
  213. if (this.globalBgAudioManager.paused) {
  214. this.globalBgAudioManager.play();
  215. } else {
  216. this.globalBgAudioManager.pause();
  217. }
  218. } else {
  219. this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  220. }
  221. this.showAudioPop = true;
  222. } else if (this.hasPermission == 2) {
  223. this.jurisdictionList.SellerMobile = item.BackAudioPlay.SellerMobile;
  224. this.jurisdictionList.SellerName = item.BackAudioPlay.SellerName;
  225. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  226. this.isShowhasPermission = true;
  227. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  228. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  229. this.applyForIsShow = true;
  230. }
  231. },
  232. },
  233. //load
  234. onLoad(option) {
  235. this.getActivityList();
  236. },
  237. async onShow() {
  238. await this.$store.dispatch("checkHandle", "noGO");
  239. this.$store.commit("audioBg/parseIntAudio", true);
  240. },
  241. onHide() {
  242. this.$store.commit("audioBg/parseIntAudio", false);
  243. },
  244. /* 触底 */
  245. onReachBottom: Throttle(function () {
  246. if (this.status === "nomore") return;
  247. this.status = "loading";
  248. this.page_no++;
  249. this.getActivityList();
  250. }),
  251. /* 下拉刷新 */
  252. onPullDownRefresh: Throttle(function () {
  253. this.page_no = 1;
  254. this.refresh = true;
  255. this.getActivityList();
  256. }),
  257. };
  258. </script>
  259. <style scoped lang="scss">
  260. .activity-content {
  261. background-color: #f7f7f7;
  262. padding-bottom: 90rpx;
  263. position: relative;
  264. padding-top: 20rpx;
  265. .nodata_ico {
  266. width: 374rpx;
  267. height: 288rpx;
  268. }
  269. .title-date {
  270. position: relative;
  271. .audio-back {
  272. position: absolute;
  273. right: 0;
  274. top: 50%;
  275. transform: translateY(-50%);
  276. width: 99rpx;
  277. height: 39rpx;
  278. font-size: 24rpx;
  279. color: #fff;
  280. display: flex;
  281. align-items: center;
  282. background-color: #3385ff;
  283. border-radius: 20rpx;
  284. padding-left: 4rpx;
  285. .audio-img {
  286. width: 30rpx;
  287. height: 30rpx;
  288. margin: 0 5rpx;
  289. }
  290. }
  291. }
  292. }
  293. @import "@/components/activity/indexActivity.scss";
  294. </style>