paintShopList.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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/img/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. // goodsId:this.goodsId,
  57. // lat: this.location.lat ? this.location.lat : '',
  58. // lng: this.location.lng ? this.location.lng : '',
  59. }, 'GET').then(res => {
  60. uni.hideLoading();
  61. this.queryShopList = res.data
  62. //console.log('list+=', this.queryShopList);
  63. })
  64. },
  65. goDetail(item) {
  66. this.$store.commit('mutationsckshopInfo', item)
  67. uni.navigateBack({
  68. delta:-1
  69. })
  70. // uni.navigateTo({
  71. // url: '../shop/shopDetail?id=' + item.shopId
  72. // })
  73. }
  74. },
  75. // 下拉刷新
  76. onPullDownRefresh() {
  77. this.getqueryShopList()
  78. setTimeout(function() {
  79. uni.stopPullDownRefresh();
  80. }, 1000);
  81. },
  82. }
  83. </script>
  84. <style scoped>
  85. .box {
  86. min-height: 100vh;
  87. background-color: #F4F5F7;
  88. padding-top: 20rpx;
  89. padding-bottom: 60rpx;
  90. }
  91. .shopline {
  92. margin: 0rpx 24rpx 20rpx;
  93. padding: 20rpx;
  94. background-color: #FFFFFF;
  95. border-radius: 10rpx;
  96. display: flex;
  97. }
  98. .nodataImg {
  99. width: 400rpx;
  100. padding-top: 100rpx;
  101. }
  102. .noTxt {
  103. font-size: 36rpx;
  104. color: #999999;
  105. padding-top: 50rpx;
  106. }
  107. .nodataBox {
  108. text-align: center;
  109. }
  110. .shopImg {
  111. width: 146rpx;
  112. height: 146rpx;
  113. border-radius: 6rpx;
  114. }
  115. .shopBox {
  116. padding-top: 30rpx;
  117. display: flex;
  118. }
  119. .flex {
  120. display: flex;
  121. justify-content: space-between;
  122. }
  123. .shopCont {
  124. padding-left: 22rpx;
  125. width: 520rpx;
  126. }
  127. .shopName {
  128. color: #333333;
  129. font-size: 26rpx;
  130. font-weight: 600;
  131. }
  132. .span1 {
  133. color: #FF4F00;
  134. font-size: 36rpx;
  135. }
  136. .span2 {
  137. color: #FF4F00;
  138. font-size: 22rpx;
  139. }
  140. .span3 {
  141. color: #333333;
  142. font-size: 22rpx;
  143. padding-left: 22rpx;
  144. }
  145. .shopBq {
  146. color: #FF4F00;
  147. font-size: 22rpx;
  148. border-radius: 4rpx;
  149. border: 1px solid #FF4F00;
  150. line-height: 30rpx;
  151. height: 30rpx;
  152. padding: 0rpx 5rpx;
  153. margin-top: 10rpx;
  154. }
  155. .brandsBg {
  156. display: flex;
  157. height: 38rpx;
  158. flex-wrap: wrap;
  159. align-items: center;
  160. overflow: hidden;
  161. padding: 5rpx 0rpx;
  162. }
  163. .brands {
  164. border-radius: 4rpx;
  165. padding: 0 5rpx;
  166. color: #F19D01;
  167. height: 28rpx;
  168. border: 1px solid #F19D01;
  169. font-size: 20rpx;
  170. line-height: 28rpx;
  171. margin: 5rpx 10rpx 5rpx 0rpx;
  172. }
  173. .timeBg {
  174. display: flex;
  175. }
  176. .shopTime {
  177. color: #666666;
  178. font-size: 22rpx;
  179. }
  180. .addressBox {
  181. color: #666666;
  182. font-size: 22rpx;
  183. }
  184. .shopNameSearchInput {
  185. width: 500rpx;
  186. }
  187. .colorCS {
  188. color: #FF4F00;
  189. }
  190. .shopbox {
  191. padding: 0 16rpx;
  192. }
  193. .shopImg {
  194. width: 146rpx;
  195. height: 146rpx;
  196. border-radius: 10rpx;
  197. }
  198. .shopCallImg {
  199. width: 38rpx;
  200. height: 46rpx;
  201. }
  202. .shopTop {
  203. display: flex;
  204. justify-content: space-between;
  205. width: 510rpx;
  206. }
  207. .shopright {
  208. padding-left: 20rpx;
  209. }
  210. .shopName {
  211. font-size: 26rpx;
  212. color: #333333;
  213. line-height: 37rpx;
  214. width: 450rpx;
  215. white-space: nowrap;
  216. overflow: hidden;
  217. text-overflow: ellipsis;
  218. }
  219. .shopScore1 {
  220. font-size: 36rpx;
  221. font-weight: bold;
  222. color: #FF4F00;
  223. height: 50rpx;
  224. line-height: 50rpx;
  225. }
  226. .shopScore11 {
  227. font-size: 22rpx;
  228. color: #FF4F00;
  229. margin-right: 14rpx;
  230. }
  231. .shopScore2 {
  232. font-size: 22rpx;
  233. color: #666666;
  234. margin-right: 14rpx;
  235. padding: 8rpx 0;
  236. }
  237. .shopScore3 {
  238. font-size: 22rpx;
  239. color: #333333;
  240. padding-left: 20rpx;
  241. }
  242. .Btn {
  243. width: 104rpx;
  244. height: 56rpx;
  245. background: #FF2400 linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
  246. border-radius: 6rpx;
  247. font-size: 26rpx;
  248. text-align: center;
  249. color: #FFFFFF;
  250. line-height: 56rpx;
  251. }
  252. .shopBottom {
  253. display: flex;
  254. }
  255. .shopBottomLeft {
  256. font-size: 25rpx;
  257. color: #666666;
  258. line-height: 30rpx;
  259. padding-top: 10rpx;
  260. display: flex;
  261. justify-content: space-between;
  262. padding-right: 10rpx;
  263. }
  264. .shopaddress {
  265. width: 400rpx;
  266. /* 隐藏文字显示 ...不换行 */
  267. overflow: hidden;
  268. text-overflow: ellipsis;
  269. white-space: nowrap;
  270. }
  271. .noMore {
  272. text-align: center;
  273. line-height: 50rpx;
  274. color: #999999;
  275. font-size: 28rpx;
  276. }
  277. </style>