index.vue 24 KB

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