activityDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <template>
  2. <view class="activity-detail">
  3. <view class="" v-if="haveAuth==1">
  4. <view class="notice" v-if="detailData.IsLimitPeople==1">
  5. <van-notice-bar color="#FFFFFF" background="#FE9000"
  6. text="该活动参与名额有限,报名客户请按时参加,若不能及时参加请联系销售取消,爽约会影响您的后续报名资格" />
  7. </view>
  8. <view class="content">
  9. <view v-if="detailData.ActivityName" class="dialog-title">{{detailData.ActivityName}}</view>
  10. <view class="city-box">
  11. <text v-if="detailData.ActivityTypeName">活动类型:{{detailData.ActivityTypeName}}</text>
  12. <view class="city" v-if="detailData.City">
  13. <image src="../../static/img/location.png" mode=""></image>
  14. <text>{{detailData.City}}</text>
  15. </view>
  16. </view>
  17. <text v-if="detailData.ChartPermissionName">所属行业:{{detailData.ChartPermissionName}}</text>
  18. <text v-if="detailData.ActivityTimeText">活动时间:{{detailData.ActivityTimeText}}</text>
  19. <text v-if="detailData.DistinguishedGuest">嘉&nbsp;&nbsp; &nbsp;&nbsp;宾:{{detailData.DistinguishedGuest}}</text>
  20. <text v-if="detailData.Host">主&nbsp; 持&nbsp; 人:{{detailData.Host}}</text>
  21. <text v-if="detailData.Expert">专&nbsp;&nbsp; &nbsp; &nbsp;家:{{detailData.Expert}}</text>
  22. <text v-if="detailData.City">城&nbsp;&nbsp; &nbsp; &nbsp;市:{{detailData.City}}</text>
  23. <view v-if="detailData.MainlandTell">大陆拨入:
  24. <text class="phone" @click="phonebtn(detailData.MainlandTell)">{{detailData.MainlandTell}}</text>
  25. </view>
  26. <view v-if="detailData.HongKongTell">香港拨入:
  27. <text @click="phonebtn(detailData.HongKongTell)" class="phone">{{detailData.HongKongTell}}</text>
  28. </view>
  29. <view v-if="detailData.TaiwanTell">台湾拨入:
  30. <text @click="phonebtn(detailData.TaiwanTell)" class="phone">{{detailData.TaiwanTell}}</text>
  31. </view>
  32. <view v-if="detailData.AmericaTell">美国拨入:
  33. <text @click="phonebtn(detailData.AmericaTell)" class="phone">{{detailData.AmericaTell}}</text>
  34. </view>
  35. <!-- <text v-if="detailData.ReportLink">报告链接:{{detailData.ReportLink}}</text> -->
  36. <!-- <view class=""> -->
  37. <text v-if="detailData.ParticipationCode">拨入密码:{{detailData.ActivityTypeName=='公司调研电话会'&&detailData.IsSignup==0?'请报名获取':detailData.ParticipationCode}}</text>
  38. <!-- <text>拨入密码: {{detailData.ParticipationCode}}</text> -->
  39. <!-- </view> -->
  40. </view>
  41. <view class="network" v-if="detailData.OnlineParticipation">
  42. <view class="network-left">网络参会:</view>
  43. <view class="network-right" @click="networkBtn" style="color: #2C83FF;">
  44. {{detailData.OnlineParticipation}}
  45. </view>
  46. </view>
  47. <view v-if="detailData.Address" class="network">
  48. <view class="network-left">活动地址:</view>
  49. <view class="network-right" v-if="detailData.IsSignup==0 && detailData.ActivityTypeName=='公司线下调研'">请报名获取
  50. </view>
  51. <view class="network-right" v-else>{{detailData.Address}}</view>
  52. </view>
  53. <view v-if="detailData.Highlights" class="network">
  54. <view class="network-left">活动亮点: </view>
  55. <view class="network-right">{{detailData.Highlights}}
  56. </view>
  57. </view>
  58. <view v-if="detailData.Theme" class="network">
  59. <view class="network-left">主&nbsp;&nbsp; &nbsp; &nbsp;题: </view>
  60. <view class="network-right">{{detailData.Theme}}
  61. </view>
  62. </view>
  63. <view v-if="detailData.Remarks" class="network">
  64. <view class="network-left">备&nbsp;&nbsp; &nbsp; &nbsp;注: </view>
  65. <view class="network-right">{{detailData.Remarks}}
  66. </view>
  67. </view>
  68. <view class="network" v-if="detailData.ReportLink">
  69. <view class="network-left">相关报告:</view>
  70. <view class="network-right" style="color: #2C83FF;" @click="goDetail">
  71. 查看报告链接
  72. </view>
  73. </view>
  74. <view class="" style="height: 50rpx;"></view>
  75. <view>
  76. <view class="content-bottom"
  77. v-if="detailData.ActivityTypeId==1||detailData.ActivityTypeId==2||(detailData.ActivityTypeId==3&&detailData.IsLimitPeople==0)||(detailData.IsLimitPeople==0 && detailData.ActivityTypeName=='公司线下调研')">
  78. <view class="" v-if="detailData.ActiveState==1">
  79. <view class="make-outbound" @click="signupCancel(1)" v-if="detailData.IsSignup==1">
  80. 取消外呼
  81. </view>
  82. <view class="make-outbound" v-else @click="signupAdd(1)">
  83. 预约外呼
  84. </view>
  85. <view @click="meetingReminderCancel" class="make-conference"
  86. v-if="detailData.IsCancelMeetingReminder==1">
  87. 取消会议提醒
  88. <text>(会前15分钟推送微信消息提醒)</text>
  89. </view>
  90. <view @click="meetingReminderAdd" class="make-conference" v-else>
  91. 会议提醒
  92. <text>(会前15分钟推送微信消息提醒)</text>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="bottom-env" v-else>
  97. <view class="apply-box" v-if="detailData.ActiveState==1">
  98. <view class="cancel-apply">
  99. 报名人数:<text>{{detailData.SignupNum}}</text>/{{detailData.LimitPeopleNum}}
  100. </view>
  101. <view v-if="detailData.IsSignup==0" class="ok-apply" @click="wanttosignup">
  102. {{detailData.SignupType==1?'预约外呼':'我要报名'}}
  103. </view>
  104. <view v-else class="ok-apply" @click="signupCancel(2)">
  105. {{detailData.SignupType==1?'取消外呼':'取消报名'}}
  106. </view>
  107. </view>
  108. </view>
  109. <view class="select-box">
  110. <u-popup v-model="selectShow" mode="bottom">
  111. <view style="color: #333333;font-size: 28rpxrpx;">请选择参会方式</view>
  112. <view style="color: #2C83FF;" @click="signupAdd(1)">预约外呼</view>
  113. <view style="color: #2C83FF;" @click="signupAdd(2)">自主拨入</view>
  114. <view style="color: #A9AFB8;" @click="selectShow=false">取消</view>
  115. </u-popup>
  116. </view>
  117. </view>
  118. <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
  119. :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure" />
  120. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  121. </view>
  122. <view v-else>
  123. <jurisdiction :haveAuth="haveAuth" :industryMsg="industryMsg" :sellerMobile="sellerMobile"></jurisdiction>
  124. </view>
  125. </view>
  126. </template>
  127. <script>
  128. import {
  129. activity,
  130. User
  131. } from "@/config/api.js"
  132. import modalDialog from '@/components/modalDialog.vue'
  133. import jurisdiction from "./jurisdiction/components.vue"
  134. let app = getApp()
  135. export default {
  136. data() {
  137. return {
  138. id: '',
  139. detailData: {},
  140. isShowJurisdiction: false,
  141. isGain: true,
  142. signupType: '', //关注类型
  143. goFollow: false, //是否关注公众号
  144. signupStatus: 'Success', //4个不同的类型提示文案
  145. isShow: false, //弹框
  146. isCancelShow: false,
  147. idTypeCancel: {
  148. id: '',
  149. type: 1,
  150. cutId: '',
  151. state: ''
  152. },
  153. selectShow: false,
  154. isAreaCode: false,
  155. areaCode: {
  156. id: '',
  157. type: ''
  158. },
  159. isNeedAddCountryCode: false,
  160. haveAuth: '',
  161. industryMsg: '',
  162. sellerMobile: ''
  163. }
  164. },
  165. components: {
  166. modalDialog,
  167. jurisdiction
  168. },
  169. methods: {
  170. //获取是否需要填写区号接口
  171. countryCcode() {
  172. User.countryCcode().then(res => {
  173. if (res.Ret == 200) {
  174. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode
  175. }
  176. })
  177. },
  178. getActivityDetail() {
  179. activity.getActivityDetail({
  180. ActivityId: this.id
  181. }).then(res => {
  182. if (res.Ret == 200) {
  183. this.haveAuth = res.Data.HasPermission
  184. this.industryMsg = res.Data.PopupMsg.split(':', 1)
  185. this.sellerMobile = res.Data.SellerMobile
  186. if (res.Data.HasPermission == 1) {
  187. this.detailData = res.Data.Detail
  188. let pages = getCurrentPages()
  189. let prevPage = pages[pages.length - 2]
  190. const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == this.id)
  191. prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup
  192. prevPage.$vm.collectList[index].SignupNum = this.detailData.SignupNum
  193. prevPage.$vm.collectList[index].IsCancelMeetingReminder = this.detailData
  194. .IsCancelMeetingReminder
  195. }
  196. }
  197. })
  198. },
  199. phonebtn(phone) {
  200. uni.makePhoneCall({
  201. phoneNumber: phone
  202. });
  203. },
  204. //报名
  205. signupAdd(type) {
  206. if (this.isNeedAddCountryCode) {
  207. this.isAreaCode = true
  208. this.areaCode = {
  209. id,
  210. type
  211. }
  212. } else {
  213. activity.signupAdd({
  214. ActivityId: Number(this.id),
  215. SignupType: type,
  216. }).then(res => {
  217. if (res.Ret == 200) {
  218. if (res.Data.GoFollow && res.Data.SignupStatus !== 'Success' || !res.Data.GoFollow) {
  219. this.isShow = true
  220. } else {
  221. this.goFollow = res.Data.GoFollow
  222. }
  223. this.signupType = res.Data.SignupType
  224. this.signupStatus = res.Data.SignupStatus
  225. this.idTypeCancel = {
  226. cutId: res.Data.ActivityId,
  227. state: 1
  228. }
  229. }
  230. })
  231. }
  232. this.selectShow = false
  233. },
  234. //取消报名
  235. signupCancel(type) {
  236. this.isCancelShow = true
  237. this.idTypeCancel = {
  238. id: Number(this.id),
  239. type,
  240. cutId: '',
  241. state: 0
  242. }
  243. },
  244. networkBtn() {
  245. uni.navigateTo({
  246. url: '/pages/networkAttend/networkAttend?url=' + this.detailData.OnlineParticipation,
  247. })
  248. },
  249. cancelEnsure() {
  250. this.getActivityDetail()
  251. },
  252. goDetail() {
  253. uni.navigateTo({
  254. url: '/pages/reportDetail/reportDetail?idReport=' + this.detailData.ReportLink,
  255. })
  256. },
  257. meetingReminderAdd() {
  258. activity.meetingReminderAdd({
  259. ActivityId: Number(this.id)
  260. }).then(res => {
  261. if (res.Ret == 200) {
  262. uni.showModal({
  263. confirmText: '知道了',
  264. confirmColor: '#3385FF',
  265. content: res.Msg,
  266. showCancel: false,
  267. success: (res) => {
  268. if (res.confirm) {
  269. this.getActivityDetail()
  270. }
  271. }
  272. })
  273. }
  274. })
  275. },
  276. //取消会议提醒接口
  277. meetingReminderCancel() {
  278. activity.meetingReminderCancel({
  279. ActivityId: Number(this.id)
  280. }).then(res => {
  281. if (res.Ret == 200) {
  282. uni.showModal({
  283. confirmText: '知道了',
  284. confirmColor: '#3385FF',
  285. content: res.Msg,
  286. showCancel: false,
  287. success: (res) => {
  288. if (res.confirm) {
  289. this.getActivityDetail()
  290. }
  291. }
  292. })
  293. }
  294. })
  295. },
  296. wanttosignup() {
  297. if (this.detailData.IsLimitPeople == 1 && this.detailData.ActivityTypeName == '公司调研电话会') {
  298. this.selectShow = true
  299. } else {
  300. this.signupAdd(3)
  301. }
  302. },
  303. },
  304. onLoad(option) {
  305. this.id = option.id
  306. this.countryCcode()
  307. this.getActivityDetail()
  308. }
  309. }
  310. </script>
  311. <style lang="scss">
  312. .activity-detail {
  313. padding-bottom: 100rpx;
  314. .notice {
  315. height: 60rpx;
  316. width: 100%;
  317. }
  318. .content {
  319. padding: 34rpx 34rpx 0rpx;
  320. margin-bottom: -20rpx;
  321. color: #333333;
  322. font-size: 28rpx;
  323. view {
  324. padding-left: 20rpx;
  325. }
  326. text {
  327. line-height: 80rpx;
  328. padding-left: 20rpx;
  329. }
  330. .phone {
  331. padding: 0;
  332. display: inline-block;
  333. color: #2C83FF;
  334. }
  335. .dialog-title {
  336. width: 682rpx;
  337. padding: 20rpx 0;
  338. background: #F2F2F2;
  339. opacity: 0.8;
  340. font-size: 30rpx;
  341. font-weight: bold;
  342. margin-bottom: 15rpx;
  343. }
  344. .city-box {
  345. display: flex;
  346. align-items: center;
  347. text {
  348. padding: 0;
  349. }
  350. .city {
  351. display: flex;
  352. color: #2088FF;
  353. align-items: center;
  354. image {
  355. width: 27rpx;
  356. height: 32rpx;
  357. margin-right: 12rpx;
  358. }
  359. }
  360. }
  361. }
  362. .network {
  363. margin-top: 30rpx;
  364. display: flex;
  365. padding-left: 54rpx;
  366. .network-left {
  367. width: 150rpx;
  368. }
  369. .network-right {
  370. width: 480rpx;
  371. }
  372. }
  373. .content-bottom {
  374. margin: 50rpx 0 30rpx;
  375. .make-outbound {
  376. margin: 0 auto;
  377. width: 368rpx;
  378. height: 80rpx;
  379. background: linear-gradient(268deg, #2DDBFF 0%, #1599FF 49%, #005EFF 100%);
  380. opacity: 1;
  381. border-radius: 4rpx;
  382. color: #FFFFFF;
  383. font-size: 34rpx;
  384. line-height: 80rpx;
  385. text-align: center;
  386. }
  387. .make-conference {
  388. margin: 30rpx auto;
  389. width: 368rpx;
  390. height: 80rpx;
  391. border: 2px solid #2C83FF;
  392. opacity: 1;
  393. border-radius: 4rpx;
  394. padding-top: 10rpx;
  395. text-align: center;
  396. color: #2C83FF;
  397. text {
  398. font-size: 16rpx;
  399. }
  400. }
  401. }
  402. .bottom-env {
  403. position: fixed;
  404. bottom: 0;
  405. padding-bottom: constant(safe-area-inset-bottom);
  406. padding-bottom: env(safe-area-inset-bottom);
  407. left: 0;
  408. width: 100%;
  409. background-color: #FFFFFF;
  410. }
  411. .apply-box {
  412. width: 100%;
  413. height: 100rpx;
  414. display: flex;
  415. font-size: 32rpx;
  416. color: #333333;
  417. line-height: 100rpx;
  418. .cancel-apply {
  419. display: flex;
  420. padding-left: 50rpx;
  421. flex: 1;
  422. border: 2rpx solid #005eff;
  423. background-color: #fff;
  424. text {
  425. color: #005EFF;
  426. }
  427. }
  428. .ok-apply {
  429. flex: 1;
  430. background: linear-gradient(268deg, #2DDBFF 0%, #1599FF 49%, #005EFF 100%);
  431. text-align: center;
  432. color: #FFFFFF;
  433. }
  434. }
  435. .select-box {
  436. width: 100%;
  437. view {
  438. height: 95prx;
  439. line-height: 95rpx;
  440. text-align: center;
  441. font-size: 32rpx;
  442. border-bottom: 1rpx solid #EBEBEB;
  443. ;
  444. }
  445. }
  446. }
  447. </style>