store_item.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <!-- 店铺组件-->
  2. <template name="storeItem">
  3. <view class="shop_pre">
  4. <view class="pre_top" :data-vid="store_info.vid">
  5. <view class="shop_left">
  6. <view class="shop_avatar_img">
  7. <image class="shop_avatar" mode="aspectFill" :src="store_info.storeLogoUrl"></image>
  8. </view>
  9. <view class="shop_des">
  10. <view class="des_top">
  11. <text class="shop_name">{{store_info.storeName}}</text>
  12. </view>
  13. <view class="des_bottom">
  14. <text class="shop_type" v-if="store_info.isOwnShop == 1">自营</text>
  15. <text class="popularity">关注{{store_info.followNumber}}</text>
  16. <text class="line">|</text>
  17. <text class="payer_number">已售{{store_info.orderFinishedCount}}</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="go_shop" @click='goStoreDetail(store_info.storeId)'>进店</view>
  22. </view>
  23. <view class="pre_content" v-if="store_info.goodsListVOList.length">
  24. <view v-for="(item1, index2) in store_info.goodsListVOList" :key="index2" class="commodity" v-if="index2 < 3" :data-gid="item1.goodsId"
  25. @tap="goods_detail(item1)">
  26. <view class="commodity_images">
  27. <image :src="item1.goodsImage" mode="aspectFit" class="commodity_img"></image>
  28. </view>
  29. <view class="commodity_price"><text>¥</text><text>{{$getPartNumber(item1.goodsPrice,'int')}}</text>.<text>{{$getPartNumber(item1.goodsPrice,'decimal')}}</text></view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. name: "goodsItemH",
  37. data() {
  38. return {
  39. }
  40. },
  41. props: {
  42. store_info: {
  43. type: Object,
  44. value: {}
  45. },
  46. },
  47. methods: {
  48. //进入商品详情页
  49. goods_detail(goods_info) {
  50. uni.navigateTo({
  51. url: '/pages/product/detail?productId=' + goods_info.defaultProductId + '&goodsId='+ goods_info.goodsId
  52. })
  53. },
  54. //跳转店铺详情页面
  55. goStoreDetail(vid) {
  56. uni.navigateTo({
  57. url: '/pages/store/shopHomePage?vid=' + vid
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang='scss'>
  64. .shop_lists {
  65. margin-top: 182rpx;
  66. width: 100%;
  67. background: #F5F5F5;
  68. padding: 20rpx 0;
  69. box-sizing: border-box;
  70. height: 100%;
  71. }
  72. .shop_pre {
  73. width: 710rpx;
  74. background: rgba(255, 255, 255, 1);
  75. border-radius: 15rpx;
  76. margin: 0 auto;
  77. box-sizing: border-box;
  78. margin-bottom: 20rpx;
  79. padding: 0 21rpx;
  80. }
  81. .pre_top {
  82. display: flex;
  83. width: 100%;
  84. height: 140rpx;
  85. justify-content: space-between;
  86. align-items: center;
  87. }
  88. .shop_left {
  89. display: flex;
  90. align-items: center;
  91. }
  92. .shop_avatar_img {
  93. width: 80rpx;
  94. height: 80rpx;
  95. border-radius: 50%;
  96. margin-right: 20rpx;
  97. background: #F8F8F8;
  98. }
  99. .shop_avatar {
  100. width: 80rpx;
  101. height: 80rpx;
  102. border-radius: 50%;
  103. margin-right: 20rpx;
  104. }
  105. .shop_des {
  106. display: flex;
  107. flex-direction: column;
  108. }
  109. .des_top {
  110. display: flex;
  111. margin-bottom: 20rpx;
  112. }
  113. .shop_name {
  114. max-width: 323rpx;
  115. font-size: 30rpx;
  116. font-family: PingFang SC;
  117. font-weight: bold;
  118. color: rgba(45, 45, 45, 1);
  119. line-height: 32rpx;
  120. white-space: nowrap;
  121. text-overflow: ellipsis;
  122. overflow: hidden;
  123. word-break: break-all;
  124. }
  125. .shop_type {
  126. width: 56px;
  127. height: 30px;
  128. background: #FB1B1B;
  129. border-radius: 15px;
  130. font-size: 22px;
  131. font-family: PingFang SC;
  132. font-weight: 600;
  133. color: #FFFFFF;
  134. line-height: 30px;
  135. text-align: center;
  136. transform: scale(0.5);
  137. margin-left: -14px;
  138. margin-top: -7px;
  139. }
  140. .des_bottom {
  141. display: flex;
  142. }
  143. .popularity {
  144. font-size: 24rpx;
  145. font-family: PingFang SC;
  146. font-weight: 600;
  147. color: #999999;
  148. line-height: 32rpx;
  149. margin-left: -10rpx;
  150. }
  151. .line {
  152. height: 24rpx;
  153. color: #999999;
  154. font-size: 24rpx;
  155. margin: 0 15rpx;
  156. }
  157. .payer_number {
  158. font-size: 24rpx;
  159. font-family: PingFang SC;
  160. font-weight: 600;
  161. color: #999999;
  162. line-height: 32rpx;
  163. }
  164. .go_shop {
  165. width: 100rpx;
  166. height: 50rpx;
  167. border: 1rpx solid #FF0000;
  168. border-radius: 25rpx;
  169. font-size: 28rpx;
  170. font-family: PingFang SC;
  171. font-weight: 600;
  172. color: #FB1B1B;
  173. line-height: 32rpx;
  174. display: flex;
  175. align-items: center;
  176. justify-content: center;
  177. }
  178. .pre_content {
  179. display: flex;
  180. }
  181. .commodity {
  182. width: 216rpx;
  183. height: 216rpx;
  184. position: relative;
  185. margin-right: 10rpx;
  186. margin-bottom: 21rpx;
  187. background: #F5F5F5;
  188. border-radius: 10rpx;
  189. }
  190. .commodity:nth-of-type(3) {
  191. margin-right: 0;
  192. }
  193. .commodity_images {
  194. width: 216rpx;
  195. height: 216rpx;
  196. border-radius: 10rpx;
  197. margin-bottom: 20rpx;
  198. background: #F8F8F8;
  199. }
  200. .commodity_img {
  201. width: 216rpx;
  202. height: 216rpx;
  203. border-radius: 10rpx;
  204. margin-bottom: 20rpx;
  205. }
  206. .commodity_price {
  207. font-size: 24rpx;
  208. font-family: PingFang SC;
  209. font-weight: 600;
  210. color: #FFFFFF;
  211. line-height: 24rpx;
  212. position: absolute;
  213. width: 100%;
  214. bottom: 0;
  215. z-index: 7;
  216. text-align: center;
  217. height: 36rpx;
  218. background: rgba(0, 0, 0, 0.3);
  219. border-radius: 0 0 10rpx 10rpx;
  220. display: flex;
  221. align-items: center;
  222. justify-content: center;
  223. }
  224. .commodity_price text:nth-child(1),
  225. .commodity_price text:nth-last-child(1) {
  226. font-size: 20rpx;
  227. }
  228. .filter_title {
  229. margin-top: 40rpx;
  230. margin: 28rpx;
  231. }
  232. .default {
  233. color: #dddddd !important;
  234. }
  235. .default .iconfont {
  236. color: #dddddd !important;
  237. }
  238. .attributr_sel_con{
  239. .attributr_sel_text{
  240. color: red;
  241. }
  242. font-size: 12rpx;
  243. }
  244. </style>