| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379 |
- <template>
- <view class="content">
- <!-- 轮播 -->
- <view class="carousel-section">
- <swiper class="carousel" :autoplay="true" :interval="3000" :duration="1000">
- <swiper-item v-for="item in carouselList" :key="item.id">
- <image :src="item.pic"></image>
- </swiper-item>
- </swiper>
- </view>
- <!-- 分类 -->
- <view class="cate-section">
- <view class="cate-item" @click="navTo('/pages/applic/appliSystem1')">
- <image src="../../static/icon/icon1.png" style="width: 70rpx;height: 64rpx;"></image>
- <text>爱心捐赠</text>
- </view>
- <view class="cate-item" @click="navTo('/pages/applic/appliSystem')">
- <view class="cate-item">
- <image src="../../static/icon/icon2.png" style="width: 66rpx;height: 66rpx;"></image>
- <text>造血干细胞捐献</text>
- </view>
- </view>
- <view class="cate-item" @click="navTo('/pages/applic/organDonation')">
- <image src="../../static/icon/icon3.png" style="width: 80rpx;height: 68rpx;"></image>
- <text>器官捐献</text>
- </view>
- <!-- </a> -->
- <view>
- <view class="cate-item" @click="navTo('/pages/form/tovolApply')">
- <image src="../../static/icon/icon4.png" style="width: 66rpx;height: 66rpx;"></image>
- <text>志愿者登记</text>
- </view>
- </view>
- <view>
- <view class="cate-item" @click="navTo('/pages/train/index')">
- <image src="../../static/icon/icon5.png" style="width: 66rpx;height: 65rpx;"></image>
- <text>培训报名</text>
- </view>
- </view>
- </view>
- <!-- 红会科普 -->
- <view class="science-section">
- <view class="science-title">
- <image src="../../static/img/wings-left.png" mode=""></image>
- <view class="title">红会科普</view>
- <image src="../../static/img/wings-right.png" mode=""></image>
- </view>
- <scroll-view class="science-box" scroll-x>
- <view class="science-content">
- <view class="science-item" v-for="(item, index) in science" :key="index" @click="Jump(item)">
- <image :src="item.image_input[0]" mode=""></image>
- <view class="article-title word1_ellipsis">{{ item.title }}</view>
- <view class="article-content">{{ item.synopsis }}</view>
- </view>
- </view>
- </scroll-view>
- <navigator class="science-more" url="/pages/applic/science">
- 查看更多
- <image src="../../static/icon/moreRight.png" mode=""></image>
- <image src="../../static/icon/moreRight.png" mode=""></image>
- </navigator>
- </view>
-
- <view class="science-section" style="padding-bottom: 20rpx;">
- <view class="science-title">
- <image src="../../static/img/wings-left.png" mode=""></image>
- <view class="title">爱心榜</view>
- <image src="../../static/img/wings-right.png" mode=""></image>
- </view>
- <view class="love">
- <view class="love-wrap">
- <!-- <view class="" style="height: 46rpx;"></view> -->
- <!-- <view class="love-top">
- 爱心榜
- </view> -->
- <view class="tab-tit flex">
- <view class="tit">
- 捐赠时间
- </view>
- <view class="tit" style="width: 30%;">
- 捐献者/单位
- </view>
- <view class="tit" style="width: 20%;">
- 捐赠金额
- </view>
- <view class="tit">
- 捐赠意向
- </view>
- </view>
- <view class="tab-tit flex tab-val" v-for="item in showLove">
- <view class="tit clamp">
- {{item.pay_time | getTime}}
- </view>
- <view class="tit clamp" style="width: 30%;">
- {{item.donate_er || '佚名'}}
- </view>
- <view class="tit clamp" style="width: 20%;">
- {{item.money*1}}
- </view>
- <view class="tit clamp">
- {{item.intention || '红十字会人道事...'}}
- </view>
- </view>
- <view class="lookmore" @click="navTo('/pages/index/loveList')">
- 查看更多
- <!-- <image src="../../static/icon/lm.png" mode="widthFix"></image> -->
- </view>
- </view>
-
- </view>
- </view>
-
- <!-- sos急救系统 -->
- <view class="system">
- <view class="system-title">
- <view class="img">
- <image src="../../static/img/wings-left.png"></image>
- </view>
- <view class="title" @click="tolocation">救在身边</view>
- <view class="img">
- <image src="../../static/img/wings-right.png"></image>
- </view>
- </view>
- <view class="system-map">
- <map @click="tolocation" :show-location="false" class="map-box" id="mapjzsb" :markers="markerjzsb"
- :scale="scale" :latitude="latitude4" :longitude="longitude4" ref="mapjzsb"
- style="height: 450rpx"></map>
- </view>
- </view>
- <view v-for="(item, index) in jzsbList" :key="item.id">
- <view class="location-item">
- <view class="box-left">
- <view class="img01">
- <image src="../../static/img/line01.png" mode=""></image>
- </view>
- <view class="img02">
- <image src="../../static/img/002.png" mode=""></image>
- </view>
- <!-- <view class="img02" v-else><image src="../../static/img/missing-face.png" mode=""></image></view> -->
- <view class="info">
- <view class="info-header">
- <view class="name">救护员{{ index + 1 }}</view>
- <view class="distance">{{ item.num }}km</view>
- <view class="location-icon">
- <image src="../../static/img/location-icon.png" mode=""></image>
- </view>
- </view>
- <view class="address">{{ item.address }}</view>
- </view>
- </view>
- <view class="box-right" @click="rescue(item, index)">
- <view class="img" v-if="!item.is">
- <image src="../../static/img/rescue.png" mode=""></image>
- </view>
- <view class="called" v-if="item.is">已呼叫</view>
- </view>
- </view>
- </view>
- <navigator class="science-more" url="/pages/applic/location">
- 查看更多
- <image src="../../static/icon/moreRight.png" mode=""></image>
- <image src="../../static/icon/moreRight.png" mode=""></image>
- </navigator>
- <view class="" style="height: 20rpx;">
-
- </view>
- <view class="list-box">
- <view class="system-title">
- <view class="img">
- <image src="../../static/img/wings-left.png"></image>
- </view>
- <view class="title">救护站</view>
- <view class="img">
- <image src="../../static/img/wings-right.png"></image>
- </view>
- </view>
- <view id="container">
- <map class="map-box" id="map" :show-location="false" :markers="marker" :scale='scale'
- :latitude="latitude4" :longitude="longitude4" ref="map" style="height: 450rpx"
- @markertap='markertap'>
- </map>
- </view>
- <view class="">
- <view class="list-tpl flex" @click="openAddress(item)" v-for="(item,index) in AEDList" :key="item.id">
- <view class="list-left">
- <view class="number">{{ index + 1 }}</view>
- <view class="info">
- <view class="title">{{ item.introduction }}</view>
- <view class="addr">地址:{{ item.address }}</view>
- </view>
- </view>
- <view class="image">
- <image src="../../static/img/img10.png"></image>
- <view class="tip">导航</view>
- </view>
- </view>
- <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
- </view>
- </view>
- <navigator class="science-more" url="/pages/applic/aid">
- 查看更多
- <image src="../../static/icon/moreRight.png" mode=""></image>
- <image src="../../static/icon/moreRight.png" mode=""></image>
- </navigator>
- <view class="" style="height: 20rpx;">
-
- </view>
- <template v-if="AedList.length > 0">
- <view class="list-box">
- <view class="system-title">
- <view class="img">
- <image src="../../static/img/wings-left.png"></image>
- </view>
- <view class="title">AED</view>
- <view class="img">
- <image src="../../static/img/wings-right.png"></image>
- </view>
- </view>
- <view id="container">
- <map class="map-box" id="map" :show-location="false" :markers="markeraed" :scale='scale'
- :latitude="latitude4" :longitude="longitude4" ref="map" style="height: 450rpx"
- @markertap='markertap'>
- </map>
- </view>
- <view class="">
- <view class="list-tpl flex" @click="openAddress(item)" v-for="(item,index) in AedList" :key="item.id">
- <view class="list-left">
- <view class="number">{{ index + 1 }}</view>
- <view class="info">
- <view class="title">{{ item.name }}</view>
- <view class="addr">地址:{{ item.detailed_address }}</view>
- </view>
- </view>
-
- <view class="image">
- <image src="../../static/img/img10.png"></image>
- <view class="tip">导航</view>
- </view>
- </view>
- <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
- </view>
- </view>
- <navigator class="science-more" url="/pages/applic/aed">
- 查看更多
- <image src="../../static/icon/moreRight.png" mode=""></image>
- <image src="../../static/icon/moreRight.png" mode=""></image>
- </navigator>
- </template>
- <uni-popup ref="popup" type="bottom" @click="close">
- <view class="popup_row">
- <view class="rows">
- <view class="rows-item" @click="toGaodeMap">
- 高德地图
- </view>
- <view class="rows-item" @click="tobaiDuMap">
- 百度地图
- </view>
- <view class="rows-item" @click="totengxunMap">
- 腾讯地图
- </view>
- <!-- <view class="rows-item" @click="toGoogleMap">
- Google地图
- </view> -->
- <!-- <view class="row-1"><image class="first_aid" src="../../static/img/img03.jpg"></image></view> -->
- <!-- <view class="row-2">扫码进入急救平台</view> -->
- </view>
- </view>
- </uni-popup>
- <uni-popup ref="popups" type="center">
- <view class="popup_rows">
- <view class="title">
- <view class="title-left">请输入您的手机号,等待救援!</view>
- <view class="cancel" @click="cancel">
- <image src="../../static/img/cancel1.png" mode=""></image>
- </view>
- </view>
- <view class="inpBox"><input type="text" value="" placeholder="请输入您的手机号" v-model="to_phone" /></view>
- <view class="inpedit">可在方框中修改您的手机号</view>
- <view class="comfirm">
- <view class="comfirm1" @click="comfirm1()">确认</view>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import {
- loadIndexs,
- bannerlist,
- getListAED,
- getDistance,
- getdis,
- getStation,
- getLove,
- tocall
- } from '@/api/index.js';
- import {
- saveUrl,
- interceptor
- } from '@/utils/loginUtils.js';
- import {
- mapState,
- mapMutations
- } from 'vuex';
- import {
- userinfo
- } from '@/api/user.js';
- import uniPopup from '@/components/uni-popup/uni-popup.vue';
- import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
- import {
- getLoca
- } from '@/utils/wxAuthorized.js';
- export default {
- components: {
- uniPopup,
- uniLoadMore
- },
- data() {
- return {
- loveList: [],
- jzsbList: [],
- carouselList: [], //轮播
- science: [], //文章列表
- page: 1,
- limit: 10,
- AEDList: [],//救护站
- AedList: [],//aed列表
- latitude2: '',
- longitude2: '',
- latitude4: '30.647021',
- longitude4: '114.133656',
- // longitude4: '121.15829821166992',
- // latitude4: "30.044394499237708",
- address: '',
- loadingType: 'more',
- markerList: [],
- marker: [],
- markerjzsb: [],
- markeraed: [],//aed图表
- marker1: [],
- longitude: '121.15829821166992',
- latitude: "30.044394499237708",
- longitude1: '120.553638',
- latitude1: "30.547011",
- scale: '12', //地图缩放程度
- scale1: '15',
- showbox: false,
- showTEXT: false,
- to_phone: '',
- };
- },
- filters: {
- getTime(val) {
- let date = new Date(val * 1000);
- let Y = date.getFullYear();
- let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1;
- let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
- return Y + '/' + M + '/' + D;
- },
- },
- onShow() {
- // let token = uni.getStorageSync('token');
- console.log(11, this);
- // if (!this.hasLogin) {
- // // 登录拦截
- // // interceptor();
- // uni.showModal({
- // title: '登录',
- // content: '您未登录,是否马上登陆?',
- // success: e => {
- // if (e.confirm) {
- // saveUrl();
- // interceptor();
- // }
- // },
- // fail: e => {
- // console.log(e);
- // }
- // });
- // } else {
- // this.loadData();
- // }
- this.loadData()
- if(this.timer) {
- clearTimeout(this.timer)
- }
- },
- onLoad() {
- let obj = this;
- let locationAddress
- let wxOjb = require('jweixin-module');
- locationAddress = wxOjb.getLocation;
- wxOjb.ready(() => {
- console.log('加载完毕注册事件');
- locationAddress({
- type: 'gcj02',
- success: function(res) {
- console.log('获取经纬度', res);
- obj.longitude4 = res.longitude
- obj.latitude4 = res.latitude
- obj.marker = [{
- longitude: res.longitude,
- latitude: res.latitude,
- iconPath: '/static/img/img19.png',
- width: '45',
- height: '45',
- }]
- obj.marker1 = [{
- longitude: res.longitude,
- latitude: res.latitude,
- iconPath: '/static/img/img19.png',
- width: '45',
- height: '45',
- }]
- obj.loadData();
- obj.getJzsb()
- },
- fail(e) {
- console.log('失败', e);
- // window.location.reload();
- //30.647021,114.133656
- obj.longitude4 = '114.133656'
- obj.latitude4 = '30.647021'
- obj.marker = [{
- longitude: res.longitude,
- latitude: res.latitude,
- iconPath: '/static/img/img19.png',
- width: '45',
- height: '45',
- }]
- obj.marker1 = [{
- longitude: res.longitude,
- latitude: res.latitude,
- iconPath: '/static/img/img19.png',
- width: '45',
- height: '45',
- }]
- obj.loadData();
- obj.getJzsb()
- }
- });
- })
- },
- computed: {
- ...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
- showLove() {
- return this.loveList.slice(0, 5);
- }
- },
- // 下拉加载
- onReachBottom() {
- // this.loadData();
- },
- methods: {
- ...mapMutations('user', ['setUserInfo']),
- gundong() {
- let obj = this;
- obj.timer = setTimeout(() => {
- obj.loveList.push(obj.loveList.shift());
- // console.log(obj.moreJxList)
- obj.gundong();
- }, 2000);
- },
- getLove(index_start_time,index_end_time) {
- let obj = this
- getLove({
- page: 1,
- limit: 100,
- data:index_start_time+ ' - ' + index_end_time
- }).then(res => {
- this.loveList = res.data.data
- if(obj.loveList.length > 5) {
- obj.gundong();
- }
- })
- },
- cancel() {
- this.$refs.popups.close();
- },
- comfirm1() {
- let obj = this;
- if (obj.to_phone.toString().trim() == '') {
- // uni.showModal({
- // title:'输入框为空',
- // // content:JSON.stringify(obj)
- // })
- } else {
- console.log('obj.to_phone1111', obj.to_phone);
- const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
- if (!reg.test(obj.to_phone)) {
- obj.$api.msg('请填写正确的手机号码');
- return;
- }
- tocall({
- name: obj.name,
- uid: obj.uid,
- phone: obj.phone,
- longitude: obj.longitude4,
- latitude: obj.latitude4,
- to_phone: obj.to_phone
- }).then(data => {
- console.log(99988, data);
- uni.showModal({
- title: '请耐心等待救援',
- success: res => {
- if (res.confirm) {
- window.location.reload(); //重新刷新页面
- }
- }
- });
- obj.$refs.popups.close();
- obj.iscall = false;
- console.log(123, obj.iscall);
- });
- }
- },
- // 立即救援
- rescue(item, index) {
- let obj = this;
- uni.showModal({
- content: '是否发起求救?',
- success: res => {
- if (res.confirm) {
- this.$refs.popups.open(item, index);
- obj.name = item.name;
- obj.uid = item.uid;
- obj.phone = item.phone;
- obj.iscall = false;
- console.log('点击救援时item.phone:', obj.phone);
- }
- }
- });
- },
- // 调用高德
- toGaodeMap() {
- let latitude = this.latitude2
- let longitude = this.longitude2
- let address = this.address
- console.log('选择高德', latitude, longitude, address)
- // window.location.href = 'https://uri.amap.com/marker?position=30.537043,120.567191&name=浙江省嘉兴市桐乡市高桥镇高桥大道51号'
- window.location.href = `https://uri.amap.com/marker?position=${longitude},${latitude}&name=${address}`
- // window.location.href = `http://uri.amap.com/navigation?from=114.02597366,22.54605355&to=114.029243,22.609562&mode=car&src=nyx_super`
- // http://uri.amap.com/navigation?from=" + fromLongitude + "," + fromLatitude + "&to="+ longitude + "," + latitude + "&mode=car&src=nyx_super
- },
- // 调用腾讯
- totengxunMap() {
- let latitude = this.latitude2
- let longitude = this.longitude2
- let address = this.address
- console.log('选择腾讯', latitude, longitude)
- window.location.href =
- `http://apis.map.qq.com/uri/v1/marker?marker=coord:${latitude},${longitude};addr:${address}`;
- },
- // 调用百度
- tobaiDuMap() {
- let latitude = this.latitude2
- let longitude = this.longitude2
- let latitude6 = this.latitude4
- let longitude6 = this.longitude4
- let address = this.address
- console.log('选择百度', latitude, longitude)
- console.log('获取当前经纬度', latitude6, longitude6)
- window.location.href =
- `http://api.map.baidu.com/direction?origin=latlng:${latitude6},${longitude6}|name:我的位置&destination=${latitude},${longitude}&mode=driving®ion=${ address }&output=html&src=webapp.baidu.openAPIdemo`
- //`bdapp://map/navi?location=${longitude},${latitude}&coord_type=gc02&title=${address}&content=${address}&output=html&src=andr.baidu.openAPIdemo `
- },
- // 调用谷歌
- toGoogleMap() {
- let latitude = this.latitude2
- let longitude = this.longitude2
- console.log('选择谷歌', latitude, longitude)
- },
- navTo(url) {
- if (!this.hasLogin) {
- uni.showModal({
- title: '登录',
- content: '您未登录,是否马上登陆?',
- success: e => {
- if (e.confirm) {
- interceptor();
- }
- },
- fail: e => {
- console.log(e);
- }
- });
- return;
- }
- uni.navigateTo({
- url,
- fail(e) {
- uni.switchTab({
- url
- })
- }
- });
- },
- tolocation() {
- uni.navigateTo({
- url: "/pages/applic/location"
- })
- },
- // 点击图标
- markertap(e) {
- console.log(e.target.markerId);
- this.$refs.popup.open();
- let obj = this;
- for (let i = 0; i < obj.marker.length; i++) {
- if (e.target.markerId == obj.marker[i].id) {
- obj.latitude2 = obj.marker[i].latitude;
- obj.longitude2 = obj.marker[i].longitude;
- obj.address = obj.marker[i].address;
- // uni.showModal({
- // title: '坐标',
- // content: JSON.stringify(obj.marker[i]),
- // success() {
- // uni.showModal({
- // title: '成功',
- // content: obj.marker[i].latitude
- // })
- // }
- // })
- }
- }
- },
- loadData() {
- let obj = this;
- console.log('打印当前经纬度', obj.longitude4, obj.latitude4)
- // userinfo({}).then(({
- // data
- // }) => {
- // obj.setUserInfo(data);
- // loadIndexs({}).then(({
- // data
- // }) => {
- // obj.carouselList = data.banner; //轮播图
- // bannerlist().then(({
- // data
- // }) => {
- // console.log(data);
- // obj.science = data;
- // });
- // });
- // });
- loadIndexs({}).then(({
- data
- }) => {
- obj.carouselList = data.banner; //轮播图
- console.log(data.index_end_time,)
- if(data.index_end_time && data.index_statr_time) {
- console.log('zz')
- this.getLove(data.index_statr_time,data.index_end_time)
- }else {
- this.getLove()
- }
- bannerlist().then(({
- data
- }) => {
- obj.science = data;
- });
- });
- if (obj.loadingType === 'noMore') {
- //防止重复加载
- return;
- }
- // 修改当前对象状态为加载中
- obj.loadingType = 'loading';
- obj.getStation()
- getDistance({
- lng1: obj.longitude4,
- lat1: obj.latitude4
- }).then(({
- data
- }) => {
- console.log(data, 980)
- obj.AEDList = data
- obj.AEDList = data.slice(0, 5)
- let arr = data.map(item => ({
- latitude: item.latitude,
- longitude: item.longitude,
- iconPath: '/static/icon/jzsb.png',
- width: '35',
- height: '35',
- id: item.id,
- address: item.address
- }))
- obj.marker = obj.marker.concat(arr)
- obj.marker = obj.marker.slice(0, 6)
- console.log('obj.marker', obj.marker)
- })
- obj.getJzsb()
- },
- // 导航
- openAddress(item) {
- let obj = this
- obj.latitude2 = item.latitude
- obj.longitude2 = item.longitude
- obj.address = item.address
- this.$refs.popup.open();
- },
- Jump(item) {
- // console.log(item);
- if (item.url != '') {
- window.open(item.url);
- return
- }
- uni.navigateTo({
- url: "/pages/applic/info?id=" + item.id
- })
- },
- open() {
- this.$refs.popup.open();
- },
- close() {
- this.$refs.popup.close();
- },
- // 获取就在身边
- getJzsb() {
- let obj = this;
- getdis({
- lng1: obj.longitude4,
- lat1: obj.latitude4,
- page: 1,
- limit: 3
- }).then((res) => {
- let data = res.data;
- console.log(data, 'jzsb')
- this.jzsbList = res.data.slice(0, 3)
- let arr = data.map(item => ({
- latitude: item.latitude,
- longitude: item.longitude,
- iconPath: '/static/img/img014.png',
- width: '35',
- height: '35',
- id: item.id,
- address: item.address
- }))
- obj.markerjzsb = obj.marker1.concat(arr)
- console.log(obj.markerjzsb, 'obj.markerjzsb')
- }).catch(err => {
- console.log(err);
- uni.hideLoading();
- });
- },
- getStation() {
- getStation({
- longitude: this.longitude4,
- latitude: this.latitude4,
- page: 1,
- limit: 3
- }).then(res => {
- this.AedList = res.data.list.slice(0, 3)
- let arr =this.AedList.map(item => ({
- latitude: item.latitude,
- longitude: item.longitude,
- iconPath: '/static/icon/aed-na.png',
- width: '35',
- height: '35',
- id: item.id,
- address: item.detailed_address
- }))
- this.markeraed = this.marker1.concat(arr)
-
- })
- }
- }
- };
- </script>
- <style lang="scss">
- a {
- text-decoration: none;
- color: #5f5f5f;
- }
- .content {
- // line-height: 1;
- background-color: #FFABAB;
- // padding-bottom: 60rpx;
- }
- .popup_row {
- width: 100%;
- height: 500rpx;
- background-color: #ffffff;
- border-radius: 20rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- .rows {
- width: 100%;
- padding: 0 24rpx;
- .rows-item {
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- width: 100%;
- font-size: 32rpx;
- color: #303133;
- // border-bottom: 1rpx solid #f0f0f0;
- }
- // .row-1 {
- // margin: auto;
- // .first_aid {
- // width: 300rpx;
- // height: 300rpx;
- // }
- // }
- // .row-2 {
- // font-size: 38rpx;
- // margin-top: 20rpx;
- // }
- }
- }
- .content {
- background-color: #f8f8f8;
- height: 100%;
- /* 头部 轮播图 */
- .carousel-section {
- // padding-top: 10px;
- overflow: hidden;
- .carousel {
- width: 100%;
- height: 398rpx;
- .carousel-item {
- width: 100%;
- height: 100%;
- padding-left: 30rpx;
- padding-right: 30rpx;
- overflow: hidden;
- }
- image {
- width: 100%;
- height: 398rpx;
- }
- }
- }
- // 分类
- .cate-section {
- display: flex;
- justify-items: center;
- align-items: center;
- justify-content: space-around;
- height: 214rpx;
- width: 750rpx;
- background-color: #ffffff;
- .cate-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #5f5f5f;
- font-size: 26rpx;
- image {
- height: 88rpx;
- width: 88rpx;
- margin-bottom: 14rpx;
- // border-radius: 50%;
- opacity: 0.7;
- }
- }
- }
- // 红会科普
- .science-section {
- width: 100%;
- background-color: #ffffff;
- margin-top: 18rpx;
- padding-top: 30rpx;
- .science-title {
- display: flex;
- justify-content: center;
- align-items: center;
- padding-bottom: 22rpx;
- .title {
- width: 285rpx;
- height: 64rpx;
- background-color: #FF727E;
- border-radius: 32rpx;
- color: #ffffff;
- font-size: 32rpx;
- line-height: 64rpx;
- text-align: center;
- }
- image {
- width: 68rpx;
- height: 43rpx;
- margin-left: 16rpx;
- margin-right: 16rpx;
- }
- }
- .science-box {
- padding-left: 15rpx;
- padding-right: 15rpx;
- padding-bottom: 20rpx;
- border-bottom: 1rpx solid #f0f0f0;
- white-space: nowrap;
- display: flex;
- width: 100%;
- // .uni-scroll-view-content{
- // display: flex;
- // }
- .science-content {
- // width: 100%;
- // display: flex;
- display: -webkit-box;
- .science-item {
- margin-right: 24rpx;
- width: 198rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- image {
- width: 100%;
- height: 145rpx;
- }
- .article-title {
- width: 198rpx;
- color: #333;
- font-size: 25rpx;
- padding-top: 20rpx;
- padding-bottom: 16rpx;
- font-weight: 900;
- }
- .article-content {
- width: 198rpx;
- color: #999999;
- font-size: 18rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- }
- }
- }
- .science-more {
- display: flex;
- justify-content: center;
- align-items: center;
- color: $motif-color;
- font-size: 30rpx;
- padding-top: 18rpx;
- padding-bottom: 18rpx;
- image {
- width: 20rpx;
- height: 27rpx;
- }
- }
- }
- // sos急救中心
- .system {
- width: 100%;
- background-color: #ffffff;
- margin-top: 18rpx;
- padding-top: 40rpx;
- // padding-bottom: 45rpx;
- // margin-bottom: 43rpx;
- .system-title {
- display: flex;
- justify-content: center;
- align-items: center;
- padding-bottom: 22rpx;
- .title {
- width: 285rpx;
- height: 64rpx;
- background-color: #FF727E;
- border-radius: 32rpx;
- color: #ffffff;
- font-size: 32rpx;
- line-height: 64rpx;
- text-align: center;
- }
- .img {
- width: 68rpx;
- height: 43rpx;
- margin-left: 16rpx;
- margin-right: 16rpx;
- image {
- width: 68rpx;
- height: 43rpx;
- }
- }
- }
- .system-map {
- width: 750rpx;
- height: 500rpx;
- background-color: #ffffff;
- padding: 0 24rpx;
- padding-bottom: 45rpx;
- .map-box {
- width: 100%;
- height: 500rpx;
- background-color: #f8f8f8;
- image {
- width: 100%;
- height: 500rpx;
- }
- }
- }
- }
- // AED
- .list-box {
- // padding: 0rpx 25rpx 24rpx;
- // margin-bottom: 84rpx;
- .system-title {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 130rpx;
- // padding-bottom: 22rpx;
- background-color: #FFFFFF;
- .title {
- width: 285rpx;
- height: 64rpx;
- background-color: #FF727E;
- border-radius: 32rpx;
- color: #ffffff;
- font-size: 32rpx;
- line-height: 64rpx;
- text-align: center;
- }
- .img {
- width: 68rpx;
- height: 43rpx;
- margin-left: 16rpx;
- margin-right: 16rpx;
- image {
- width: 68rpx;
- height: 43rpx;
- }
- }
- }
- }
- .map-box {
- // background-color: #FFFFFF;
- width: 100%;
- height: 366rpx;
- // border: 2rpx solid #F2F2F2;
- box-shadow: 5px 15px 15px 5px #F2F2F2;
- }
- .list-tpl {
- background-color: #FFFFFF;
- margin: 25rpx 0rpx 0;
- padding: 25rpx 25rpx;
- font-size: 28rpx;
- border-radius: 15rpx;
- display: flex;
- justify-content: space-between;
- .list-left {
- display: flex;
- width: 100%;
- .number {
- font-size: 32rpx;
- margin-right: 14rpx;
- }
- .info {
- width: 100%;
- .title {
- font-size: 32rpx;
- color: #222222;
- font-weight: 500;
- }
- .addr {
- margin-top: 20rpx;
- }
- }
- }
- .image {
- width: 10%;
- text-align: center;
- image {
- width: 50rpx;
- height: 50rpx;
- }
- .tip {
- color: #7F7F7F;
- font-size: 21rpx;
- }
- }
- }
- }
- .location-item {
- // width: 710rpx;
- background-color: #fff;
- z-index: 10;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #e7e8ea;
- padding: 15rpx 30rpx;
- // margin: auto;
- .box-left {
- display: flex;
- .img01 {
- width: 8rpx;
- height: 28rpx;
- margin-right: 18rpx;
- image {
- width: 8rpx;
- height: 28rpx;
- }
- }
- .img02 {
- width: 117rpx;
- height: 117rpx;
- border-radius: 50%;
- image {
- width: 117rpx;
- height: 117rpx;
- border-radius: 50%;
- }
- }
- .info {
- margin-left: 16rpx;
- .info-header {
- display: flex;
- align-items: center;
- .name {
- font-size: 32rpx;
- color: #333333;
- }
- .distance {
- margin-left: 25rpx;
- font-size: 28rpx;
- color: #303133;
- }
- .location-icon {
- margin-left: 10rpx;
- width: 20rpx;
- height: 26rpx;
- image {
- width: 20rpx;
- height: 26rpx;
- display: inline;
- }
- }
- }
- .address {
- font-size: 26rpx;
- color: #333333;
- margin-top: 33rpx;
- }
- }
- }
- .box-right {
- .img {
- height: 107rpx;
- image {
- width: 107rpx;
- height: 107rpx;
- }
- }
- .called {
- margin-right: 16rpx;
- height: 107rpx;
- line-height: 107rpx;
- font-size: 28rpx;
- color: #cb131c;
- }
- }
- }
- .popup_rows {
- // margin-top: 108rpx;
- height: 440rpx;
- border-radius: 25rpx;
- width: 100%;
- padding: 24rpx;
- background-color: #f8f8f8;
- z-index: 999;
- .title {
- border-bottom: 2rpx solid #f2f2f2;
- color: #e63931;
- font-size: 32rpx;
- padding-left: 4rpx;
- padding-bottom: 16rpx;
- display: flex;
- justify-content: space-between;
- // align-items: center;
- .cancel {
- margin-left: 52rpx;
- width: 36rpx;
- height: 36rpx;
- image {
- width: 36rpx;
- height: 36rpx;
- }
- }
- }
- .inpBox {
- margin-top: 52rpx;
- border: 2px solid #f2f2f2;
- padding: 12rpx 24rpx;
- color: #ff9797;
- border-radius: 8rpx;
- .input-placeholder {
- // height: 70rpx;
- font-size: 32rpx;
- color: #ff9797;
- }
- }
- .inpedit {
- margin-top: 24rpx;
- margin-left: 14rpx;
- font-size: 28rpx;
- color: #ff9797;
- }
- .comfirm {
- display: flex;
- justify-content: flex-end;
- margin-top: 54rpx;
- .comfirm1 {
- padding: 12rpx 24rpx;
- border-radius: 12rpx;
- color: #ffffff;
- background-color: #e63931;
- }
- }
- }
- .science-more {
- background-color: #fff;
- display: flex;
- justify-content: center;
- align-items: center;
- color: $motif-color;
- font-size: 30rpx;
- padding-top: 18rpx;
- padding-bottom: 18rpx;
- image {
- width: 20rpx;
- height: 27rpx;
- }
- }
- .love {
- background: #FFFFFF;
- }
- .love-wrap {
- margin: auto;
- width: 694rpx;
- // height: 309px;
-
- box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.1000);
- border-radius: 30rpx;
- position: relative;
- text-align: center;
- .love-top {
- width: 185rpx;
- line-height: 55rpx;
- background: #FF4C4C;
- border-radius: 28rpx;
- font-size: 30rpx;
- font-weight: bold;
- color: #FFFFFF;
- text-align: center;
- position: absolute;
- top: -25rpx;
- left: 0;
- right: 0;
- margin: auto;
- }
- .tab-tit {
- line-height: 65rpx;
- border-bottom: 1px solid #F2F2F2;
- .tit {
- width: 25%;
- font-size: 20rpx;
- font-weight: bold;
- color: #FF4C4C;
- }
- }
- .tab-val {
- .tit {
- color: #101010;
- }
- }
- }
-
- .lookmore {
- padding: 10rpx 0;
- font-size: 24rpx;
- font-weight: 500;
- color: #090909;
- image {
- display: inline-block;
- margin-left: 10rpx;
- width: 18rpx;
-
- }
- }
- </style>
|