index.vue 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="container">
  3. <view class="image-container" @click="toPage('merchant')">
  4. <image src="@/static/index/merchant.png" mode="aspectFit"></image>
  5. <text>客户端</text>
  6. </view>
  7. <view class="image-container" @click="toPage('login')">
  8. <image src="@/static/index/rider.png" mode="aspectFit"></image>
  9. <text>骑手端</text>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. methods: {
  16. toPage(path) {
  17. uni.navigateTo({
  18. url: '/pages/login/' + path
  19. });
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. .container {
  26. display: flex;
  27. justify-content: center;
  28. align-items: center;
  29. height: 100vh;
  30. }
  31. .image-container {
  32. width: 50%;
  33. display: flex;
  34. justify-content: center;
  35. flex-direction: column;
  36. align-items: center;
  37. text {
  38. margin-top: 20rpx;
  39. }
  40. }
  41. image {
  42. width: 100px;
  43. /* 设置图片宽度,根据实际需求调整 */
  44. height: 100px;
  45. /* 设置图片高度,保持与宽度一致 */
  46. }
  47. </style>