registrationSuccess.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  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 / 87085983</view>
  83. </view>
  84. <view class="exam_entry">
  85. 参加本次活动,请添加此次活动专属微信号
  86. <!-- <text class="entrys">考试入口:</text>请进入祥粤云学堂小程序或者网站, 在个人中心找到模考功能进行考试。 -->
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. var curTime = new Date().getTime() // 当前时间的时间戳
  92. export default {
  93. name: 'registrationSuccess',
  94. data() {
  95. return {
  96. startTime: '',
  97. endTime: '',
  98. lastStartDay: '',
  99. lastEndDay: '',
  100. sDay: '',
  101. eDay: '',
  102. }
  103. },
  104. filters: {
  105. getLastDay(time) {
  106. console.log('time:', time)
  107. var padDate = function (va) {
  108. va = va < 10 ? '0' + va : va
  109. return va
  110. }
  111. if (time) {
  112. var value = new Date(time * 1000) //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  113. var year = value.getFullYear()
  114. var month = padDate(value.getMonth() + 1)
  115. var day = padDate(value.getDate())
  116. let t_value = year + '/' + month + '/' + day
  117. console.log('t:', t_value)
  118. let curTimeLast = new Date(new Date(t_value).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1
  119. let lastStartDay = parseInt(curTimeLast/1000) - parseInt(curTime/1000)
  120. let days = parseInt(lastStartDay/24/60/60)
  121. return days >= 1 ? days : 0
  122. // this.lastEndDay = parseInt(curTimeLast/1000) - parseInt(curTime/1000)
  123. // this.sDay = this.lastStartDay/24/60/60
  124. // this.eDay = this.lastEndDay/24/60/60
  125. // console.log('lastStartDay', this.lastStartDay, this.lastEndDay, this.sDay, this.eDay)
  126. }
  127. }
  128. },
  129. onLoad(option) {
  130. console.log('option: ', option)
  131. this.startTime = option.startTime
  132. this.endTime = option.endTime
  133. // this.startTime = "1663041599"
  134. // this.endTime = "1663127999"
  135. },
  136. }
  137. </script>
  138. <style>
  139. page {
  140. background-color: #DFECFD;
  141. }
  142. </style>
  143. <style lang="scss" scoped>
  144. .registration_success {
  145. width: 100%;
  146. display: flex;
  147. flex-direction: column;
  148. align-items: center;
  149. }
  150. .exam_success {
  151. width: 100%;
  152. height: 360rpx;
  153. // margin-top: 68rpx;
  154. display: flex;
  155. align-items: center;
  156. position: relative;
  157. top: 0;
  158. left: 0;
  159. .imgs {
  160. width: 100%;
  161. height: 360rpx;
  162. // width: 56rpx;
  163. // height: 56rpx;
  164. }
  165. .activity_time {
  166. width: 662rpx;
  167. height: 72rpx;
  168. line-height: 72rpx;
  169. text-align: center;
  170. background: rgba(255,255,255,0.7);
  171. border-radius: 16rpx;
  172. border: 2rpx solid #FFFFFF;
  173. font-size: 30rpx;
  174. font-weight: 500;
  175. color: #2D5692;
  176. position: absolute;
  177. bottom: 12rpx;
  178. left: 40rpx;
  179. }
  180. }
  181. .exam_times {
  182. margin-top: 28rpx;
  183. display: flex;
  184. align-items: center;
  185. justify-content: space-between;
  186. width: 670rpx;
  187. height: 178rpx;
  188. background: #FFFFFF;
  189. border-radius: 24rpx;
  190. padding: 0rpx 64rpx;
  191. .all_time {
  192. .time_left {
  193. text-align: center;
  194. }
  195. .numbers {
  196. font-size: 52rpx;
  197. font-weight: 800;
  198. color: #F67205;
  199. }
  200. .days {
  201. font-size: 28rpx;
  202. font-weight: 500;
  203. color: #F67205;
  204. }
  205. .words {
  206. font-size: 28rpx;
  207. color: #6D7D94;
  208. margin-top: 10rpx;
  209. }
  210. }
  211. .time_title {
  212. font-size: 48rpx;
  213. font-weight: bold;
  214. color: #3487FF;
  215. }
  216. .time_range {
  217. font-size: 26rpx;
  218. font-weight: 500;
  219. color: #222222;
  220. margin-top: 12rpx;
  221. }
  222. .lines {
  223. width: 2rpx;
  224. height: 84rpx;
  225. background: #E4E4E4;
  226. }
  227. }
  228. .mains {
  229. width: 670rpx;
  230. height: 874rpx;
  231. background: #FFFFFF;
  232. border-radius: 16rpx;
  233. margin-top: 36rpx;
  234. .gives {
  235. width: 100%;
  236. height: 160rpx;
  237. padding: 32rpx 60rpx;
  238. background-color: #3F8DFD;
  239. font-size: 36rpx;
  240. font-weight: bold;
  241. color: #FFFFFF;
  242. line-height: 48rpx;
  243. border-radius: 16rpx 16rpx 0rpx 0rpx;
  244. text-align: center;
  245. }
  246. .middles {
  247. margin-top: 48rpx;
  248. display: flex;
  249. flex-direction: column;
  250. align-items: center;
  251. .qr_codes {
  252. width: 268rpx;
  253. height: 268rpx;
  254. background: #FFFFFF;
  255. border-radius: 24rpx;
  256. border: 4rpx solid #91BEFF;
  257. position: relative;
  258. top: 0;
  259. left: 0;
  260. .code {
  261. width: 248rpx;
  262. height: 248rpx;
  263. position: absolute;
  264. top: 6rpx;
  265. left: 6rpx;
  266. }
  267. }
  268. .discern {
  269. font-size: 28rpx;
  270. font-weight: bold;
  271. color: #222222;
  272. margin-top: 24rpx;
  273. }
  274. }
  275. .middle_line {
  276. display: flex;
  277. justify-content: space-between;
  278. align-items: center;
  279. margin-top: 28rpx;
  280. .half_cir_left {
  281. width: 20rpx;
  282. height: 40rpx;
  283. border-radius: 0rpx 20rpx 20rpx 0rpx;
  284. background-color: #DFECFD;
  285. }
  286. .half_cir_rig {
  287. width: 20rpx;
  288. height: 40rpx;
  289. border-radius: 20rpx 0rpx 0rpx 20rpx;
  290. background-color: #DFECFD;
  291. }
  292. .line {
  293. width: 588rpx;
  294. height: 2rpx;
  295. border-bottom: 2rpx dashed #C4DCFF;
  296. }
  297. }
  298. .flows {
  299. margin-top: 18rpx;
  300. display: flex;
  301. flex-direction: column;
  302. align-items: center;
  303. .f_title {
  304. font-size: 32rpx;
  305. font-weight: bold;
  306. color: #222222;
  307. position: relative;
  308. top: 0rpx;
  309. left: 0rpx;
  310. &::after {
  311. content: '';
  312. width: 32rpx;
  313. height: 8rpx;
  314. background: #3F8DFD;
  315. position: absolute;
  316. bottom: -8rpx;
  317. left: 40rpx;
  318. }
  319. }
  320. .f_lines {
  321. width: 500rpx;
  322. display: flex;
  323. align-items: center;
  324. justify-content: space-between;
  325. margin: 26rpx 0rpx 16rpx 0rpx;
  326. .numbers {
  327. width: 40rpx;
  328. height: 40rpx;
  329. line-height: 40rpx;
  330. text-align: center;
  331. background: #D5E6FF;
  332. border-radius: 50%;
  333. font-size: 24rpx;
  334. font-weight: bold;
  335. color: #3F8DFD;
  336. }
  337. .line {
  338. height: 2rpx;
  339. border-bottom: 2rpx dashed #C4DCFF;
  340. }
  341. .line_one {
  342. width: 112rpx;
  343. }
  344. .line_two {
  345. width: 86rpx;
  346. }
  347. .line_three {
  348. width: 48rpx;
  349. }
  350. }
  351. .f_words {
  352. display: flex;
  353. align-items: flex-start;
  354. width: 526rpx;
  355. justify-content: space-between;
  356. .word {
  357. font-size: 26rpx;
  358. font-weight: 400;
  359. color: #3F8DFD;
  360. }
  361. .word_one {
  362. }
  363. .word_two {
  364. width: 156rpx;
  365. text-align: center;
  366. }
  367. }
  368. }
  369. }
  370. .distance_time {
  371. margin-top: 56rpx;
  372. .time_item {
  373. font-size: 32rpx;
  374. color: #222222;
  375. margin-bottom: 24rpx;
  376. }
  377. }
  378. .activity_phone {
  379. margin: 40rpx 0rpx 56rpx 0rpx;
  380. padding: 32rpx 0rpx 0rpx 44rpx;
  381. width: 670rpx;
  382. height: 148rpx;
  383. background: #FFFFFF;
  384. border-radius: 24rpx;
  385. .titles {
  386. font-size: 28rpx;
  387. color: #222222;
  388. margin-bottom: 12rpx;
  389. }
  390. .phone_num {
  391. font-size: 28rpx;
  392. font-weight: bold;
  393. color: #3F8DFD;
  394. }
  395. }
  396. .exam_entry {
  397. font-size: 32rpx;
  398. font-weight: 500;
  399. color: #222222;
  400. margin-bottom: 100rpx;
  401. // margin-top: 22rpx;
  402. // margin-bottom: 100rpx;
  403. // width: 686rpx;
  404. // height: 128rpx;
  405. // background: #3F8DFD;
  406. // border-radius: 16rpx;
  407. // padding: 20rpx 50rpx;
  408. // color: #fff;
  409. // line-height: 44rpx;
  410. // .entrys {
  411. // font-size: 28rpx;
  412. // font-weight: bold;
  413. // color: #FFFFFF;
  414. // }
  415. }
  416. </style>