app-store.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="app-store">
  3. <view class="app-text" :style="{'app-text-border': borderStyle}" v-if="title">门店信息</view>
  4. <view class="app-list" :class="{'app-list-border': storeNum > 1}">
  5. <app-jump-button form arrangement="a" open_type="navigate" :url="`/pages/store/detail?id=${store_id}`">
  6. <text class="app-store-name" >
  7. {{name}}
  8. </text>
  9. <text class="app-address">地址: {{address}}</text>
  10. <text class="app-time">营业时间: {{business_hours}}</text>
  11. </app-jump-button>
  12. </view>
  13. <view class="app-more" v-if="storeNum > 1">
  14. <app-jump-button open_type="navigate" :url="`/pages/store/store?book_id=${goods_id}`" arrangement="left" form>
  15. 查看全部{{storeNum}}家分店
  16. <icon class="app-icon" v-if="icon" type></icon>
  17. </app-jump-button>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. name: "app-store",
  24. props: {
  25. borderStyle: {
  26. type: Boolean,
  27. default: function() {
  28. return true;
  29. }
  30. },
  31. icon: {
  32. type: Boolean,
  33. default() {
  34. return true;
  35. }
  36. },
  37. storeNum: {
  38. type: Number,
  39. default() {
  40. return 0;
  41. }
  42. },
  43. business_hours: {
  44. type: String,
  45. default() {
  46. return '';
  47. }
  48. },
  49. address: {
  50. type: String,
  51. default() {
  52. return '';
  53. }
  54. },
  55. name: {
  56. type: String,
  57. default() {
  58. return '';
  59. }
  60. },
  61. store_id: {
  62. type: String,
  63. default() {
  64. return '';
  65. }
  66. },
  67. title: {
  68. type: Boolean,
  69. default() {
  70. return true;
  71. }
  72. },
  73. goods_id: {
  74. type: String,
  75. default() {
  76. return '';
  77. }
  78. },
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .app-store {
  84. width: 100%;
  85. background-color: white;
  86. padding-left: #{24rpx};
  87. margin-bottom: #{20rpx};
  88. .app-text {
  89. height: #{72rpx};
  90. width: calc(100% - #{24rpx});
  91. font-size: #{26rpx};
  92. color: #999999;
  93. line-height: #{72rpx};
  94. border-bottom: #{1rpx} solid #e2e2e2;
  95. }
  96. .app-text-border {
  97. border-bottom: #{1rpx} solid #e2e2e2;
  98. }
  99. .app-more {
  100. height: #{80rpx};
  101. line-height: #{80rpx};
  102. font-size: #{28rpx};
  103. color: #00a0e9;
  104. position: relative;
  105. }
  106. .app-icon {
  107. position: absolute;
  108. top: #{30rpx};
  109. right: #{24rpx};
  110. width: #{10rpx};
  111. height: #{22rpx};
  112. background-size: 100% 100%;
  113. background-repeat: no-repeat;
  114. background-image: url("../../../static/image/icon/arrow-right.png");
  115. }
  116. .app-list-border {
  117. border-bottom: #{1rpx} solid #e2e2e2;
  118. }
  119. .app-list {
  120. padding-bottom: #{32rpx};
  121. .app-store-name {
  122. font-size: #{28rpx};
  123. margin-top: #{32rpx};
  124. margin-bottom: #{20rpx};
  125. color: #353535;
  126. }
  127. .app-address {
  128. font-size: #{28rpx};
  129. color: #999999;
  130. }
  131. .app-time {
  132. font-size: #{28rpx};
  133. color: #999999;
  134. }
  135. }
  136. }
  137. </style>