map - 副本 (2).nvue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281
  1. <template>
  2. <view class="main-container">
  3. <!-- <map id="map" ref="map1" :show-location="true" :style="{'height':windowHeight+'px','width':windowWidth+'px'}"
  4. :latitude="latitude" :longitude="longitude" :circles="circles" :scale="scale"
  5. @tap="clickMap" @markertap="markertap"></map> -->
  6. <map id="map" ref="mapRef" :show-location="true" :latitude="latitude" :longitude="longitude" :scale="scale"
  7. :markers="markersData" :circles="circles" :style="{'width':windowWidth+'px','height':windowHeight+'px'}" @tap="clickMap"
  8. @markertap="markertap"></map>
  9. <!-- 遮罩层 -->
  10. <!-- <view class="search-bg" v-if="showMask"
  11. :style="{'width':windowWidth+'px','height':windowHeight+'px','z-index': 2}"
  12. @click.stop="e => {return false}" @touchend.prevent="aaaaa()">
  13. </view> -->
  14. <!-- 更多地图 -->
  15. <view class="top-btn-box">
  16. <view class="top-btn">
  17. <template
  18. v-if="pageListMap01 && pageListMap01.themeModuleVoList && pageListMap01.themeModuleVoList.length > 0">
  19. <view class="top-btn-item top-btn-item-l" v-for="(item,index) in pageListMap01.themeModuleVoList"
  20. :key="`MapType_${index}`" @click="toApp(item)">
  21. <image class="top-img" :src="item.moduleImage" mode="aspectFill"></image>
  22. <text class="top-txt">{{item.moduleName}}</text>
  23. </view>
  24. </template>
  25. <view class="top-btn-item" @click="onMoerMap()">
  26. <image class="top-img" src="@/static/map/more.png" mode=""></image>
  27. <text class="top-txt">更多地图</text>
  28. </view>
  29. </view>
  30. <view v-if="[1,2].includes(DataType)" class=" top-btn-item data-type"
  31. @click="DataType === 1 ? DataType = 2 : DataType = 1">
  32. <text class="data-type-icon iconfont_nvue">&#xe676;</text>
  33. <!-- <image class="top-img" src="@/static/map/list.png" mode=""></image> -->
  34. <text class="top-txt">{{DataType === 1 ? '列表' : '轮播'}}</text>
  35. </view>
  36. <!-- 定位我的当前位置 -->
  37. <view class="data-type my-location" @click.stop="backMyLocation()">
  38. <image class="my-img" src="@/static/map/my.png" mode="aspectFill"></image>
  39. </view>
  40. </view>
  41. <!-- 搜索框 -->
  42. <search ref="searchRefs" :keyWord="keyWord" :showMask="showMask" :searchType="searchType"
  43. :hotClassify="hotClassify" :classifyList="classifyList" :classifyTree="classifyTree"
  44. :activeClassify="activeClassify" :oneClassifyIndex="oneClassifyIndex" @clearSearch="clearSearch"
  45. :activeDistance="activeDistance" :twoClassifyIndex="twoClassifyIndex" @onSearchFocus="onSearchFocus"
  46. @onSelectClassify="onSelectClassify" @selectLabel="e => searchType = e"
  47. @selectHotClassify="selectHotClassify" @onSearch="onSearch" />
  48. <!-- 点位信息卡片 -->
  49. <template v-if="!showMask">
  50. <template v-if="DataType === 1">
  51. <swiperList :addressList="addressList" :classifyList="classifyList"
  52. :key="`swiperList_${addressList.length}`" @onCurrent="onCurrent" :keyWord="keyWord"
  53. :activeClassify="activeClassify" />
  54. </template>
  55. <template v-if="DataType === 2">
  56. <dataList :addressList="addressList" :classifyList="classifyList" :loading="loading" :keyWord="keyWord"
  57. :activeClassify="activeClassify" />
  58. </template>
  59. <view v-else-if="DataType === 3">
  60. <babTouchbox :minHeight="0.35" :maxHeight="0.8" :touchHeight="64" @currentHeight="setTouchHeight"
  61. @maxtHeight="setScrollMaxHeight">
  62. <view class="map-headline">
  63. <text class="headline-lr"></text>
  64. <text class="headline-text">更多地图</text>
  65. <text class="headline-lr iconfont_nvue" @click.stop="DataType = 1">&#xe867;</text>
  66. </view>
  67. <scroll-view :style="{'height':TouchHeight - 40 +'px' }" scroll-y="true" :show-scrollbar="false">
  68. <template>
  69. <view class="map-type"
  70. v-if="pageListMap01 && pageListMap01.themeModuleVoList && pageListMap01.themeModuleVoList.length > 0">
  71. <view class="map-type-lable">
  72. <text class="label-line"></text>
  73. <text class="lable-name">{{pageListMap01.themeVo.themeName }}</text>
  74. </view>
  75. <view class="map-type-list">
  76. <view class="map-type-item"
  77. v-for="(item , index) in pageListMap01.themeModuleVoList"
  78. :key="`themeModule_${index}`" @click.stop="toApp(item)">
  79. <image class="map-type-icon" :src="item.moduleImage" mode=""></image>
  80. <text class="map-type-name">{{item.moduleName}}</text>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="map-type"
  85. v-if="pageListMap02 && pageListMap02.themeModuleVoList && pageListMap02.themeModuleVoList.length > 0">
  86. <view class="map-type-lable">
  87. <text class="label-line"></text>
  88. <text class="lable-name">{{pageListMap02.themeVo.themeName }}</text>
  89. </view>
  90. <view class="map-type-list">
  91. <view class="map-type-item"
  92. v-for="(item , index) in pageListMap02.themeModuleVoList"
  93. :key="`themeModule_two_${index}`">
  94. <image class="map-type-icon" :src="item.moduleImage" mode=""></image>
  95. <text class="map-type-name">{{item.moduleName}}</text>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- <view v-else class="empty-box">
  100. <EmptyDate />
  101. </view> -->
  102. </template>
  103. </scroll-view>
  104. </babTouchbox>
  105. </view>
  106. </template>
  107. </view>
  108. </template>
  109. <script src="https://webapi.amap.com/maps?v=1.4.15&key=bde3903093d0eff03b0052192a67e1c0"></script>
  110. <script>
  111. let app = getApp();
  112. const $defaultId = -1;
  113. import babTouchbox from '@/components/bab-Touchbox/bab-Touchbox';
  114. import EmptyDate from '@/components/EmptyDate/EmptyDate';
  115. import swiperList from "./mapModule/swiperList"
  116. import dataList from "./mapModule/dataList"
  117. import search from "./mapModule/search"
  118. import {
  119. getThemeModule,
  120. getLocationClassify,
  121. getLocationNearbyList,
  122. getCircumList,
  123. getLocationIinfo
  124. } from "@/api/government.js"
  125. export default {
  126. components: {
  127. babTouchbox,
  128. EmptyDate,
  129. swiperList,
  130. dataList,
  131. search
  132. },
  133. data() {
  134. return {
  135. map: null,
  136. latitude: 30.635607,
  137. longitude: 111.389431,
  138. myLatitude: 30.635607,
  139. myLongitude: 111.389431,
  140. showMask: false,
  141. keyWord: '',
  142. // 搜索
  143. searchType: 1, // 1: 默认收索框; 2:选择热门搜索类型; 3:选择筛选条件, 4: 选择地址 , 5:选择分类
  144. // 分类
  145. classifyList: [],
  146. hotClassify: [],
  147. classifyTree: [],
  148. oneClassifyIndex: 1,
  149. twoClassifyIndex: null,
  150. activeClassify: null,
  151. TouchHeight: 0,
  152. scrollMaxHeight: 0,
  153. scale: 18,
  154. windowHeight: 0,
  155. windowWidth: 0,
  156. swiperList: [{
  157. title: '主标题0',
  158. subTitle: '副标题0'
  159. },
  160. {
  161. title: '主标题1',
  162. subTitle: '副标题1'
  163. },
  164. {
  165. title: '主标题2',
  166. subTitle: '副标题2'
  167. }
  168. ],
  169. activeDistance: null,
  170. // 列表
  171. oldDataType: null,
  172. DataType: 1, // 1 轮播 2:列表 , 3 更多地图
  173. addressList: [], // 地址点位列表
  174. markersData: [],
  175. circles:[
  176. {
  177. latitude: this.myLongitude,
  178. longitude: this.myLatitude,
  179. fillColor: 'rgba(156,207,209,0.5)',
  180. radius: radius,
  181. // color: 'transparent',
  182. strokeWidth: 2
  183. }
  184. ],
  185. // 更多地图类型
  186. pageListMap01: null,
  187. pageListMap02: null,
  188. };
  189. },
  190. created() {
  191. uni.$on('NextMap', (data) => {
  192. if (data) {
  193. this.selectHotClassify(data);
  194. }
  195. });
  196. uni.$on('NextMapKwd', (data) => {
  197. if (data) {
  198. this.onSearch(data);
  199. }
  200. });
  201. const {
  202. statusBarHeight,
  203. screenHeight,
  204. navHeight,
  205. screenWidth
  206. } = app.globalData;
  207. this.windowHeight = screenHeight
  208. this.windowWidth = screenWidth
  209. // #ifdef APP-NVUE
  210. try {
  211. var domModule = weex.requireModule('dom');
  212. domModule.addRule('fontFace', {
  213. fontFamily: 'iconfont_nvue',
  214. src: "url('../../../static/font/yige/iconfont.ttf')",
  215. });
  216. } catch (e) {
  217. //TODO handle the exception
  218. }
  219. // #endif
  220. uni.getLocation({
  221. type: 'gcj02',
  222. isHighAccuracy: true, //高精度
  223. geocode: true, //将位置解析成地址
  224. success: res => {
  225. this.latitude = res.latitude;
  226. this.longitude = res.longitude;
  227. this.myLatitude = res.latitude;
  228. this.myLongitude = res.longitude;
  229. // _this.getTypeOptions();
  230. },
  231. fail: function(res) {
  232. console.log('res = ', res)
  233. },
  234. });
  235. this.clearSearch(true);
  236. },
  237. // beforeDestroy() {
  238. // uni.$off('initPop');
  239. // },
  240. computed: {
  241. },
  242. onReady() {
  243. // this.map = plus.maps.create('map', {});
  244. this.map = uni.createMapContext('map', this);
  245. plus.key.addEventListener('backbutton', function() {
  246. // console.log('backbutton');
  247. });
  248. plus.webview.currentWebview().setStyle({
  249. popGesture: 'none',
  250. });
  251. },
  252. watch: {
  253. DataType: {
  254. handler: function(newType, oldType) {
  255. this.hideJianpan()
  256. },
  257. immediate: true
  258. },
  259. searchType: {
  260. handler: function(newType, oldType) {
  261. this.showMask = newType > 1;
  262. },
  263. immediate: true
  264. },
  265. classifyList: {
  266. handler: function(newArr, oldArr) {
  267. if (newArr && newArr.length) {
  268. const hot = [];
  269. const parentC = [];
  270. newArr.forEach(el => {
  271. if (hot.length < 5) {
  272. // 获取前五个二级分类为热门分类
  273. if (el.parentId) {
  274. hot.push(el)
  275. }
  276. }
  277. if (!el.parentId) {
  278. parentC.push(el)
  279. }
  280. })
  281. this.hotClassify = hot
  282. parentC.forEach(el => {
  283. el.children = newArr.filter(vl => el.id === vl.parentId)
  284. });
  285. this.classifyTree = parentC;
  286. // console.log('this.classifyTree = ', this.classifyTree)
  287. } else {
  288. }
  289. },
  290. immediate: true
  291. },
  292. DataType: {
  293. handler: function(newT, oldT) {
  294. if ([1, 2].includes(newT)) {
  295. this.oldDataType = newT
  296. } else {
  297. this.oldDataType = 1
  298. }
  299. },
  300. immediate: true
  301. },
  302. },
  303. methods: {
  304. backMyLocation() {
  305. // console.log('scale = ', this.scale)
  306. this.hideJianpan()
  307. this.$refs.mapRef.moveToLocation();
  308. },
  309. setTouchHeight(val) {
  310. // console.log('setScrollHeight = ', val)
  311. // 实时返回的滑动组件高度
  312. this.TouchHeight = val;
  313. },
  314. setScrollMaxHeight(val) {
  315. //最大高度
  316. this.scrollMaxHeight = val;
  317. },
  318. toHere(item) {
  319. uni.openLocation({
  320. latitude: parseFloat(item.latitude), // 要去的地址经度,浮点数
  321. longitude: parseFloat(item.longitude), // 要去的地址纬度,浮点数
  322. name: item.name, // 位置名
  323. address: item.detailedAddress, // 要去的地址详情说明
  324. scale: 16, // 地图缩放级别,整形值,范围从1~28。默认为最大
  325. });
  326. },
  327. initialize() {
  328. this.getMapType();
  329. this.getClassify();
  330. },
  331. toApp(PageInfo) {
  332. uni.$emit('mapJump', PageInfo);
  333. },
  334. clearSearch(initial = false) {
  335. this.searchType = 1;
  336. this.showMask = false;
  337. this.keyWord = '';
  338. this.DataType = 1;
  339. this.addressList = [];
  340. this.markersData = [];
  341. this.oneClassifyIndex = 1;
  342. this.twoClassifyIndex = null;
  343. this.activeClassify = null;
  344. if (initial) {
  345. this.pageListMap01 = null;
  346. this.pageListMap02 = null;
  347. this.classifyList = [];
  348. this.hotClassify = [];
  349. this.classifyTree = [];
  350. };
  351. this.initialize();
  352. },
  353. // 选中热门分类
  354. selectHotClassify(item) {
  355. this.activeClassify = item
  356. const f = this.classifyList.find(el => el.id === item.parentId);
  357. try {
  358. this.classifyTree.forEach((el, index) => {
  359. if (el.id === f.id) {
  360. this.oneClassifyIndex = index;
  361. throw new Error('')
  362. }
  363. })
  364. } catch (e) {
  365. //TODO handle the exception
  366. }
  367. setTimeout(() => {
  368. this.searchType = 3;
  369. this.keyWord = '';
  370. this.getMapList();
  371. }, 10);
  372. },
  373. onSelectClassify(data) {
  374. const {
  375. level,
  376. val,
  377. index
  378. } = data
  379. switch (level) {
  380. case 1:
  381. // 选择一级分类
  382. this.oneClassifyIndex = index;
  383. if (!val.children || val.children.length === 0) {
  384. // 直接选中分类
  385. this.activeClassify = val;
  386. } else {
  387. return false;
  388. }
  389. break;
  390. case 2:
  391. // 选择二级分类
  392. this.twoClassifyIndex = index;
  393. this.activeClassify = val
  394. break;
  395. case 3:
  396. // 选择范围
  397. this.activeDistance = val
  398. break;
  399. }
  400. this.searchType = 3;
  401. this.getMapList()
  402. // classifyList
  403. },
  404. onCurrent(index) {
  405. this.markersData = this.markersData.map((el, idx) => {
  406. // if (index === idx) {
  407. // el.width = '45rpx';
  408. // el.height = '60rpx';
  409. // } else {
  410. // el.width = '30rpx';
  411. // el.height = '40rpx';
  412. // delete el.iconPath
  413. // };
  414. return el
  415. })
  416. if (this.markersData && this.markersData.length > 0) {
  417. this.latitude = this.markersData[index].latitude;
  418. this.longitude = this.markersData[index].longitude;
  419. }
  420. },
  421. setCovers(list) {
  422. this.markersData = list.map(el => {
  423. // el.width = '30rpx';
  424. // el.height = '40rpx';
  425. el.locationType = 'zx';
  426. return el
  427. });
  428. // console.log('this.markersData = ', this.markersData)
  429. },
  430. // 聚合组题
  431. getMapType() {
  432. const type = ['map001', 'map002']
  433. type.forEach((el, index) => {
  434. getThemeModule(el).then(res => {
  435. const data = res.data || null;
  436. if (el === type[0]) {
  437. this.pageListMap01 = data || null
  438. }
  439. if (el === type[1]) {
  440. this.pageListMap02 = data || null
  441. };
  442. })
  443. })
  444. },
  445. aaaaa() {
  446. console.log('aaaaa ======= ')
  447. },
  448. // 获取分类
  449. getClassify() {
  450. getLocationClassify().then(res => {
  451. try {
  452. const data = res.data || []
  453. this.classifyList = data;
  454. } catch (e) {
  455. //TODO handle the exception
  456. }
  457. this.getMapList();
  458. })
  459. },
  460. // 获取地图列表
  461. getMapList() {
  462. // console.log('NextMapKwd // 收索= ')
  463. uni.showLoading()
  464. // return false;
  465. const classifyId = this.activeClassify?.id || '';
  466. const params = {
  467. latitude: this.myLatitude,
  468. longitude: this.myLongitude,
  469. classifyId: classifyId,
  470. name: this.keyWord,
  471. }
  472. getLocationNearbyList(params).then(res => {
  473. this.addressList = res.data || [];
  474. // console.log('daya==1===' , res.data)
  475. this.setCovers(this.addressList)
  476. this.getCircum()
  477. }).catch(err => {
  478. this.getCircum()
  479. })
  480. },
  481. onMoerMap() {
  482. this.hideJianpan()
  483. this.searchType = 1;
  484. this.DataType = 3
  485. },
  486. hideJianpan() {
  487. try {
  488. this.$refs.searchRefs.blur();
  489. } catch (e) {
  490. //TODO handle the exception
  491. };
  492. uni.hideKeyboard()
  493. },
  494. clickMap() {
  495. this.hideJianpan();
  496. // switch (this.searchType){
  497. // case 2:
  498. // break;
  499. // default:
  500. // break;
  501. // }
  502. // searchType: 1, // 1: 默认收索框; 2:选择热门搜索类型; 3:选择筛选条件, 4: 选择地址 , 5:选择分类
  503. },
  504. // 搜索周边
  505. getCircum() {
  506. try {
  507. this.$refs.searchRefs.blur();
  508. } catch (e) {
  509. //TODO handle the exception
  510. }
  511. const name = this.keyWord || this.activeClassify?.name;
  512. uni.hideKeyboard()
  513. if (!name) {
  514. this.DataType = 2;
  515. this.showMask = false;
  516. uni.hideLoading()
  517. return
  518. }
  519. const radius = this.activeDistance?.value || 3000;
  520. this.circles = [
  521. {
  522. latitude: this.myLongitude,
  523. longitude: this.myLatitude,
  524. fillColor: 'rgba(156,207,209,0.5)',
  525. radius: radius,
  526. // color: 'transparent',
  527. strokeWidth: 2
  528. }
  529. ];
  530. const params = {
  531. keywords: name,
  532. location: this.myLongitude + ',' + this.myLatitude,
  533. pageNum: 1,
  534. pageSize: 20,
  535. radius: radius,
  536. }
  537. getCircumList(params).then(res => {
  538. const data = res.data || [];
  539. // console.log('daya=====' , data)
  540. const covers = JSON.parse(JSON.stringify(this.markersData));
  541. data.forEach((e) => {
  542. // e.width = '30rpx';
  543. // e.height = '40rpx';
  544. e.classifyId = this.acticeId;
  545. e.longitude = e.location.split(',')[0];
  546. e.latitude = e.location.split(',')[1];
  547. e.locationType = 'gd';
  548. e.detailedAddress = e.address;
  549. e.intro = e.type;
  550. // e.id = this.markersData.length + 101;
  551. covers.push(e);
  552. this.addressList.push(e);
  553. // e.iconPath = that.$getImgPath(that.getTypeIcon(e.classifyId));
  554. // e.iconPath = '';
  555. });
  556. this.DataType = 2;
  557. this.showMask = false;
  558. this.markersData = covers
  559. }).finally(() => {
  560. uni.hideLoading()
  561. })
  562. },
  563. // 搜索 - 获取焦点
  564. onSearchFocus() {
  565. if (this.searchType === 1) {
  566. this.searchType = 2;
  567. }
  568. this.showMask = true;
  569. // this.DataType = 5;
  570. // setTimeout(() => {
  571. // this.showMask = true;
  572. // this.searchType = 2;
  573. // }, 10);
  574. },
  575. onSearchBlur() {
  576. // console.log('shiqijiaodian')
  577. // this.showMask = false;
  578. // setTimeout(() => {
  579. // this.DataType = this.oldDataType
  580. // }, 10);
  581. // console.log('shiqijiaodian', this.DataType)
  582. },
  583. // 收索
  584. onSearch(e) {
  585. this.keyWord = e;
  586. this.activeClassify = null;
  587. this.getMapList(e)
  588. }
  589. // getLabel(list, id) {
  590. // let name = '';
  591. // try {
  592. // list.forEach(el => {
  593. // if (el.id === id) {
  594. // name = el.name;
  595. // throw new Error()
  596. // }
  597. // })
  598. // } catch (e) {
  599. // //TODO handle the exception
  600. // }
  601. // },
  602. },
  603. };
  604. </script>
  605. <style lang="scss" scoped>
  606. $ZIndex: 1;
  607. .iconfont_nvue {
  608. font-family: iconfont_nvue;
  609. }
  610. .main-container {
  611. // position: relative;
  612. }
  613. .my-location {
  614. // position: absolute;
  615. // align-items: center;
  616. justify-content: center;
  617. // right: 20rpx;
  618. // top: 800rpx;
  619. width: 110rpx;
  620. height: 110rpx;
  621. border-radius: 22rpx;
  622. background-color: #fff;
  623. z-index: $ZIndex;
  624. .my-img {
  625. width: 54rpx;
  626. height: 54rpx;
  627. }
  628. }
  629. .search-bg {
  630. position: absolute;
  631. z-index: 1;
  632. background-color: rgba(0, 0, 0, 0.4);
  633. }
  634. .search-box {
  635. position: absolute;
  636. z-index: 21111111111;
  637. top: 70rpx;
  638. left: 20rpx;
  639. right: 20rpx;
  640. // margin-top: 20rpx;
  641. background: #fff;
  642. border-radius: 20rpx;
  643. .search-val {
  644. position: relative;
  645. z-index: 999;
  646. border-radius: 20rpx;
  647. background: rgba(184, 184, 184, 0.30);
  648. .search-frame {
  649. background-color: #fff;
  650. height: 89rpx;
  651. flex-direction: row;
  652. align-items: center;
  653. padding: 20rpx;
  654. border-radius: 20rpx;
  655. box-shadow: 0px 10px 16px 0px rgba(153, 153, 153, 0.15);
  656. .back-icon {
  657. transform: rotate(-180deg) !important;
  658. }
  659. .search-icon {
  660. font-size: 40rpx;
  661. color: #666666;
  662. width: 40rpx;
  663. height: 40rpx;
  664. transform: rotate(0deg);
  665. }
  666. .search-input {
  667. flex: 1;
  668. font-size: 28rpx;
  669. margin-left: 10rpx;
  670. }
  671. }
  672. .classify-box {
  673. height: 179rpx;
  674. flex-direction: row;
  675. align-items: center;
  676. justify-content: space-between;
  677. padding: 30rpx 30rpx;
  678. .classify-item {
  679. height: 100rpx;
  680. flex-direction: column;
  681. align-items: center;
  682. justify-content: space-between;
  683. .classify-icon {
  684. width: 64rpx;
  685. height: 64rpx;
  686. }
  687. .classify-text {
  688. font-size: 24rpx;
  689. font-family: PingFang SC, PingFang SC-Bold;
  690. font-weight: 700;
  691. color: #373737;
  692. }
  693. }
  694. }
  695. .condition-box {
  696. .condition-label {
  697. flex-direction: row;
  698. align-items: center;
  699. height: 92rpx;
  700. border-bottom: 1rpx solid $zw-border-color;
  701. padding: 0 30rpx;
  702. .label-item {
  703. // width: 200rpx;
  704. flex-direction: row;
  705. align-items: center;
  706. &+.label-item {
  707. margin-left: 20rpx;
  708. }
  709. .label-item-text {
  710. width: 130rpx;
  711. font-size: 28rpx;
  712. line-height: 36rpx;
  713. font-family: PingFang SC, PingFang SC-Regular;
  714. font-weight: 400;
  715. text-align: center;
  716. color: #1a1a1a;
  717. padding-right: 4px;
  718. }
  719. .label-item-icon {
  720. width: 28rpx;
  721. height: 28rpx;
  722. transform: rotate(0deg);
  723. transition: transform 1s;
  724. }
  725. .active-condition-label {
  726. transform: rotate(-180deg);
  727. }
  728. }
  729. }
  730. .condition-val {
  731. height: 121rpx;
  732. flex-direction: row;
  733. align-items: center;
  734. .scroll-condition {
  735. // width: 710rpx;
  736. padding: 0 30rpx;
  737. flex-direction: row;
  738. .scroll-condition-content {
  739. flex-direction: row;
  740. }
  741. }
  742. .auto-width-item-v {
  743. padding-right: 30rpx;
  744. .condition-item-v {
  745. height: 70rpx;
  746. background-color: #f2f2f2;
  747. line-height: 70rpx;
  748. padding: 0 30rpx;
  749. font-size: 28rpx;
  750. font-family: PingFang SC, PingFang SC-Regular;
  751. font-weight: 400;
  752. text-align: center;
  753. color: #666666;
  754. border-radius: 10rpx;
  755. border-width: 1rpx;
  756. border-style: solid;
  757. border-color: #f2f2f2;
  758. }
  759. .active-condition-val {
  760. border-color: #4fc9d5;
  761. background-color: #EDFDFD;
  762. color: #3FB9D4;
  763. }
  764. }
  765. }
  766. .condition-list-box {
  767. .condition-list {
  768. // padding: 0 30rpx;
  769. flex-direction: row;
  770. justify-content: space-between;
  771. align-items: stretch;
  772. .condition-list-left {
  773. width: 200rpx;
  774. .active-condition {
  775. background-color: #fff;
  776. }
  777. }
  778. .condition-list-right {
  779. // width: 430rpx;
  780. flex: 1;
  781. background-color: #fff;
  782. .active-condition {
  783. color: #3DB8D2;
  784. }
  785. }
  786. .condition-list-item {
  787. height: 80rpx;
  788. line-height: 80rpx;
  789. font-size: 28rpx;
  790. font-family: PingFang SC, PingFang SC-Regular;
  791. font-weight: 400;
  792. color: #666666;
  793. padding: 0 20rpx;
  794. }
  795. }
  796. }
  797. }
  798. }
  799. }
  800. .swiper-box {
  801. position: absolute;
  802. left: 0;
  803. bottom: 40px;
  804. z-index: 1;
  805. // background-color: skyblue;
  806. .swiper-content {
  807. width: 623rpx;
  808. height: 317rpx;
  809. background-color: #fff;
  810. border-radius: 20rpx;
  811. overflow: hidden;
  812. padding: 20rpx;
  813. .content-info {
  814. height: 168rpx;
  815. flex-direction: row;
  816. align-items: stretch;
  817. justify-content: space-between;
  818. .info-logo {
  819. width: 168rpx;
  820. height: 168rpx;
  821. border-radius: 20rpx;
  822. }
  823. .info-text {
  824. width: 390rpx;
  825. height: 168rpx;
  826. flex-direction: column;
  827. .info-name {
  828. font-size: 30rpx;
  829. height: 42rpx;
  830. font-family: PingFang SC, PingFang SC-Bold;
  831. font-weight: 700;
  832. color: #333333;
  833. }
  834. .info-more {
  835. height: 126rpx;
  836. flex-direction: row;
  837. justify-content: space-between;
  838. align-items: flex-end;
  839. .more-text {
  840. height: 126rpx;
  841. flex-direction: column;
  842. justify-content: space-between;
  843. width: 268rpx;
  844. padding-right: 20rpx;
  845. // .info-tag {
  846. // height: 42rpx;
  847. // font-size: 24rpx;
  848. // background-color: #E3FCFC;
  849. // }
  850. .bottomTextView {
  851. border-radius: 20rpx 0px;
  852. height: 42rpx;
  853. font-size: 24rpx;
  854. background-color: #E3FCFC;
  855. .bottomText {
  856. line-height: 42rpx;
  857. padding: 0 22rpx;
  858. font-size: 24rpx;
  859. color: #43BDD6;
  860. }
  861. }
  862. .info-site {
  863. font-size: 24rpx;
  864. font-family: PingFang SC, PingFang SC-Medium;
  865. color: #666666;
  866. }
  867. }
  868. .more-btn {
  869. width: 122rpx;
  870. height: 50rpx;
  871. // background: linear-gradient(90deg,#45c7d5 4%, #3cb7d1 93%);
  872. background-color: #45c7d5;
  873. border-radius: 25rpx;
  874. flex-direction: row;
  875. justify-content: center;
  876. align-items: center;
  877. .toimg {
  878. width: 22rpx;
  879. height: 24rpx;
  880. }
  881. .btn-text {
  882. font-size: 24rpx;
  883. font-family: PingFang SC, PingFang SC-Regular;
  884. font-weight: 400;
  885. color: #ffffff;
  886. }
  887. }
  888. }
  889. }
  890. }
  891. .content-details {
  892. padding-top: 25rpx;
  893. height: 109rpx;
  894. font-size: 30rpx;
  895. font-family: PingFang SC, PingFang SC-Regular;
  896. font-weight: 400;
  897. color: #1a1a1a;
  898. }
  899. }
  900. }
  901. .address-list {
  902. .address-item {
  903. height: 176rpx;
  904. border-bottom-width: 1rpx;
  905. border-bottom-style: solid;
  906. border-bottom-color: #EDEDED;
  907. padding: 30rpx 0 20rpx;
  908. flex-direction: column;
  909. justify-content: space-between;
  910. .address-headline {
  911. flex-direction: row;
  912. justify-content: space-between;
  913. align-items: center;
  914. .headline-name {
  915. flex: 1;
  916. font-size: 28rpx;
  917. font-weight: 500;
  918. color: #1a1a1a;
  919. }
  920. .headline-distance {
  921. width: 200rpx;
  922. flex-direction: row;
  923. justify-content: flex-end;
  924. align-items: center;
  925. .distance-text {
  926. font-size: 24rpx;
  927. font-weight: 300;
  928. text-align: left;
  929. color: #666666;
  930. }
  931. .distance-icon {
  932. width: 28rpx;
  933. height: 28rpx;
  934. }
  935. }
  936. }
  937. .location-info {
  938. flex-direction: row;
  939. align-items: center;
  940. .location-icon {
  941. width: 21.54rpx;
  942. height: 25.96rpx;
  943. }
  944. .location-text {
  945. flex: 1;
  946. padding-left: 5rpx;
  947. font-size: 24rpx;
  948. font-weight: 300;
  949. color: #808080;
  950. }
  951. }
  952. .times {
  953. .time-info {
  954. font-size: 24rpx;
  955. font-weight: 300;
  956. color: #808080;
  957. }
  958. }
  959. }
  960. }
  961. .top-btn-box {
  962. position: absolute;
  963. top: 200rpx;
  964. right: 20rpx;
  965. z-index: 1;
  966. .top-btn {
  967. width: 110rpx;
  968. background-color: #fff;
  969. border-radius: 20rpx;
  970. box-shadow: 0 0 20rpx #ccc;
  971. padding: 0 15rpx;
  972. .top-btn-item-l {
  973. border-bottom-width: 1rpx;
  974. border-bottom-style: solid;
  975. border-bottom-color: #8F8F8F;
  976. }
  977. .top-btn-item {
  978. // width: 64rpx;
  979. padding: 20rpx 0;
  980. display: flex;
  981. flex-direction: column;
  982. justify-content: center;
  983. align-items: center;
  984. .top-img {
  985. width: 60rpx !important;
  986. height: 60rpx !important;
  987. }
  988. .top-txt {
  989. font-size: 20rpx;
  990. margin-top: 3rpx;
  991. }
  992. }
  993. }
  994. .data-type {
  995. flex-direction: column;
  996. justify-content: center;
  997. align-items: center;
  998. background-color: #fff;
  999. width: 110rpx;
  1000. padding: 20rpx 0;
  1001. border-radius: 20rpx;
  1002. margin-top: 30rpx;
  1003. .data-type-icon {
  1004. color: #1a1a1a;
  1005. font-size: 50rpx;
  1006. }
  1007. .top-txt {
  1008. font-size: 24rpx;
  1009. font-family: PingFang SC, PingFang SC-Regular;
  1010. font-weight: 400;
  1011. text-align: center;
  1012. color: #1a1a1a;
  1013. }
  1014. }
  1015. // .top-btn {
  1016. // flex-direction: column;
  1017. // padding: 20rpx 10rpx;
  1018. // border-radius: 20rpx;
  1019. // background-color: #fff;
  1020. // box-shadow: 0 0 20rpx #ccc;
  1021. // .top-btn-item {
  1022. // flex-direction: column;
  1023. // align-items: center;
  1024. // margin-bottom: 15rpx;
  1025. // }
  1026. // .top-btn-item-l {
  1027. // margin-bottom: 0;
  1028. // }
  1029. // .top-img {
  1030. // width: 60rpx;
  1031. // height: 60rpx;
  1032. // }
  1033. // .top-txt {
  1034. // font-size: 20rpx;
  1035. // margin-top: 3rpx;
  1036. // }
  1037. // .btn-more {
  1038. // margin-top: 30rpx;
  1039. // }
  1040. // }
  1041. }
  1042. .map-headline {
  1043. flex-direction: row;
  1044. justify-content: space-between;
  1045. align-items: center;
  1046. padding: 0 20rpx;
  1047. height: 60rpx;
  1048. .headline-lr {
  1049. width: 100rpx;
  1050. }
  1051. .iconfont_nvue {
  1052. text-align: right;
  1053. font-size: 40rpx;
  1054. color: #999999;
  1055. }
  1056. .headline-text {
  1057. font-size: 36rpx;
  1058. font-family: PingFang SC, PingFang SC-Bold;
  1059. font-weight: 700;
  1060. text-align: center;
  1061. color: #1a1a1a;
  1062. }
  1063. }
  1064. .map-type {
  1065. padding: 30rpx 0 10rpx;
  1066. .map-type-lable {
  1067. flex-direction: row;
  1068. align-items: center;
  1069. .label-line {
  1070. width: 8rpx;
  1071. height: 35rpx;
  1072. border-radius: 4rpx;
  1073. background-color: #44c6d4;
  1074. }
  1075. .lable-name {
  1076. font-size: 32rpx;
  1077. font-family: PingFang SC, PingFang SC-Regular;
  1078. font-weight: 400;
  1079. text-align: left;
  1080. color: #1a1a1a;
  1081. line-height: 30px;
  1082. padding-left: 22rpx;
  1083. }
  1084. }
  1085. .map-type-list {
  1086. flex-direction: row;
  1087. align-items: stretch;
  1088. flex-wrap: wrap;
  1089. .map-type-item {
  1090. width: 175rpx;
  1091. flex-direction: column;
  1092. justify-content: center;
  1093. align-items: center;
  1094. margin-top: 30rpx;
  1095. .map-type-icon {
  1096. width: 86rpx;
  1097. height: 86rpx;
  1098. }
  1099. .map-type-name {
  1100. padding: 13rpx 4rpx 0;
  1101. font-size: 26rpx;
  1102. font-family: PingFang SC, PingFang SC-Regular;
  1103. font-weight: 400;
  1104. text-align: center;
  1105. color: #666666;
  1106. }
  1107. }
  1108. }
  1109. }
  1110. .auto-width-item {
  1111. overflow: hidden;
  1112. flex-direction: row;
  1113. }
  1114. .nvue-one-row {
  1115. text-overflow: ellipsis; //文字超出省略号
  1116. lines: 1; //文字行数
  1117. }
  1118. .nvue-two-row {
  1119. text-overflow: ellipsis; //文字超出省略号
  1120. lines: 2; //文字行数
  1121. }
  1122. </style>