index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <template>
  2. <div class="findStore">
  3. <Nav>
  4. <template #title>
  5. <p>找店铺</p>
  6. </template>
  7. </Nav>
  8. <div class="market">
  9. <div class="mark-list">
  10. <scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="marketScrollLeft" scroll-with-animation>
  11. <view class="scroll-view-item_H" v-for="(item, index) in marketList" :key="index"
  12. :class="index == idx ? 'active' : ''" @click="marketClick(index)">{{ item }}
  13. </view>
  14. </scroll-view>
  15. </div>
  16. <div class="material-list">
  17. <scroll-view class="scroll-view-material" scroll-x="true" :scroll-left="scrollLeft" scroll-with-animation>
  18. <view class="material-item" v-for="(item, index) in materialList" :key="index"
  19. :class="index == materIdx ? 'active' : ''" @click="materialClick(index)">{{ item }}</view>
  20. </scroll-view>
  21. </div>
  22. </div>
  23. <main>
  24. <div class="shops-list">
  25. <div class="shop-item" v-for="item in 10" :key="item">
  26. <div class="title">
  27. <p>佛山市顺德区正一<span>五金工具</span>有限公司</p>
  28. <div class="talk">洽谈</div>
  29. </div>
  30. <div class="info">
  31. <div class="favorable">
  32. <div class="finger">好评指数</div>
  33. <div class="star">
  34. <tui-rate :hollow="true" active="#EF530E" normal="#EF530E" :current="4" :score="0.5" :size="16" disabled></tui-rate>
  35. <p>
  36. <span>5星工厂</span>
  37. <tui-icon name="arrowright" size="16" color="#EF530E"></tui-icon>
  38. </p>
  39. </div>
  40. </div>
  41. <div class="brand">
  42. <div class="img-box">
  43. <img src="../../../static/new-images/findStore/icon.png" alt="">
  44. <p>品牌工厂</p>
  45. </div>
  46. <span>7年</span>
  47. </div>
  48. </div>
  49. <div class="text">
  50. <span>支持定制</span>
  51. <span>批量采购</span>
  52. <span>58%回头率</span>
  53. <p>广东佛山</p>
  54. </div>
  55. <div class="product-list">
  56. <div class="product-item" v-for="(item, index) in 6">
  57. <template v-if="index <= 2">
  58. <div class="img">
  59. <tui-lazyload-img width="100%" height="100%" radius="20rpx"
  60. :src="'../../../static/new-images/findStore/product.png' || ''"></tui-lazyload-img>
  61. </div>
  62. <p>兔拉拉环保型高 温中温低热54522温中温低热54522</p>
  63. </template>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </main>
  69. </div>
  70. </template>
  71. <script>
  72. import Nav from "../components/Nav.vue"
  73. export default {
  74. components: {
  75. Nav
  76. },
  77. data() {
  78. return {
  79. marketList: ['亚洲材料城', '亚太木业城', '水藤木材市场', '沙龙材料市场', '亚洲材料城', '亚太木业城', '水藤木材市场', '沙龙材料市场'],
  80. marketScrollLeft: 0,
  81. materialList: ['皮革', '布艺材料', '塑料五金', '石材', '木材', '化工涂料', '填充材料', '辅料', '快捷服务'],
  82. scrollLeft: 0,
  83. idx: 0, // 材料城的激活态
  84. materIdx: 0, // 材料的激活态
  85. }
  86. },
  87. methods: {
  88. marketClick(index) {
  89. this.idx = index
  90. this.marketScrollLeft = index * 30
  91. },
  92. materialClick(index) {
  93. this.materIdx = index
  94. this.scrollLeft = index * 15
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. page {
  101. background-color: #F5F5F5;
  102. }
  103. .findStore {
  104. .market {
  105. padding: 30rpx 25rpx;
  106. box-sizing: border-box;
  107. .mark-list {
  108. color: rgba(0, 0, 0, .5);
  109. .scroll-view_H {
  110. white-space: nowrap;
  111. width: 100%;
  112. .scroll-view-item_H {
  113. display: inline-block;
  114. margin-left: 40rpx;
  115. &:first-of-type {
  116. margin-left: 0;
  117. }
  118. }
  119. .active {
  120. font-size: 36rpx !important;
  121. color: #000;
  122. font-weight: 600;
  123. }
  124. }
  125. }
  126. .material-list {
  127. color: rgba(0, 0, 0, .5);
  128. white-space: nowrap;
  129. width: 100%;
  130. margin-top: 35rpx;
  131. .material-item {
  132. display: inline-block;
  133. padding: 4rpx 8rpx;
  134. background-color: #fff;
  135. margin-left: 15rpx;
  136. box-sizing: border-box;
  137. border: 1rpx solid transparent;
  138. &:first-of-type {
  139. margin-left: 0;
  140. }
  141. }
  142. .active {
  143. background-color: #FBF4F4;
  144. border-color: #EF530E;
  145. color: #EF530E;
  146. }
  147. }
  148. }
  149. main {
  150. padding: 30rpx;
  151. .shops-list {
  152. display: flex;
  153. flex-direction: column;
  154. gap: 25rpx;
  155. .shop-item {
  156. padding: 30rpx;
  157. background-color: #fff;
  158. border-radius: 20rpx;
  159. .title {
  160. display: flex;
  161. align-items: center;
  162. justify-content: space-between;
  163. p {
  164. font-size: 32rpx;
  165. color: #000;
  166. font-weight: 550;
  167. width: 82%;
  168. overflow: hidden;
  169. white-space: nowrap;
  170. text-overflow: ellipsis;
  171. span {
  172. color: #EF530E;
  173. }
  174. }
  175. .talk {
  176. padding: 10rpx 25rpx;
  177. background-color: #FFF2EC;
  178. color: #EF530E;
  179. font-size: 28rpx;
  180. border-radius: 50rpx;
  181. }
  182. }
  183. .info {
  184. display: flex;
  185. align-items: center;
  186. padding-top: 30rpx;
  187. .favorable {
  188. display: flex;
  189. align-items: center;
  190. height: 50rpx;
  191. .finger {
  192. height: 100%;
  193. background-color: #EF530E;
  194. padding: 0 15rpx;
  195. color: #fff;
  196. font-weight: 500;
  197. font-size: 28rpx;
  198. text-align: center;
  199. line-height: 50rpx;
  200. border-radius: 10rpx;
  201. }
  202. .star {
  203. display: flex;
  204. align-items: center;
  205. background-color: #FBF4F4;
  206. height: 100%;
  207. gap: 5rpx;
  208. padding-left: 10rpx;
  209. color: #EF530E;
  210. font-size: 22rpx;
  211. p {
  212. display: flex;
  213. gap: 5rpx;
  214. align-items: center;
  215. }
  216. }
  217. }
  218. .brand {
  219. display: flex;
  220. align-items: center;
  221. margin-left: 10rpx;
  222. gap: 10rpx;
  223. .img-box {
  224. display: flex;
  225. align-items: center;
  226. gap: 3rpx;
  227. font-size: 24rpx;
  228. font-weight: 600;
  229. img {
  230. width: 25rpx;
  231. height: 25rpx;
  232. display: block;
  233. }
  234. p {
  235. border-right: 1rpx solid #D8D8D8;
  236. padding-right: 10rpx;
  237. }
  238. }
  239. }
  240. }
  241. .text {
  242. margin-top: 25rpx;
  243. display: flex;
  244. gap: 15rpx;
  245. align-items: center;
  246. font-size: 24rpx;
  247. color: rgba(0, 0, 0, 0.5);
  248. span {
  249. position: relative;
  250. padding-right: 10rpx;
  251. &::after {
  252. content: "";
  253. position: absolute;
  254. right: 0;
  255. top: 50%;
  256. transform: translateY(-50%);
  257. width: 1rpx;
  258. height: 80%;
  259. background-color: #D8D8D8;
  260. }
  261. }
  262. }
  263. .product-list {
  264. display: flex;
  265. align-items: center;
  266. gap: 25rpx;
  267. margin-top: 20rpx;
  268. .product-item {
  269. width: 200rpx;
  270. .img {
  271. width: 200rpx;
  272. height: 200rpx;
  273. }
  274. p {
  275. margin-top: 10rpx;
  276. padding-right: 10rpx;
  277. box-sizing: border-box;
  278. font-size: 26rpx;
  279. height: 72rpx;
  280. overflow: hidden;
  281. -webkit-line-clamp: 2;
  282. text-overflow: ellipsis;
  283. display: -webkit-box;
  284. -webkit-box-orient: vertical;
  285. }
  286. }
  287. }
  288. }
  289. }
  290. }
  291. }
  292. </style>