|
|
@@ -7,7 +7,7 @@
|
|
|
</swiper>
|
|
|
</view>
|
|
|
<view class="bk-box">
|
|
|
- <view class="box-item" v-for="item in navList" @click="navItemTo(item.cid)">
|
|
|
+ <view class="box-item" v-for="item in navList" @click="navItemTo(item.cid,item.name)">
|
|
|
<view class="item-logo">
|
|
|
<image :src="item.logo" mode=""></image>
|
|
|
</view>
|
|
|
@@ -48,42 +48,65 @@
|
|
|
<image src="../../static/img/sciencelogo.png" mode=""></image>
|
|
|
</view>
|
|
|
<!-- sos急救系统 -->
|
|
|
- <view class="system" @click="tolocation">
|
|
|
- <top-title :title="'救在身边'" @click="tolocation"></top-title>
|
|
|
+ <!-- <view class="system">
|
|
|
+ <top-title :title="'救在身边'" navurl="/pages/applic/location" :show_more="true"></top-title>
|
|
|
<view class="system-map">
|
|
|
- <map
|
|
|
- class="map-box"
|
|
|
- id="map"
|
|
|
- show-location
|
|
|
- :markers="marker"
|
|
|
- :scale="scale"
|
|
|
- :latitude="latitude4"
|
|
|
- :longitude="longitude4"
|
|
|
- ref="map"
|
|
|
- @markertap="markertap"
|
|
|
- ></map>
|
|
|
- <!-- <view class="map-box" ><image src="../../static/img/map.jpg" mode=""></image></view> -->
|
|
|
+ <map class="map-box" id="map" show-location :markers="jzsbmarker" :scale="scale" :latitude="latitude4"
|
|
|
+ :longitude="longitude4" ref="map" @markertap="markertap"></map>
|
|
|
+ </view>
|
|
|
+ <view class="" style="padding-top: 80rpx;">
|
|
|
+ <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" v-if="item.info !=null">
|
|
|
+ <image src="../../static/img/002.png" mode=""></image>
|
|
|
+ </view>
|
|
|
+ <view class="img02" v-else>
|
|
|
+ <image src="../../static/img/002.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>
|
|
|
+ </view>
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="list-box">
|
|
|
+ <view class="system-title">
|
|
|
+ <top-title :title="'救护站'" :navurl="'/pages/applic/aid'" :show_more="true"></top-title>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="list-box">
|
|
|
- <view class="system-title"><top-title :title="'救护站'" @click="tolocation"></top-title></view>
|
|
|
<view id="container">
|
|
|
- <map
|
|
|
- class="map-box"
|
|
|
- id="map"
|
|
|
- show-location
|
|
|
- :markers="marker"
|
|
|
- :scale="scale"
|
|
|
- :latitude="latitude4"
|
|
|
- :longitude="longitude4"
|
|
|
- ref="map"
|
|
|
- style="height: 450rpx"
|
|
|
- @markertap="markertap"
|
|
|
- ></map>
|
|
|
+ <map class="map-box" id="map" show-location :markers="jhzmarker" :scale="scale" :latitude="latitude4"
|
|
|
+ :longitude="longitude4" ref="map" style="height: 450rpx" @markertap="jhzmarkertap"></map>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
- <view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in Mechanism" :key="item.id">
|
|
|
+ <view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in Mechanism"
|
|
|
+ :key="item.id">
|
|
|
<template>
|
|
|
<view class="list-left">
|
|
|
<view class="info">
|
|
|
@@ -98,28 +121,19 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
- <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="list-box" style="margin-top: 20rpx;">
|
|
|
- <view class="system-title"><top-title :title="'智能AED'" @click="tolocation"></top-title></view>
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="list-box" style="margin-top: 20rpx;">
|
|
|
+ <view class="system-title">
|
|
|
+ <top-title :title="'智能AED'" :navurl="'/pages/applic/aed'" :show_more="true"></top-title>
|
|
|
+ </view>
|
|
|
<view id="container">
|
|
|
- <map
|
|
|
- class="map-box"
|
|
|
- id="map"
|
|
|
- show-location
|
|
|
- :markers="marker"
|
|
|
- :scale="scale"
|
|
|
- :latitude="latitude4"
|
|
|
- :longitude="longitude4"
|
|
|
- ref="map"
|
|
|
- style="height: 450rpx"
|
|
|
- @markertap="markertap"
|
|
|
- ></map>
|
|
|
+ <map class="map-box" id="map" show-location :markers="aedmarker" :scale="scale" :latitude="latitude4"
|
|
|
+ :longitude="longitude4" ref="map" style="height: 450rpx" @markertap="aedmarkertap"></map>
|
|
|
</view>
|
|
|
<view class="">
|
|
|
<view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id">
|
|
|
- <template >
|
|
|
+ <template>
|
|
|
<view class="list-left">
|
|
|
<view class="info">
|
|
|
<view class="title">{{ item.introduction }}</view>
|
|
|
@@ -133,20 +147,37 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
- <!-- <uni-load-more :status="loadingType"></uni-load-more> -->
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<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="popup2" type="center" @click="close2">
|
|
|
+ <view class="popup_row2">
|
|
|
+ <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>
|
|
|
@@ -161,7 +192,7 @@ 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';
|
|
|
-import { getcomAddress } from '@/api/index.js';
|
|
|
+import { getcomAddress, getArticleList } from '@/api/index.js';
|
|
|
import topTitle from '../../components/top-title/top-title.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -179,7 +210,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
logo: '../../static/icon/index2.png',
|
|
|
- name: '认识红会',
|
|
|
+ name: '走近红会',
|
|
|
cid: 4,
|
|
|
},
|
|
|
{
|
|
|
@@ -199,7 +230,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
logo: '../../static/icon/index6.png',
|
|
|
- name: '器官捐献',
|
|
|
+ name: '器官遗体捐献',
|
|
|
cid: 8,
|
|
|
},
|
|
|
{
|
|
|
@@ -222,17 +253,30 @@ export default {
|
|
|
name: '志愿服务',
|
|
|
cid: 12,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // logo: '',
|
|
|
+ // name: '红十字青少年',
|
|
|
+ // cid: 20,
|
|
|
+ // },
|
|
|
{
|
|
|
logo: '../../static/icon/index11.png',
|
|
|
name: '博爱家园',
|
|
|
cid: 13,
|
|
|
},
|
|
|
- {
|
|
|
- logo: '',
|
|
|
- name: '',
|
|
|
- cid: 0,
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // logo: '',
|
|
|
+ // name: '',
|
|
|
+ // cid: 0,
|
|
|
+ // }
|
|
|
],
|
|
|
+ name: '',
|
|
|
+ uid: '',
|
|
|
+ phone: '',
|
|
|
+ to_phone: '',
|
|
|
+ jzsbmarker: [],
|
|
|
+ jzsblist: [],
|
|
|
+ jhzmarker: [],
|
|
|
+ aedmarker: [],
|
|
|
carouselList: [], //轮播
|
|
|
science: [], //文章列表
|
|
|
page: 1,
|
|
|
@@ -296,130 +340,23 @@ export default {
|
|
|
},
|
|
|
onLoad() {
|
|
|
saveUrl();
|
|
|
- let obj = this;
|
|
|
- // obj.getNavList()
|
|
|
- try {
|
|
|
- let locationAddress;
|
|
|
- // #ifdef H5
|
|
|
- let wxOjb = require('jweixin-module');
|
|
|
- locationAddress = wxOjb.getLocation;
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- locationAddress = uni.getLocation;
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- wxOjb.ready(() => {
|
|
|
- console.log('加载完毕注册事件');
|
|
|
- locationAddress({
|
|
|
- type: 'wgs84',
|
|
|
- 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.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- // window.location.reload();
|
|
|
- obj.tishi()
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- // #endif
|
|
|
-
|
|
|
- // #ifdef MP
|
|
|
- locationAddress({
|
|
|
- type: 'wgs84',
|
|
|
- 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.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- obj.tishi()
|
|
|
- }
|
|
|
- });
|
|
|
- // #endif
|
|
|
- } catch (e) {
|
|
|
- let locationAddress;
|
|
|
- // #ifdef H5
|
|
|
- let wxOjb = require('jweixin-module');
|
|
|
- locationAddress = wxOjb.getLocation;
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- locationAddress = uni.getLocation;
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- wxOjb.ready(() => {
|
|
|
- console.log('加载完毕注册事件');
|
|
|
- locationAddress({
|
|
|
- type: 'wgs84',
|
|
|
- success: function(res) {
|
|
|
- console.log('获取经纬度', res);
|
|
|
- obj.longitude4 = res.longitude;
|
|
|
- obj.latitude4 = res.latitude;
|
|
|
- obj.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- obj.tishi()
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- locationAddress({
|
|
|
- type: 'wgs84',
|
|
|
- success: function(res) {
|
|
|
- console.log('获取经纬度', res);
|
|
|
- obj.longitude4 = res.longitude;
|
|
|
- obj.latitude4 = res.latitude;
|
|
|
- obj.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- obj.tishi()
|
|
|
- }
|
|
|
- });
|
|
|
- // #endif
|
|
|
- }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('user', ['userInfo', 'baseURL', 'hasLogin'])
|
|
|
},
|
|
|
// 下拉加载
|
|
|
onReachBottom() {
|
|
|
- this.loadData();
|
|
|
+ // this.loadData();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo']),
|
|
|
//获取导航列表
|
|
|
- navItemTo(cid) {
|
|
|
+ navItemTo(cid,name) {
|
|
|
let url = ''
|
|
|
if(cid == 0) {
|
|
|
return
|
|
|
}else if(cid !== 6) {
|
|
|
- url = '/pages/article/list?cid=' + cid
|
|
|
+ url = '/pages/article/list?cid=' + cid + '&name=' + encodeURI(name)
|
|
|
}else {
|
|
|
url = '/pages/article/lists?cid=' + cid
|
|
|
}
|
|
|
@@ -525,115 +462,108 @@ export default {
|
|
|
loadData() {
|
|
|
let obj = this;
|
|
|
console.log('打印当前经纬度', obj.longitude4, obj.latitude4);
|
|
|
- userinfo({}).then(({ data }) => {
|
|
|
+ userinfo({}).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
obj.setUserInfo(data);
|
|
|
- loadIndexs({}).then(({ data }) => {
|
|
|
+ loadIndexs({}).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
obj.carouselList = data.banner; //轮播图
|
|
|
- bannerlist().then(({ data }) => {
|
|
|
+ bannerlist().then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
console.log(data);
|
|
|
obj.science = data;
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
- if (obj.loadingType === 'noMore') {
|
|
|
- //防止重复加载
|
|
|
- return;
|
|
|
- }
|
|
|
- // 修改当前对象状态为加载中
|
|
|
- obj.loadingType = 'loading';
|
|
|
- getListAED({
|
|
|
- page: obj.page,
|
|
|
- limit: obj.limit
|
|
|
- }).then(({ data }) => {
|
|
|
- console.log(data, 999);
|
|
|
- // obj.AEDList = data
|
|
|
- for (let i = 0; i < data.length; i++) {
|
|
|
- data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
|
|
|
- }
|
|
|
- obj.AEDList = obj.AEDList.concat(data);
|
|
|
- console.log(obj.AEDList, '999++++++++++++++++++++++++++');
|
|
|
- obj.markerList = data;
|
|
|
- obj.page++;
|
|
|
- if (obj.limit == data.length) {
|
|
|
- obj.loadingType = 'more';
|
|
|
- } else {
|
|
|
- obj.loadingType = 'noMore';
|
|
|
- }
|
|
|
- });
|
|
|
- getListMechanism({
|
|
|
- page: obj.page,
|
|
|
- limit: obj.limit
|
|
|
- }).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);
|
|
|
- }
|
|
|
- obj.Mechanism = obj.Mechanism.concat(data);
|
|
|
- console.log(obj.Mechanism, '888++++++++++++++++++++++++++');
|
|
|
- // obj.markerList = data;
|
|
|
- obj.page2++;
|
|
|
- if (obj.limit2 == data.length) {
|
|
|
- obj.loadingType2 = 'more';
|
|
|
- } else {
|
|
|
- obj.loadingType2 = 'noMore';
|
|
|
- }
|
|
|
- })
|
|
|
- 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/img/img014.png',
|
|
|
- width: '35',
|
|
|
- height: '35',
|
|
|
- id: item.id,
|
|
|
- address: item.address
|
|
|
- }));
|
|
|
- obj.marker = obj.marker.concat(arr);
|
|
|
- obj.marker = obj.marker.slice(0, 6);
|
|
|
- // uni.showModal({
|
|
|
- // title: '提示',
|
|
|
- // content: JSON.stringify(obj.marker)
|
|
|
- // })
|
|
|
- });
|
|
|
+ // if (obj.loadingType === 'noMore') {
|
|
|
+ // //防止重复加载
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // // 修改当前对象状态为加载中
|
|
|
+ // obj.loadingType = 'loading';
|
|
|
+ // getListAED({
|
|
|
+ // page: 1,
|
|
|
+ // limit: 2
|
|
|
+ // }).then(({
|
|
|
+ // data
|
|
|
+ // }) => {
|
|
|
+ // console.log(data, 999);
|
|
|
+ // // obj.AEDList = data
|
|
|
+ // for (let i = 0; i < data.length; i++) {
|
|
|
+ // data[i].space = obj.space(obj.latitude4, obj.longitude4, data[i].latitude, data[i].longitude);
|
|
|
+ // }
|
|
|
+ // obj.AEDList = data;
|
|
|
+ // 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.aedmarker = obj.marker.concat(arr)
|
|
|
+ // console.log(obj.AEDList, '999++++++++++++++++++++++++++');
|
|
|
+ // obj.markerList = data;
|
|
|
+ // });
|
|
|
+ // getListMechanism({
|
|
|
+ // page: 1,
|
|
|
+ // limit: 2
|
|
|
+ // }).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 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.jhzmarker = obj.marker.concat(arr)
|
|
|
+ // obj.Mechanism = data;
|
|
|
+ // console.log(obj.Mechanism, '888++++++++++++++++++++++++++');
|
|
|
+ // })
|
|
|
+ // getdis({
|
|
|
+ // lng1: obj.longitude4,
|
|
|
+ // lat1: obj.latitude4,
|
|
|
+ // page: 1,
|
|
|
+ // limit: 2
|
|
|
+ // }).then((res) => {
|
|
|
+ // let data = res.data;
|
|
|
+ // data = data.slice(0,2)
|
|
|
+ // console.log('就在身边请求数据', data);
|
|
|
+ // console.log('data.phone333', data.phone)
|
|
|
+ // data = data.map(d => {
|
|
|
+ // return {
|
|
|
+ // ...d,
|
|
|
+ // iscall: true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // obj.jzsblist = data;
|
|
|
+
|
|
|
+ // 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.jzsbmarker = obj.marker.concat(arr)
|
|
|
+ // }).catch(err => {
|
|
|
+ // console.log(err);
|
|
|
+ // });
|
|
|
},
|
|
|
- // 选择当前位置
|
|
|
- // chooseAddress() {
|
|
|
- // console.log('233')
|
|
|
- // let obj = this;
|
|
|
- // uni.chooseLocation({
|
|
|
- // success: function(res) {
|
|
|
- // console.log(res)
|
|
|
- // obj.addressData.area = res.name;
|
|
|
- // console.log('位置名称:' + res.name);
|
|
|
- // console.log('详细地址:' + res.address);
|
|
|
- // console.log('经度:' + res.longitude);
|
|
|
- // console.log('纬度:' + res.latitude);
|
|
|
- // obj.addressData.latitude = res.latitude;
|
|
|
- // obj.addressData.longitude = res.longitude;
|
|
|
- // obj.addressDetail = res.address;
|
|
|
- // console.log('common_address123',obj.addressDetail )
|
|
|
- // console.log('latitude123',obj.addressData.latitude )
|
|
|
- // console.log('longitude123',obj.addressData.longitude )
|
|
|
- // getcomAddress({
|
|
|
- // common_address: obj.addressDetail,
|
|
|
- // longitude: obj.addressData.longitude,
|
|
|
- // latitude: obj.addressData.latitude
|
|
|
- // }).then(data => {
|
|
|
- // console.log(333)
|
|
|
- // console.log(data);
|
|
|
- // if (data.status == 200) {
|
|
|
- // obj.$api.msg('保存成功')
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
// 导航
|
|
|
openAddress(item) {
|
|
|
let obj = this;
|
|
|
@@ -673,7 +603,68 @@ export default {
|
|
|
s = s * 6378.137;
|
|
|
s = Math.round(s * 10000) / 10000;
|
|
|
return s * 1000; // 单位米
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 立即救援
|
|
|
+ rescue(item, index) {
|
|
|
+ let obj = this;
|
|
|
+ uni.showModal({
|
|
|
+ content: '是否发起求救?',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$refs.popup2.open(item, index);
|
|
|
+ obj.name = item.name;
|
|
|
+ obj.uid = item.uid;
|
|
|
+ obj.phone = item.phone;
|
|
|
+ obj.iscall = false
|
|
|
+ console.log('点击救援时item.phone:', obj.phone)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ 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.popup2.close();
|
|
|
+ obj.iscall = false
|
|
|
+ console.log(123, obj.iscall)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
@@ -1050,16 +1041,16 @@ a {
|
|
|
.bk-box {
|
|
|
width: 750rpx;
|
|
|
height: 779rpx;
|
|
|
- background-color: #eee;
|
|
|
+ background-color: #fff;
|
|
|
margin-top: 10rpx;
|
|
|
// background-color: red;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-wrap: wrap;
|
|
|
.box-item {
|
|
|
- width: 33%;
|
|
|
+ width: 250rpx;
|
|
|
height: 194rpx;
|
|
|
- margin: 1rpx;
|
|
|
+ border: 1px solid #eee;
|
|
|
display: flex;
|
|
|
background-color: #fff;
|
|
|
flex-direction: column;
|
|
|
@@ -1083,4 +1074,69 @@ a {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.popup_row2 {
|
|
|
+ // 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|