index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287
  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">
  7. <image :src="baseURL + item.image"></image>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. <!-- 分类 -->
  12. <view class="cate-section flex">
  13. <view class="cate-item flex" @click="aixin">
  14. <view class="img-wrapper flex">
  15. <image src="../../static/index/index10.png" mode="" class="img"></image>
  16. </view>
  17. <view class="item-title">爱心捐款</view>
  18. </view>
  19. <view class="cate-item flex" @click="tocontribution">
  20. <view class="img-wrapper flex">
  21. <image src="../../static/index/index04.png" mode="" class="img"></image>
  22. </view>
  23. <view class="item-title">遗体器官捐献</view>
  24. </view>
  25. <view class="cate-item flex" @click="toapplic">
  26. <view class="img-wrapper flex">
  27. <image src="../../static/index/index03.png" mode="" class="img"></image>
  28. </view>
  29. <view class="item-title">造血干细胞捐献</view>
  30. </view>
  31. <view class="cate-item flex" @click="toOrgan">
  32. <view class="img-wrapper flex">
  33. <image src="../../static/index/index02.png" mode="" class="img"></image>
  34. </view>
  35. <view class="item-title">红十字志愿者</view>
  36. </view>
  37. <view class="cate-item flex" @click="tohelpActi">
  38. <view class="img-wrapper flex">
  39. <image src="../../static/index/index01.png" mode="" class="img"></image>
  40. </view>
  41. <view class="item-title">培训报名</view>
  42. </view>
  43. <view class="cate-item flex" @click="tohelpActi1">
  44. <view class="img-wrapper flex">
  45. <image src="../../static/index/index07.png" mode="" class="img"></image>
  46. </view>
  47. <view class="item-title">红十字会员</view>
  48. </view>
  49. <view class="cate-item flex" @click="tohelpActi">
  50. <view class="img-wrapper flex">
  51. <image src="../../static/index/index09.png" mode="" class="img"></image>
  52. </view>
  53. <view class="item-title">救在身边系统</view>
  54. </view>
  55. <view class="cate-item flex" @click="tohelpActi">
  56. <view class="img-wrapper flex">
  57. <image src="../../static/index/index08.png" mode="" class="img"></image>
  58. </view>
  59. <view class="item-title">AED智能系统</view>
  60. </view>
  61. <view class="cate-item flex" @click="tohelpActi">
  62. <view class="img-wrapper flex">
  63. <image src="../../static/index/index06.png" mode="" class="img"></image>
  64. </view>
  65. <view class="item-title">救护站智能系统</view>
  66. </view>
  67. <view class="cate-item flex" @click="tohelpActi">
  68. <view class="img-wrapper flex">
  69. <image src="../../static/index/index05.png" mode="" class="img"></image>
  70. </view>
  71. <view class="item-title">红会科普</view>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. import {
  78. getAed,
  79. getAidList,
  80. getRescuerList,
  81. sos,
  82. } from '@/api/category.js'
  83. import {
  84. loadIndexs,
  85. bannerlist,
  86. getListAED,
  87. getDistance,
  88. getListMechanism,
  89. getdis,
  90. tocall
  91. } from '@/api/index.js';
  92. import {
  93. saveUrl,
  94. interceptor
  95. } from '@/utils/loginUtils.js';
  96. import {
  97. mapState,
  98. mapMutations
  99. } from 'vuex';
  100. import {
  101. userinfo
  102. } from '@/api/user.js';
  103. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  104. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  105. import {
  106. getLoca
  107. } from '@/utils/wxAuthorized.js';
  108. import {
  109. getcomAddress
  110. } from '@/api/index.js';
  111. import topTitle from '../../components/top-title/top-title.vue';
  112. export default {
  113. components: {
  114. uniPopup,
  115. uniLoadMore,
  116. topTitle
  117. },
  118. data() {
  119. return {
  120. shareShow: true,
  121. user_id: '',
  122. rescuers_id: '',
  123. name: '',
  124. uid: '',
  125. phone: '',
  126. to_phone: '',
  127. jzsbmarker: [],
  128. jzsblist: [],
  129. jhzmarker: [],
  130. aedmarker: [],
  131. carouselList: [], //轮播
  132. science: [], //文章列表
  133. page: 1,
  134. limit: 10,
  135. AEDList: [],
  136. Mechanism: [],
  137. latitude2: '',
  138. longitude2: '',
  139. latitude4: '',
  140. longitude4: '',
  141. address: '',
  142. loadingType: 'more',
  143. markerList: [],
  144. marker: [],
  145. longitude: '121.15829821166992',
  146. latitude: '30.044394499237708',
  147. longitude1: '120.553638',
  148. latitude1: '30.547011',
  149. scale: '12', //地图缩放程度
  150. scale1: '15',
  151. showbox: false,
  152. showTEXT: false,
  153. addressData: {
  154. name: '',
  155. mobile: '',
  156. latitude: 0, //纬度
  157. longitude: 0, //经度
  158. address: {
  159. province: '',
  160. city: '',
  161. district: '',
  162. detail: ''
  163. },
  164. area: '',
  165. default: false
  166. }
  167. };
  168. },
  169. onShow() {
  170. saveUrl();
  171. // let token = uni.getStorageSync('token');
  172. console.log(11, this);
  173. if (!this.hasLogin) {
  174. // 登录拦截
  175. // interceptor();
  176. uni.showModal({
  177. title: '登录',
  178. content: '您未登录,是否马上登陆?',
  179. success: e => {
  180. if (e.confirm) {
  181. interceptor();
  182. }
  183. },
  184. fail: e => {
  185. console.log(e);
  186. }
  187. });
  188. } else {
  189. // this.loadData();
  190. }
  191. },
  192. onLoad() {
  193. this.loadIndex()
  194. saveUrl();
  195. let obj = this;
  196. let weichatBrowser = uni.getStorageSync('weichatBrowser')
  197. if(weichatBrowser) {
  198. try {
  199. let locationAddress;
  200. // #ifdef H5
  201. let wxOjb = require('jweixin-module');
  202. locationAddress = wxOjb.getLocation;
  203. // #endif
  204. // #ifdef MP
  205. locationAddress = uni.getLocation;
  206. // #endif
  207. // #ifdef H5
  208. wxOjb.ready(() => {
  209. console.log('加载完毕注册事件');
  210. locationAddress({
  211. type: 'gcj02',
  212. success: function(res) {
  213. console.log('获取经纬度', res);
  214. obj.longitude4 = res.longitude;
  215. obj.latitude4 = res.latitude;
  216. obj.marker = [{
  217. longitude: res.longitude,
  218. latitude: res.latitude,
  219. iconPath: '/static/img/img19.png',
  220. width: '45',
  221. height: '45'
  222. }];
  223. obj.loadData();
  224. },
  225. fail(e) {
  226. console.log('失败', e);
  227. // window.location.reload();
  228. }
  229. });
  230. });
  231. // #endif
  232. // #ifdef MP
  233. locationAddress({
  234. type: 'gcj02',
  235. success: function(res) {
  236. console.log('获取经纬度', res);
  237. obj.longitude4 = res.longitude;
  238. obj.latitude4 = res.latitude;
  239. obj.marker = [{
  240. longitude: res.longitude,
  241. latitude: res.latitude,
  242. iconPath: '/static/img/img19.png',
  243. width: '45',
  244. height: '45'
  245. }];
  246. obj.loadData();
  247. },
  248. fail(e) {
  249. console.log('失败', e);
  250. obj.tishi()
  251. }
  252. });
  253. // #endif
  254. } catch (e) {
  255. let locationAddress;
  256. // #ifdef H5
  257. let wxOjb = require('jweixin-module');
  258. locationAddress = wxOjb.getLocation;
  259. // #endif
  260. // #ifdef MP
  261. locationAddress = uni.getLocation;
  262. // #endif
  263. // #ifdef H5
  264. wxOjb.ready(() => {
  265. console.log('加载完毕注册事件');
  266. locationAddress({
  267. type: 'gcj02',
  268. success: function(res) {
  269. console.log('获取经纬度', res);
  270. obj.longitude4 = res.longitude;
  271. obj.latitude4 = res.latitude;
  272. obj.loadData();
  273. },
  274. fail(e) {
  275. console.log('失败', e);
  276. obj.tishi()
  277. }
  278. });
  279. });
  280. // #endif
  281. // #ifdef MP
  282. locationAddress({
  283. type: 'gcj02',
  284. success: function(res) {
  285. console.log('获取经纬度', res);
  286. obj.longitude4 = res.longitude;
  287. obj.latitude4 = res.latitude;
  288. obj.loadData();
  289. },
  290. fail(e) {
  291. console.log('失败', e);
  292. obj.tishi()
  293. }
  294. });
  295. // #endif
  296. }
  297. }else {
  298. uni.getLocation({
  299. type: 'gcj02',
  300. success: function(res) {
  301. console.log('获取经纬度', res);
  302. obj.longitude4 = res.longitude;
  303. obj.latitude4 = res.latitude;
  304. obj.marker = [{
  305. longitude: res.longitude,
  306. latitude: res.latitude,
  307. iconPath: '/static/img/img19.png',
  308. width: '45',
  309. height: '45'
  310. }];
  311. obj.loadData();
  312. },
  313. fail(e) {
  314. console.log('失败', e);
  315. // window.location.reload();
  316. }
  317. })
  318. }
  319. },
  320. computed: {
  321. ...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
  322. ...mapState(['baseURL']),
  323. },
  324. // 下拉加载
  325. // onReachBottom() {
  326. // this.loadData();
  327. // },
  328. methods: {
  329. ...mapMutations('user', ['setUserInfo']),
  330. loadIndex() {
  331. loadIndexs({}).then(({
  332. data
  333. }) => {
  334. console.log(data,'index')
  335. this.carouselList = data.banner; //轮播图
  336. });
  337. },
  338. tocontribution() {
  339. uni.navigateTo({
  340. url: "/pages/form/applicationForm"
  341. // url: '/pages/applic/toOrgan'
  342. });
  343. },
  344. //爱心捐款
  345. aixin(){
  346. uni.navigateTo({
  347. url:'/pages/applic/love'
  348. })
  349. },
  350. //提示
  351. tishi() {
  352. uni.showModal({
  353. title: '提示',
  354. content: '获取当前位置信息失败,是否刷新页面。',
  355. success: function(res) {
  356. if (res.confirm) {
  357. window.location.reload();
  358. console.log('用户点击确定');
  359. } else if (res.cancel) {
  360. console.log('用户点击取消');
  361. }
  362. }
  363. })
  364. },
  365. // 调用高德
  366. toGaodeMap() {
  367. let latitude = this.latitude2;
  368. let longitude = this.longitude2;
  369. let address = this.address;
  370. console.log('选择高德', latitude, longitude, address);
  371. // window.location.href = 'https://uri.amap.com/marker?position=30.537043,120.567191&name=浙江省嘉兴市桐乡市高桥镇高桥大道51号'
  372. window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`;
  373. // window.location.href = `http://uri.amap.com/navigation?from=114.02597366,22.54605355&to=114.029243,22.609562&mode=car&src=nyx_super`
  374. // http://uri.amap.com/navigation?from=" + fromLongitude + "," + fromLatitude + "&to="+ longitude + "," + latitude + "&mode=car&src=nyx_super
  375. },
  376. // 调用腾讯
  377. totengxunMap() {
  378. let latitude = this.latitude2;
  379. let longitude = this.longitude2;
  380. let address = this.address;
  381. console.log('选择腾讯', latitude, longitude);
  382. window.location.href =
  383. `http://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};addr:${address}`;
  384. },
  385. // 调用百度
  386. tobaiDuMap() {
  387. let latitude = this.latitude2;
  388. let longitude = this.longitude2;
  389. let latitude6 = this.latitude4;
  390. let longitude6 = this.longitude4;
  391. let address = this.address;
  392. console.log('选择百度', latitude, longitude);
  393. console.log('获取当前经纬度', latitude6, longitude6);
  394. window.location.href =
  395. `http://api.map.baidu.com/direction?origin=latlng:${latitude6},${longitude6}|name:我的位置&destination=${latitude},${longitude}&mode=driving&region=${address}&output=html&src=webapp.baidu.openAPIdemo`;
  396. //`bdapp://map/navi?location=${longitude},${latitude}&coord_type=gc02&title=${address}&content=${address}&output=html&src=andr.baidu.openAPIdemo `
  397. },
  398. // 调用谷歌
  399. toGoogleMap() {
  400. let latitude = this.latitude2;
  401. let longitude = this.longitude2;
  402. console.log('选择谷歌', latitude, longitude);
  403. },
  404. tolocation() {
  405. uni.navigateTo({
  406. url: '/pages/applic/location'
  407. });
  408. },
  409. toapplic() {
  410. uni.navigateTo({
  411. url: '/pages/applic/appliSystem'
  412. });
  413. },
  414. tohelpActi() {
  415. uni.navigateTo({
  416. // url: "/pages/applic/tohelpActi"
  417. url: '/pages/cart/cart'
  418. });
  419. },
  420. tohelpActi1(){
  421. uni.navigateTo({
  422. url:'../cart/cat1'
  423. })
  424. },
  425. toOrgan() {
  426. console.log('kepuxingbaoming');
  427. uni.navigateTo({
  428. url: '/pages/form/tovolApply'
  429. });
  430. },
  431. // 点击图标
  432. markertap(e) {
  433. console.log(e.target.markerId);
  434. this.$refs.popup.open();
  435. let obj = this;
  436. for (let i = 0; i < obj.marker.length; i++) {
  437. if (e.target.markerId == obj.marker[i].id) {
  438. obj.latitude2 = obj.marker[i].latitude;
  439. obj.longitude2 = obj.marker[i].longitude;
  440. obj.address = obj.marker[i].address;
  441. }
  442. }
  443. },
  444. aedmarkertap(e) {
  445. console.log(e.target.markerId);
  446. let obj = this;
  447. for (let i = 0; i < obj.aedmarker.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. }
  453. }
  454. obj.$refs.popup.open();
  455. },
  456. jhzmarkertap(e) {
  457. console.log(e.target.markerId);
  458. let obj = this;
  459. for (let i = 0; i < obj.jhzmarker.length; i++) {
  460. if (e.target.markerId == obj.marker[i].id) {
  461. obj.latitude2 = obj.marker[i].latitude;
  462. obj.longitude2 = obj.marker[i].longitude;
  463. obj.address = obj.marker[i].address;
  464. }
  465. }
  466. obj.$refs.popup.open();
  467. },
  468. loadData() {
  469. let obj = this;
  470. console.log('打印当前经纬度', obj.longitude4, obj.latitude4);
  471. userinfo({}).then(({
  472. data
  473. }) => {
  474. obj.setUserInfo(data);
  475. obj.to_phone = data.mobile || ''
  476. });
  477. if (obj.loadingType === 'noMore') {
  478. //防止重复加载
  479. return;
  480. }
  481. // 修改当前对象状态为加载中
  482. obj.loadingType = 'loading';
  483. getAed({
  484. longitude: obj.longitude4,
  485. latitude: obj.latitude4,
  486. page: 1,
  487. limit: 2
  488. }).then(({
  489. data
  490. }) => {
  491. console.log(data, 999);
  492. // obj.AEDList = data
  493. for (let i = 0; i < data.length; i++) {
  494. data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
  495. }
  496. obj.AEDList = data;
  497. let arr = data.map(item => ({
  498. latitude: item.latitude,
  499. longitude: item.longitude,
  500. iconPath: '/static/img/img014.png',
  501. width: '35',
  502. height: '35',
  503. id: item.id,
  504. address: item.address
  505. }));
  506. obj.aedmarker = obj.marker.concat(arr)
  507. console.log(obj.AEDList, '999++++++++++++++++++++++++++');
  508. obj.markerList = data;
  509. });
  510. getAidList({
  511. page: 1,
  512. limit: 2,
  513. longitude: obj.longitude4,
  514. latitude: obj.latitude4,
  515. }).then(({
  516. data
  517. }) => {
  518. console.log(data, '机构+++++++++++++')
  519. for (let i = 0; i < data.length; i++) {
  520. data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
  521. }
  522. let arr = data.map(item => ({
  523. latitude: item.latitude,
  524. longitude: item.longitude,
  525. iconPath: '/static/img/img014.png',
  526. width: '35',
  527. height: '35',
  528. id: item.id,
  529. address: item.address
  530. }));
  531. obj.jhzmarker = obj.marker.concat(arr)
  532. obj.Mechanism = data;
  533. console.log(obj.Mechanism, '888++++++++++++++++++++++++++');
  534. })
  535. getRescuerList({
  536. longitude: obj.longitude4,
  537. latitude: obj.latitude4,
  538. page: 1,
  539. limit: 2
  540. }).then((res) => {
  541. let data = res.data;
  542. data = data.slice(0,2)
  543. console.log('就在身边请求数据', data);
  544. console.log('data.phone333', data.phone)
  545. data = data.map(d => {
  546. return {
  547. ...d,
  548. iscall: true
  549. }
  550. })
  551. obj.jzsblist = data;
  552. let arr = data.map(item => ({
  553. latitude: item.latitude,
  554. longitude: item.longitude,
  555. iconPath: '/static/img/img014.png',
  556. width: '35',
  557. height: '35',
  558. id: item.id,
  559. address: item.address
  560. }))
  561. obj.jzsbmarker = obj.marker.concat(arr)
  562. }).catch(err => {
  563. console.log(err);
  564. });
  565. },
  566. // 导航
  567. openAddress(item) {
  568. let obj = this;
  569. obj.latitude2 = item.latitude;
  570. obj.longitude2 = item.longitude;
  571. obj.address = item.address;
  572. this.$refs.popup.open();
  573. },
  574. Jump(item) {
  575. // console.log(item);
  576. if (item.url != '') {
  577. window.open(item.url);
  578. return;
  579. }
  580. uni.navigateTo({
  581. url: '/pages/applic/info?id=' + item.id
  582. });
  583. },
  584. open() {
  585. this.$refs.popup.open();
  586. },
  587. close() {
  588. this.$refs.popup.close();
  589. },
  590. navTo(url) {
  591. uni.navigateTo({
  592. url
  593. });
  594. },
  595. space(lat1, lng1, lat2, lng2) {
  596. console.log(lat1, lng1, lat2, lng2);
  597. var radLat1 = (lat1 * Math.PI) / 180.0;
  598. var radLat2 = (lat2 * Math.PI) / 180.0;
  599. var a = radLat1 - radLat2;
  600. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  601. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  602. .pow(Math.sin(b / 2), 2)));
  603. s = s * 6378.137;
  604. s = Math.round(s * 10000) / 10000;
  605. return s * 1000; // 单位米
  606. },
  607. // 立即救援
  608. rescue(item, index) {
  609. let obj = this;
  610. console.log(item, 'jiuzhu item')
  611. uni.showModal({
  612. content: '是否发起求救?',
  613. success: res => {
  614. if (res.confirm) {
  615. this.$refs.popup2.open(item, index);
  616. obj.rescuers_id = item.id
  617. obj.user_id = item.user_id
  618. }
  619. }
  620. })
  621. },
  622. close2() {
  623. this.$refs.popup2.close()
  624. },
  625. comfirm1: function() {
  626. let obj = this
  627. if (obj.to_phone.toString().trim() == '') {
  628. return obj.$api.msg('请输入手机号码')
  629. } else {
  630. console.log('obj.to_phone1111', obj.to_phone)
  631. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  632. if (!reg.test(obj.to_phone)) {
  633. obj.$api.msg('请填写正确的手机号码');
  634. return;
  635. }
  636. sos({
  637. mobile: obj.to_phone,
  638. address: obj.user_address,
  639. latitude: obj.latitude4,
  640. longitude: obj.longitude4,
  641. rescuers_id: obj.rescuers_id,
  642. rescuers_user_id: obj.user_id
  643. }).then(res => {
  644. uni.showModal({
  645. title: '请耐心等待救援',
  646. success: res => {
  647. if (res.confirm) {
  648. window.location.reload(); //重新刷新页面
  649. }
  650. }
  651. })
  652. obj.$refs.popup2.close();
  653. })
  654. }
  655. },
  656. }
  657. };
  658. </script>
  659. <style lang="scss">
  660. a {
  661. text-decoration: none;
  662. color: #5f5f5f;
  663. }
  664. .content {
  665. // line-height: 1;
  666. background-color: #ffabab;
  667. // padding-bottom: 60rpx;
  668. }
  669. .popup_row {
  670. width: 100%;
  671. height: 500rpx;
  672. background-color: #ffffff;
  673. border-radius: 20rpx;
  674. display: flex;
  675. justify-content: center;
  676. align-items: center;
  677. .rows {
  678. width: 100%;
  679. padding: 0 24rpx;
  680. .rows-item {
  681. height: 80rpx;
  682. line-height: 80rpx;
  683. text-align: center;
  684. width: 100%;
  685. font-size: 32rpx;
  686. color: #303133;
  687. // border-bottom: 1rpx solid #f0f0f0;
  688. }
  689. // .row-1 {
  690. // margin: auto;
  691. // .first_aid {
  692. // width: 300rpx;
  693. // height: 300rpx;
  694. // }
  695. // }
  696. // .row-2 {
  697. // font-size: 38rpx;
  698. // margin-top: 20rpx;
  699. // }
  700. }
  701. }
  702. .content {
  703. background-color: #f8f8f8;
  704. height: 100%;
  705. /* 头部 轮播图 */
  706. .carousel-section {
  707. // padding-top: 10px;
  708. overflow: hidden;
  709. background-color: #fff;
  710. .carousel {
  711. width: 705rpx;
  712. height: 375rpx;
  713. margin: 0 auto;
  714. border-radius: 20rpx;
  715. overflow: hidden;
  716. .carousel-item {
  717. width: 100%;
  718. height: 100%;
  719. padding-left: 30rpx;
  720. padding-right: 30rpx;
  721. overflow: hidden;
  722. }
  723. image {
  724. width: 100%;
  725. height: 375rpx;
  726. border-radius: 20rpx;
  727. }
  728. }
  729. }
  730. // 分类
  731. .cate-section {
  732. justify-content: space-between;
  733. flex-wrap: wrap;
  734. background-color: #fff;
  735. padding: 46rpx 0 30rpx;
  736. height: 100%;
  737. .cate-item {
  738. width: 33.3%;
  739. flex-direction: column;
  740. text-align: center;
  741. align-items: center;
  742. justify-content: center;
  743. margin-bottom: 70rpx;
  744. .img-wrapper {
  745. width: 90rpx;
  746. height: 90rpx;
  747. background: #eef4ff;
  748. border-radius: 14rpx;
  749. position: relative;
  750. image {
  751. position: absolute;
  752. left: 50%;
  753. top: 50%;
  754. transform: translate(-50%, -50%);
  755. }
  756. .img {
  757. width: 90rpx;
  758. height: 90rpx;
  759. }
  760. }
  761. .item-title {
  762. margin-top: 15rpx;
  763. font-size: 28rpx;
  764. font-family: PingFang SC;
  765. font-weight: bold;
  766. color: #333333;
  767. }
  768. }
  769. }
  770. // 红会科普
  771. .science-section {
  772. width: 100%;
  773. background-color: #ffffff;
  774. margin-top: 18rpx;
  775. padding-top: 30rpx;
  776. .science-title {
  777. display: flex;
  778. justify-content: center;
  779. align-items: center;
  780. padding-bottom: 22rpx;
  781. .title {
  782. width: 285rpx;
  783. height: 64rpx;
  784. background-color: #ca121e;
  785. border-radius: 32rpx;
  786. color: #ffffff;
  787. font-size: 32rpx;
  788. line-height: 64rpx;
  789. text-align: center;
  790. }
  791. image {
  792. width: 68rpx;
  793. height: 43rpx;
  794. margin-left: 16rpx;
  795. margin-right: 16rpx;
  796. }
  797. }
  798. .science-box {
  799. padding-left: 15rpx;
  800. padding-right: 15rpx;
  801. padding-bottom: 20rpx;
  802. border-bottom: 1rpx solid #f0f0f0;
  803. white-space: nowrap;
  804. display: flex;
  805. width: 100%;
  806. // .uni-scroll-view-content{
  807. // display: flex;
  808. // }
  809. .science-content {
  810. // width: 100%;
  811. // display: flex;
  812. display: -webkit-box;
  813. .science-item {
  814. margin-right: 24rpx;
  815. width: 198rpx;
  816. display: flex;
  817. flex-direction: column;
  818. align-items: center;
  819. text-align: center;
  820. image {
  821. width: 100%;
  822. height: 145rpx;
  823. }
  824. .article-title {
  825. width: 198rpx;
  826. color: #333;
  827. font-size: 25rpx;
  828. padding-top: 20rpx;
  829. padding-bottom: 16rpx;
  830. font-weight: 900;
  831. }
  832. .article-content {
  833. width: 198rpx;
  834. color: #999999;
  835. font-size: 18rpx;
  836. overflow: hidden;
  837. text-overflow: ellipsis;
  838. display: -webkit-box;
  839. word-break: break-all;
  840. -webkit-box-orient: vertical;
  841. -webkit-line-clamp: 2;
  842. }
  843. }
  844. }
  845. }
  846. .science-more {
  847. display: flex;
  848. justify-content: center;
  849. align-items: center;
  850. color: #cb131c;
  851. font-size: 30rpx;
  852. padding-top: 18rpx;
  853. padding-bottom: 18rpx;
  854. image {
  855. width: 20rpx;
  856. height: 27rpx;
  857. }
  858. }
  859. }
  860. // sos急救中心
  861. .system {
  862. width: 100%;
  863. background-color: #ffffff;
  864. margin-top: 18rpx;
  865. padding: 40rpx 30rpx 35rpx 30rpx;
  866. margin-bottom: 20rpx;
  867. .system-map {
  868. margin: 30rpx auto 0;
  869. width: 689rpx;
  870. height: 312rpx;
  871. background-color: #ffffff;
  872. // padding: 0 30rpx;
  873. padding-bottom: 45rpx;
  874. // .map-box {
  875. // width: 100%;
  876. // height: 312rpx;
  877. // // background-color: #fff;
  878. // }
  879. }
  880. }
  881. // AED
  882. .list-box {
  883. padding: 0rpx 25rpx 24rpx;
  884. // margin-bottom: 84rpx;
  885. background-color: #fff;
  886. .system-title {
  887. display: flex;
  888. justify-content: flex-start;
  889. align-items: center;
  890. height: 130rpx;
  891. // padding-bottom: 22rpx;
  892. background-color: #ffffff;
  893. .title {
  894. width: 285rpx;
  895. height: 64rpx;
  896. background-color: #ca121e;
  897. border-radius: 32rpx;
  898. color: #ffffff;
  899. font-size: 32rpx;
  900. line-height: 64rpx;
  901. text-align: center;
  902. }
  903. .img {
  904. width: 68rpx;
  905. height: 43rpx;
  906. margin-left: 16rpx;
  907. margin-right: 16rpx;
  908. image {
  909. width: 68rpx;
  910. height: 43rpx;
  911. }
  912. }
  913. }
  914. }
  915. .map-box {
  916. width: 100%;
  917. height: 366rpx;
  918. }
  919. .list-tpl {
  920. background-color: #ffffff;
  921. margin: 25rpx 0rpx;
  922. padding: 25rpx 25rpx;
  923. font-size: 28rpx;
  924. border-radius: 15rpx;
  925. display: flex;
  926. justify-content: space-between;
  927. align-items: center;
  928. border-bottom: 1px solid #f1f1f1;
  929. .list-left {
  930. display: flex;
  931. width: 100%;
  932. .number {
  933. font-size: 32rpx;
  934. margin-right: 14rpx;
  935. }
  936. .info {
  937. width: 100%;
  938. .title {
  939. font-size: 32rpx;
  940. color: #222222;
  941. font-weight: 500;
  942. }
  943. .addr {
  944. width: 400rpx;
  945. margin-top: 20rpx;
  946. font-size: 20rpx;
  947. font-family: PingFang SC;
  948. font-weight: 500;
  949. color: #999999;
  950. }
  951. }
  952. }
  953. .image {
  954. width: 20%;
  955. text-align: center;
  956. image {
  957. width: 50rpx;
  958. height: 50rpx;
  959. }
  960. .tip {
  961. color: #7f7f7f;
  962. font-size: 21rpx;
  963. }
  964. }
  965. }
  966. }
  967. .red-box {
  968. margin: 20rpx 0;
  969. height: 521rpx;
  970. padding: 40rpx 23rpx 35rpx 23rpx;
  971. background-color: #fff;
  972. .red-nav {
  973. justify-content: space-between;
  974. margin-top: 23rpx;
  975. .left-nav {
  976. width: 332rpx;
  977. height: 392rpx;
  978. background: #FFF3F5;
  979. background-image: url(../../static/img/m1.png);
  980. background-size: 100% 100%;
  981. }
  982. .right-nav {
  983. width: 357rpx;
  984. height: 392rpx;
  985. flex-direction: column;
  986. justify-content: space-between;
  987. // background: #F6F6FF;
  988. .right-top-nav {
  989. width: 357rpx;
  990. height: 204rpx;
  991. background: #F6F6FF;
  992. background-image: url(../../static/img/m2.png);
  993. background-size: 100% 100%;
  994. }
  995. .right-bottom-nav {
  996. width: 357rpx;
  997. height: 173rpx;
  998. justify-content: space-between;
  999. view {
  1000. width: 171rpx;
  1001. height: 173rpx;
  1002. }
  1003. .left-item {
  1004. background: #F5EFFE;
  1005. background-image: url(../../static/img/m3.png);
  1006. background-size: 100% 100%;
  1007. }
  1008. .right-item {
  1009. background: #EDFEFE;
  1010. background-image: url(../../static/img/m4.png);
  1011. background-size: 100% 100%;
  1012. }
  1013. }
  1014. }
  1015. }
  1016. }
  1017. .popup_row2 {
  1018. // margin-top: 108rpx;
  1019. height: 440rpx;
  1020. border-radius: 25rpx;
  1021. width: 100%;
  1022. padding: 24rpx;
  1023. background-color: #f8f8f8;
  1024. z-index: 999;
  1025. .title {
  1026. border-bottom: 2rpx solid #F2F2F2;
  1027. color: #E63931;
  1028. font-size: 32rpx;
  1029. padding-left: 4rpx;
  1030. padding-bottom: 16rpx;
  1031. display: flex;
  1032. justify-content: space-between;
  1033. // align-items: center;
  1034. .cancel {
  1035. margin-left: 52rpx;
  1036. width: 36rpx;
  1037. height: 36rpx;
  1038. image {
  1039. width: 36rpx;
  1040. height: 36rpx;
  1041. }
  1042. }
  1043. }
  1044. .inpBox {
  1045. margin-top: 52rpx;
  1046. border: 2px solid #f2f2f2;
  1047. padding: 12rpx 24rpx;
  1048. color: #FF9797;
  1049. border-radius: 8rpx;
  1050. .input-placeholder {
  1051. // height: 70rpx;
  1052. font-size: 32rpx;
  1053. color: #FF9797;
  1054. }
  1055. }
  1056. .inpedit {
  1057. margin-top: 24rpx;
  1058. margin-left: 14rpx;
  1059. font-size: 28rpx;
  1060. color: #FF9797;
  1061. }
  1062. .comfirm {
  1063. display: flex;
  1064. justify-content: flex-end;
  1065. margin-top: 54rpx;
  1066. .comfirm1 {
  1067. padding: 12rpx 24rpx;
  1068. border-radius: 12rpx;
  1069. color: #FFFFFF;
  1070. background-color: #E63931;
  1071. }
  1072. }
  1073. }
  1074. .location-item {
  1075. z-index: 1000;
  1076. display: flex;
  1077. justify-content: space-between;
  1078. align-items: center;
  1079. border-bottom: 1rpx solid #E7E8EA;
  1080. padding: 15rpx 0;
  1081. .box-left {
  1082. display: flex;
  1083. .img01 {
  1084. width: 8rpx;
  1085. height: 28rpx;
  1086. margin-right: 18rpx;
  1087. image {
  1088. width: 8rpx;
  1089. height: 28rpx;
  1090. }
  1091. }
  1092. .img02 {
  1093. width: 117rpx;
  1094. height: 117rpx;
  1095. border-radius: 50%;
  1096. image {
  1097. width: 117rpx;
  1098. height: 117rpx;
  1099. border-radius: 50%;
  1100. }
  1101. }
  1102. .info {
  1103. margin-left: 16rpx;
  1104. .info-header {
  1105. display: flex;
  1106. align-items: center;
  1107. .name {
  1108. font-size: 32rpx;
  1109. color: #333333;
  1110. }
  1111. .distance {
  1112. margin-left: 25rpx;
  1113. font-size: 28rpx;
  1114. color: #303133;
  1115. }
  1116. .location-icon {
  1117. margin-left: 10rpx;
  1118. width: 20rpx;
  1119. height: 26rpx;
  1120. image {
  1121. width: 20rpx;
  1122. height: 26rpx;
  1123. display: inline;
  1124. }
  1125. }
  1126. }
  1127. .address {
  1128. font-size: 26rpx;
  1129. color: #333333;
  1130. margin-top: 33rpx;
  1131. }
  1132. }
  1133. }
  1134. .box-right {
  1135. .img {
  1136. height: 107rpx;
  1137. image {
  1138. width: 107rpx;
  1139. height: 107rpx;
  1140. }
  1141. }
  1142. .called {
  1143. margin-right: 16rpx;
  1144. height: 107rpx;
  1145. line-height: 107rpx;
  1146. font-size: 28rpx;
  1147. color: #CB131C;
  1148. }
  1149. }
  1150. }
  1151. .ewm {
  1152. width: 75rpx;
  1153. height: 75rpx;
  1154. position: absolute;
  1155. right: 10rpx;
  1156. bottom: 200rpx;
  1157. background-color: #fff;
  1158. border-radius: 50%;
  1159. box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
  1160. image {
  1161. width: 50rpx;
  1162. height: 50rpx;
  1163. position: absolute;
  1164. top: 0;
  1165. left: 0;
  1166. bottom: 0;
  1167. right: 0;
  1168. margin: auto;
  1169. }
  1170. .ewm-tit {
  1171. position: absolute;
  1172. bottom: 10rpx;
  1173. font-size: 10rpx;
  1174. }
  1175. .closeEwm {
  1176. width: 40rpx;
  1177. height: 40rpx;
  1178. position: absolute;
  1179. top: -40rpx;
  1180. right: -20rpx;
  1181. image {
  1182. width: 100%;
  1183. height: 100%;
  1184. }
  1185. }
  1186. }
  1187. </style>