activityDetail.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. <template>
  2. <view class="container activity-detail">
  3. <view class="" v-if="haveAuth==1">
  4. <!-- 头部滚动显示 -->
  5. <view class="notice" v-if="detailData.IsLimitPeople==1">
  6. <van-notice-bar color="#FFFFFF" background="#FE9000"
  7. text="该活动参与名额有限,报名客户请按时参加,若不能按时参加请及时取消报名,爽约会影响您的后续报名资格" />
  8. </view>
  9. <!-- 内容部分 -->
  10. <view class="content">
  11. <view v-if="detailData.ActivityName" class="dialog-title" :class="1==1?'brackets-title':''">{{detailData.ActivityName}}</view>
  12. <view class="city-box">
  13. <text v-if="detailData.ActivityTypeName" >活动类型:</text>
  14. <view class="city" >
  15. <text style="color: #333;">{{detailData.ActivityTypeName}}</text>
  16. <image v-if="detailData.City" style="margin-left: 15rpx" src="../../static/img/location.png" mode=""></image>
  17. <text v-if="detailData.City">{{detailData.City}}</text>
  18. </view>
  19. <view class="choose-limit" @click="strictSelection" v-if="detailData.IsShowSustainable">
  20. <image src="../../static/img/choose_icon.png" mode=""></image>
  21. <image class="limit-img" src="../../static/img/limit_icon.png" mode=""></image>
  22. </view>
  23. </view>
  24. <view v-if="detailData.ChartPermissionName" class="network">
  25. <view class="network-left">所属行业:</view>
  26. <view class="network-right">{{detailData.ChartPermissionName}}</view>
  27. </view>
  28. <view v-if="detailData.ActivityTimeText" class="network">
  29. <view class="network-left">活动时间:</view>
  30. <view class="network-right">{{detailData.ActivityTimeText}}</view>
  31. </view>
  32. <view v-if="detailData.DistinguishedGuest" class="network">
  33. <view class="network-left" >嘉&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;宾:</view>
  34. <view class="network-right">{{detailData.DistinguishedGuest}}</view>
  35. </view>
  36. <view v-if="detailData.Host" class="network">
  37. <view class="network-left">主&nbsp;&nbsp;持&nbsp;人:</view>
  38. <view class="network-right">{{detailData.Host}}</view>
  39. </view>
  40. <view v-if="detailData.Speaker" class="network">
  41. <view class="network-left">主&nbsp;&nbsp;讲&nbsp;人:</view>
  42. <view class="network-right">{{detailData.Speaker}}</view>
  43. </view>
  44. <view v-if="detailData.Expert" class="network">
  45. <view class="network-left">专家背景:</view>
  46. <view class="network-right">
  47. <rich-text :nodes="detailData.Expert"></rich-text>
  48. </view>
  49. </view>
  50. <view v-if="detailData.MainlandTell" class="network">
  51. <view class="network-left">大陆拨入:</view>
  52. <view class="network-right" style="color: #2C83FF;" @click="phonebtn(detailData.MainlandTell)">{{detailData.MainlandTell}}</view>
  53. </view>
  54. <view v-if="detailData.HongKongTell" class="network">
  55. <view class="network-left">香港拨入:</view>
  56. <view class="network-right" style="color: #2C83FF;" @click="phonebtn(detailData.HongKongTell)">{{detailData.HongKongTell}}</view>
  57. </view>
  58. <view v-if="detailData.TaiwanTell" class="network">
  59. <view class="network-left">台湾拨入:</view>
  60. <view class="network-right" style="color: #2C83FF;" @click="phonebtn(detailData.TaiwanTell)">{{detailData.TaiwanTell}}</view>
  61. </view>
  62. <view v-if="detailData.AmericaTell" class="network">
  63. <view class="network-left">美国拨入:</view>
  64. <view class="network-right" style="color: #2C83FF;" @click="phonebtn(detailData.AmericaTell)">{{detailData.AmericaTell}}</view>
  65. </view>
  66. <view v-if="detailData.ParticipationCode" class="network">
  67. <view class="network-left">拨入密码:</view>
  68. <view class="network-right">{{detailData.ActivityTypeName=='公司调研电话会'&&detailData.IsLimitPeople==1 && detailData.IsSignup==0?'请报名获取':detailData.ParticipationCode}}</view>
  69. </view>
  70. <view class="network" v-if="detailData.OnlineParticipation">
  71. <view class="network-left">网络参会:</view>
  72. <view class="network-right" @click="networkBtn" style="color: #2C83FF;">
  73. {{detailData.OnlineParticipation}}
  74. </view>
  75. </view>
  76. <view v-if="detailData.Address" class="network">
  77. <view class="network-left">活动地址:</view>
  78. <view class="network-right" v-if="detailData.IsSignup==0 && detailData.ActivityTypeName=='公司线下调研'&&detailData.IsLimitPeople==1">请报名获取
  79. </view>
  80. <view class="network-right" v-else>{{detailData.Address}}</view>
  81. </view>
  82. <view v-if="detailData.Highlights" class="network">
  83. <view class="network-left">活动亮点: </view>
  84. <view class="network-right">
  85. <rich-text :nodes="detailData.Highlights"></rich-text>
  86. </view>
  87. </view>
  88. <view class="network" v-if="detailData.ReportLink">
  89. <view class="network-left">相关报告:</view>
  90. <view class="network-right" style="color: #2C83FF;" @click="goDetail">
  91. 查看报告链接
  92. </view>
  93. </view>
  94. <view v-if="detailData.Theme" class="network">
  95. <view class="network-left">主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题: </view>
  96. <view class="network-right">
  97. <rich-text :nodes="detailData.Theme"></rich-text>
  98. </view>
  99. </view>
  100. <view v-if="detailData.Remarks" class="network">
  101. <view class="network-left">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注: </view>
  102. <view class="network-right">
  103. <rich-text :nodes="detailData.Remarks"></rich-text>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="" style="height: 50rpx;"></view>
  108. <!-- 操作按钮部分 -->
  109. <view>
  110. <view class="content-bottom"
  111. v-if="detailData.ActivityTypeId==1||detailData.ActivityTypeId==2||(detailData.ActivityTypeId==3&&detailData.IsLimitPeople==0)||(detailData.IsLimitPeople==0 && detailData.ActivityTypeName=='公司线下调研')">
  112. <view class="" v-if="detailData.ActiveState==1">
  113. <view class="make-outbound" @click="signupCancel(1)" v-if="detailData.IsSignup==1">
  114. 取消外呼
  115. </view>
  116. <view class="make-outbound" v-else @click="signupAdd(1)">
  117. 预约外呼
  118. </view>
  119. <view @click="meetingReminderCancel" class="make-conference"
  120. v-if="detailData.IsCancelMeetingReminder==1">
  121. 取消会议提醒
  122. <text>(会前15分钟推送微信消息提醒)</text>
  123. </view>
  124. <view @click="meetingReminderAdd" class="make-conference" v-else>
  125. 会议提醒
  126. <text>(会前15分钟推送微信消息提醒)</text>
  127. </view>
  128. <view v-if="detailData.ActivityTypeId==1" class="make-generation make-conference" @click="askingGo">
  129. 帮我代问
  130. </view>
  131. </view>
  132. </view>
  133. <view class="bottom-env" v-else>
  134. <view class="apply-box" v-if="detailData.ActiveState==1">
  135. <view class="cancel-apply">
  136. 报名人数:<text>{{detailData.SignupNum}}</text>/{{detailData.LimitPeopleNum}}
  137. </view>
  138. <view v-if="detailData.IsSignup==0" class="ok-apply" @click="wanttosignup">
  139. {{detailData.SignupType==1?'预约外呼':'我要报名'}}
  140. </view>
  141. <view v-else class="ok-apply" @click="signupCancel(2)">
  142. {{detailData.SignupType==1?'取消外呼':'取消报名'}}
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 参会方式的弹出层 -->
  148. <view class="select-box">
  149. <u-popup v-model="selectShow" mode="bottom">
  150. <view style="color: #333333;font-size: 28rpxrpx;">请选择参会方式</view>
  151. <view style="color: #2C83FF;" @click="signupAdd(1)">预约外呼</view>
  152. <view style="color: #2C83FF;" @click="signupAdd(2)">自主拨入</view>
  153. <view style="color: #A9AFB8;" @click="selectShow=false">取消</view>
  154. </u-popup>
  155. </view>
  156. <!-- 各种弹框部分 -->
  157. <modalDialog :isShow="isShow" :signupType="signupType" :goFollow="goFollow" :signupStatus="signupStatus"
  158. :isCancelShow="isCancelShow" :idTypeCancel="idTypeCancel" @cancelShowBtn="cancelEnsure" :editIsShow="editIsShow" :countryCode="countryCode" :mobileEdit="mobileEdit" :goOnNextStep="goOnNextStep" :mailboxBinding="mailboxBinding"/>
  159. <!-- 区号的弹出层 -->
  160. <areaCode :isAreaCode="isAreaCode" :areaCode="areaCode" />
  161. </view>
  162. <!-- 权限部分 -->
  163. <view v-else>
  164. <jurisdiction :haveAuth="haveAuth" :industryMsg="industryMsg" :msgType="msgType" :sellerMobile="sellerMobile" :sellerName="sellerName"></jurisdiction>
  165. </view>
  166. </view>
  167. </template>
  168. <script>
  169. import { activity, User } from "@/config/api.js"
  170. import modalDialog from '@/components/modalDialog.vue'
  171. import areaCode from "@/components/areaCode.vue";
  172. import jurisdiction from "./jurisdiction/components.vue"
  173. let app = getApp()
  174. export default {
  175. data() {
  176. return {
  177. id: '',
  178. detailData: {},
  179. isShowJurisdiction: false,
  180. isGain: true,
  181. signupType: '', //关注类型
  182. goFollow: false, //是否关注公众号
  183. signupStatus: 'Success', //4个不同的类型提示文案
  184. isShow: false, //弹框
  185. isCancelShow: false,
  186. idTypeCancel: {
  187. id: '',
  188. type: 1,
  189. cutId: '',
  190. state: ''
  191. },
  192. selectShow: false,
  193. isAreaCode: false,
  194. areaCode: {
  195. id: '',
  196. type: ''
  197. },
  198. isNeedAddCountryCode: false,
  199. haveAuth: '',
  200. industryMsg: '',
  201. sellerMobile: '',
  202. sellerName:'',//销售名称
  203. msgType:"" ,
  204. editIsShow:false,//外呼莫泰框
  205. countryCode:'',//外呼区号
  206. mobileEdit:'',//外呼手机号
  207. goOnNextStep:'',//设置外呼号后弹出哪个
  208. mailboxBinding:false,//是否绑定邮箱
  209. }
  210. },
  211. components: {
  212. modalDialog,
  213. jurisdiction,
  214. areaCode
  215. },
  216. watch:{
  217. haveAuth:{
  218. handler(){
  219. if(this.haveAuth==1){
  220. this.$store.dispatch("statistics",{PageType:'ActivitParticulars',DetailId:this.id})
  221. }
  222. },
  223. immediate:true
  224. }
  225. },
  226. methods: {
  227. //获取是否需要填写区号接口
  228. countryCcode() {
  229. User.countryCcode().then(res => {
  230. if (res.Ret == 200) {
  231. this.isNeedAddCountryCode = res.Data.IsNeedAddCountryCode
  232. }
  233. })
  234. },
  235. getActivityDetail() {
  236. activity.getActivityDetail({
  237. ActivityId: this.id
  238. }).then(res => {
  239. if (res.Ret == 200) {
  240. this.haveAuth = res.Data.HasPermission
  241. this.industryMsg = res.Data.PopupMsg
  242. this.sellerMobile = res.Data.SellerMobile
  243. this.sellerName=res.Data.SellerName
  244. this.msgType=res.Data.MsgType
  245. if (res.Data.HasPermission == 1) {
  246. this.detailData = res.Data.Detail
  247. let pages = getCurrentPages()
  248. let prevPage = pages[pages.length - 2]
  249. const index = prevPage.$vm.collectList.findIndex(item => item.ActivityId == this.id)
  250. prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup
  251. prevPage.$vm.collectList[index].SignupNum = this.detailData.SignupNum
  252. prevPage.$vm.collectList[index].IsCancelMeetingReminder = this.detailData
  253. .IsCancelMeetingReminder
  254. }
  255. }
  256. })
  257. },
  258. phonebtn(phone) {
  259. uni.makePhoneCall({
  260. phoneNumber: phone
  261. });
  262. },
  263. //报名
  264. signupAdd(type) {
  265. if (this.isNeedAddCountryCode) {
  266. this.isAreaCode = true
  267. this.areaCode = {
  268. id:Number(this.id),
  269. type
  270. }
  271. } else {
  272. activity.signupAdd({
  273. ActivityId: Number(this.id),
  274. SignupType: type,
  275. }).then(res => {
  276. if (res.Ret == 200) {
  277. this.signupType = res.Data.SignupType
  278. this.signupStatus = res.Data.SignupStatus
  279. this.countryCode=res.Data.CountryCode
  280. this.mobileEdit=res.Data.Mobile
  281. this.goOnNextStep=res.Data.GoFollow
  282. this.idTypeCancel = {
  283. cutId: res.Data.ActivityId,
  284. state: 1
  285. }
  286. if( res.Data.GoBindEmail){
  287. this.mailboxBinding=true
  288. return
  289. }
  290. if(res.Data.SignupStatus !== 'Success') {
  291. this.isShow = true
  292. }else {
  293. if(res.Data.GoOutboundMobile){
  294. this.editIsShow=true
  295. }else if (res.Data.GoFollow){
  296. this.goFollow = res.Data.GoFollow
  297. }else if(res.Data.SignupStatus == 'Success') {
  298. this.isShow = true
  299. }
  300. }
  301. }
  302. })
  303. }
  304. this.selectShow = false
  305. },
  306. //取消报名
  307. signupCancel(type) {
  308. this.isCancelShow = true
  309. this.idTypeCancel = {
  310. id: Number(this.id),
  311. type,
  312. cutId: '',
  313. state: 0
  314. }
  315. },
  316. networkBtn() {
  317. uni.navigateTo({
  318. url: '/activityPages/networkAttend/networkAttend?url=' + this.detailData.OnlineParticipation,
  319. })
  320. },
  321. cancelEnsure() {
  322. this.getActivityDetail()
  323. },
  324. goDetail() {
  325. uni.navigateTo({
  326. url: '/pages/reportDetail/reportDetail?id=' + this.detailData.ArticleId,
  327. })
  328. },
  329. askingGo(){
  330. uni.navigateTo({
  331. url: '/activityPages/generationAsk/generationAsk?id='+this.id
  332. })
  333. },
  334. meetingReminderAdd() {
  335. activity.meetingReminderAdd({
  336. ActivityId: Number(this.id)
  337. }).then(res => {
  338. if (res.Ret == 200) {
  339. uni.showModal({
  340. confirmText: '知道了',
  341. confirmColor: '#3385FF',
  342. content: res.Msg,
  343. showCancel: false,
  344. success: (res) => {
  345. if (res.confirm) {
  346. this.getActivityDetail()
  347. }
  348. }
  349. })
  350. }
  351. })
  352. },
  353. //取消会议提醒接口
  354. meetingReminderCancel() {
  355. activity.meetingReminderCancel({
  356. ActivityId: Number(this.id)
  357. }).then(res => {
  358. if (res.Ret == 200) {
  359. uni.showModal({
  360. confirmText: '知道了',
  361. confirmColor: '#3385FF',
  362. content: res.Msg,
  363. showCancel: false,
  364. success: (res) => {
  365. if (res.confirm) {
  366. this.getActivityDetail()
  367. }
  368. }
  369. })
  370. }
  371. })
  372. },
  373. wanttosignup() {
  374. if (this.detailData.IsLimitPeople == 1 && this.detailData.ActivityTypeName == '公司调研电话会') {
  375. this.selectShow = true
  376. } else {
  377. this.signupAdd(3)
  378. }
  379. },
  380. //点击了严选
  381. strictSelection(){
  382. activity.descriptionOfResearch().then(res=>{
  383. if(res.Ret==200){
  384. uni.showModal({
  385. content:res.Data.Item.ConfigValue,
  386. confirmText:'知道了',
  387. showCancel:false,
  388. confirmColor:'#3385FF',
  389. success: function (res) {
  390. }
  391. });
  392. }
  393. })
  394. }
  395. },
  396. onLoad(option) {
  397. this.id = option.id
  398. },
  399. onShow() {
  400. this.$store.dispatch("checkHandle").then(res=>{
  401. this.countryCcode()//判断是否加区号
  402. this.getActivityDetail()
  403. })
  404. },
  405. /**
  406. * 用户点击分享
  407. */
  408. onShareAppMessage: function(res) {
  409. return {
  410. title: '活动详情',
  411. path: '/activityPages/activityDetail/activityDetail?id='+this.id,
  412. success: (res) => {},
  413. fail: (err) => {}
  414. }
  415. },
  416. }
  417. </script>
  418. <style lang="scss">
  419. .activity-detail {
  420. padding-bottom: 100rpx;
  421. .notice {
  422. height: 60rpx;
  423. width: 100%;
  424. }
  425. .choose-limit {
  426. position: relative;
  427. display: flex;
  428. align-items: center;
  429. // margin-left: 20rpx;
  430. image {
  431. width: 93rpx;
  432. height: 38rpx;
  433. }
  434. .limit-img {
  435. position: absolute;
  436. top: -13rpx;
  437. right: -30rpx;
  438. width: 46rpx;
  439. height: 26rpx;
  440. }
  441. }
  442. .content {
  443. padding: 34rpx 34rpx 0rpx;
  444. margin-bottom: -20rpx;
  445. color: #333333;
  446. font-size: 28rpx;
  447. view {
  448. padding-left: 20rpx;
  449. }
  450. text {
  451. line-height: 80rpx;
  452. padding-left: 20rpx;
  453. }
  454. .phone {
  455. padding: 0;
  456. display: inline-block;
  457. color: #2C83FF;
  458. }
  459. .dialog-title {
  460. width: 682rpx;
  461. padding: 20rpx;
  462. background: #F2F2F2;
  463. opacity: 0.8;
  464. font-size: 30rpx;
  465. font-weight: bold;
  466. margin-bottom: 15rpx;
  467. color: #000;
  468. }
  469. .brackets-title {
  470. padding-left: 20rpx;
  471. }
  472. .city-box {
  473. display: flex;
  474. align-items: center;
  475. text {
  476. padding: 0;
  477. }
  478. .city {
  479. display: flex;
  480. color: #2088FF;
  481. align-items: center;
  482. image {
  483. width: 27rpx;
  484. height: 32rpx;
  485. margin-right: 12rpx;
  486. }
  487. }
  488. }
  489. }
  490. .network {
  491. margin-bottom: 30rpx;
  492. padding: 0 !important;
  493. display: flex;
  494. .network-left {
  495. width: 160rpx;
  496. text-align-last:justify;
  497. text-align:justify;
  498. }
  499. .network-right {
  500. width: 480rpx;
  501. }
  502. }
  503. .content-bottom {
  504. margin: 50rpx 0 30rpx;
  505. .make-outbound {
  506. margin: 0 auto;
  507. width: 368rpx;
  508. height: 80rpx;
  509. background: linear-gradient(268deg, #2DDBFF 0%, #1599FF 49%, #005EFF 100%);
  510. opacity: 1;
  511. border-radius: 4rpx;
  512. color: #FFFFFF;
  513. font-size: 34rpx;
  514. line-height: 80rpx;
  515. text-align: center;
  516. }
  517. .make-generation {
  518. padding-top: 0rpx !important;
  519. line-height: 76rpx;
  520. }
  521. .make-conference {
  522. margin: 30rpx auto;
  523. width: 368rpx;
  524. height: 80rpx;
  525. border: 2px solid #2C83FF;
  526. opacity: 1;
  527. border-radius: 4rpx;
  528. padding-top: 5rpx;
  529. text-align: center;
  530. color: #2C83FF;
  531. font-size:30rpx;
  532. text {
  533. font-size: 16rpx;
  534. }
  535. }
  536. }
  537. .bottom-env {
  538. position: fixed;
  539. bottom: 0;
  540. padding-bottom: constant(safe-area-inset-bottom);
  541. padding-bottom: env(safe-area-inset-bottom);
  542. left: 0;
  543. width: 100%;
  544. background-color: #FFFFFF;
  545. }
  546. .apply-box {
  547. width: 100%;
  548. height: 100rpx;
  549. display: flex;
  550. font-size: 32rpx;
  551. color: #333333;
  552. line-height: 100rpx;
  553. .cancel-apply {
  554. display: flex;
  555. padding-left: 50rpx;
  556. flex: 1;
  557. border: 2rpx solid #005eff;
  558. background-color: #fff;
  559. text {
  560. color: #005EFF;
  561. }
  562. }
  563. .ok-apply {
  564. flex: 1;
  565. background: linear-gradient(268deg, #2DDBFF 0%, #1599FF 49%, #005EFF 100%);
  566. text-align: center;
  567. color: #FFFFFF;
  568. }
  569. }
  570. .select-box {
  571. width: 100%;
  572. view {
  573. height: 95prx;
  574. line-height: 95rpx;
  575. text-align: center;
  576. font-size: 32rpx;
  577. border-bottom: 1rpx solid #EBEBEB;
  578. ;
  579. }
  580. }
  581. }
  582. </style>