transfer.vue 29 KB

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