registrationSuccess.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <template>
  2. <view class="registration_success">
  3. <nav-bar title="模考报名成功"></nav-bar>
  4. <view class="exam_success">
  5. <image class="imgs" src="../static/ping_bg.png"></image>
  6. <view class="activity_time">
  7. 活动时间:{{ startTime | formate('yyyy年mm月dd日')}}-{{ endTime | formate('yyyy年mm月dd日')}}
  8. </view>
  9. </view>
  10. <view class="exam_times">
  11. <view class="time_up">
  12. <view class="start_time all_time">
  13. <view class="time_left">
  14. <text class="numbers">{{ startTime | getLastDay }}</text>
  15. <text class="days">天</text>
  16. </view>
  17. <view class="words">距模考开始时间</view>
  18. </view>
  19. <view class="lines"></view>
  20. <view class="end_time all_time">
  21. <view class="time_left">
  22. <text class="numbers">{{ endTime | getLastDay }}</text>
  23. <text class="days">天</text>
  24. </view>
  25. <view class="words">距模考结束时间</view>
  26. </view>
  27. </view>
  28. <view class="time_down">
  29. <view class="look_mock" @click="toLookMock()">立即进入模考</view>
  30. </view>
  31. </view>
  32. <view class="mains">
  33. <view class="gives">
  34. 送价值1109元一建《冲刺黄金包》 提分必备神器
  35. </view>
  36. <view class="middles">
  37. <view class="qr_codes">
  38. <image class="code" src="../static/erCode.png" show-menu-by-longpress="true"></image>
  39. </view>
  40. <view class="discern">长按识别二维码 加活动专属微信号</view>
  41. </view>
  42. <view class="middle_line">
  43. <view class="half_cir_left"></view>
  44. <view class="line"></view>
  45. <view class="half_cir_rig"></view>
  46. </view>
  47. <view class="flows">
  48. <view class="f_title">活动流程</view>
  49. <view class="f_lines">
  50. <view class="numbers">1</view>
  51. <view class="line line_one"></view>
  52. <view class="numbers">2</view>
  53. <view class="line line_two"></view>
  54. <view class="numbers">3</view>
  55. <view class="line line_three"></view>
  56. <view class="numbers">4</view>
  57. </view>
  58. <view class="f_words">
  59. <view class="word word_one">预约报名</view>
  60. <view class="word word_two">扫码添加活动 专属微信号</view>
  61. <view class="word word_three">模考</view>
  62. <view class="word word_four">领福利</view>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="activity_phone">
  67. <view class="titles">活动咨询电话</view>
  68. <view class="phone_num">020-87085982 / 020-87085983 / 18565459156</view>
  69. </view>
  70. <view class="exam_entry">
  71. 参加本次活动,请添加此次活动专属微信号
  72. </view>
  73. <view v-if="courseList.length" class="course_list">
  74. <view class="titles">
  75. <image class="code" src="@/static/learn/act_icon.png" ></image>
  76. <text class="title">推荐课程</text>
  77. </view>
  78. <view class="list_item" v-for="(item,index) in courseList" :key="index" @click="toBuy(item)">
  79. <view class="course_content">
  80. <view class="c_title">{{item.goodsName}}</view>
  81. <view class="c_downs">
  82. <view class="img">
  83. <image :src="$method.splitImgHost(item.coverUrl, true)"></image>
  84. <view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
  85. </view>
  86. <view class="text">
  87. <view class="desc">
  88. <view class="left">
  89. <text class="mon_t">¥ {{item.standPrice}}</text>
  90. <text v-if="item.linePrice" class="sale"> ¥ </text>
  91. <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
  92. </view>
  93. <view class="right">
  94. <view class="regiser_row" v-if="!hideBuyState">立即购买</view>
  95. </view>
  96. </view>
  97. <view v-if="item.buyUserNum" class="joins">
  98. <!-- 为0时,不显示 -->
  99. <view class="people">{{ item.buyUserNum }}人参与</view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. import { mapGetters } from 'vuex'
  110. var curTime = new Date().getTime() // 当前时间的时间戳
  111. export default {
  112. name: 'registrationSuccess',
  113. data() {
  114. return {
  115. startTime: '',
  116. endTime: '',
  117. // lastStartDay: '',
  118. // lastEndDay: '',
  119. // sDay: '',
  120. // eDay: '',
  121. activityId: '',
  122. courseList: [],
  123. pageNum: 1,
  124. pageSize: 10,
  125. total: 0,
  126. }
  127. },
  128. filters: {
  129. getLastDay(time) {
  130. var padDate = function (va) {
  131. va = va < 10 ? '0' + va : va
  132. return va
  133. }
  134. if (time) {
  135. var value = new Date(time * 1000) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  136. var year = value.getFullYear()
  137. var month = padDate(value.getMonth() + 1)
  138. var day = padDate(value.getDate())
  139. let t_value = year + '/' + month + '/' + day
  140. let curTimeLast = new Date(new Date(t_value).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1
  141. let lastStartDay = parseInt(curTimeLast/1000) - parseInt(curTime/1000)
  142. let days = parseInt(lastStartDay/24/60/60)
  143. return days >= 1 ? days : 0
  144. }
  145. },
  146. },
  147. computed: { ...mapGetters(['hideBuyState']) },
  148. onLoad(option) {
  149. // console.log('option: ', option)
  150. // endTime=1663084800&startTime=1662998400&activityId=13
  151. this.startTime = option.startTime
  152. this.endTime = option.endTime
  153. this.activityId = option.activityId
  154. },
  155. onShow() {
  156. this.courseList = []
  157. this.getAct()
  158. },
  159. onPullDownRefresh() {
  160. this.pageNum = 1
  161. this.getAct()
  162. },
  163. onReachBottom() {
  164. console.log(this.total,'total')
  165. console.log(this.courseList.length,'length')
  166. if (this.courseList.length < this.total) {
  167. this.pageNum++
  168. this.getAct()
  169. }
  170. },
  171. methods: {
  172. getAct() {
  173. this.$http({
  174. url: `/app/common/activity/goodsList/${this.activityId}`,
  175. method: 'get',
  176. noToken: true,
  177. data: {
  178. pageNum: this.pageNum,
  179. pageSize: this.pageSize,
  180. }
  181. }).then((res) => {
  182. if (res.data.code == 200) {
  183. // this.courseList = res.data.data || []
  184. this.courseList.push(...res.data.rows)
  185. this.total = res.data.total
  186. }
  187. })
  188. },
  189. toBuy(item) {
  190. if (item.goodsType == 2) {
  191. uni.navigateTo({
  192. url: '/pages2/bank/detail?id='+item.goodsId
  193. })
  194. } else {
  195. // /pages5/liveDetail/index
  196. uni.navigateTo({
  197. url: '/pages3/course/detail?id='+item.goodsId + '&goodsType=' + item.goodsType
  198. })
  199. }
  200. },
  201. // 查看模考
  202. toLookMock(){
  203. uni.navigateTo({
  204. url: '/pages5/examList/index?state=0'
  205. })
  206. }
  207. }
  208. }
  209. </script>
  210. <style>
  211. page {
  212. /* background-color: #DFECFD; */
  213. background: linear-gradient(90deg, #EDF1FF 0%, #D9F0FF 100%);
  214. }
  215. </style>
  216. <style lang="scss" scoped>
  217. .registration_success {
  218. width: 100%;
  219. display: flex;
  220. flex-direction: column;
  221. align-items: center;
  222. }
  223. .exam_success {
  224. width: 100%;
  225. height: 360rpx;
  226. // margin-top: 68rpx;
  227. display: flex;
  228. align-items: center;
  229. position: relative;
  230. top: 0;
  231. left: 0;
  232. .imgs {
  233. width: 100%;
  234. height: 360rpx;
  235. // width: 56rpx;
  236. // height: 56rpx;
  237. }
  238. .activity_time {
  239. width: 662rpx;
  240. height: 72rpx;
  241. line-height: 72rpx;
  242. text-align: center;
  243. background: rgba(255,255,255,0.7);
  244. border-radius: 16rpx;
  245. border: 2rpx solid #FFFFFF;
  246. font-size: 30rpx;
  247. font-weight: 500;
  248. color: #2D5692;
  249. position: absolute;
  250. bottom: 12rpx;
  251. left: 40rpx;
  252. }
  253. }
  254. .exam_times {
  255. margin-top: 28rpx;
  256. width: 670rpx;
  257. // height: 178rpx;
  258. background: #FFFFFF;
  259. border-radius: 24rpx;
  260. padding: 0rpx 64rpx;
  261. .time_up {
  262. display: flex;
  263. align-items: center;
  264. justify-content: space-between;
  265. width: 100%;
  266. height: 178rpx;
  267. }
  268. .time_down {
  269. display: flex;
  270. align-items: center;
  271. justify-content: center;
  272. margin-bottom: 40rpx;
  273. .look_mock {
  274. width: 288rpx;
  275. height: 80rpx;
  276. line-height: 80rpx;
  277. text-align: center;
  278. background: #FFFFFF;
  279. border-radius: 160rpx;
  280. border: 2rpx solid #F67205;
  281. font-size: 32rpx;
  282. color: #F67205;
  283. }
  284. }
  285. .all_time {
  286. .time_left {
  287. text-align: center;
  288. }
  289. .numbers {
  290. font-size: 52rpx;
  291. font-weight: 800;
  292. color: #F67205;
  293. }
  294. .days {
  295. font-size: 28rpx;
  296. font-weight: 500;
  297. color: #F67205;
  298. }
  299. .words {
  300. font-size: 28rpx;
  301. color: #6D7D94;
  302. margin-top: 10rpx;
  303. }
  304. }
  305. .time_title {
  306. font-size: 48rpx;
  307. font-weight: bold;
  308. color: #3487FF;
  309. }
  310. .time_range {
  311. font-size: 26rpx;
  312. font-weight: 500;
  313. color: #222222;
  314. margin-top: 12rpx;
  315. }
  316. .lines {
  317. width: 2rpx;
  318. height: 84rpx;
  319. background: #E4E4E4;
  320. }
  321. }
  322. .mains {
  323. width: 670rpx;
  324. height: 874rpx;
  325. background: #FFFFFF;
  326. border-radius: 16rpx;
  327. margin-top: 36rpx;
  328. .gives {
  329. width: 100%;
  330. height: 160rpx;
  331. padding: 32rpx 60rpx;
  332. background-color: #3F8DFD;
  333. font-size: 36rpx;
  334. font-weight: bold;
  335. color: #FFFFFF;
  336. line-height: 48rpx;
  337. border-radius: 16rpx 16rpx 0rpx 0rpx;
  338. text-align: center;
  339. }
  340. .middles {
  341. margin-top: 48rpx;
  342. display: flex;
  343. flex-direction: column;
  344. align-items: center;
  345. .qr_codes {
  346. width: 268rpx;
  347. height: 268rpx;
  348. background: #FFFFFF;
  349. border-radius: 24rpx;
  350. border: 4rpx solid #91BEFF;
  351. position: relative;
  352. top: 0;
  353. left: 0;
  354. .code {
  355. width: 248rpx;
  356. height: 248rpx;
  357. position: absolute;
  358. top: 6rpx;
  359. left: 6rpx;
  360. }
  361. }
  362. .discern {
  363. font-size: 28rpx;
  364. font-weight: bold;
  365. color: #222222;
  366. margin-top: 24rpx;
  367. }
  368. }
  369. .middle_line {
  370. display: flex;
  371. justify-content: space-between;
  372. align-items: center;
  373. margin-top: 28rpx;
  374. .half_cir_left {
  375. width: 20rpx;
  376. height: 40rpx;
  377. border-radius: 0rpx 20rpx 20rpx 0rpx;
  378. background-color: #DFECFD;
  379. }
  380. .half_cir_rig {
  381. width: 20rpx;
  382. height: 40rpx;
  383. border-radius: 20rpx 0rpx 0rpx 20rpx;
  384. background-color: #DFECFD;
  385. }
  386. .line {
  387. width: 588rpx;
  388. height: 2rpx;
  389. border-bottom: 2rpx dashed #C4DCFF;
  390. }
  391. }
  392. .flows {
  393. margin-top: 18rpx;
  394. display: flex;
  395. flex-direction: column;
  396. align-items: center;
  397. .f_title {
  398. font-size: 32rpx;
  399. font-weight: bold;
  400. color: #222222;
  401. position: relative;
  402. top: 0rpx;
  403. left: 0rpx;
  404. &::after {
  405. content: '';
  406. width: 32rpx;
  407. height: 8rpx;
  408. background: #3F8DFD;
  409. position: absolute;
  410. bottom: -8rpx;
  411. left: 40rpx;
  412. }
  413. }
  414. .f_lines {
  415. width: 500rpx;
  416. display: flex;
  417. align-items: center;
  418. justify-content: space-between;
  419. margin: 26rpx 0rpx 16rpx 0rpx;
  420. .numbers {
  421. width: 40rpx;
  422. height: 40rpx;
  423. line-height: 40rpx;
  424. text-align: center;
  425. background: #D5E6FF;
  426. border-radius: 50%;
  427. font-size: 24rpx;
  428. font-weight: bold;
  429. color: #3F8DFD;
  430. }
  431. .line {
  432. height: 2rpx;
  433. border-bottom: 2rpx dashed #C4DCFF;
  434. }
  435. .line_one {
  436. width: 112rpx;
  437. }
  438. .line_two {
  439. width: 86rpx;
  440. }
  441. .line_three {
  442. width: 48rpx;
  443. }
  444. }
  445. .f_words {
  446. display: flex;
  447. align-items: flex-start;
  448. width: 526rpx;
  449. justify-content: space-between;
  450. .word {
  451. font-size: 26rpx;
  452. font-weight: 400;
  453. color: #3F8DFD;
  454. }
  455. .word_two {
  456. width: 156rpx;
  457. text-align: center;
  458. }
  459. }
  460. }
  461. }
  462. .distance_time {
  463. margin-top: 56rpx;
  464. .time_item {
  465. font-size: 32rpx;
  466. color: #222222;
  467. margin-bottom: 24rpx;
  468. }
  469. }
  470. .activity_phone {
  471. margin: 40rpx 0rpx 56rpx 0rpx;
  472. padding: 32rpx 0rpx 32rpx 44rpx;
  473. width: 670rpx;
  474. // height: 148rpx;
  475. background: #FFFFFF;
  476. border-radius: 24rpx;
  477. .titles {
  478. font-size: 28rpx;
  479. color: #222222;
  480. margin-bottom: 12rpx;
  481. }
  482. .phone_num {
  483. font-size: 28rpx;
  484. font-weight: bold;
  485. color: #3F8DFD;
  486. }
  487. }
  488. .exam_entry {
  489. font-size: 32rpx;
  490. font-weight: 500;
  491. color: #222222;
  492. margin-bottom: 80rpx;
  493. }
  494. .course_list {
  495. // width: 100%;
  496. padding: 0rpx 32rpx;
  497. box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  498. .titles {
  499. margin-left: 10rpx;
  500. margin-bottom: 32rpx;
  501. .code {
  502. width: 38rpx;
  503. height: 24rpx;
  504. }
  505. .title {
  506. font-size: 40rpx;
  507. font-family: OPPOSans-Bold, OPPOSans;
  508. font-weight: bold;
  509. color: #222222;
  510. margin-left: 14rpx;
  511. }
  512. }
  513. .list_item {
  514. padding: 24rpx;
  515. // height: 278rpx;
  516. background: #FFFFFF;
  517. box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1,99,235,0.1000);
  518. border-radius: 24rpx;
  519. background:#fff;
  520. margin-bottom: 32rpx;
  521. display: flex;
  522. align-items: center;
  523. .c_title {
  524. font-size: 32rpx;
  525. font-weight: bold;
  526. margin-bottom: 24rpx;
  527. font-weight: bold;
  528. color: #222222;
  529. }
  530. .c_downs {
  531. display: flex;
  532. }
  533. .img {
  534. position:relative;
  535. margin-right: 24rpx;
  536. border-radius: 16rpx ;
  537. overflow: hidden;
  538. width: 204rpx;
  539. height: 120rpx;
  540. image {
  541. width:100%;
  542. height:100%;
  543. }
  544. .time {
  545. position:absolute;
  546. bottom:0;
  547. right:0;
  548. width: 80rpx;
  549. height: 32rpx;
  550. background: rgba(1, 25, 45, 0.4);
  551. color:#fff;
  552. text-align: center;
  553. line-height: 32rpx;
  554. font-size: 24rpx;
  555. border-radius: 10rpx 0px 10rpx 0px;
  556. }
  557. }
  558. .text {
  559. width: 440rpx;
  560. position: relative;
  561. display: flex;
  562. flex-direction: column;
  563. justify-content: space-between;
  564. height: 120rpx;
  565. .joins {
  566. .people {
  567. width: 160rpx;
  568. font-size: 20rpx;
  569. color: #999999;
  570. padding: 0rpx 8rpx;
  571. text-align: center;
  572. height: 36rpx;
  573. line-height: 36rpx;
  574. background: #F6F7FB;
  575. border-radius: 4px;
  576. }
  577. }
  578. .desc {
  579. margin-top: 10rpx;
  580. display: flex;
  581. align-items: center;
  582. justify-content: space-between;
  583. width: 100%;
  584. .left {
  585. flex:1;
  586. color:#333;
  587. font-size: 26rpx;
  588. .mon_t {
  589. font-weight: bold;
  590. color: #FC3F3F;
  591. font-size: 36rpx;
  592. }
  593. .sale {
  594. color: #999999;
  595. font-size: 24rpx;
  596. margin-left: 8rpx;
  597. }
  598. .price_line {
  599. color: #999999;
  600. font-size: 24rpx;
  601. text-decoration:line-through;
  602. font-weight: 400;
  603. }
  604. }
  605. .right {
  606. font-size: 24rpx;
  607. font-weight: bold;
  608. .regiser_row {
  609. width: 144rpx;
  610. height: 52rpx;
  611. line-height: 52rpx;
  612. text-align: center;
  613. border-radius: 16rpx;
  614. background-color: #FC3F3F;
  615. color: #fff;
  616. font-weight: 500;
  617. font-size: 26rpx;
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. </style>