registrationSuccess.vue 15 KB

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