registrationSuccess.vue 15 KB

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