index.vue 647 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <home-frame @toPath="toPath">
  3. 发现
  4. </home-frame>
  5. </template>
  6. <script>
  7. import homeFrame from "../components/home-frame.vue";
  8. export default {
  9. components: {
  10. homeFrame
  11. },
  12. data() {
  13. return {
  14. };
  15. },
  16. onLoad() {
  17. },
  18. onShow() {
  19. },
  20. methods: {
  21. // 跳转页面
  22. toPath(e) {
  23. let url = `/${e.route}`;
  24. if (e.type == '0') uni.navigateTo({
  25. url
  26. })
  27. else if (e.type == '1') uni.redirectTo({
  28. url
  29. })
  30. else if (e.type == '2') uni.reLaunch({
  31. url
  32. })
  33. else if (e.type == '3') uni.switchTab({
  34. url
  35. })
  36. }
  37. },
  38. };
  39. </script>
  40. <style lang="scss">
  41. .content {}
  42. </style>