registrationSuccess.vue 19 KB

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