activityBack.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <view class="activity-content activity-search-content">
  3. <!-- 活动列表 -->
  4. <view :class="['activity-pages', tabsActiveSearch == 4 && 'content-padding']">
  5. <view class="collect-ul">
  6. <view class="collect-ltem" v-for="(item, index) in collectList" :key="index">
  7. <view class="title-date" @click="goDetail(item)">
  8. <text :class="item.ActivityType == 1 ? '' : 'xianxia'">{{ item.ActivityType == 1 ? "线上" : "线下" }}</text>
  9. {{ item.ActivityTimeText }}
  10. <view class="audio-back" v-if="item.AudioLink" @click.stop="audioPlayBack(item)">
  11. <image
  12. class="audio-img"
  13. :src="
  14. curVoiceId === item.ActivityId && !curAudioPaused
  15. ? 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_stop.png'
  16. : 'https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/back_group.png'
  17. "
  18. ></image>
  19. {{ curVoiceId === item.ActivityId && !curAudioPaused ? "暂停" : "回放" }}
  20. </view>
  21. </view>
  22. <view class="item-li">
  23. <view class="item-img" @click="goDetail(item)">
  24. <image :src="item.ImgUrl"> </image>
  25. <text v-if="item.ActiveState == 1" class="img-status begin">未开始</text>
  26. <text v-else-if="item.ActiveState == 2" class="img-status proceed">进行中</text>
  27. <text v-else class="img-status">已结束</text>
  28. <view class="img-type">
  29. <image :src="item.ImgUrlText" mode=""></image>
  30. </view>
  31. </view>
  32. <view class="item">
  33. <view class="item-text" @click="goDetail(item)">
  34. <text class="activity-title"> {{ item.ActivityName }} </text>
  35. <text class="text_twoLine" v-if="item.Expert">专家背景:{{ item.Expert }} </text>
  36. <text class="text_twoLine" v-if="item.DistinguishedGuest">嘉宾:{{ item.DistinguishedGuest }} </text>
  37. <text class="text_twoLine" v-if="item.Speaker">主讲人:{{ item.Speaker }}</text>
  38. </view>
  39. <block v-if="item.ActiveState == 1">
  40. <view :class="['bottom-box', item.ActivityTypeId == 1 && item.IsLimitPeople == 0 && 'expert-item', item.City && 'city']">
  41. <view class="city-img" v-if="item.City">
  42. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png"></image>
  43. {{ item.City }}
  44. </view>
  45. <view style="display: flex">
  46. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId == 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  47. <text v-if="item.IsShowAppointment" @click="summaryIsHandel(item)">{{ item.IsAppointment == 1 ? "取消纪要" : "预约纪要" }}</text>
  48. <text v-if="item.IsShowMeetingReminder" @click="meetingReminderAdd(item.ActivityId, item.IsCancelMeetingReminder)">
  49. {{ item.IsCancelMeetingReminder == 0 ? "消息提醒" : "取消提醒" }}
  50. </text>
  51. <view v-if="item.IsShowHelpSsk" style="width: 130rpx">
  52. <text @click="askingGo(item)">帮我带问</text>
  53. </view>
  54. <text v-if="item.IsShowOutboundCall && item.ActivityTypeId != 1" class="button" @click="signupIsAddOfCancel(item, 1)">{{ item.IsSignup == 1 ? "取消外呼" : "预约外呼" }}</text>
  55. <text v-if="item.IsShowDetails" @click="goDetail(item)" class="button">查看详情</text>
  56. <block v-if="item.IsShowSignup">
  57. <block v-if="item.IsCClassMeeting">
  58. <text class="button" @click="signupIsAddOfCancel(item, 3, 'CClass')">{{ item.IsSignup == 1 ? "取消报名" : "我要报名" }}</text>
  59. </block>
  60. <block v-else>
  61. <text class="button" v-if="item.IsSignup !== 1" @click="wanttosignup(item)">我要报名</text>
  62. <text class="button" v-else @click="signupIsAddOfCancel(item, 2)">{{ item.SignupType == 1 ? "取消外呼" : "取消报名" }}</text>
  63. </block>
  64. </block>
  65. </view>
  66. </view>
  67. </block>
  68. <block v-else>
  69. <view class="bottom-box city" v-if="item.City">
  70. <view class="city-img">
  71. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/location.png" />
  72. {{ item.City }}
  73. </view>
  74. </view>
  75. <view class="bottom-box real-time" v-if="item.ActiveState == 2 && item.ActivityTypeId == 1">
  76. <text class="button" @click="askingGo(item, '提问')">实时提问</text>
  77. </view>
  78. </block>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 各种自定义弹框 -->
  85. <modalDialog
  86. :isShow="isShow"
  87. :signupType="signupType"
  88. :goFollow="goFollow"
  89. :signupStatus="signupStatus"
  90. :hasPermission="hasPermission"
  91. :jurisdictionList="jurisdictionList"
  92. :editIsShow="editIsShow"
  93. :isCancelShow="isCancelShow"
  94. :idTypeCancel="idTypeCancel"
  95. @cancelShowBtn="cancelEnsure"
  96. :countryCode="countryCode"
  97. :mobileEdit="mobileEdit"
  98. :goOnNextStep="goOnNextStep"
  99. :isShowhasPermission="isShowhasPermission"
  100. :applyForIsShow="applyForIsShow"
  101. :mailboxBinding="mailboxBinding"
  102. />
  103. <!-- 选择区号弹出层 -->
  104. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  105. <!-- 参会方式弹出层 -->
  106. <view class="select-box">
  107. <u-popup v-model="selectShow" mode="bottom">
  108. <view style="color: #333333; font-size: 28rpxrpx">请选择参会方式</view>
  109. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 1)">预约外呼</view>
  110. <view style="color: #2c83ff" @click="signupIsAddOfCancel('', 2)">自主拨入</view>
  111. <view style="color: #a9afb8" @click="selectShow = false">取消</view>
  112. </u-popup>
  113. </view>
  114. <view v-if="showAudioBox">
  115. <audioModule :showAudioPop.sync="showAudioPop" />
  116. </view>
  117. <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
  118. </view>
  119. </template>
  120. <script>
  121. import modalDialog from "@/components/modalDialog.vue";
  122. import areaCode from "@/components/activity/areaCode.vue";
  123. import myMixin from "@/components/activity/index.js";
  124. import myActivityMixin from "@/components/activity/indexActivity.js";
  125. import freeCharge from "@/components/freeCharge";
  126. import audioModule from "@/components/audioModule/index";
  127. import { activity } from "@/config/api";
  128. export default {
  129. props: {
  130. collectLists: {
  131. type: Array,
  132. default: [],
  133. },
  134. tabsActiveSearch: {
  135. type: Number,
  136. },
  137. },
  138. data() {
  139. return {
  140. isShowSearch: false,
  141. status: "loadmore",
  142. totalPage: "",
  143. haveData: true,
  144. activeState: 0, //活动进行状态
  145. activeStateOption: [
  146. {
  147. name: "全部",
  148. state: 0,
  149. },
  150. {
  151. name: "可回放",
  152. state: 1,
  153. },
  154. ],
  155. selectShow: false,
  156. showAudioPop: false,
  157. };
  158. },
  159. mixins: [myMixin, myActivityMixin],
  160. components: {
  161. modalDialog,
  162. areaCode,
  163. freeCharge,
  164. audioModule,
  165. },
  166. watch: {
  167. collectLists: {
  168. handler(newVal) {
  169. this.collectList = newVal;
  170. },
  171. deep: true,
  172. immediate: true,
  173. },
  174. },
  175. methods: {
  176. //获取是否需要填写区号接口
  177. countryCcode() {
  178. User.countryCcode().then((res) => {
  179. if (res.Ret == 200) {
  180. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode;
  181. }
  182. });
  183. },
  184. //点击了回放
  185. async audioPlayBack(item) {
  186. if (!item.BackAudioPlay) {
  187. const res = await activity.getActivityDetail({
  188. ActivityId: item.ActivityId,
  189. });
  190. if (res.Ret === 200) {
  191. item.BackAudioPlay = res.Data;
  192. }
  193. }
  194. this.hasPermission = item.BackAudioPlay.HasPermission;
  195. this.jurisdictionList.ActivityId = item.BackAudioPlay.ActivityId;
  196. if (this.hasPermission == 1) {
  197. this.$store.commit("audioBg/parseIntAudio", true);
  198. // 判断是否为同一个音频
  199. if (this.$store.state.audioBg.activityId == item.ActivityId) {
  200. if (this.globalBgAudioManager.paused) {
  201. this.globalBgAudioManager.play();
  202. } else {
  203. this.globalBgAudioManager.pause();
  204. }
  205. } else {
  206. this.$store.commit("audioBg/addAudio", { list: item.VoiceList, activityId: item.ActivityId, activityTitle: item.ActivityName });
  207. }
  208. this.showAudioPop = true;
  209. } else if (this.hasPermission == 2) {
  210. this.jurisdictionList.SellerMobile = item.BackAudioPlay.SellerMobile;
  211. this.jurisdictionList.SellerName = item.BackAudioPlay.SellerName;
  212. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  213. this.isShowhasPermission = true;
  214. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  215. this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
  216. this.applyForIsShow = true;
  217. }
  218. },
  219. },
  220. computed: {
  221. curVoiceId() {
  222. //当前正在播放的音频id
  223. return this.$store.state.audioBg.activityId;
  224. },
  225. curAudioPaused() {
  226. //当前音频是否暂停状态
  227. return this.$store.state.audioBg.paused;
  228. },
  229. showAudioBox() {
  230. return this.$store.state.audioBg.parseIntShow;
  231. },
  232. },
  233. };
  234. </script>
  235. <style scoped lang="scss">
  236. .activity-pages {
  237. padding-bottom: 30rpx;
  238. }
  239. @import "@/components/activity/indexActivity.scss";
  240. .activity-search-content {
  241. background-color: #f7f7f7;
  242. .ipt-right {
  243. z-index: 11;
  244. }
  245. .collect-ltem {
  246. margin-top: 0 !important;
  247. margin-bottom: 20rpx !important;
  248. }
  249. .select-conyent {
  250. display: flex;
  251. float: right;
  252. margin-bottom: 20rpx;
  253. height: 51rpx;
  254. width: 252rpx;
  255. border-radius: 47rpx;
  256. overflow: hidden;
  257. margin-right: 30rpx;
  258. .state-item {
  259. width: 126rpx;
  260. height: 51rpx;
  261. text-align: center;
  262. line-height: 51rpx;
  263. color: #999999;
  264. font-size: 24rpx;
  265. background-color: #f8f8fa;
  266. }
  267. .state-active-item {
  268. background: #3385ff;
  269. color: #fff;
  270. border-radius: 47rpx;
  271. }
  272. }
  273. .title-date {
  274. position: relative;
  275. .audio-back {
  276. position: absolute;
  277. right: 0;
  278. top: 50%;
  279. transform: translateY(-50%);
  280. width: 99rpx;
  281. height: 39rpx;
  282. font-size: 24rpx;
  283. color: #fff;
  284. display: flex;
  285. align-items: center;
  286. background-color: #3385ff;
  287. border-radius: 20rpx;
  288. padding-left: 4rpx;
  289. .audio-img {
  290. width: 30rpx;
  291. height: 30rpx;
  292. margin: 0 5rpx;
  293. }
  294. }
  295. }
  296. .top-content {
  297. width: 100%;
  298. position: fixed;
  299. top: 0;
  300. left: 0;
  301. z-index: 99;
  302. background-color: #fff;
  303. .searchTarget-header {
  304. position: relative;
  305. width: 100%;
  306. background-color: #fff;
  307. padding: 20rpx 0;
  308. display: flex;
  309. justify-content: center;
  310. align-items: center;
  311. .sea_ipt_placeholder {
  312. color: #8d8d8d;
  313. }
  314. .sea_ipt {
  315. width: 682rpx;
  316. height: 70rpx;
  317. line-height: 70rpx;
  318. box-sizing: border-box;
  319. background: #f9f9f9;
  320. font-size: 26rpx;
  321. color: #4a4a4a;
  322. padding: 0 180rpx 0 78rpx;
  323. border-radius: 70rpx;
  324. }
  325. .sea_ico {
  326. width: 31rpx;
  327. height: 31rpx;
  328. position: absolute;
  329. left: 60rpx;
  330. top: 50%;
  331. transform: translateY(-50%);
  332. }
  333. .ipt-right {
  334. display: flex;
  335. align-items: center;
  336. position: absolute;
  337. right: 59rpx;
  338. top: 50%;
  339. transform: translateY(-50%);
  340. color: #3385ff;
  341. .line {
  342. margin: 0 21rpx;
  343. color: #e0e0e0;
  344. }
  345. }
  346. }
  347. .search-cont {
  348. height: calc(100vh - 200rpx);
  349. padding-bottom: 20rpx;
  350. overflow: hidden;
  351. overflow-y: auto;
  352. background-color: #f7f7f7;
  353. .search-cont-top {
  354. padding: 0 34rpx 0;
  355. margin-bottom: 10rpx;
  356. padding-top: 20rpx;
  357. &:last-child {
  358. margin-bottom: 0;
  359. }
  360. .cont-tit {
  361. font-size: 32rpx;
  362. margin-bottom: 20rpx;
  363. font-weight: 500;
  364. display: flex;
  365. justify-content: space-between;
  366. .empty_ico {
  367. width: 32rpx;
  368. height: 33rpx;
  369. }
  370. }
  371. .targetList {
  372. display: flex;
  373. flex-wrap: wrap;
  374. font-size: 28rpx;
  375. .target-item {
  376. width: 50%;
  377. margin-bottom: 20rpx;
  378. }
  379. .chart-item {
  380. width: 100%;
  381. margin-bottom: 20rpx;
  382. }
  383. }
  384. }
  385. }
  386. }
  387. }
  388. .content-padding {
  389. padding-top: 90rpx !important;
  390. }
  391. </style>