index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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="num">{{yyNum}}</text>个<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  8. </view>
  9. <view class="examItem" @click="goResult">
  10. <view class="item">考试成绩和证书</view>
  11. <view class="item"><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. import { mapGetters } from 'vuex';
  18. export default {
  19. components: {
  20. },
  21. data() {
  22. return {
  23. yyNum:0,
  24. };
  25. },
  26. onLoad(){
  27. },
  28. onShow() {
  29. this.getInfo()
  30. },
  31. methods: {
  32. getInfo(){
  33. this.$api.getinfoAttached().then(res => {
  34. if (res.data.code === 200) {
  35. this.yyNum = res.data.data.subscribeSum;
  36. }
  37. });
  38. },
  39. goAppointment(){
  40. this.$navTo.togo('/pages2/exam/exam_appointment');
  41. },
  42. goResult(){
  43. this.$navTo.togo('/pages2/exam/exam_result');
  44. }
  45. },
  46. onReachBottom() {},
  47. computed: { ...mapGetters(['userInfo']) }
  48. };
  49. </script>
  50. <style >
  51. page {
  52. background: #EAEEF1;
  53. }
  54. </style>
  55. <style scoped lang="scss">
  56. .examWrap{
  57. padding: 16rpx;
  58. .examItem{
  59. height: 80rpx;
  60. background: #FFFFFF;
  61. box-shadow: 0px 0px 16rpx 4rpx rgba(145, 156, 178, 0.1);
  62. border-radius: 16rpx;
  63. display: flex;
  64. justify-content: space-between;
  65. align-items: center;
  66. padding: 0 25rpx;
  67. font-size: 32rpx;
  68. font-family: PingFang SC;
  69. font-weight: 500;
  70. color: #333333;
  71. margin-bottom: 16rpx;
  72. .num{
  73. color:#007AFF;
  74. text-decoration: underline;
  75. margin-right: 5rpx;
  76. }
  77. }
  78. }
  79. </style>