registrationSuccess.vue 19 KB

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