index.vue 24 KB

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