index.vue 721 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="content">
  3. <view class="one">
  4. <image :src="logoUrl" mode="aspectFit"></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. logoUrl: require('../../static/foods_2.webp'),
  13. }
  14. },
  15. onLoad() {
  16. const that = this;
  17. that.search('/pagesHome/home/index');
  18. },
  19. onShow() {
  20. const that = this;
  21. },
  22. methods: {
  23. async search(e) {
  24. const that = this;
  25. uni.redirectTo({
  26. url: e
  27. })
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss">
  33. .content {
  34. .one {
  35. flex-grow: 1;
  36. text-align: center;
  37. image {
  38. width: 50vw;
  39. height: 50vw;
  40. border-radius: 90%;
  41. box-shadow: 0 0 5px #f1f1f1;
  42. margin: 30vw 0 0 0;
  43. }
  44. }
  45. }
  46. </style>