index.vue 665 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <button type="primary" size="mini" @tap="toCommon('pagesHome/video/index')">电视节目</button>
  5. <button type="primary" size="mini" @tap="toCommon('pagesHome/prize/index')">抽奖</button>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. };
  14. },
  15. onLoad() {
  16. const that = this;
  17. // that.toCommon('pagesHome/prize/index')
  18. },
  19. methods: {
  20. toCommon(e) {
  21. uni.navigateTo({
  22. url: `/${e}`
  23. })
  24. }
  25. },
  26. };
  27. </script>
  28. <style lang="scss">
  29. .content {
  30. .one {
  31. margin: 2vw;
  32. text-align: center;
  33. button {
  34. margin: 0.5vw;
  35. }
  36. }
  37. }
  38. </style>