index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view>
  3. <view class="content"><u-button @click="jumpBank">前往题库</u-button></view>
  4. </view>
  5. </template>
  6. <script>
  7. import { mapGetters } from 'vuex';
  8. export default {
  9. components: {},
  10. data() {
  11. return {};
  12. },
  13. onPullDownRefresh() {},
  14. onLoad(option) {},
  15. onShow() {
  16. /* if(this.current === 2 && this.$method.isLogin()){
  17. this.$refs.refMy.init();
  18. } */
  19. },
  20. onShareAppMessage(res) {
  21. var self = this;
  22. return {
  23. title: '中正',
  24. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  25. };
  26. },
  27. methods: {
  28. jumpBank() {
  29. // this.$navTo.togo('/pages2/bank/questionBank');
  30. this.$navTo.togo('/pages2/appointment/index');
  31. },
  32. getDict() {
  33. },
  34. updateHomePlan() {
  35. this.$refs.home.init();
  36. },
  37. beforeSwitch(index) {
  38. let that = this;
  39. if (index == 1) {
  40. this.isClick1 = true;
  41. }
  42. if (index == this.current) {
  43. return false;
  44. }
  45. if (!this.$method.isLogin()) {
  46. if (index == 0 || index == 1) {
  47. return true;
  48. } else {
  49. this.$navTo.togo('/pages/login/login');
  50. return false;
  51. }
  52. } else {
  53. if (index == 2) {
  54. this.$refs.refMy.init();
  55. }
  56. return true;
  57. }
  58. }
  59. },
  60. onReachBottom() {},
  61. // computed: { ...mapGetters(['userInfo']) }
  62. };
  63. </script>
  64. <style scoped>
  65. .content {
  66. height: 80vh;
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. }
  71. </style>