HomeService.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="content">
  3. <view class="entrance">
  4. <view class="item">
  5. <image class="icon" src="/static/nav/store.png" @click="goUrl('oneself')"></image>
  6. <view class="title">堂食自提</view>
  7. </view>
  8. <view class="item">
  9. <image class="icon" src="/static/nav/send.png" @click="goUrl('express')"></image>
  10. <view class="title">外卖到家</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. props: {
  18. data: {
  19. type: Array,
  20. default: []
  21. }
  22. },
  23. methods: {
  24. goUrl(orderMode) {
  25. this.$navTo('pages/category/index', { orderMode });
  26. }
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .entrance {
  32. position: relative;
  33. margin-top: -20rpx;
  34. margin-bottom: 30rpx;
  35. border-radius: 10rpx;
  36. background-color: #ffffff;
  37. box-shadow: #666;
  38. padding: 40rpx 0;
  39. display: flex;
  40. align-items: center;
  41. justify-content: center;
  42. border: solid 1rpx #ccc;
  43. margin: 10rpx 10rpx 25rpx 10rpx;
  44. .item {
  45. flex: 1;
  46. display: flex;
  47. flex-direction: column;
  48. justify-content: center;
  49. align-items: center;
  50. position: relative;
  51. &:nth-child(1):after {
  52. content: '';
  53. position: absolute;
  54. width: 1rpx;
  55. background-color: #ccc;
  56. right: 0;
  57. height: 100%;
  58. transform: scaleX(0.5) scaleY(0.8);
  59. }
  60. .icon {
  61. width: 120rpx;
  62. height: 120rpx;
  63. margin: 28rpx;
  64. }
  65. .title {
  66. font-size: 36rpx;
  67. color: #666;
  68. font-weight: 600;
  69. }
  70. .content {
  71. font-size: 28rpx;
  72. color: #666;
  73. font-weight: 400;
  74. }
  75. }
  76. }
  77. </style>