index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992
  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. </view>
  99. </view> -->
  100. <view class="list-box" style="margin-top: 20rpx;">
  101. <view class="system-title"><top-title :title="'智能AED'" @click="tolocation"></top-title></view>
  102. <view id="container">
  103. <map
  104. class="map-box"
  105. id="map"
  106. show-location
  107. :markers="marker"
  108. :scale="scale"
  109. :latitude="latitude4"
  110. :longitude="longitude4"
  111. ref="map"
  112. style="height: 450rpx"
  113. @markertap="markertap"
  114. ></map>
  115. </view>
  116. <view class="">
  117. <view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id">
  118. <template >
  119. <view class="list-left">
  120. <view class="info">
  121. <view class="title">{{ item.introduction }}</view>
  122. <view class="addr">地址:{{ item.address }}</view>
  123. </view>
  124. </view>
  125. <view class="image">
  126. <image src="../../static/img/img10.png"></image>
  127. <view class="tip" v-if="item.space > 999">>999m</view>
  128. <view class="tip" v-else>{{ item.space }}m</view>
  129. </view>
  130. </template>
  131. </view>
  132. <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
  133. </view>
  134. </view>
  135. <uni-popup ref="popup" type="bottom" @click="close">
  136. <view class="popup_row">
  137. <view class="rows">
  138. <view class="rows-item" @click="toGaodeMap">高德地图</view>
  139. <view class="rows-item" @click="tobaiDuMap">百度地图</view>
  140. <view class="rows-item" @click="totengxunMap">腾讯地图</view>
  141. <!-- <view class="rows-item" @click="toGoogleMap">
  142. Google地图
  143. </view> -->
  144. <!-- <view class="row-1"><image class="first_aid" src="../../static/img/img03.jpg"></image></view> -->
  145. <!-- <view class="row-2">扫码进入急救平台</view> -->
  146. </view>
  147. </view>
  148. </uni-popup>
  149. </view>
  150. </template>
  151. <script>
  152. import { loadIndexs, bannerlist, getListAED, getDistance, getListMechanism } from '@/api/index.js';
  153. import { saveUrl, interceptor } from '@/utils/loginUtils.js';
  154. import { mapState, mapMutations } from 'vuex';
  155. import { userinfo } from '@/api/user.js';
  156. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  157. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  158. import { getLoca } from '@/utils/wxAuthorized.js';
  159. import { getcomAddress } from '@/api/index.js';
  160. import topTitle from '../../components/top-title/top-title.vue';
  161. export default {
  162. components: {
  163. uniPopup,
  164. uniLoadMore,
  165. topTitle
  166. },
  167. data() {
  168. return {
  169. carouselList: [], //轮播
  170. science: [], //文章列表
  171. page: 1,
  172. limit: 10,
  173. page2: 1,
  174. limit2: 10,
  175. AEDList: [],
  176. Mechanism: [],
  177. latitude2: '',
  178. longitude2: '',
  179. latitude4: '',
  180. longitude4: '',
  181. address: '',
  182. loadingType: 'more',
  183. loadingType1: '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: 690rpx;
  669. height: 320rpx;
  670. border-radius: 30rpx;
  671. margin: 0 auto;
  672. .carousel-item {
  673. width: 100%;
  674. height: 100%;
  675. padding-left: 30rpx;
  676. padding-right: 30rpx;
  677. overflow: hidden;
  678. }
  679. image {
  680. width: 100%;
  681. height: 320rpx;
  682. border-radius: 30rpx;
  683. }
  684. }
  685. }
  686. // 红会科普
  687. .science-section {
  688. width: 100%;
  689. background-color: #ffffff;
  690. margin-top: 18rpx;
  691. padding-top: 30rpx;
  692. .science-title {
  693. display: flex;
  694. justify-content: center;
  695. align-items: center;
  696. padding-bottom: 22rpx;
  697. .title {
  698. width: 285rpx;
  699. height: 64rpx;
  700. background-color: #ca121e;
  701. border-radius: 32rpx;
  702. color: #ffffff;
  703. font-size: 32rpx;
  704. line-height: 64rpx;
  705. text-align: center;
  706. }
  707. image {
  708. width: 68rpx;
  709. height: 43rpx;
  710. margin-left: 16rpx;
  711. margin-right: 16rpx;
  712. }
  713. }
  714. .science-box {
  715. padding-left: 15rpx;
  716. padding-right: 15rpx;
  717. padding-bottom: 20rpx;
  718. border-bottom: 1rpx solid #f0f0f0;
  719. white-space: nowrap;
  720. display: flex;
  721. width: 100%;
  722. // .uni-scroll-view-content{
  723. // display: flex;
  724. // }
  725. .science-content {
  726. // width: 100%;
  727. // display: flex;
  728. display: -webkit-box;
  729. .science-item {
  730. margin-right: 24rpx;
  731. width: 198rpx;
  732. display: flex;
  733. flex-direction: column;
  734. align-items: center;
  735. text-align: center;
  736. image {
  737. width: 100%;
  738. height: 145rpx;
  739. }
  740. .article-title {
  741. width: 198rpx;
  742. color: #333;
  743. font-size: 25rpx;
  744. padding-top: 20rpx;
  745. padding-bottom: 16rpx;
  746. font-weight: 900;
  747. }
  748. .article-content {
  749. width: 198rpx;
  750. color: #999999;
  751. font-size: 18rpx;
  752. overflow: hidden;
  753. text-overflow: ellipsis;
  754. display: -webkit-box;
  755. word-break: break-all;
  756. -webkit-box-orient: vertical;
  757. -webkit-line-clamp: 2;
  758. }
  759. }
  760. }
  761. }
  762. .science-more {
  763. display: flex;
  764. justify-content: center;
  765. align-items: center;
  766. color: #cb131c;
  767. font-size: 30rpx;
  768. padding-top: 18rpx;
  769. padding-bottom: 18rpx;
  770. image {
  771. width: 20rpx;
  772. height: 27rpx;
  773. }
  774. }
  775. }
  776. // sos急救中心
  777. .system {
  778. width: 100%;
  779. background-color: #ffffff;
  780. margin-top: 18rpx;
  781. padding: 40rpx 30rpx 35rpx 30rpx;
  782. margin-bottom: 20rpx;
  783. .system-map {
  784. margin: 30rpx auto 0;
  785. width: 689rpx;
  786. height: 312rpx;
  787. background-color: #ffffff;
  788. // padding: 0 30rpx;
  789. padding-bottom: 45rpx;
  790. // .map-box {
  791. // width: 100%;
  792. // height: 312rpx;
  793. // // background-color: #fff;
  794. // }
  795. }
  796. }
  797. // AED
  798. .list-box {
  799. padding: 0rpx 25rpx 24rpx;
  800. // margin-bottom: 84rpx;
  801. background-color: #fff;
  802. .system-title {
  803. display: flex;
  804. justify-content: flex-start;
  805. align-items: center;
  806. height: 130rpx;
  807. // padding-bottom: 22rpx;
  808. background-color: #ffffff;
  809. .title {
  810. width: 285rpx;
  811. height: 64rpx;
  812. background-color: #ca121e;
  813. border-radius: 32rpx;
  814. color: #ffffff;
  815. font-size: 32rpx;
  816. line-height: 64rpx;
  817. text-align: center;
  818. }
  819. .img {
  820. width: 68rpx;
  821. height: 43rpx;
  822. margin-left: 16rpx;
  823. margin-right: 16rpx;
  824. image {
  825. width: 68rpx;
  826. height: 43rpx;
  827. }
  828. }
  829. }
  830. }
  831. .map-box {
  832. // background-color: #FFFFFF;
  833. width: 100%;
  834. height: 366rpx;
  835. // border: 2rpx solid #F2F2F2;
  836. box-shadow: 5px 15px 15px 5px #f2f2f2;
  837. }
  838. .list-tpl {
  839. background-color: #ffffff;
  840. margin: 25rpx 0rpx;
  841. padding: 25rpx 25rpx;
  842. font-size: 28rpx;
  843. border-radius: 15rpx;
  844. display: flex;
  845. justify-content: space-between;
  846. align-items: center;
  847. border-bottom: 1px solid #f1f1f1;
  848. .list-left {
  849. display: flex;
  850. width: 100%;
  851. .number {
  852. font-size: 32rpx;
  853. margin-right: 14rpx;
  854. }
  855. .info {
  856. width: 100%;
  857. .title {
  858. font-size: 32rpx;
  859. color: #222222;
  860. font-weight: 500;
  861. }
  862. .addr {
  863. width: 400rpx;
  864. margin-top: 20rpx;
  865. font-size: 20rpx;
  866. font-family: PingFang SC;
  867. font-weight: 500;
  868. color: #999999;
  869. }
  870. }
  871. }
  872. .image {
  873. width: 10%;
  874. text-align: center;
  875. image {
  876. width: 50rpx;
  877. height: 50rpx;
  878. }
  879. .tip {
  880. color: #7f7f7f;
  881. font-size: 21rpx;
  882. }
  883. }
  884. }
  885. }
  886. .red-box {
  887. margin: 20rpx 0;
  888. // height: 393rpx;
  889. padding: 30rpx 30rpx 40rpx 30rpx;
  890. background-color: #fff;
  891. .red-nav {
  892. padding-top: 25rpx;
  893. display: flex;
  894. justify-content: space-between;
  895. .nav-item {
  896. width: 330rpx;
  897. height: 175rpx;
  898. background: #FFF4F2;
  899. border-radius: 15rpx;
  900. image {
  901. width: 330rpx;
  902. height: 175rpx;
  903. }
  904. }
  905. }
  906. }
  907. // 分类
  908. .cate-section {
  909. justify-content: space-around;
  910. background-color: #fff;
  911. padding: 0rpx 0 30rpx;
  912. .cate-item {
  913. flex-grow: 0;
  914. width: 25%;
  915. flex-direction: column;
  916. text-align: center;
  917. align-items: center;
  918. justify-content: center;
  919. .img-wrapper {
  920. width: 149rpx;
  921. height: 149rpx;
  922. background: #FFFFFF;
  923. // box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(255, 124, 177, 0.11);
  924. border-radius: 20rpx;
  925. position: relative;
  926. image {
  927. width: 149rpx;
  928. height: 149rpx;
  929. position: absolute;
  930. left: 50%;
  931. top: 50%;
  932. transform: translate(-50%, -50%);
  933. }
  934. }
  935. .item-title {
  936. // margin-top: 15rpx;
  937. font-size: 24rpx;
  938. font-family: PingFang SC;
  939. font-weight: 500;
  940. color: #333333;
  941. }
  942. }
  943. }
  944. </style>