shopList.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. <template>
  2. <view class="box">
  3. <view class="allShop" >
  4. <view class="topView">
  5. <view class="search"><!-- 120rpx -->
  6. <view class="searchVIew">
  7. <image src="../../static/img/icon_search.png" mode="" class="searchIMg"></image>
  8. <input type="text" value="" placeholder="请输入门店名称" class="searchInput" v-model="shopName" @confirm="searchList" />
  9. <image src="../../static/img/icon_search_del.png" v-show="shopName" mode="" class="ssScImg" @click="searchSc"></image>
  10. </view>
  11. </view>
  12. <view class="screen">
  13. <view class="screenLine">
  14. <view class="screenLineTxt" @click="showCity=true,comprehensiveShow=false,levelShow=false">{{cityname}}</view>
  15. <image src="../../static/img/icon_arrow_gray.png" mode="" v-show="!showCity" class="screenJt"></image>
  16. </view>
  17. <view class="screenLine" @click="juli" :class="{colorCS:comprehensiveShow}">
  18. <view class="screenLineTxt" v-if="comprehensive==0">综合排序</view>
  19. <view class="screenLineTxt" v-if="comprehensive==1">距离最近</view>
  20. <view class="screenLineTxt" v-if="comprehensive==2">评分最高</view>
  21. <image src="../../static/img/icon_arrow_gray.png" mode="" v-show="!comprehensiveShow" class="screenJt"></image>
  22. </view>
  23. <!-- 综合排序 -->
  24. <view class="shoplevelBox " v-show="comprehensiveShow" @click="comprehensiveShow=false">
  25. <view class="shoplevelCont ">
  26. <view class="comprehensivebox">
  27. <view class="comprehensiveLine" :class="{comprehensiveACtive:comprehensive==0}" @click.stop="comprehensiveClick(0)">综合排序</view>
  28. <view class="comprehensiveLine" :class="{comprehensiveACtive:comprehensive==1}" @click.stop="comprehensiveClick(1)">距离最近</view>
  29. <view class="comprehensiveLine" :class="{comprehensiveACtive:comprehensive==2}" @click.stop="comprehensiveClick(2)">评分最高</view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 综合排序 -->
  34. </view>
  35. </view>
  36. <view class="shopLineBox">
  37. <view class="shopline" v-for="(item,index) in queryShopList" @click="goDetail(item)">
  38. <view class="shoplineLeft">
  39. <image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
  40. <image src="../../static/img/noimg.png" mode="" class="shopImg" v-else></image>
  41. </view>
  42. <view class="shopright">
  43. <view class="shopTop">
  44. <view class="shopName">{{item.shopName}}</view>
  45. <!-- <image src="../../static/img/shopcall.png" mode="" class="shopCallImg"></image> -->
  46. </view>
  47. <view class="shopScore">
  48. <span class="shopScore1" v-if="item.shopScore">{{item.shopScore}}</span>
  49. <span class="shopScore2" v-if="item.shopScore">分</span>
  50. <span class="shopScore2" v-if="!item.shopScore">暂无评分</span>
  51. <span class="shopScore3">服务次数 {{item.sheetSum}}</span>
  52. </view>
  53. <view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span v-if="item.endTime">{{item.endTime}}</span> </view>
  54. <view class="shopBottom">
  55. <view class="shopBottomLeft">
  56. <span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
  57. <span class="shopaddress">{{item.address}}</span>
  58. </view>
  59. <!-- <view class="Btn" @click="ckshop(item)">确定</view> -->
  60. </view>
  61. </view>
  62. </view>
  63. <view v-if="queryShopList==''" class="nodataBox">
  64. <image src="../../static/img/nodata.png" mode="widthFix" class="nodataImg"></image>
  65. <view class="noTxt">暂无数据</view>
  66. </view>
  67. </view>
  68. </view>
  69. <chose-city @selectCity="selectCity" v-if="showCity" @closeModal="closeModal"></chose-city>
  70. </view>
  71. </template>
  72. <script>
  73. import choseCity from "@/components/chose-city/chose-city"
  74. export default {
  75. components: {
  76. choseCity
  77. },
  78. data() {
  79. return {
  80. location:'',
  81. cityname:'上海市',
  82. queryShopList:'',
  83. shopName:'',
  84. level:'',
  85. comprehensive:1,
  86. shopLevel:[
  87. {name:'洗剪点',ckeck:false},{name:'VIIIP',ckeck:false}
  88. ],
  89. levelShow:false,
  90. comprehensiveShow:false,
  91. showCity:false,
  92. }
  93. },
  94. onShow() {
  95. this.showCity=false;
  96. this.levelShow=false;
  97. this.comprehensiveShow=false;
  98. this.$common.isUserId();
  99. this.location=uni.getStorageSync("location");
  100. if(this.location){
  101. this.cityname=this.location.cityname
  102. }
  103. this.getqueryShopList()//获取全部门店列表
  104. this.getqueryBShopLevel()//查询门店等级
  105. },
  106. onLoad() {
  107. },
  108. methods: {
  109. mdlx(){
  110. this.levelShow=!this.levelShow;this.comprehensiveShow=false;this.showCity=false
  111. },
  112. juli(){
  113. this.comprehensiveShow=!this.comprehensiveShow;this.levelShow=false;this.showCity=false
  114. },
  115. searchList(){
  116. this.getqueryShopList()//获取全部门店列表
  117. },
  118. searchSc(){
  119. this.shopName='';
  120. this.getqueryShopList()//获取全部门店列表
  121. },
  122. selectCity(item) {
  123. console.log('-您选择的城市-',item)
  124. this.location.cityname=item.name;
  125. this.location.cityCode=item.citycode;
  126. this.cityname=item.name;
  127. console.log(this.location)
  128. uni.setStorage({
  129. key: 'location',
  130. data: this.location,
  131. success: function () {}
  132. });
  133. this.showCity = false;
  134. this.getqueryShopList()//获取全部门店列表
  135. },
  136. closeModal() {
  137. this.showCity = false
  138. },
  139. getqueryShopList(){
  140. uni.showLoading({ });
  141. this.$http('worldKeepCar/worldHome/getWorldShopInfoList', {
  142. shopName:this.shopName,
  143. lat:this.location.lat,
  144. lng:this.location.lng,
  145. cityCode:this.location.cityCode,
  146. comprehensive:this.comprehensive,
  147. level:this.level,
  148. },'GET').then(res => {
  149. uni.hideLoading();
  150. this.queryShopList=res.data
  151. })
  152. },
  153. getqueryBShopLevel(){
  154. this.$http('miniAppShopInfoController/queryBShopLevel', {
  155. },'GET').then(res => {
  156. res.data.forEach(item=>{
  157. item.ckeck=false;
  158. })
  159. this.shopLevel=res.data
  160. })
  161. },
  162. levelClick(item){
  163. item.ckeck=!item.ckeck
  164. },
  165. shoplevelReset(){
  166. this.shopLevel.forEach(item=>{
  167. item.ckeck=false;
  168. })
  169. // this.getqueryShopList()
  170. //this.levelShow=false;
  171. },
  172. shoplevelsbu(){
  173. var arr=[]
  174. this.shopLevel.forEach(item=>{
  175. if(item.ckeck){
  176. arr.push(item.id)
  177. }
  178. })
  179. this.level=arr.join(',')
  180. console.log(this.level)
  181. this.levelShow=false;
  182. this.getqueryShopList()
  183. },
  184. comprehensiveClick(num){
  185. this.comprehensive=num;
  186. this.comprehensiveShow=false;
  187. this.getqueryShopList()
  188. },
  189. goDetail(item){
  190. uni.navigateTo({
  191. url:'../shop/shopDetail?id='+item.shopId
  192. })
  193. }
  194. }
  195. }
  196. </script>
  197. <style scoped>
  198. .box{
  199. min-height: 100vh;
  200. background:#F4F5F7 ;
  201. }
  202. .allShop{
  203. /* background: #FFFFFF; */
  204. }
  205. .topView{
  206. position: fixed;
  207. width: 100%;
  208. height: 170rpx;
  209. background-color: #FFFFFF;
  210. z-index: 11;
  211. }
  212. .searchIMg{
  213. width: 40rpx;height: 40rpx;margin-top: 16rpx;margin-left: 20rpx;
  214. }
  215. .ssScImg{
  216. width: 40rpx;height: 40rpx;margin-top: 16rpx;
  217. }
  218. .search{
  219. padding: 24rpx;
  220. background: #FFFFFF;
  221. }
  222. .searchVIew{
  223. display: flex;
  224. background: #F4F5F7;
  225. border-radius: 36rpx;
  226. height: 72rpx;
  227. }
  228. .searchInput{
  229. color: #999999;font-size: 28rpx;padding-left: 16rpx;
  230. height: 72rpx;line-height: 72rpx;width: 570rpx;
  231. }
  232. .screenJt{
  233. width: 24rpx;
  234. height: 24rpx;
  235. margin-top: 7rpx;
  236. margin-left: 5rpx;
  237. }
  238. .screen{
  239. display: flex;
  240. justify-content: space-around;
  241. padding: 0 24rpx 16rpx 24rpx;
  242. border-bottom: 2rpx solid #EEEEEE;
  243. position: relative;
  244. background: #FFFFFF;
  245. height: 60rpx;
  246. }
  247. .screenLine{
  248. display: flex;
  249. color: #333333;
  250. font-size: 28rpx;
  251. }
  252. .shopLineBox{
  253. padding: 190rpx 0rpx 25rpx;
  254. }
  255. .shopBox2{
  256. margin-top: 20rpx;
  257. padding-bottom: 30rpx;
  258. background: #FFFFFF;
  259. border-radius: 10rpx;
  260. padding-left: 20rpx;
  261. padding-right: 20rpx;
  262. }
  263. .shoplevelBox{
  264. position: fixed;
  265. left: 0;
  266. width: 750rpx;
  267. top: 196rpx;
  268. background: rgba(0,0,0,0.4);
  269. z-index: 11;
  270. border-top: 1px solid #EEEEEE;
  271. border-bottom:1px solid #EEEEEE ;
  272. height: calc(100vh - 196rpx);
  273. }
  274. /* #ifdef H5 */
  275. .shoplevelBox{
  276. top: calc(196rpx + 44px);
  277. }
  278. /* #endif */
  279. .shoplevelCont{
  280. display: flex;
  281. flex-wrap: wrap;
  282. background: #FFFFFF;
  283. padding: 24rpx;
  284. }
  285. .shoplevelLine{
  286. color: #333333;
  287. line-height: 64rpx;
  288. padding: 0 40rpx;
  289. height: 64rpx;
  290. background: #F4F5F7;
  291. border-radius: 32rpx;
  292. margin-right: 20rpx;
  293. margin-bottom: 30rpx;
  294. }
  295. .shoplevelBottom{
  296. display: flex;
  297. justify-content: space-between;
  298. padding-top: 60rpx;
  299. padding-right: 24rpx;
  300. background: #FFFFFF;
  301. padding: 24rpx;
  302. }
  303. .shoplevelReset{
  304. width: 320rpx;
  305. height: 74rpx;
  306. border-radius: 37rpx;
  307. border: 2rpx solid #FF4F00;
  308. text-align: center;
  309. line-height: 74rpx;
  310. font-size: 30rpx;
  311. font-family: PingFangSC-Medium, PingFang SC;
  312. font-weight: 500;
  313. color: #FF4F00;
  314. }
  315. .shoplevelsbu{
  316. width: 320rpx;
  317. height: 74rpx;
  318. background: #FF4F00;
  319. border-radius: 37rpx;
  320. font-size: 30rpx;
  321. font-family: PingFangSC-Medium, PingFang SC;
  322. font-weight: 500;
  323. color: #FFFFFF;
  324. text-align: center;
  325. line-height: 74rpx;
  326. border: 2rpx solid #FF4F00;
  327. }
  328. .shoplevalActive{
  329. color: #FF4F00;
  330. background: rgba(255, 79, 0, 0.08);
  331. }
  332. .comprehensiveLine{
  333. /* width: 200rpx;
  334. height: 60rpx;
  335. line-height: 60rpx;
  336. text-align: center;
  337. border: 1px solid rgb(228, 228, 228);
  338. border-radius: 10rpx; */
  339. font-size: 26rpx;
  340. font-family: PingFangSC-Regular, PingFang SC;
  341. font-weight: 400;
  342. color: #333333;
  343. padding: 25rpx 0;
  344. }
  345. .comprehensivebox{
  346. /* display: flex;justify-content: space-around; */
  347. }
  348. .comprehensiveACtive{
  349. color: #FF4F00;
  350. }
  351. .nodataImg{
  352. width: 400rpx;
  353. padding-top: 100rpx;
  354. }
  355. .noTxt{
  356. font-size: 36rpx;
  357. color: #999999;
  358. padding-top: 50rpx;
  359. }
  360. .nodataBox{
  361. text-align: center;
  362. }
  363. .shopImg{
  364. width: 146rpx;
  365. height: 146rpx;
  366. border-radius: 6rpx;
  367. }
  368. .shopBox{
  369. padding-top: 30rpx;
  370. display: flex;
  371. }
  372. .flex{
  373. display: flex;
  374. justify-content: space-between;
  375. }
  376. .shopCont{
  377. padding-left: 22rpx;
  378. width: 520rpx;
  379. }
  380. .shopName{
  381. color: #333333;
  382. font-size: 26rpx;
  383. font-weight: 600;
  384. }
  385. .span1{
  386. color: #FF4F00;font-size: 36rpx;
  387. }
  388. .span2{
  389. color: #FF4F00;font-size: 22rpx;
  390. }
  391. .span3{
  392. color: #333333;font-size: 22rpx;padding-left: 22rpx;
  393. }
  394. .shopBq{
  395. color: #FF4F00;font-size: 22rpx;border-radius: 4rpx;
  396. border: 1px solid #FF4F00;line-height: 30rpx;height: 30rpx;padding: 0rpx 5rpx;
  397. margin-top: 10rpx;
  398. }
  399. .shopTime{
  400. color: #666666;font-size: 22rpx;
  401. }
  402. .addressBox{
  403. color: #666666;font-size: 22rpx;
  404. }
  405. .shopNameSearchInput{
  406. width: 500rpx;
  407. }
  408. .colorCS{
  409. color: #FF4F00;
  410. }
  411. .shopbox{
  412. padding:0 16rpx;
  413. }
  414. .shopline{
  415. padding: 20rpx;
  416. background: #FFFFFF;
  417. border-radius: 10rpx;
  418. margin-top: 20rpx;
  419. display: flex;
  420. }
  421. .shopImg{
  422. width: 146rpx;
  423. height: 146rpx;
  424. border-radius: 10rpx;
  425. }
  426. .shopCallImg{
  427. width: 38rpx;
  428. height: 46rpx;
  429. }
  430. .shopTop{
  431. display: flex;
  432. justify-content: space-between;
  433. width: 510rpx;
  434. }
  435. .shopright{
  436. padding-left: 20rpx;
  437. }
  438. .shopName{
  439. font-size: 26rpx;
  440. color: #333333;
  441. line-height: 37rpx;
  442. width:450rpx;
  443. white-space: nowrap;
  444. overflow: hidden;
  445. text-overflow: ellipsis;
  446. }
  447. .shopScore1{
  448. font-size: 36rpx;
  449. color: #FF4F00;
  450. }
  451. .shopScore2{
  452. font-size: 22rpx;
  453. color: #FF4F00;
  454. }
  455. .shopScore3{
  456. font-size: 22rpx;
  457. color: #333333;
  458. padding-left: 20rpx;
  459. }
  460. .shopTime{
  461. font-size: 22rpx;
  462. color: #666666;
  463. line-height: 30rpx;
  464. padding-top: 10rpx;
  465. }
  466. .Btn{
  467. width: 104rpx;
  468. height: 56rpx;
  469. background: #FF2400 linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
  470. border-radius: 6rpx;
  471. font-size: 26rpx;
  472. text-align: center;
  473. color: #FFFFFF;
  474. line-height: 56rpx;
  475. }
  476. .shopBottom{
  477. display: flex;
  478. }
  479. .shopBottomLeft{
  480. width: 500rpx;
  481. font-size: 22rpx;
  482. color: #666666;
  483. line-height: 30rpx;
  484. padding-top: 10rpx;
  485. }
  486. .shopaddress{
  487. padding-left: 10rpx;
  488. }
  489. </style>