registrationSuccess.vue 16 KB

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