registrationSuccess.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  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 class="sale">/限时优惠</text> -->
  106. <text v-if="item.linePrice" class="sale"> ¥ </text>
  107. <text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
  108. </view>
  109. <view class="right">
  110. <view class="regiser_row" v-if="!hideBuyState">立即购买</view>
  111. </view>
  112. </view>
  113. <view v-if="item.buyUserNum" class="joins">
  114. <!-- <image class="people" src="/static/index/people.png"></image> -->
  115. <!-- 为0时,不显示 -->
  116. <view class="people">{{ item.buyUserNum }}人参与</view>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </template>
  125. <script>
  126. import { mapGetters } from 'vuex'
  127. var curTime = new Date().getTime() // 当前时间的时间戳
  128. export default {
  129. name: 'registrationSuccess',
  130. data() {
  131. return {
  132. startTime: '',
  133. endTime: '',
  134. lastStartDay: '',
  135. lastEndDay: '',
  136. sDay: '',
  137. eDay: '',
  138. activityId: '',
  139. courseList: [],
  140. }
  141. },
  142. filters: {
  143. getLastDay(time) {
  144. console.log('time:', time)
  145. var padDate = function (va) {
  146. va = va < 10 ? '0' + va : va
  147. return va
  148. }
  149. if (time) {
  150. var value = new Date(time * 1000) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  151. var year = value.getFullYear()
  152. var month = padDate(value.getMonth() + 1)
  153. var day = padDate(value.getDate())
  154. let t_value = year + '/' + month + '/' + day
  155. console.log('t:', t_value)
  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. // this.lastEndDay = parseInt(curTimeLast/1000) - parseInt(curTime/1000)
  161. // this.sDay = this.lastStartDay/24/60/60
  162. // this.eDay = this.lastEndDay/24/60/60
  163. // console.log('lastStartDay', this.lastStartDay, this.lastEndDay, this.sDay, this.eDay)
  164. }
  165. },
  166. },
  167. computed: { ...mapGetters(['hideBuyState']) },
  168. onLoad(option) {
  169. console.log('option: ', option)
  170. this.startTime = option.startTime
  171. this.endTime = option.endTime
  172. this.activityId = option.activityId
  173. this.getAct()
  174. // this.startTime = "1663041599"
  175. // this.endTime = "1663127999"
  176. },
  177. methods: {
  178. getAct() {
  179. this.$http({
  180. url: `/app/common/activity/goodsList/${this.activityId}`,
  181. method: 'get',
  182. noToken: true,
  183. }).then((res) => {
  184. if (res.data.code == 200) {
  185. console.log('res', res)
  186. this.courseList = res.data.data || []
  187. }
  188. })
  189. },
  190. toBuy(item) {
  191. if (item.goodsType == 1) {
  192. uni.navigateTo({
  193. url: '/pages3/course/detail?id='+item.goodsId
  194. })
  195. } else if (item.goodsType == 2) {
  196. uni.navigateTo({
  197. url: '/pages2/bank/detail?id='+item.goodsId
  198. })
  199. } else {
  200. uni.navigateTo({
  201. url: '/pages5/liveDetail/index?id='+item.goodsId
  202. })
  203. }
  204. },
  205. }
  206. }
  207. </script>
  208. <style>
  209. page {
  210. /* background-color: #DFECFD; */
  211. background: linear-gradient(90deg, #EDF1FF 0%, #D9F0FF 100%);
  212. }
  213. </style>
  214. <style lang="scss" scoped>
  215. .registration_success {
  216. width: 100%;
  217. display: flex;
  218. flex-direction: column;
  219. align-items: center;
  220. }
  221. .exam_success {
  222. width: 100%;
  223. height: 360rpx;
  224. // margin-top: 68rpx;
  225. display: flex;
  226. align-items: center;
  227. position: relative;
  228. top: 0;
  229. left: 0;
  230. .imgs {
  231. width: 100%;
  232. height: 360rpx;
  233. // width: 56rpx;
  234. // height: 56rpx;
  235. }
  236. .activity_time {
  237. width: 662rpx;
  238. height: 72rpx;
  239. line-height: 72rpx;
  240. text-align: center;
  241. background: rgba(255,255,255,0.7);
  242. border-radius: 16rpx;
  243. border: 2rpx solid #FFFFFF;
  244. font-size: 30rpx;
  245. font-weight: 500;
  246. color: #2D5692;
  247. position: absolute;
  248. bottom: 12rpx;
  249. left: 40rpx;
  250. }
  251. }
  252. .exam_times {
  253. margin-top: 28rpx;
  254. display: flex;
  255. align-items: center;
  256. justify-content: space-between;
  257. width: 670rpx;
  258. height: 178rpx;
  259. background: #FFFFFF;
  260. border-radius: 24rpx;
  261. padding: 0rpx 64rpx;
  262. .all_time {
  263. .time_left {
  264. text-align: center;
  265. }
  266. .numbers {
  267. font-size: 52rpx;
  268. font-weight: 800;
  269. color: #F67205;
  270. }
  271. .days {
  272. font-size: 28rpx;
  273. font-weight: 500;
  274. color: #F67205;
  275. }
  276. .words {
  277. font-size: 28rpx;
  278. color: #6D7D94;
  279. margin-top: 10rpx;
  280. }
  281. }
  282. .time_title {
  283. font-size: 48rpx;
  284. font-weight: bold;
  285. color: #3487FF;
  286. }
  287. .time_range {
  288. font-size: 26rpx;
  289. font-weight: 500;
  290. color: #222222;
  291. margin-top: 12rpx;
  292. }
  293. .lines {
  294. width: 2rpx;
  295. height: 84rpx;
  296. background: #E4E4E4;
  297. }
  298. }
  299. .mains {
  300. width: 670rpx;
  301. height: 874rpx;
  302. background: #FFFFFF;
  303. border-radius: 16rpx;
  304. margin-top: 36rpx;
  305. .gives {
  306. width: 100%;
  307. height: 160rpx;
  308. padding: 32rpx 60rpx;
  309. background-color: #3F8DFD;
  310. font-size: 36rpx;
  311. font-weight: bold;
  312. color: #FFFFFF;
  313. line-height: 48rpx;
  314. border-radius: 16rpx 16rpx 0rpx 0rpx;
  315. text-align: center;
  316. }
  317. .middles {
  318. margin-top: 48rpx;
  319. display: flex;
  320. flex-direction: column;
  321. align-items: center;
  322. .qr_codes {
  323. width: 268rpx;
  324. height: 268rpx;
  325. background: #FFFFFF;
  326. border-radius: 24rpx;
  327. border: 4rpx solid #91BEFF;
  328. position: relative;
  329. top: 0;
  330. left: 0;
  331. .code {
  332. width: 248rpx;
  333. height: 248rpx;
  334. position: absolute;
  335. top: 6rpx;
  336. left: 6rpx;
  337. }
  338. }
  339. .discern {
  340. font-size: 28rpx;
  341. font-weight: bold;
  342. color: #222222;
  343. margin-top: 24rpx;
  344. }
  345. }
  346. .middle_line {
  347. display: flex;
  348. justify-content: space-between;
  349. align-items: center;
  350. margin-top: 28rpx;
  351. .half_cir_left {
  352. width: 20rpx;
  353. height: 40rpx;
  354. border-radius: 0rpx 20rpx 20rpx 0rpx;
  355. background-color: #DFECFD;
  356. }
  357. .half_cir_rig {
  358. width: 20rpx;
  359. height: 40rpx;
  360. border-radius: 20rpx 0rpx 0rpx 20rpx;
  361. background-color: #DFECFD;
  362. }
  363. .line {
  364. width: 588rpx;
  365. height: 2rpx;
  366. border-bottom: 2rpx dashed #C4DCFF;
  367. }
  368. }
  369. .flows {
  370. margin-top: 18rpx;
  371. display: flex;
  372. flex-direction: column;
  373. align-items: center;
  374. .f_title {
  375. font-size: 32rpx;
  376. font-weight: bold;
  377. color: #222222;
  378. position: relative;
  379. top: 0rpx;
  380. left: 0rpx;
  381. &::after {
  382. content: '';
  383. width: 32rpx;
  384. height: 8rpx;
  385. background: #3F8DFD;
  386. position: absolute;
  387. bottom: -8rpx;
  388. left: 40rpx;
  389. }
  390. }
  391. .f_lines {
  392. width: 500rpx;
  393. display: flex;
  394. align-items: center;
  395. justify-content: space-between;
  396. margin: 26rpx 0rpx 16rpx 0rpx;
  397. .numbers {
  398. width: 40rpx;
  399. height: 40rpx;
  400. line-height: 40rpx;
  401. text-align: center;
  402. background: #D5E6FF;
  403. border-radius: 50%;
  404. font-size: 24rpx;
  405. font-weight: bold;
  406. color: #3F8DFD;
  407. }
  408. .line {
  409. height: 2rpx;
  410. border-bottom: 2rpx dashed #C4DCFF;
  411. }
  412. .line_one {
  413. width: 112rpx;
  414. }
  415. .line_two {
  416. width: 86rpx;
  417. }
  418. .line_three {
  419. width: 48rpx;
  420. }
  421. }
  422. .f_words {
  423. display: flex;
  424. align-items: flex-start;
  425. width: 526rpx;
  426. justify-content: space-between;
  427. .word {
  428. font-size: 26rpx;
  429. font-weight: 400;
  430. color: #3F8DFD;
  431. }
  432. .word_two {
  433. width: 156rpx;
  434. text-align: center;
  435. }
  436. }
  437. }
  438. }
  439. .distance_time {
  440. margin-top: 56rpx;
  441. .time_item {
  442. font-size: 32rpx;
  443. color: #222222;
  444. margin-bottom: 24rpx;
  445. }
  446. }
  447. .activity_phone {
  448. margin: 40rpx 0rpx 56rpx 0rpx;
  449. padding: 32rpx 0rpx 0rpx 44rpx;
  450. width: 670rpx;
  451. height: 148rpx;
  452. background: #FFFFFF;
  453. border-radius: 24rpx;
  454. .titles {
  455. font-size: 28rpx;
  456. color: #222222;
  457. margin-bottom: 12rpx;
  458. }
  459. .phone_num {
  460. font-size: 28rpx;
  461. font-weight: bold;
  462. color: #3F8DFD;
  463. }
  464. }
  465. .exam_entry {
  466. font-size: 32rpx;
  467. font-weight: 500;
  468. color: #222222;
  469. margin-bottom: 80rpx;
  470. }
  471. .course_list {
  472. // width: 100%;
  473. padding: 0rpx 32rpx;
  474. box-shadow: 0px 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
  475. .titles {
  476. margin-left: 10rpx;
  477. margin-bottom: 32rpx;
  478. .code {
  479. width: 38rpx;
  480. height: 24rpx;
  481. }
  482. .title {
  483. font-size: 40rpx;
  484. font-family: OPPOSans-Bold, OPPOSans;
  485. font-weight: bold;
  486. color: #222222;
  487. margin-left: 14rpx;
  488. }
  489. }
  490. .list_item {
  491. padding: 24rpx;
  492. // height: 278rpx;
  493. background: #FFFFFF;
  494. box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1,99,235,0.1000);
  495. border-radius: 24rpx;
  496. background:#fff;
  497. margin-bottom: 32rpx;
  498. display: flex;
  499. align-items: center;
  500. .c_title {
  501. font-size: 32rpx;
  502. font-weight: bold;
  503. margin-bottom: 24rpx;
  504. font-weight: bold;
  505. color: #222222;
  506. }
  507. .c_downs {
  508. display: flex;
  509. }
  510. .img {
  511. position:relative;
  512. margin-right: 24rpx;
  513. border-radius: 16rpx ;
  514. overflow: hidden;
  515. width: 204rpx;
  516. height: 120rpx;
  517. image {
  518. width:100%;
  519. height:100%;
  520. }
  521. .time {
  522. position:absolute;
  523. bottom:0;
  524. right:0;
  525. width: 80rpx;
  526. height: 32rpx;
  527. background: rgba(1, 25, 45, 0.4);
  528. color:#fff;
  529. text-align: center;
  530. line-height: 32rpx;
  531. font-size: 24rpx;
  532. border-radius: 10rpx 0px 10rpx 0px;
  533. }
  534. }
  535. .text {
  536. width: 440rpx;
  537. position: relative;
  538. display: flex;
  539. flex-direction: column;
  540. justify-content: space-between;
  541. height: 120rpx;
  542. .joins {
  543. .people {
  544. width: 160rpx;
  545. font-size: 20rpx;
  546. color: #999999;
  547. padding: 0rpx 8rpx;
  548. text-align: center;
  549. height: 36rpx;
  550. line-height: 36rpx;
  551. background: #F6F7FB;
  552. border-radius: 4px;
  553. }
  554. }
  555. .desc {
  556. margin-top: 10rpx;
  557. display: flex;
  558. align-items: center;
  559. justify-content: space-between;
  560. width: 100%;
  561. .left {
  562. flex:1;
  563. color:#333;
  564. font-size: 26rpx;
  565. .mon_t {
  566. font-weight: bold;
  567. color: #FC3F3F;
  568. font-size: 36rpx;
  569. }
  570. .sale {
  571. color: #999999;
  572. font-size: 24rpx;
  573. margin-left: 8rpx;
  574. }
  575. .price_line {
  576. color: #999999;
  577. font-size: 24rpx;
  578. text-decoration:line-through;
  579. font-weight: 400;
  580. }
  581. }
  582. .right {
  583. font-size: 24rpx;
  584. font-weight: bold;
  585. .regiser_row {
  586. width: 144rpx;
  587. height: 52rpx;
  588. line-height: 52rpx;
  589. text-align: center;
  590. border-radius: 16rpx;
  591. background-color: #FC3F3F;
  592. color: #fff;
  593. font-weight: 500;
  594. font-size: 26rpx;
  595. }
  596. }
  597. }
  598. }
  599. }
  600. }
  601. </style>