index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
  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 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. overflow: hidden;
  654. .carousel-item {
  655. width: 100%;
  656. height: 100%;
  657. padding-left: 30rpx;
  658. padding-right: 30rpx;
  659. overflow: hidden;
  660. }
  661. image {
  662. width: 100%;
  663. height: 375rpx;
  664. border-radius: 20rpx;
  665. }
  666. }
  667. }
  668. // 分类
  669. .cate-section {
  670. justify-content: space-around;
  671. background-color: #fff;
  672. padding: 46rpx 0 30rpx;
  673. .cate-item {
  674. width: 25%;
  675. flex-direction: column;
  676. text-align: center;
  677. align-items: center;
  678. justify-content: center;
  679. .img-wrapper {
  680. width: 100rpx;
  681. height: 88rpx;
  682. background: #eef4ff;
  683. border-radius: 14rpx;
  684. position: relative;
  685. image {
  686. position: absolute;
  687. left: 50%;
  688. top: 50%;
  689. transform: translate(-50%, -50%);
  690. }
  691. .img1 {
  692. width: 100rpx;
  693. height: 84rpx;
  694. }
  695. .img2 {
  696. width: 100rpx;
  697. height: 85rpx;
  698. }
  699. .img3 {
  700. width: 100rpx;
  701. height: 84rpx;
  702. }
  703. .img4 {
  704. width: 100rpx;
  705. height: 88rpx;
  706. }
  707. }
  708. .item-title {
  709. margin-top: 15rpx;
  710. font-size: 24rpx;
  711. font-family: PingFang SC;
  712. font-weight: 500;
  713. color: #333333;
  714. }
  715. }
  716. }
  717. // 红会科普
  718. .science-section {
  719. width: 100%;
  720. background-color: #ffffff;
  721. margin-top: 18rpx;
  722. padding-top: 30rpx;
  723. .science-title {
  724. display: flex;
  725. justify-content: center;
  726. align-items: center;
  727. padding-bottom: 22rpx;
  728. .title {
  729. width: 285rpx;
  730. height: 64rpx;
  731. background-color: #ca121e;
  732. border-radius: 32rpx;
  733. color: #ffffff;
  734. font-size: 32rpx;
  735. line-height: 64rpx;
  736. text-align: center;
  737. }
  738. image {
  739. width: 68rpx;
  740. height: 43rpx;
  741. margin-left: 16rpx;
  742. margin-right: 16rpx;
  743. }
  744. }
  745. .science-box {
  746. padding-left: 15rpx;
  747. padding-right: 15rpx;
  748. padding-bottom: 20rpx;
  749. border-bottom: 1rpx solid #f0f0f0;
  750. white-space: nowrap;
  751. display: flex;
  752. width: 100%;
  753. // .uni-scroll-view-content{
  754. // display: flex;
  755. // }
  756. .science-content {
  757. // width: 100%;
  758. // display: flex;
  759. display: -webkit-box;
  760. .science-item {
  761. margin-right: 24rpx;
  762. width: 198rpx;
  763. display: flex;
  764. flex-direction: column;
  765. align-items: center;
  766. text-align: center;
  767. image {
  768. width: 100%;
  769. height: 145rpx;
  770. }
  771. .article-title {
  772. width: 198rpx;
  773. color: #333;
  774. font-size: 25rpx;
  775. padding-top: 20rpx;
  776. padding-bottom: 16rpx;
  777. font-weight: 900;
  778. }
  779. .article-content {
  780. width: 198rpx;
  781. color: #999999;
  782. font-size: 18rpx;
  783. overflow: hidden;
  784. text-overflow: ellipsis;
  785. display: -webkit-box;
  786. word-break: break-all;
  787. -webkit-box-orient: vertical;
  788. -webkit-line-clamp: 2;
  789. }
  790. }
  791. }
  792. }
  793. .science-more {
  794. display: flex;
  795. justify-content: center;
  796. align-items: center;
  797. color: #cb131c;
  798. font-size: 30rpx;
  799. padding-top: 18rpx;
  800. padding-bottom: 18rpx;
  801. image {
  802. width: 20rpx;
  803. height: 27rpx;
  804. }
  805. }
  806. }
  807. // sos急救中心
  808. .system {
  809. width: 100%;
  810. background-color: #ffffff;
  811. margin-top: 18rpx;
  812. padding: 40rpx 30rpx 35rpx 30rpx;
  813. margin-bottom: 20rpx;
  814. .system-map {
  815. margin: 30rpx auto 0;
  816. width: 689rpx;
  817. height: 312rpx;
  818. background-color: #ffffff;
  819. // padding: 0 30rpx;
  820. padding-bottom: 45rpx;
  821. // .map-box {
  822. // width: 100%;
  823. // height: 312rpx;
  824. // // background-color: #fff;
  825. // }
  826. }
  827. }
  828. // AED
  829. .list-box {
  830. padding: 0rpx 25rpx 24rpx;
  831. // margin-bottom: 84rpx;
  832. background-color: #fff;
  833. .system-title {
  834. display: flex;
  835. justify-content: flex-start;
  836. align-items: center;
  837. height: 130rpx;
  838. // padding-bottom: 22rpx;
  839. background-color: #ffffff;
  840. .title {
  841. width: 285rpx;
  842. height: 64rpx;
  843. background-color: #ca121e;
  844. border-radius: 32rpx;
  845. color: #ffffff;
  846. font-size: 32rpx;
  847. line-height: 64rpx;
  848. text-align: center;
  849. }
  850. .img {
  851. width: 68rpx;
  852. height: 43rpx;
  853. margin-left: 16rpx;
  854. margin-right: 16rpx;
  855. image {
  856. width: 68rpx;
  857. height: 43rpx;
  858. }
  859. }
  860. }
  861. }
  862. .map-box {
  863. width: 100%;
  864. height: 366rpx;
  865. }
  866. .list-tpl {
  867. background-color: #ffffff;
  868. margin: 25rpx 0rpx;
  869. padding: 25rpx 25rpx;
  870. font-size: 28rpx;
  871. border-radius: 15rpx;
  872. display: flex;
  873. justify-content: space-between;
  874. align-items: center;
  875. border-bottom: 1px solid #f1f1f1;
  876. .list-left {
  877. display: flex;
  878. width: 100%;
  879. .number {
  880. font-size: 32rpx;
  881. margin-right: 14rpx;
  882. }
  883. .info {
  884. width: 100%;
  885. .title {
  886. font-size: 32rpx;
  887. color: #222222;
  888. font-weight: 500;
  889. }
  890. .addr {
  891. width: 400rpx;
  892. margin-top: 20rpx;
  893. font-size: 20rpx;
  894. font-family: PingFang SC;
  895. font-weight: 500;
  896. color: #999999;
  897. }
  898. }
  899. }
  900. .image {
  901. width: 10%;
  902. text-align: center;
  903. image {
  904. width: 50rpx;
  905. height: 50rpx;
  906. }
  907. .tip {
  908. color: #7f7f7f;
  909. font-size: 21rpx;
  910. }
  911. }
  912. }
  913. }
  914. .red-box {
  915. margin: 20rpx 0;
  916. height: 521rpx;
  917. padding: 40rpx 23rpx 35rpx 23rpx;
  918. background-color: #fff;
  919. .red-nav {
  920. justify-content: space-between;
  921. margin-top: 23rpx;
  922. .left-nav {
  923. width: 332rpx;
  924. height: 392rpx;
  925. background: #FFF3F5;
  926. background-image: url(../../static/img/m1.png);
  927. background-size: 100% 100%;
  928. }
  929. .right-nav {
  930. width: 357rpx;
  931. height: 392rpx;
  932. flex-direction: column;
  933. justify-content: space-between;
  934. // background: #F6F6FF;
  935. .right-top-nav {
  936. width: 357rpx;
  937. height: 204rpx;
  938. background: #F6F6FF;
  939. background-image: url(../../static/img/m2.png);
  940. background-size: 100% 100%;
  941. }
  942. .right-bottom-nav {
  943. width: 357rpx;
  944. height: 173rpx;
  945. justify-content: space-between;
  946. view {
  947. width: 171rpx;
  948. height: 173rpx;
  949. }
  950. .left-item {
  951. background: #F5EFFE;
  952. background-image: url(../../static/img/m3.png);
  953. background-size: 100% 100%;
  954. }
  955. .right-item {
  956. background: #EDFEFE;
  957. background-image: url(../../static/img/m4.png);
  958. background-size: 100% 100%;
  959. }
  960. }
  961. }
  962. }
  963. }
  964. </style>