index.vue 25 KB

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