index.vue 1.6 KB

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