paintShopList.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <template>
  2. <view class="box">
  3. <view class="shopline" v-for="(item,index) in queryShopList" @click="goDetail(item)">
  4. <view class="shoplineLeft">
  5. <image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
  6. <image src="../../static/timg/noimg.png" mode="" class="shopImg" v-else></image>
  7. </view>
  8. <view class="shopright">
  9. <view class="shopTop">
  10. <view class="shopName">{{item.shopName}}</view>
  11. </view>
  12. <view class="brandsBg" v-if="item.brands">
  13. <view class="brands" v-for="(v,index2) in item.brands.split(',')">{{v}}</view>
  14. </view>
  15. <view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span
  16. v-if="item.endTime">{{item.endTime}}</span> </view>
  17. <view class="shopBottomLeft">
  18. <span class="shopaddress"
  19. v-if="item.address">{{item.provinceName}}{{item.cityName}}{{item.areaName}}{{item.address}}</span>
  20. <span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 上拉 加载更多 -->
  25. <view class="noMore" v-if="noMoreShow && (queryShopList.length!=0)">没有更多数据</view>
  26. <!-- 无数据空白页 -->
  27. <nodata v-if="queryShopList.length==0"></nodata>
  28. </view>
  29. </template>
  30. <script>
  31. import nodata from '../../components/nodata/nodata.vue'
  32. export default {
  33. components: {
  34. nodata,
  35. },
  36. data() {
  37. return {
  38. location: {
  39. lng: '',
  40. lat: '',
  41. },
  42. queryShopList: '',
  43. noMoreShow: false,
  44. goodsId:'',
  45. }
  46. },
  47. onLoad(opt) {
  48. this.getqueryShopList() //获取全部门店列表
  49. },
  50. methods: {
  51. getqueryShopList() {
  52. uni.showLoading({
  53. title: '加载中'
  54. })
  55. this.$http('openSheetMetalSprayPaint/queryBpshopList', {
  56. }, 'GET').then(res => {
  57. uni.hideLoading();
  58. this.queryShopList = res.data
  59. //console.log('list+=', this.queryShopList);
  60. })
  61. },
  62. goDetail(item) {
  63. this.$store.commit('mutationsckshopInfo', item)
  64. uni.navigateBack({
  65. delta:-1
  66. })
  67. // uni.navigateTo({
  68. // url: '../shop/shopDetail?id=' + item.shopId
  69. // })
  70. }
  71. },
  72. // 下拉刷新
  73. onPullDownRefresh() {
  74. this.getqueryShopList()
  75. setTimeout(function() {
  76. uni.stopPullDownRefresh();
  77. }, 1000);
  78. },
  79. }
  80. </script>
  81. <style scoped>
  82. .box {
  83. min-height: 100vh;
  84. background-color: #F4F5F7;
  85. padding-top: 20rpx;
  86. padding-bottom: 60rpx;
  87. }
  88. .shopline {
  89. margin: 0rpx 24rpx 20rpx;
  90. padding: 20rpx;
  91. background-color: #FFFFFF;
  92. border-radius: 10rpx;
  93. display: flex;
  94. }
  95. .nodataImg {
  96. width: 400rpx;
  97. padding-top: 100rpx;
  98. }
  99. .noTxt {
  100. font-size: 36rpx;
  101. color: #999999;
  102. padding-top: 50rpx;
  103. }
  104. .nodataBox {
  105. text-align: center;
  106. }
  107. .shopImg {
  108. width: 146rpx;
  109. height: 146rpx;
  110. border-radius: 6rpx;
  111. }
  112. .shopBox {
  113. padding-top: 30rpx;
  114. display: flex;
  115. }
  116. .flex {
  117. display: flex;
  118. justify-content: space-between;
  119. }
  120. .shopCont {
  121. padding-left: 22rpx;
  122. width: 520rpx;
  123. }
  124. .shopName {
  125. color: #333333;
  126. font-size: 26rpx;
  127. font-weight: 600;
  128. }
  129. .span1 {
  130. color: #FF4F00;
  131. font-size: 36rpx;
  132. }
  133. .span2 {
  134. color: #FF4F00;
  135. font-size: 22rpx;
  136. }
  137. .span3 {
  138. color: #333333;
  139. font-size: 22rpx;
  140. padding-left: 22rpx;
  141. }
  142. .shopBq {
  143. color: #FF4F00;
  144. font-size: 22rpx;
  145. border-radius: 4rpx;
  146. border: 1px solid #FF4F00;
  147. line-height: 30rpx;
  148. height: 30rpx;
  149. padding: 0rpx 5rpx;
  150. margin-top: 10rpx;
  151. }
  152. .brandsBg {
  153. display: flex;
  154. height: 38rpx;
  155. flex-wrap: wrap;
  156. align-items: center;
  157. overflow: hidden;
  158. padding: 5rpx 0rpx;
  159. }
  160. .brands {
  161. border-radius: 4rpx;
  162. padding: 0 5rpx;
  163. color: #F19D01;
  164. height: 28rpx;
  165. border: 1px solid #F19D01;
  166. font-size: 20rpx;
  167. line-height: 28rpx;
  168. margin: 5rpx 10rpx 5rpx 0rpx;
  169. }
  170. .timeBg {
  171. display: flex;
  172. }
  173. .shopTime {
  174. color: #666666;
  175. font-size: 22rpx;
  176. }
  177. .addressBox {
  178. color: #666666;
  179. font-size: 22rpx;
  180. }
  181. .shopNameSearchInput {
  182. width: 500rpx;
  183. }
  184. .colorCS {
  185. color: #FF4F00;
  186. }
  187. .shopbox {
  188. padding: 0 16rpx;
  189. }
  190. .shopImg {
  191. width: 146rpx;
  192. height: 146rpx;
  193. border-radius: 10rpx;
  194. }
  195. .shopCallImg {
  196. width: 38rpx;
  197. height: 46rpx;
  198. }
  199. .shopTop {
  200. display: flex;
  201. justify-content: space-between;
  202. width: 510rpx;
  203. }
  204. .shopright {
  205. padding-left: 20rpx;
  206. }
  207. .shopName {
  208. font-size: 26rpx;
  209. color: #333333;
  210. line-height: 37rpx;
  211. width: 450rpx;
  212. white-space: nowrap;
  213. overflow: hidden;
  214. text-overflow: ellipsis;
  215. }
  216. .shopScore1 {
  217. font-size: 36rpx;
  218. font-weight: bold;
  219. color: #FF4F00;
  220. height: 50rpx;
  221. line-height: 50rpx;
  222. }
  223. .shopScore11 {
  224. font-size: 22rpx;
  225. color: #FF4F00;
  226. margin-right: 14rpx;
  227. }
  228. .shopScore2 {
  229. font-size: 22rpx;
  230. color: #666666;
  231. margin-right: 14rpx;
  232. padding: 8rpx 0;
  233. }
  234. .shopScore3 {
  235. font-size: 22rpx;
  236. color: #333333;
  237. padding-left: 20rpx;
  238. }
  239. .Btn {
  240. width: 104rpx;
  241. height: 56rpx;
  242. background: #FF2400 linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
  243. border-radius: 6rpx;
  244. font-size: 26rpx;
  245. text-align: center;
  246. color: #FFFFFF;
  247. line-height: 56rpx;
  248. }
  249. .shopBottom {
  250. display: flex;
  251. }
  252. .shopBottomLeft {
  253. font-size: 25rpx;
  254. color: #666666;
  255. line-height: 30rpx;
  256. padding-top: 10rpx;
  257. display: flex;
  258. justify-content: space-between;
  259. padding-right: 10rpx;
  260. }
  261. .shopaddress {
  262. width: 400rpx;
  263. /* 隐藏文字显示 ...不换行 */
  264. overflow: hidden;
  265. text-overflow: ellipsis;
  266. white-space: nowrap;
  267. }
  268. .noMore {
  269. text-align: center;
  270. line-height: 50rpx;
  271. color: #999999;
  272. font-size: 28rpx;
  273. }
  274. </style>