瑶都万能墙
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
1.6 KiB

6 months ago
  1. <template>
  2. <view
  3. class="shop"
  4. @click.stop="toShop"
  5. v-if="shop">
  6. <view class="image">
  7. <image :src="shop.logoImage" mode=""></image>
  8. </view>
  9. <view class="shop-box"
  10. >
  11. <view class="title">
  12. {{ shop.title }}
  13. </view>
  14. <view class="desc">
  15. {{ shop.address }}
  16. </view>
  17. </view>
  18. <view class="arrow-right">
  19. 进店
  20. <uv-icon
  21. name="arrow-right"
  22. size="40rpx"
  23. color="#5baaff"
  24. ></uv-icon>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. props : {
  31. shop : {
  32. default : null,
  33. }
  34. },
  35. data() {
  36. return {
  37. }
  38. },
  39. methods: {
  40. toShop(){
  41. uni.navigateTo({
  42. url: '/pages_order/gourmet/gourmetDetail?id=' + this.shop.id
  43. })
  44. },
  45. }
  46. }
  47. </script>
  48. <style scoped lang="scss">
  49. .shop{
  50. display: flex;
  51. align-items: center;
  52. background-color: rgba($uni-color, 0.1);
  53. padding: 10rpx 20rpx;
  54. border-radius: 20rpx;
  55. color: $uni-color;
  56. .image{
  57. width: 90rpx;
  58. height: 90rpx;
  59. margin-right: 10rpx;
  60. flex-shrink: 0;
  61. image{
  62. width: 100%;
  63. height: 100%;
  64. border-radius: 10rpx;
  65. }
  66. }
  67. .shop-box{
  68. flex: 1;
  69. width: calc(100% - 220rpx);
  70. .title{
  71. font-size: 28rpx;
  72. overflow:hidden; //超出的文本隐藏
  73. text-overflow:ellipsis; //溢出用省略号显示
  74. white-space:nowrap; //溢出不换行
  75. }
  76. .desc{
  77. margin-top: 10rpx;
  78. color: rgba($uni-color, 0.6);
  79. font-size: 24rpx;
  80. overflow:hidden; //超出的文本隐藏
  81. text-overflow:ellipsis; //溢出用省略号显示
  82. white-space:nowrap; //溢出不换行
  83. }
  84. }
  85. .arrow-right{
  86. flex-shrink: 0;
  87. margin-left: auto;
  88. display: flex;
  89. align-items: center;
  90. font-size: 26rpx;
  91. }
  92. }
  93. </style>