index.vue 25 KB

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