index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  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="tohelpActi2">
  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="tohelpActi3">
  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="tohelpActi4">
  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. tohelpActi2(){
  426. uni.navigateTo({
  427. url:'/pages/applic/location'
  428. })
  429. },
  430. tohelpActi3(){
  431. uni.navigateTo({
  432. url:'../applic/aed'
  433. })
  434. },
  435. tohelpActi4(){
  436. uni.navigateTo({
  437. url:'/pages/applic/science'
  438. })
  439. },
  440. toOrgan() {
  441. console.log('kepuxingbaoming');
  442. uni.navigateTo({
  443. url: '/pages/form/tovolApply'
  444. });
  445. },
  446. // 点击图标
  447. markertap(e) {
  448. console.log(e.target.markerId);
  449. this.$refs.popup.open();
  450. let obj = this;
  451. for (let i = 0; i < obj.marker.length; i++) {
  452. if (e.target.markerId == obj.marker[i].id) {
  453. obj.latitude2 = obj.marker[i].latitude;
  454. obj.longitude2 = obj.marker[i].longitude;
  455. obj.address = obj.marker[i].address;
  456. }
  457. }
  458. },
  459. aedmarkertap(e) {
  460. console.log(e.target.markerId);
  461. let obj = this;
  462. for (let i = 0; i < obj.aedmarker.length; i++) {
  463. if (e.target.markerId == obj.marker[i].id) {
  464. obj.latitude2 = obj.marker[i].latitude;
  465. obj.longitude2 = obj.marker[i].longitude;
  466. obj.address = obj.marker[i].address;
  467. }
  468. }
  469. obj.$refs.popup.open();
  470. },
  471. jhzmarkertap(e) {
  472. console.log(e.target.markerId);
  473. let obj = this;
  474. for (let i = 0; i < obj.jhzmarker.length; i++) {
  475. if (e.target.markerId == obj.marker[i].id) {
  476. obj.latitude2 = obj.marker[i].latitude;
  477. obj.longitude2 = obj.marker[i].longitude;
  478. obj.address = obj.marker[i].address;
  479. }
  480. }
  481. obj.$refs.popup.open();
  482. },
  483. loadData() {
  484. let obj = this;
  485. console.log('打印当前经纬度', obj.longitude4, obj.latitude4);
  486. userinfo({}).then(({
  487. data
  488. }) => {
  489. obj.setUserInfo(data);
  490. obj.to_phone = data.mobile || ''
  491. });
  492. if (obj.loadingType === 'noMore') {
  493. //防止重复加载
  494. return;
  495. }
  496. // 修改当前对象状态为加载中
  497. obj.loadingType = 'loading';
  498. getAed({
  499. longitude: obj.longitude4,
  500. latitude: obj.latitude4,
  501. page: 1,
  502. limit: 2
  503. }).then(({
  504. data
  505. }) => {
  506. console.log(data, 999);
  507. // obj.AEDList = 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.AEDList = data;
  512. let arr = data.map(item => ({
  513. latitude: item.latitude,
  514. longitude: item.longitude,
  515. iconPath: '/static/img/img014.png',
  516. width: '35',
  517. height: '35',
  518. id: item.id,
  519. address: item.address
  520. }));
  521. obj.aedmarker = obj.marker.concat(arr)
  522. console.log(obj.AEDList, '999++++++++++++++++++++++++++');
  523. obj.markerList = data;
  524. });
  525. getAidList({
  526. page: 1,
  527. limit: 2,
  528. longitude: obj.longitude4,
  529. latitude: obj.latitude4,
  530. }).then(({
  531. data
  532. }) => {
  533. console.log(data, '机构+++++++++++++')
  534. for (let i = 0; i < data.length; i++) {
  535. data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
  536. }
  537. let arr = data.map(item => ({
  538. latitude: item.latitude,
  539. longitude: item.longitude,
  540. iconPath: '/static/img/img014.png',
  541. width: '35',
  542. height: '35',
  543. id: item.id,
  544. address: item.address
  545. }));
  546. obj.jhzmarker = obj.marker.concat(arr)
  547. obj.Mechanism = data;
  548. console.log(obj.Mechanism, '888++++++++++++++++++++++++++');
  549. })
  550. getRescuerList({
  551. longitude: obj.longitude4,
  552. latitude: obj.latitude4,
  553. page: 1,
  554. limit: 2
  555. }).then((res) => {
  556. let data = res.data;
  557. data = data.slice(0,2)
  558. console.log('就在身边请求数据', data);
  559. console.log('data.phone333', data.phone)
  560. data = data.map(d => {
  561. return {
  562. ...d,
  563. iscall: true
  564. }
  565. })
  566. obj.jzsblist = data;
  567. let arr = data.map(item => ({
  568. latitude: item.latitude,
  569. longitude: item.longitude,
  570. iconPath: '/static/img/img014.png',
  571. width: '35',
  572. height: '35',
  573. id: item.id,
  574. address: item.address
  575. }))
  576. obj.jzsbmarker = obj.marker.concat(arr)
  577. }).catch(err => {
  578. console.log(err);
  579. });
  580. },
  581. // 导航
  582. openAddress(item) {
  583. let obj = this;
  584. obj.latitude2 = item.latitude;
  585. obj.longitude2 = item.longitude;
  586. obj.address = item.address;
  587. this.$refs.popup.open();
  588. },
  589. Jump(item) {
  590. // console.log(item);
  591. if (item.url != '') {
  592. window.open(item.url);
  593. return;
  594. }
  595. uni.navigateTo({
  596. url: '/pages/applic/info?id=' + item.id
  597. });
  598. },
  599. open() {
  600. this.$refs.popup.open();
  601. },
  602. close() {
  603. this.$refs.popup.close();
  604. },
  605. navTo(url) {
  606. uni.navigateTo({
  607. url
  608. });
  609. },
  610. space(lat1, lng1, lat2, lng2) {
  611. console.log(lat1, lng1, lat2, lng2);
  612. var radLat1 = (lat1 * Math.PI) / 180.0;
  613. var radLat2 = (lat2 * Math.PI) / 180.0;
  614. var a = radLat1 - radLat2;
  615. var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
  616. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
  617. .pow(Math.sin(b / 2), 2)));
  618. s = s * 6378.137;
  619. s = Math.round(s * 10000) / 10000;
  620. return s * 1000; // 单位米
  621. },
  622. // 立即救援
  623. rescue(item, index) {
  624. let obj = this;
  625. console.log(item, 'jiuzhu item')
  626. uni.showModal({
  627. content: '是否发起求救?',
  628. success: res => {
  629. if (res.confirm) {
  630. this.$refs.popup2.open(item, index);
  631. obj.rescuers_id = item.id
  632. obj.user_id = item.user_id
  633. }
  634. }
  635. })
  636. },
  637. close2() {
  638. this.$refs.popup2.close()
  639. },
  640. comfirm1: function() {
  641. let obj = this
  642. if (obj.to_phone.toString().trim() == '') {
  643. return obj.$api.msg('请输入手机号码')
  644. } else {
  645. console.log('obj.to_phone1111', obj.to_phone)
  646. const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
  647. if (!reg.test(obj.to_phone)) {
  648. obj.$api.msg('请填写正确的手机号码');
  649. return;
  650. }
  651. sos({
  652. mobile: obj.to_phone,
  653. address: obj.user_address,
  654. latitude: obj.latitude4,
  655. longitude: obj.longitude4,
  656. rescuers_id: obj.rescuers_id,
  657. rescuers_user_id: obj.user_id
  658. }).then(res => {
  659. uni.showModal({
  660. title: '请耐心等待救援',
  661. success: res => {
  662. if (res.confirm) {
  663. window.location.reload(); //重新刷新页面
  664. }
  665. }
  666. })
  667. obj.$refs.popup2.close();
  668. })
  669. }
  670. },
  671. }
  672. };
  673. </script>
  674. <style lang="scss">
  675. a {
  676. text-decoration: none;
  677. color: #5f5f5f;
  678. }
  679. .content {
  680. // line-height: 1;
  681. background-color: #ffabab;
  682. // padding-bottom: 60rpx;
  683. }
  684. .popup_row {
  685. width: 100%;
  686. height: 500rpx;
  687. background-color: #ffffff;
  688. border-radius: 20rpx;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. .rows {
  693. width: 100%;
  694. padding: 0 24rpx;
  695. .rows-item {
  696. height: 80rpx;
  697. line-height: 80rpx;
  698. text-align: center;
  699. width: 100%;
  700. font-size: 32rpx;
  701. color: #303133;
  702. // border-bottom: 1rpx solid #f0f0f0;
  703. }
  704. // .row-1 {
  705. // margin: auto;
  706. // .first_aid {
  707. // width: 300rpx;
  708. // height: 300rpx;
  709. // }
  710. // }
  711. // .row-2 {
  712. // font-size: 38rpx;
  713. // margin-top: 20rpx;
  714. // }
  715. }
  716. }
  717. .content {
  718. background-color: #f8f8f8;
  719. height: 100%;
  720. /* 头部 轮播图 */
  721. .carousel-section {
  722. // padding-top: 10px;
  723. overflow: hidden;
  724. background-color: #fff;
  725. .carousel {
  726. width: 705rpx;
  727. height: 375rpx;
  728. margin: 0 auto;
  729. border-radius: 20rpx;
  730. overflow: hidden;
  731. .carousel-item {
  732. width: 100%;
  733. height: 100%;
  734. padding-left: 30rpx;
  735. padding-right: 30rpx;
  736. overflow: hidden;
  737. }
  738. image {
  739. width: 100%;
  740. height: 375rpx;
  741. border-radius: 20rpx;
  742. }
  743. }
  744. }
  745. // 分类
  746. .cate-section {
  747. justify-content: space-between;
  748. flex-wrap: wrap;
  749. background-color: #fff;
  750. padding: 46rpx 0 30rpx;
  751. height: 100%;
  752. .cate-item {
  753. width: 33.3%;
  754. flex-direction: column;
  755. text-align: center;
  756. align-items: center;
  757. justify-content: center;
  758. margin-bottom: 70rpx;
  759. .img-wrapper {
  760. width: 90rpx;
  761. height: 90rpx;
  762. background: #eef4ff;
  763. border-radius: 14rpx;
  764. position: relative;
  765. image {
  766. position: absolute;
  767. left: 50%;
  768. top: 50%;
  769. transform: translate(-50%, -50%);
  770. }
  771. .img {
  772. width: 90rpx;
  773. height: 90rpx;
  774. }
  775. }
  776. .item-title {
  777. margin-top: 15rpx;
  778. font-size: 28rpx;
  779. font-family: PingFang SC;
  780. font-weight: bold;
  781. color: #333333;
  782. }
  783. }
  784. }
  785. // 红会科普
  786. .science-section {
  787. width: 100%;
  788. background-color: #ffffff;
  789. margin-top: 18rpx;
  790. padding-top: 30rpx;
  791. .science-title {
  792. display: flex;
  793. justify-content: center;
  794. align-items: center;
  795. padding-bottom: 22rpx;
  796. .title {
  797. width: 285rpx;
  798. height: 64rpx;
  799. background-color: #ca121e;
  800. border-radius: 32rpx;
  801. color: #ffffff;
  802. font-size: 32rpx;
  803. line-height: 64rpx;
  804. text-align: center;
  805. }
  806. image {
  807. width: 68rpx;
  808. height: 43rpx;
  809. margin-left: 16rpx;
  810. margin-right: 16rpx;
  811. }
  812. }
  813. .science-box {
  814. padding-left: 15rpx;
  815. padding-right: 15rpx;
  816. padding-bottom: 20rpx;
  817. border-bottom: 1rpx solid #f0f0f0;
  818. white-space: nowrap;
  819. display: flex;
  820. width: 100%;
  821. // .uni-scroll-view-content{
  822. // display: flex;
  823. // }
  824. .science-content {
  825. // width: 100%;
  826. // display: flex;
  827. display: -webkit-box;
  828. .science-item {
  829. margin-right: 24rpx;
  830. width: 198rpx;
  831. display: flex;
  832. flex-direction: column;
  833. align-items: center;
  834. text-align: center;
  835. image {
  836. width: 100%;
  837. height: 145rpx;
  838. }
  839. .article-title {
  840. width: 198rpx;
  841. color: #333;
  842. font-size: 25rpx;
  843. padding-top: 20rpx;
  844. padding-bottom: 16rpx;
  845. font-weight: 900;
  846. }
  847. .article-content {
  848. width: 198rpx;
  849. color: #999999;
  850. font-size: 18rpx;
  851. overflow: hidden;
  852. text-overflow: ellipsis;
  853. display: -webkit-box;
  854. word-break: break-all;
  855. -webkit-box-orient: vertical;
  856. -webkit-line-clamp: 2;
  857. }
  858. }
  859. }
  860. }
  861. .science-more {
  862. display: flex;
  863. justify-content: center;
  864. align-items: center;
  865. color: #cb131c;
  866. font-size: 30rpx;
  867. padding-top: 18rpx;
  868. padding-bottom: 18rpx;
  869. image {
  870. width: 20rpx;
  871. height: 27rpx;
  872. }
  873. }
  874. }
  875. // sos急救中心
  876. .system {
  877. width: 100%;
  878. background-color: #ffffff;
  879. margin-top: 18rpx;
  880. padding: 40rpx 30rpx 35rpx 30rpx;
  881. margin-bottom: 20rpx;
  882. .system-map {
  883. margin: 30rpx auto 0;
  884. width: 689rpx;
  885. height: 312rpx;
  886. background-color: #ffffff;
  887. // padding: 0 30rpx;
  888. padding-bottom: 45rpx;
  889. // .map-box {
  890. // width: 100%;
  891. // height: 312rpx;
  892. // // background-color: #fff;
  893. // }
  894. }
  895. }
  896. // AED
  897. .list-box {
  898. padding: 0rpx 25rpx 24rpx;
  899. // margin-bottom: 84rpx;
  900. background-color: #fff;
  901. .system-title {
  902. display: flex;
  903. justify-content: flex-start;
  904. align-items: center;
  905. height: 130rpx;
  906. // padding-bottom: 22rpx;
  907. background-color: #ffffff;
  908. .title {
  909. width: 285rpx;
  910. height: 64rpx;
  911. background-color: #ca121e;
  912. border-radius: 32rpx;
  913. color: #ffffff;
  914. font-size: 32rpx;
  915. line-height: 64rpx;
  916. text-align: center;
  917. }
  918. .img {
  919. width: 68rpx;
  920. height: 43rpx;
  921. margin-left: 16rpx;
  922. margin-right: 16rpx;
  923. image {
  924. width: 68rpx;
  925. height: 43rpx;
  926. }
  927. }
  928. }
  929. }
  930. .map-box {
  931. width: 100%;
  932. height: 366rpx;
  933. }
  934. .list-tpl {
  935. background-color: #ffffff;
  936. margin: 25rpx 0rpx;
  937. padding: 25rpx 25rpx;
  938. font-size: 28rpx;
  939. border-radius: 15rpx;
  940. display: flex;
  941. justify-content: space-between;
  942. align-items: center;
  943. border-bottom: 1px solid #f1f1f1;
  944. .list-left {
  945. display: flex;
  946. width: 100%;
  947. .number {
  948. font-size: 32rpx;
  949. margin-right: 14rpx;
  950. }
  951. .info {
  952. width: 100%;
  953. .title {
  954. font-size: 32rpx;
  955. color: #222222;
  956. font-weight: 500;
  957. }
  958. .addr {
  959. width: 400rpx;
  960. margin-top: 20rpx;
  961. font-size: 20rpx;
  962. font-family: PingFang SC;
  963. font-weight: 500;
  964. color: #999999;
  965. }
  966. }
  967. }
  968. .image {
  969. width: 20%;
  970. text-align: center;
  971. image {
  972. width: 50rpx;
  973. height: 50rpx;
  974. }
  975. .tip {
  976. color: #7f7f7f;
  977. font-size: 21rpx;
  978. }
  979. }
  980. }
  981. }
  982. .red-box {
  983. margin: 20rpx 0;
  984. height: 521rpx;
  985. padding: 40rpx 23rpx 35rpx 23rpx;
  986. background-color: #fff;
  987. .red-nav {
  988. justify-content: space-between;
  989. margin-top: 23rpx;
  990. .left-nav {
  991. width: 332rpx;
  992. height: 392rpx;
  993. background: #FFF3F5;
  994. background-image: url(../../static/img/m1.png);
  995. background-size: 100% 100%;
  996. }
  997. .right-nav {
  998. width: 357rpx;
  999. height: 392rpx;
  1000. flex-direction: column;
  1001. justify-content: space-between;
  1002. // background: #F6F6FF;
  1003. .right-top-nav {
  1004. width: 357rpx;
  1005. height: 204rpx;
  1006. background: #F6F6FF;
  1007. background-image: url(../../static/img/m2.png);
  1008. background-size: 100% 100%;
  1009. }
  1010. .right-bottom-nav {
  1011. width: 357rpx;
  1012. height: 173rpx;
  1013. justify-content: space-between;
  1014. view {
  1015. width: 171rpx;
  1016. height: 173rpx;
  1017. }
  1018. .left-item {
  1019. background: #F5EFFE;
  1020. background-image: url(../../static/img/m3.png);
  1021. background-size: 100% 100%;
  1022. }
  1023. .right-item {
  1024. background: #EDFEFE;
  1025. background-image: url(../../static/img/m4.png);
  1026. background-size: 100% 100%;
  1027. }
  1028. }
  1029. }
  1030. }
  1031. }
  1032. .popup_row2 {
  1033. // margin-top: 108rpx;
  1034. height: 440rpx;
  1035. border-radius: 25rpx;
  1036. width: 100%;
  1037. padding: 24rpx;
  1038. background-color: #f8f8f8;
  1039. z-index: 999;
  1040. .title {
  1041. border-bottom: 2rpx solid #F2F2F2;
  1042. color: #E63931;
  1043. font-size: 32rpx;
  1044. padding-left: 4rpx;
  1045. padding-bottom: 16rpx;
  1046. display: flex;
  1047. justify-content: space-between;
  1048. // align-items: center;
  1049. .cancel {
  1050. margin-left: 52rpx;
  1051. width: 36rpx;
  1052. height: 36rpx;
  1053. image {
  1054. width: 36rpx;
  1055. height: 36rpx;
  1056. }
  1057. }
  1058. }
  1059. .inpBox {
  1060. margin-top: 52rpx;
  1061. border: 2px solid #f2f2f2;
  1062. padding: 12rpx 24rpx;
  1063. color: #FF9797;
  1064. border-radius: 8rpx;
  1065. .input-placeholder {
  1066. // height: 70rpx;
  1067. font-size: 32rpx;
  1068. color: #FF9797;
  1069. }
  1070. }
  1071. .inpedit {
  1072. margin-top: 24rpx;
  1073. margin-left: 14rpx;
  1074. font-size: 28rpx;
  1075. color: #FF9797;
  1076. }
  1077. .comfirm {
  1078. display: flex;
  1079. justify-content: flex-end;
  1080. margin-top: 54rpx;
  1081. .comfirm1 {
  1082. padding: 12rpx 24rpx;
  1083. border-radius: 12rpx;
  1084. color: #FFFFFF;
  1085. background-color: #E63931;
  1086. }
  1087. }
  1088. }
  1089. .location-item {
  1090. z-index: 1000;
  1091. display: flex;
  1092. justify-content: space-between;
  1093. align-items: center;
  1094. border-bottom: 1rpx solid #E7E8EA;
  1095. padding: 15rpx 0;
  1096. .box-left {
  1097. display: flex;
  1098. .img01 {
  1099. width: 8rpx;
  1100. height: 28rpx;
  1101. margin-right: 18rpx;
  1102. image {
  1103. width: 8rpx;
  1104. height: 28rpx;
  1105. }
  1106. }
  1107. .img02 {
  1108. width: 117rpx;
  1109. height: 117rpx;
  1110. border-radius: 50%;
  1111. image {
  1112. width: 117rpx;
  1113. height: 117rpx;
  1114. border-radius: 50%;
  1115. }
  1116. }
  1117. .info {
  1118. margin-left: 16rpx;
  1119. .info-header {
  1120. display: flex;
  1121. align-items: center;
  1122. .name {
  1123. font-size: 32rpx;
  1124. color: #333333;
  1125. }
  1126. .distance {
  1127. margin-left: 25rpx;
  1128. font-size: 28rpx;
  1129. color: #303133;
  1130. }
  1131. .location-icon {
  1132. margin-left: 10rpx;
  1133. width: 20rpx;
  1134. height: 26rpx;
  1135. image {
  1136. width: 20rpx;
  1137. height: 26rpx;
  1138. display: inline;
  1139. }
  1140. }
  1141. }
  1142. .address {
  1143. font-size: 26rpx;
  1144. color: #333333;
  1145. margin-top: 33rpx;
  1146. }
  1147. }
  1148. }
  1149. .box-right {
  1150. .img {
  1151. height: 107rpx;
  1152. image {
  1153. width: 107rpx;
  1154. height: 107rpx;
  1155. }
  1156. }
  1157. .called {
  1158. margin-right: 16rpx;
  1159. height: 107rpx;
  1160. line-height: 107rpx;
  1161. font-size: 28rpx;
  1162. color: #CB131C;
  1163. }
  1164. }
  1165. }
  1166. .ewm {
  1167. width: 75rpx;
  1168. height: 75rpx;
  1169. position: absolute;
  1170. right: 10rpx;
  1171. bottom: 200rpx;
  1172. background-color: #fff;
  1173. border-radius: 50%;
  1174. box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
  1175. image {
  1176. width: 50rpx;
  1177. height: 50rpx;
  1178. position: absolute;
  1179. top: 0;
  1180. left: 0;
  1181. bottom: 0;
  1182. right: 0;
  1183. margin: auto;
  1184. }
  1185. .ewm-tit {
  1186. position: absolute;
  1187. bottom: 10rpx;
  1188. font-size: 10rpx;
  1189. }
  1190. .closeEwm {
  1191. width: 40rpx;
  1192. height: 40rpx;
  1193. position: absolute;
  1194. top: -40rpx;
  1195. right: -20rpx;
  1196. image {
  1197. width: 100%;
  1198. height: 100%;
  1199. }
  1200. }
  1201. }
  1202. </style>