registrationSuccess.vue 19 KB

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