index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="safeArea">
  3. <nav-bar title="我的考试"></nav-bar>
  4. <view class="examWrap">
  5. <view class="examItem" @click="goAppointment">
  6. <view class="item">模拟考试预约</view>
  7. <view class="item"><text class="note">去预约模拟考试</text><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  8. </view>
  9. <view class="examItem" @click="goList(0)">
  10. <view class="item">未考试</view>
  11. <view class="item"><text class="num">{{yyNum}}</text>个<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  12. </view>
  13. <view class="examItem" @click="goList(1)">
  14. <view class="item">已结束</view>
  15. <view class="item"><text class="num">{{yyNum}}</text>个<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  16. </view>
  17. <view class="examItem" @click="goResult">
  18. <view class="item">
  19. <view>模拟考试讲解直播</view>
  20. <view class="desc"><text class="num">二建模考-法律讲解正在直播中,立即前往查看</text></view>
  21. </view>
  22. <view class="item"><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import { mapGetters } from 'vuex';
  29. export default {
  30. components: {
  31. },
  32. data() {
  33. return {
  34. yyNum:0,
  35. };
  36. },
  37. onLoad(){
  38. },
  39. onShow() {
  40. // this.getInfo()
  41. },
  42. methods: {
  43. getInfo(){
  44. this.$api.getinfoAttached().then(res => {
  45. if (res.data.code === 200) {
  46. this.yyNum = res.data.data.subscribeSum;
  47. }
  48. });
  49. },
  50. goAppointment(){
  51. this.$navTo.togo('/pages5/examAppointList/index');
  52. },
  53. goList(state) {
  54. this.$navTo.togo('/pages5/examList/index?state='+state);
  55. },
  56. goResult(){
  57. console.log(111)
  58. this.$navTo.togo('/pages5/liveList/index');
  59. }
  60. },
  61. onReachBottom() {},
  62. computed: { ...mapGetters(['userInfo']) }
  63. };
  64. </script>
  65. <style >
  66. page {
  67. background: #EAEEF1;
  68. }
  69. </style>
  70. <style scoped lang="scss">
  71. .examWrap{
  72. padding: 16rpx;
  73. .examItem{
  74. padding:24rpx;
  75. background: #FFFFFF;
  76. box-shadow: 0px 0px 16rpx 4rpx rgba(145, 156, 178, 0.1);
  77. border-radius: 16rpx;
  78. display: flex;
  79. justify-content: space-between;
  80. font-size: 32rpx;
  81. font-family: PingFang SC;
  82. font-weight: 500;
  83. color: #333333;
  84. margin-bottom: 16rpx;
  85. .num{
  86. color:#007AFF;
  87. text-decoration: underline;
  88. margin-right: 5rpx;
  89. }
  90. .desc {
  91. margin-top:30rpx;
  92. font-size: 28rpx;
  93. }
  94. .note {
  95. font-size: 24rpx;
  96. color:#999;
  97. }
  98. }
  99. }
  100. </style>