index.vue 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  1. <template>
  2. <view class="content">
  3. <!-- 轮播 -->
  4. <view class="carousel-section">
  5. <swiper class="carousel" :autoplay="true" :interval="3000" :duration="1000">
  6. <swiper-item v-for="item in carouselList" :key="item.id"><image :src="item.pic"></image></swiper-item>
  7. </swiper>
  8. </view>
  9. <!-- 分类 -->
  10. <view class="cate-section flex">
  11. <view class="cate-item flex" @click="tocontribution">
  12. <view class="img-wrapper flex">
  13. <image src="../../static/icon/icon1.png" mode="" class="img1"></image>
  14. </view>
  15. <view class="item-title">器官捐献</view>
  16. </view>
  17. <view class="cate-item flex" @click="toapplic">
  18. <view class="img-wrapper flex">
  19. <image src="../../static/icon/icon2.png" mode="" class="img2"></image>
  20. </view>
  21. <view class="item-title">造血干细胞捐献</view>
  22. </view>
  23. <view class="cate-item flex" @click="toOrgan">
  24. <view class="img-wrapper flex">
  25. <image src="../../static/icon/icon3.png" mode="" class="img3"></image>
  26. </view>
  27. <view class="item-title">培训报名</view>
  28. </view>
  29. <view class="cate-item flex" @click="tohelpActi">
  30. <view class="img-wrapper flex">
  31. <image src="../../static/icon/icon4.png" mode="" class="img4"></image>
  32. </view>
  33. <view class="item-title">志愿者登记</view>
  34. </view>
  35. </view>
  36. <!-- 爱心红会 -->
  37. <view class="red-box">
  38. <top-title :title="'爱心红会'"></top-title>
  39. <view class="red-nav flex">
  40. <view class="left-nav" @click="navTo('/pages/donate/donate')"></view>
  41. <view class="right-nav flex">
  42. <view class="right-top-nav"></view>
  43. <view class="right-bottom-nav flex">
  44. <view class="left-item" @click="navTo('/pages/applic/love')"></view>
  45. <view class="right-item" @click="navTo('/pages/applic/science')"></view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- sos急救系统 -->
  51. <view class="system" @click="tolocation">
  52. <top-title :title="'救在身边'" @click="tolocation"></top-title>
  53. <view class="system-map">
  54. <map
  55. class="map-box"
  56. id="map"
  57. show-location
  58. :markers="marker"
  59. :scale="scale"
  60. :latitude="latitude4"
  61. :longitude="longitude4"
  62. ref="map"
  63. @markertap="markertap"
  64. ></map>
  65. <!-- <view class="map-box" ><image src="../../static/img/map.jpg" mode=""></image></view> -->
  66. </view>
  67. </view>
  68. <view class="list-box">
  69. <view class="system-title"><top-title :title="'救护站'" @click="tolocation"></top-title></view>
  70. <view id="container">
  71. <map
  72. class="map-box"
  73. id="map"
  74. show-location
  75. :markers="marker"
  76. :scale="scale"
  77. :latitude="latitude4"
  78. :longitude="longitude4"
  79. ref="map"
  80. style="height: 450rpx"
  81. @markertap="markertap"
  82. ></map>
  83. </view>
  84. <view class="">
  85. <view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id" v-if="item.type === 1">
  86. <template>
  87. <view class="list-left">
  88. <view class="info">
  89. <view class="title">{{ item.introduction }}</view>
  90. <view class="addr">地址:{{ item.address }}</view>
  91. </view>
  92. </view>
  93. <view class="image">
  94. <image src="../../static/img/img10.png"></image>
  95. <view class="tip" v-if="item.space > 999">>999m</view>
  96. <view class="tip" v-else>{{ item.space }}m</view>
  97. </view>
  98. </template>
  99. </view>
  100. <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
  101. </view>
  102. </view>
  103. <view class="list-box" style="margin-top: 20rpx;">
  104. <view class="system-title"><top-title :title="'智能AED'" @click="tolocation"></top-title></view>
  105. <view id="container">
  106. <map
  107. class="map-box"
  108. id="map"
  109. show-location
  110. :markers="marker"
  111. :scale="scale"
  112. :latitude="latitude4"
  113. :longitude="longitude4"
  114. ref="map"
  115. style="height: 450rpx"
  116. @markertap="markertap"
  117. ></map>
  118. </view>
  119. <view class="">
  120. <view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id" v-if="item.type === 2">
  121. <template >
  122. <view class="list-left">
  123. <view class="info">
  124. <view class="title">{{ item.introduction }}</view>
  125. <view class="addr">地址:{{ item.address }}</view>
  126. </view>
  127. </view>
  128. <view class="image">
  129. <image src="../../static/img/img10.png"></image>
  130. <view class="tip" v-if="item.space > 999">>999m</view>
  131. <view class="tip" v-else>{{ item.space }}m</view>
  132. </view>
  133. </template>
  134. </view>
  135. <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
  136. </view>
  137. </view>
  138. <uni-popup ref="popup" type="bottom" @click="close">
  139. <view class="popup_row">
  140. <view class="rows">
  141. <view class="rows-item" @click="toGaodeMap">高德地图</view>
  142. <view class="rows-item" @click="tobaiDuMap">百度地图</view>
  143. <view class="rows-item" @click="totengxunMap">腾讯地图</view>
  144. <!-- <view class="rows-item" @click="toGoogleMap">
  145. Google地图
  146. </view> -->
  147. <!-- <view class="row-1"><image class="first_aid" src="../../static/img/img03.jpg"></image></view> -->
  148. <!-- <view class="row-2">扫码进入急救平台</view> -->
  149. </view>
  150. </view>
  151. </uni-popup>
  152. </view>
  153. </template>
  154. <script>
  155. import { loadIndexs, bannerlist, getListAED, getDistance } from '@/api/index.js';
  156. import { saveUrl, interceptor } from '@/utils/loginUtils.js';
  157. import { mapState, mapMutations } from 'vuex';
  158. import { userinfo } from '@/api/user.js';
  159. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  160. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  161. import { getLoca } from '@/utils/wxAuthorized.js';
  162. import { getcomAddress } from '@/api/index.js';
  163. import topTitle from '../../components/top-title/top-title.vue';
  164. export default {
  165. components: {
  166. uniPopup,
  167. uniLoadMore,
  168. topTitle
  169. },
  170. data() {
  171. return {
  172. carouselList: [], //轮播
  173. science: [], //文章列表
  174. page: 1,
  175. limit: 10,
  176. AEDList: [],
  177. latitude2: '',
  178. longitude2: '',
  179. latitude4: '',
  180. longitude4: '',
  181. address: '',
  182. loadingType: 'more',
  183. markerList: [],
  184. marker: [],
  185. longitude: '121.15829821166992',
  186. latitude: '30.044394499237708',
  187. longitude1: '120.553638',
  188. latitude1: '30.547011',
  189. scale: '12', //地图缩放程度
  190. scale1: '15',
  191. showbox: false,
  192. showTEXT: false,
  193. addressData: {
  194. name: '',
  195. mobile: '',
  196. latitude: 0, //纬度
  197. longitude: 0, //经度
  198. address: {
  199. province: '',
  200. city: '',
  201. district: '',
  202. detail: ''
  203. },
  204. area: '',
  205. default: false
  206. }
  207. };
  208. },
  209. onShow() {
  210. saveUrl();
  211. // let token = uni.getStorageSync('token');
  212. console.log(11, this);
  213. if (!this.hasLogin) {
  214. // 登录拦截
  215. // interceptor();
  216. uni.showModal({
  217. title: '登录',
  218. content: '您未登录,是否马上登陆?',
  219. success: e => {
  220. if (e.confirm) {
  221. interceptor();
  222. }
  223. },
  224. fail: e => {
  225. console.log(e);
  226. }
  227. });
  228. } else {
  229. this.loadData();
  230. }
  231. },
  232. onLoad() {
  233. // uni.showModal({
  234. // content: '请选择您当前位置',
  235. // success: res => {
  236. // if (res.confirm) {
  237. // this.chooseAddress()
  238. // }
  239. // }
  240. // })
  241. saveUrl();
  242. let obj = this;
  243. try {
  244. let locationAddress;
  245. // #ifdef H5
  246. let wxOjb = require('jweixin-module');
  247. locationAddress = wxOjb.getLocation;
  248. // #endif
  249. // #ifdef MP
  250. locationAddress = uni.getLocation;
  251. // #endif
  252. // #ifdef H5
  253. wxOjb.ready(() => {
  254. console.log('加载完毕注册事件');
  255. locationAddress({
  256. type: 'wgs84',
  257. success: function(res) {
  258. console.log('获取经纬度', res);
  259. obj.longitude4 = res.longitude;
  260. obj.latitude4 = res.latitude;
  261. obj.marker = [
  262. {
  263. longitude: res.longitude,
  264. latitude: res.latitude,
  265. iconPath: '/static/img/img19.png',
  266. width: '45',
  267. height: '45'
  268. }
  269. ];
  270. obj.loadData();
  271. },
  272. fail(e) {
  273. console.log('失败', e);
  274. // window.location.reload();
  275. obj.tishi()
  276. }
  277. });
  278. });
  279. // #endif
  280. // #ifdef MP
  281. locationAddress({
  282. type: 'wgs84',
  283. success: function(res) {
  284. console.log('获取经纬度', res);
  285. obj.longitude4 = res.longitude;
  286. obj.latitude4 = res.latitude;
  287. obj.marker = [
  288. {
  289. longitude: res.longitude,
  290. latitude: res.latitude,
  291. iconPath: '/static/img/img19.png',
  292. width: '45',
  293. height: '45'
  294. }
  295. ];
  296. obj.loadData();
  297. },
  298. fail(e) {
  299. console.log('失败', e);
  300. obj.tishi()
  301. }
  302. });
  303. // #endif
  304. } catch (e) {
  305. let locationAddress;
  306. // #ifdef H5
  307. let wxOjb = require('jweixin-module');
  308. locationAddress = wxOjb.getLocation;
  309. // #endif
  310. // #ifdef MP
  311. locationAddress = uni.getLocation;
  312. // #endif
  313. // #ifdef H5
  314. wxOjb.ready(() => {
  315. console.log('加载完毕注册事件');
  316. locationAddress({
  317. type: 'wgs84',
  318. success: function(res) {
  319. console.log('获取经纬度', res);
  320. obj.longitude4 = res.longitude;
  321. obj.latitude4 = res.latitude;
  322. obj.loadData();
  323. },
  324. fail(e) {
  325. console.log('失败', e);
  326. obj.tishi()
  327. }
  328. });
  329. });
  330. // #endif
  331. // #ifdef MP
  332. locationAddress({
  333. type: 'wgs84',
  334. success: function(res) {
  335. console.log('获取经纬度', res);
  336. obj.longitude4 = res.longitude;
  337. obj.latitude4 = res.latitude;
  338. obj.loadData();
  339. },
  340. fail(e) {
  341. console.log('失败', e);
  342. obj.tishi()
  343. }
  344. });
  345. // #endif
  346. }
  347. },
  348. computed: {
  349. ...mapState('user', ['userInfo', 'baseURL', 'hasLogin'])
  350. },
  351. // 下拉加载
  352. onReachBottom() {
  353. this.loadData();
  354. },
  355. methods: {
  356. ...mapMutations('user', ['setUserInfo']),
  357. tocontribution() {
  358. uni.navigateTo({
  359. // url: "/pages/applic/contribution"
  360. url: '/pages/form/applicationForm'
  361. });
  362. },
  363. //提示
  364. tishi(){
  365. uni.showModal({
  366. title: '提示',
  367. content:'获取当前位置信息失败,是否刷新页面。',
  368. success: function(res){
  369. if (res.confirm) {
  370. window.location.reload();
  371. console.log('用户点击确定');
  372. } else if (res.cancel) {
  373. console.log('用户点击取消');
  374. }
  375. }
  376. })
  377. },
  378. // 调用高德
  379. toGaodeMap() {
  380. let latitude = this.latitude2;
  381. let longitude = this.longitude2;
  382. let address = this.address;
  383. console.log('选择高德', latitude, longitude, address);
  384. // window.location.href = 'https://uri.amap.com/marker?position=30.537043,120.567191&name=浙江省嘉兴市桐乡市高桥镇高桥大道51号'
  385. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
  386. // window.location.href = `http://uri.amap.com/navigation?from=114.02597366,22.54605355&to=114.029243,22.609562&mode=car&src=nyx_super`
  387. // http://uri.amap.com/navigation?from=" + fromLongitude + "," + fromLatitude + "&to="+ longitude + "," + latitude + "&mode=car&src=nyx_super
  388. },
  389. // 调用腾讯
  390. totengxunMap() {
  391. let latitude = this.latitude2;
  392. let longitude = this.longitude2;
  393. let address = this.address;
  394. console.log('选择腾讯', latitude, longitude);
  395. window.location.href = `http://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};addr:${address}`;
  396. },
  397. // 调用百度
  398. tobaiDuMap() {
  399. let latitude = this.latitude2;
  400. let longitude = this.longitude2;
  401. let latitude6 = this.latitude4;
  402. let longitude6 = this.longitude4;
  403. let address = this.address;
  404. console.log('选择百度', latitude, longitude);
  405. console.log('获取当前经纬度', latitude6, longitude6);
  406. window.location.href = `http://api.map.baidu.com/direction?origin=latlng:${latitude6},${longitude6}|name:我的位置&destination=${latitude},${longitude}&mode=driving&region=${address}&output=html&src=webapp.baidu.openAPIdemo`;
  407. //`bdapp://map/navi?location=${longitude},${latitude}&coord_type=gc02&title=${address}&content=${address}&output=html&src=andr.baidu.openAPIdemo `
  408. },
  409. // 调用谷歌
  410. toGoogleMap() {
  411. let latitude = this.latitude2;
  412. let longitude = this.longitude2;
  413. console.log('选择谷歌', latitude, longitude);
  414. },
  415. tolocation() {
  416. uni.navigateTo({
  417. url: '/pages/applic/location'
  418. });
  419. },
  420. toapplic() {
  421. uni.navigateTo({
  422. url: '/pages/applic/appliSystem'
  423. });
  424. },
  425. tohelpActi() {
  426. uni.navigateTo({
  427. // url: "/pages/applic/tohelpActi"
  428. url: '/pages/form/tovolApply'
  429. });
  430. },
  431. toOrgan() {
  432. console.log('kepuxingbaoming');
  433. uni.navigateTo({
  434. url: '/pages/train/index'
  435. });
  436. },
  437. // 点击图标
  438. markertap(e) {
  439. console.log(e.target.markerId);
  440. this.$refs.popup.open();
  441. let obj = this;
  442. for (let i = 0; i < obj.marker.length; i++) {
  443. if (e.target.markerId == obj.marker[i].id) {
  444. obj.latitude2 = obj.marker[i].latitude;
  445. obj.longitude2 = obj.marker[i].longitude;
  446. obj.address = obj.marker[i].address;
  447. // uni.showModal({
  448. // title: '坐标',
  449. // content: JSON.stringify(obj.marker[i]),
  450. // success() {
  451. // uni.showModal({
  452. // title: '成功',
  453. // content: obj.marker[i].latitude
  454. // })
  455. // }
  456. // })
  457. }
  458. }
  459. },
  460. loadData() {
  461. let obj = this;
  462. console.log('打印当前经纬度', obj.longitude4, obj.latitude4);
  463. userinfo({}).then(({ data }) => {
  464. obj.setUserInfo(data);
  465. loadIndexs({}).then(({ data }) => {
  466. obj.carouselList = data.banner; //轮播图
  467. bannerlist().then(({ data }) => {
  468. console.log(data);
  469. obj.science = data;
  470. });
  471. });
  472. });
  473. if (obj.loadingType === 'noMore') {
  474. //防止重复加载
  475. return;
  476. }
  477. // 修改当前对象状态为加载中
  478. obj.loadingType = 'loading';
  479. getListAED({
  480. page: obj.page,
  481. limit: obj.limit
  482. }).then(({ data }) => {
  483. console.log(data, 999);
  484. // obj.AEDList = data
  485. for (let i = 0; i < data.length; i++) {
  486. data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
  487. }
  488. obj.AEDList = obj.AEDList.concat(data);
  489. console.log(obj.AEDList, '999++++++++++++++++++++++++++');
  490. obj.markerList = data;
  491. obj.page++;
  492. if (obj.limit == data.length) {
  493. obj.loadingType = 'more';
  494. } else {
  495. obj.loadingType = 'noMore';
  496. }
  497. });
  498. getDistance({
  499. lng1: obj.longitude4,
  500. lat1: obj.latitude4
  501. }).then(({ data }) => {
  502. console.log(data, 980);
  503. obj.AEDList = data;
  504. obj.AEDList = data.slice(0, 5);
  505. let arr = data.map(item => ({
  506. latitude: item.latitude,
  507. longitude: item.longitude,
  508. iconPath: '/static/img/img014.png',
  509. width: '35',
  510. height: '35',
  511. id: item.id,
  512. address: item.address
  513. }));
  514. obj.marker = obj.marker.concat(arr);
  515. obj.marker = obj.marker.slice(0, 6);
  516. // uni.showModal({
  517. // title: '提示',
  518. // content: JSON.stringify(obj.marker)
  519. // })
  520. });
  521. },
  522. // 选择当前位置
  523. // chooseAddress() {
  524. // console.log('233')
  525. // let obj = this;
  526. // uni.chooseLocation({
  527. // success: function(res) {
  528. // console.log(res)
  529. // obj.addressData.area = res.name;
  530. // console.log('位置名称:' + res.name);
  531. // console.log('详细地址:' + res.address);
  532. // console.log('经度:' + res.longitude);
  533. // console.log('纬度:' + res.latitude);
  534. // obj.addressData.latitude = res.latitude;
  535. // obj.addressData.longitude = res.longitude;
  536. // obj.addressDetail = res.address;
  537. // console.log('common_address123',obj.addressDetail )
  538. // console.log('latitude123',obj.addressData.latitude )
  539. // console.log('longitude123',obj.addressData.longitude )
  540. // getcomAddress({
  541. // common_address: obj.addressDetail,
  542. // longitude: obj.addressData.longitude,
  543. // latitude: obj.addressData.latitude
  544. // }).then(data => {
  545. // console.log(333)
  546. // console.log(data);
  547. // if (data.status == 200) {
  548. // obj.$api.msg('保存成功')
  549. // }
  550. // })
  551. // }
  552. // });
  553. // },
  554. // 导航
  555. openAddress(item) {
  556. let obj = this;
  557. obj.latitude2 = item.latitude;
  558. obj.longitude2 = item.longitude;
  559. obj.address = item.address;
  560. this.$refs.popup.open();
  561. },
  562. Jump(item) {
  563. // console.log(item);
  564. if (item.url != '') {
  565. window.open(item.url);
  566. return;
  567. }
  568. uni.navigateTo({
  569. url: '/pages/applic/info?id=' + item.id
  570. });
  571. },
  572. open() {
  573. this.$refs.popup.open();
  574. },
  575. close() {
  576. this.$refs.popup.close();
  577. },
  578. navTo(url) {
  579. uni.navigateTo({
  580. url
  581. });
  582. },
  583. space(lat1, lng1, lat2, lng2) {
  584. console.log(lat1, lng1, lat2, lng2);
  585. var radLat1 = (lat1 * Math.PI) / 180.0;
  586. var radLat2 = (lat2 * Math.PI) / 180.0;
  587. var a = radLat1 - radLat2;
  588. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  589. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
  590. s = s * 6378.137;
  591. s = Math.round(s * 10000) / 10000;
  592. return s * 1000; // 单位米
  593. }
  594. }
  595. };
  596. </script>
  597. <style lang="scss">
  598. a {
  599. text-decoration: none;
  600. color: #5f5f5f;
  601. }
  602. .content {
  603. // line-height: 1;
  604. background-color: #ffabab;
  605. // padding-bottom: 60rpx;
  606. }
  607. .popup_row {
  608. width: 100%;
  609. height: 500rpx;
  610. background-color: #ffffff;
  611. border-radius: 20rpx;
  612. display: flex;
  613. justify-content: center;
  614. align-items: center;
  615. .rows {
  616. width: 100%;
  617. padding: 0 24rpx;
  618. .rows-item {
  619. height: 80rpx;
  620. line-height: 80rpx;
  621. text-align: center;
  622. width: 100%;
  623. font-size: 32rpx;
  624. color: #303133;
  625. // border-bottom: 1rpx solid #f0f0f0;
  626. }
  627. // .row-1 {
  628. // margin: auto;
  629. // .first_aid {
  630. // width: 300rpx;
  631. // height: 300rpx;
  632. // }
  633. // }
  634. // .row-2 {
  635. // font-size: 38rpx;
  636. // margin-top: 20rpx;
  637. // }
  638. }
  639. }
  640. .content {
  641. background-color: #f8f8f8;
  642. height: 100%;
  643. /* 头部 轮播图 */
  644. .carousel-section {
  645. // padding-top: 10px;
  646. overflow: hidden;
  647. background-color: #fff;
  648. .carousel {
  649. width: 705rpx;
  650. height: 375rpx;
  651. margin: 0 auto;
  652. border-radius: 20rpx;
  653. .carousel-item {
  654. width: 100%;
  655. height: 100%;
  656. padding-left: 30rpx;
  657. padding-right: 30rpx;
  658. overflow: hidden;
  659. }
  660. image {
  661. width: 100%;
  662. height: 375rpx;
  663. border-radius: 20rpx;
  664. }
  665. }
  666. }
  667. // 分类
  668. .cate-section {
  669. justify-content: space-around;
  670. background-color: #fff;
  671. padding: 46rpx 0 30rpx;
  672. .cate-item {
  673. width: 25%;
  674. flex-direction: column;
  675. text-align: center;
  676. align-items: center;
  677. justify-content: center;
  678. .img-wrapper {
  679. width: 95rpx;
  680. height: 95rpx;
  681. background: #eef4ff;
  682. border-radius: 14rpx;
  683. position: relative;
  684. image {
  685. position: absolute;
  686. left: 50%;
  687. top: 50%;
  688. transform: translate(-50%, -50%);
  689. }
  690. .img1 {
  691. width: 46rpx;
  692. height: 42rpx;
  693. }
  694. .img2 {
  695. width: 48rpx;
  696. height: 48rpx;
  697. }
  698. .img3 {
  699. width: 47rpx;
  700. height: 43rpx;
  701. }
  702. .img4 {
  703. width: 42rpx;
  704. height: 42rpx;
  705. }
  706. }
  707. .item-title {
  708. margin-top: 15rpx;
  709. font-size: 24rpx;
  710. font-family: PingFang SC;
  711. font-weight: 500;
  712. color: #333333;
  713. }
  714. }
  715. }
  716. // 红会科普
  717. .science-section {
  718. width: 100%;
  719. background-color: #ffffff;
  720. margin-top: 18rpx;
  721. padding-top: 30rpx;
  722. .science-title {
  723. display: flex;
  724. justify-content: center;
  725. align-items: center;
  726. padding-bottom: 22rpx;
  727. .title {
  728. width: 285rpx;
  729. height: 64rpx;
  730. background-color: #ca121e;
  731. border-radius: 32rpx;
  732. color: #ffffff;
  733. font-size: 32rpx;
  734. line-height: 64rpx;
  735. text-align: center;
  736. }
  737. image {
  738. width: 68rpx;
  739. height: 43rpx;
  740. margin-left: 16rpx;
  741. margin-right: 16rpx;
  742. }
  743. }
  744. .science-box {
  745. padding-left: 15rpx;
  746. padding-right: 15rpx;
  747. padding-bottom: 20rpx;
  748. border-bottom: 1rpx solid #f0f0f0;
  749. white-space: nowrap;
  750. display: flex;
  751. width: 100%;
  752. // .uni-scroll-view-content{
  753. // display: flex;
  754. // }
  755. .science-content {
  756. // width: 100%;
  757. // display: flex;
  758. display: -webkit-box;
  759. .science-item {
  760. margin-right: 24rpx;
  761. width: 198rpx;
  762. display: flex;
  763. flex-direction: column;
  764. align-items: center;
  765. text-align: center;
  766. image {
  767. width: 100%;
  768. height: 145rpx;
  769. }
  770. .article-title {
  771. width: 198rpx;
  772. color: #333;
  773. font-size: 25rpx;
  774. padding-top: 20rpx;
  775. padding-bottom: 16rpx;
  776. font-weight: 900;
  777. }
  778. .article-content {
  779. width: 198rpx;
  780. color: #999999;
  781. font-size: 18rpx;
  782. overflow: hidden;
  783. text-overflow: ellipsis;
  784. display: -webkit-box;
  785. word-break: break-all;
  786. -webkit-box-orient: vertical;
  787. -webkit-line-clamp: 2;
  788. }
  789. }
  790. }
  791. }
  792. .science-more {
  793. display: flex;
  794. justify-content: center;
  795. align-items: center;
  796. color: #cb131c;
  797. font-size: 30rpx;
  798. padding-top: 18rpx;
  799. padding-bottom: 18rpx;
  800. image {
  801. width: 20rpx;
  802. height: 27rpx;
  803. }
  804. }
  805. }
  806. // sos急救中心
  807. .system {
  808. width: 100%;
  809. background-color: #ffffff;
  810. margin-top: 18rpx;
  811. padding: 40rpx 30rpx 35rpx 30rpx;
  812. margin-bottom: 20rpx;
  813. .system-map {
  814. margin: 30rpx auto 0;
  815. width: 689rpx;
  816. height: 312rpx;
  817. background-color: #ffffff;
  818. // padding: 0 30rpx;
  819. padding-bottom: 45rpx;
  820. // .map-box {
  821. // width: 100%;
  822. // height: 312rpx;
  823. // // background-color: #fff;
  824. // }
  825. }
  826. }
  827. // AED
  828. .list-box {
  829. padding: 0rpx 25rpx 24rpx;
  830. // margin-bottom: 84rpx;
  831. background-color: #fff;
  832. .system-title {
  833. display: flex;
  834. justify-content: flex-start;
  835. align-items: center;
  836. height: 130rpx;
  837. // padding-bottom: 22rpx;
  838. background-color: #ffffff;
  839. .title {
  840. width: 285rpx;
  841. height: 64rpx;
  842. background-color: #ca121e;
  843. border-radius: 32rpx;
  844. color: #ffffff;
  845. font-size: 32rpx;
  846. line-height: 64rpx;
  847. text-align: center;
  848. }
  849. .img {
  850. width: 68rpx;
  851. height: 43rpx;
  852. margin-left: 16rpx;
  853. margin-right: 16rpx;
  854. image {
  855. width: 68rpx;
  856. height: 43rpx;
  857. }
  858. }
  859. }
  860. }
  861. .map-box {
  862. width: 100%;
  863. height: 366rpx;
  864. }
  865. .list-tpl {
  866. background-color: #ffffff;
  867. margin: 25rpx 0rpx;
  868. padding: 25rpx 25rpx;
  869. font-size: 28rpx;
  870. border-radius: 15rpx;
  871. display: flex;
  872. justify-content: space-between;
  873. align-items: center;
  874. border-bottom: 1px solid #f1f1f1;
  875. .list-left {
  876. display: flex;
  877. width: 100%;
  878. .number {
  879. font-size: 32rpx;
  880. margin-right: 14rpx;
  881. }
  882. .info {
  883. width: 100%;
  884. .title {
  885. font-size: 32rpx;
  886. color: #222222;
  887. font-weight: 500;
  888. }
  889. .addr {
  890. width: 400rpx;
  891. margin-top: 20rpx;
  892. font-size: 20rpx;
  893. font-family: PingFang SC;
  894. font-weight: 500;
  895. color: #999999;
  896. }
  897. }
  898. }
  899. .image {
  900. width: 10%;
  901. text-align: center;
  902. image {
  903. width: 50rpx;
  904. height: 50rpx;
  905. }
  906. .tip {
  907. color: #7f7f7f;
  908. font-size: 21rpx;
  909. }
  910. }
  911. }
  912. }
  913. .red-box {
  914. margin: 20rpx 0;
  915. height: 521rpx;
  916. padding: 40rpx 23rpx 35rpx 23rpx;
  917. background-color: #fff;
  918. .red-nav {
  919. justify-content: space-between;
  920. margin-top: 23rpx;
  921. .left-nav {
  922. width: 332rpx;
  923. height: 392rpx;
  924. background: #FFF3F5;
  925. background-image: url(../../static/img/m1.png);
  926. background-size: 100% 100%;
  927. }
  928. .right-nav {
  929. width: 357rpx;
  930. height: 392rpx;
  931. flex-direction: column;
  932. justify-content: space-between;
  933. // background: #F6F6FF;
  934. .right-top-nav {
  935. width: 357rpx;
  936. height: 204rpx;
  937. background: #F6F6FF;
  938. background-image: url(../../static/img/m2.png);
  939. background-size: 100% 100%;
  940. }
  941. .right-bottom-nav {
  942. width: 357rpx;
  943. height: 173rpx;
  944. justify-content: space-between;
  945. view {
  946. width: 171rpx;
  947. height: 173rpx;
  948. }
  949. .left-item {
  950. background: #F5EFFE;
  951. }
  952. .right-item {
  953. background: #EDFEFE;
  954. background-image: url(../../static/img/m4.png);
  955. background-size: 100% 100%;
  956. }
  957. }
  958. }
  959. }
  960. }
  961. </style>