|
|
@@ -3,7 +3,7 @@
|
|
|
<!-- 轮播 -->
|
|
|
<view class="carousel-section">
|
|
|
<swiper class="carousel" :autoplay="true" :interval="3000" :duration="1000">
|
|
|
- <swiper-item v-for="item in carouselList" :key="item.id">
|
|
|
+ <swiper-item v-for="item in carouselList">
|
|
|
<image :src="item.pic"></image>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
@@ -56,7 +56,7 @@
|
|
|
</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)">
|
|
|
+ <view class="science-item" v-for="(item, index) in science" @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>
|
|
|
@@ -83,11 +83,12 @@
|
|
|
</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>
|
|
|
+ :scale="scale" :latitude="latitude4" :longitude="longitude4" ref="mapjzsb"
|
|
|
+ style="height: 450rpx"></map>
|
|
|
<!-- <view class="map-box" @click="tolocation"><image src="../../static/img/map.jpg" mode=""></image></view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-for="(item, index) in jzsbList" :key="item.id">
|
|
|
+ <view v-for="(item, index) in jzsbList">
|
|
|
<view class="location-item">
|
|
|
<view class="box-left">
|
|
|
<view class="img01">
|
|
|
@@ -115,6 +116,7 @@
|
|
|
<view class="called" v-if="item.is">已呼叫</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
<navigator class="science-more" url="/pages/applic/location">
|
|
|
查看更多
|
|
|
@@ -138,7 +140,7 @@
|
|
|
</map>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- <view class="list-tpl flex" @click="openAddress(item)" v-for="(item,index) in AEDList" :key="item.id">
|
|
|
+ <view class="list-tpl flex" @click="openAddress(item)" v-for="(item,index) in AEDList">
|
|
|
<view class="list-left">
|
|
|
<view class="number">{{ index + 1 }}</view>
|
|
|
<view class="info">
|
|
|
@@ -146,7 +148,7 @@
|
|
|
<view class="addr">地址:{{ item.address }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="image">
|
|
|
<image src="../../static/img/img10.png"></image>
|
|
|
<view class="tip">导航</view>
|
|
|
@@ -154,12 +156,54 @@
|
|
|
</view>
|
|
|
<!-- <uni-load-more :status="loadingType"></uni-load-more> -->
|
|
|
</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>
|
|
|
- <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="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="yzmarker" :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 yzList">
|
|
|
+ <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>
|
|
|
+ <navigator class="science-more" url="/pages/applic/yz">
|
|
|
+ 查看更多
|
|
|
+ <image src="../../static/icon/moreRight.png" mode=""></image>
|
|
|
+ <image src="../../static/icon/moreRight.png" mode=""></image>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+
|
|
|
<uni-popup ref="popup" type="bottom" @click="close">
|
|
|
<view class="popup_row">
|
|
|
<view class="rows">
|
|
|
@@ -210,7 +254,8 @@
|
|
|
bannerlist,
|
|
|
getListAED,
|
|
|
getDistance,
|
|
|
- getdis
|
|
|
+ getdis,
|
|
|
+ getListMechanism
|
|
|
} from '@/api/index.js';
|
|
|
import {
|
|
|
saveUrl,
|
|
|
@@ -238,6 +283,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ yzList: [],
|
|
|
+ yzmarker: [],
|
|
|
to_phone: '',
|
|
|
jzsbList: [],
|
|
|
carouselList: [], //轮播
|
|
|
@@ -455,49 +502,49 @@
|
|
|
this.$refs.popups.close();
|
|
|
},
|
|
|
comfirm1: function() {
|
|
|
- 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;
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ console.log('name:', obj.name);
|
|
|
+ console.log('uid:', obj.uid);
|
|
|
+ console.log('phone', obj.phone);
|
|
|
+ console.log('to_phone', obj.to_phone);
|
|
|
+ console.log('longitude', obj.longitude);
|
|
|
+ console.log('latitude', obj.latitude);
|
|
|
+ console.log('iscall', obj.iscall);
|
|
|
+ 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(); //重新刷新页面
|
|
|
+ }
|
|
|
}
|
|
|
- console.log('name:', obj.name);
|
|
|
- console.log('uid:', obj.uid);
|
|
|
- console.log('phone', obj.phone);
|
|
|
- console.log('to_phone', obj.to_phone);
|
|
|
- console.log('longitude', obj.longitude);
|
|
|
- console.log('latitude', obj.latitude);
|
|
|
- console.log('iscall', obj.iscall);
|
|
|
- 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);
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ });
|
|
|
+ obj.$refs.popups.close();
|
|
|
+ obj.iscall = false;
|
|
|
+ console.log(123, obj.iscall);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 立即救援
|
|
|
rescue(item, index) {
|
|
|
let obj = this;
|
|
|
@@ -567,6 +614,18 @@
|
|
|
url: "/pages/applic/location"
|
|
|
})
|
|
|
},
|
|
|
+ space(lat1 = 0, lng1 = 0, lat2, lng2) {
|
|
|
+ console.log(lat1, lng1, lat2, lng2);
|
|
|
+ var radLat1 = (lat1 * Math.PI) / 180.0;
|
|
|
+ var radLat2 = (lat2 * Math.PI) / 180.0;
|
|
|
+ var a = radLat1 - radLat2;
|
|
|
+ var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
|
|
|
+ var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math
|
|
|
+ .pow(Math.sin(b / 2), 2)));
|
|
|
+ s = s * 6378.137;
|
|
|
+ s = Math.round(s * 10000) / 10000;
|
|
|
+ return s * 1000; // 单位米
|
|
|
+ },
|
|
|
toapplic() {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/applic/appliSystem"
|
|
|
@@ -675,6 +734,38 @@
|
|
|
// content: JSON.stringify(obj.marker)
|
|
|
// })
|
|
|
})
|
|
|
+ getListMechanism({
|
|
|
+ page: 1,
|
|
|
+ limit: 100
|
|
|
+ }).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ console.log(data, '机构+++++++++++++')
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i]
|
|
|
+ .longitude);
|
|
|
+ }
|
|
|
+ // 排序
|
|
|
+ let arr1 = data.sort(obj.sortBy('space'))
|
|
|
+ let arr = arr1.map(item => ({
|
|
|
+ latitude: item.latitude,
|
|
|
+ longitude: item.longitude,
|
|
|
+ iconPath: '/static/icon/yz.png',
|
|
|
+ width: '35',
|
|
|
+ height: '35',
|
|
|
+ id: item.id,
|
|
|
+ address: item.address
|
|
|
+ }));
|
|
|
+
|
|
|
+ obj.yzmarker = obj.marker1.concat(arr)
|
|
|
+ obj.yzList = arr1.slice(0,3)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ sortBy(field) {
|
|
|
+ //根据传过来的字段进行排序,y-x 得分从高到低,x-y 从低到高
|
|
|
+ return (x, y) => {
|
|
|
+ return x[field] - y[field]
|
|
|
+ }
|
|
|
},
|
|
|
// 选择当前位置
|
|
|
// chooseAddress() {
|
|
|
@@ -713,7 +804,7 @@
|
|
|
let obj = this
|
|
|
obj.latitude2 = item.latitude
|
|
|
obj.longitude2 = item.longitude
|
|
|
- obj.address = item.address
|
|
|
+ obj.address = item.detailed_address
|
|
|
this.$refs.popup.open();
|
|
|
},
|
|
|
Jump(item) {
|
|
|
@@ -1035,6 +1126,7 @@
|
|
|
// AED
|
|
|
.list-box {
|
|
|
padding: 0rpx 25rpx 24rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
// margin-bottom: 84rpx;
|
|
|
|
|
|
.system-title {
|
|
|
@@ -1127,6 +1219,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.popup_rows {
|
|
|
// margin-top: 108rpx;
|
|
|
height: 440rpx;
|
|
|
@@ -1135,6 +1228,7 @@
|
|
|
padding: 24rpx;
|
|
|
background-color: #f8f8f8;
|
|
|
z-index: 999;
|
|
|
+
|
|
|
.title {
|
|
|
border-bottom: 2rpx solid #f2f2f2;
|
|
|
color: #e63931;
|
|
|
@@ -1143,39 +1237,46 @@
|
|
|
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;
|
|
|
@@ -1184,6 +1285,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.science-more {
|
|
|
background-color: #fff;
|
|
|
display: flex;
|
|
|
@@ -1193,12 +1295,13 @@
|
|
|
font-size: 30rpx;
|
|
|
padding-top: 18rpx;
|
|
|
padding-bottom: 18rpx;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
width: 20rpx;
|
|
|
height: 27rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.location-item {
|
|
|
// width: 710rpx;
|
|
|
background-color: #fff;
|
|
|
@@ -1208,56 +1311,57 @@
|
|
|
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;
|
|
|
@@ -1265,7 +1369,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.address {
|
|
|
font-size: 26rpx;
|
|
|
color: #333333;
|
|
|
@@ -1273,17 +1377,17 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.box-right {
|
|
|
.img {
|
|
|
height: 107rpx;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
width: 107rpx;
|
|
|
height: 107rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.called {
|
|
|
margin-right: 16rpx;
|
|
|
height: 107rpx;
|
|
|
@@ -1293,4 +1397,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|