index.vue 25 KB

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