|
|
@@ -2,103 +2,97 @@
|
|
|
<view class="content">
|
|
|
<view id="map" class="map">
|
|
|
<map @updated='mapChange' id="map_1" ref='map_1' style="width:750rpx; height: 600rpx" :latitude="latitude"
|
|
|
- :longitude="longitude" :markers="marker"></map>
|
|
|
- </view>i
|
|
|
- <view class="location">
|
|
|
- <!-- <view class="Search-box" @click="getLocation">
|
|
|
- <view class="Search-box-size">
|
|
|
- <image class="box-img" src="https://zhxc2030.com/img/img01.png"></image>
|
|
|
- <input class="box-word" placeholder="搜索地址" v-model="specificAdd" @input="searchlist">
|
|
|
- </view>
|
|
|
- </view> -->
|
|
|
- <view v-for="(item,index) in list" :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>
|
|
|
+ :longitude="longitude" :markers="marker"></map>
|
|
|
+ </view>
|
|
|
+ <view class="location">
|
|
|
+ <view v-for="(item,index) in list" :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>
|
|
|
- <espempty v-if="list.length === 0"></espempty>
|
|
|
- </view>
|
|
|
- <uni-popup ref="popup" type="center" @click="close">
|
|
|
- <view class="popup_row">
|
|
|
- <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>
|
|
|
+ <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>
|
|
|
+ <espempty v-if="list.length === 0"></espempty>
|
|
|
+ </view>
|
|
|
+ <uni-popup ref="popup" type="center" @click="close">
|
|
|
+ <view class="popup_row">
|
|
|
+ <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 {
|
|
|
- mapState,
|
|
|
- mapMutations
|
|
|
- } from 'vuex';
|
|
|
- import espempty from '@/components/espempty';
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
+ import espempty from '@/components/espempty';
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
|
import {
|
|
|
getdis,
|
|
|
tocall
|
|
|
- } from '@/api/index.js';
|
|
|
- import {
|
|
|
- userinfo
|
|
|
- } from '@/api/user.js';
|
|
|
- import {
|
|
|
- getcomAddress
|
|
|
} from '@/api/index.js';
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- uniPopup,
|
|
|
- espempty,
|
|
|
+ import {
|
|
|
+ userinfo
|
|
|
+ } from '@/api/user.js';
|
|
|
+ import {
|
|
|
+ getcomAddress
|
|
|
+ } from '@/api/index.js';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ uniPopup,
|
|
|
+ espempty,
|
|
|
},
|
|
|
//相关配置参数
|
|
|
data() {
|
|
|
@@ -106,161 +100,115 @@
|
|
|
list: [],
|
|
|
latitude: '',
|
|
|
longitude: '',
|
|
|
- current: 0,
|
|
|
+ current: 0,
|
|
|
name: '',
|
|
|
uid: '',
|
|
|
name: '',
|
|
|
- phone: '',
|
|
|
- to_phone:'',
|
|
|
- marker: [],
|
|
|
- specificAdd:'',
|
|
|
- addressData: {
|
|
|
- name: '',
|
|
|
- mobile: '',
|
|
|
- latitude: 0, //纬度
|
|
|
- longitude: 0, //经度
|
|
|
- address: {
|
|
|
- province: '',
|
|
|
- city: '',
|
|
|
- district: '',
|
|
|
- detail: '',
|
|
|
- },
|
|
|
- area: '',
|
|
|
- default: false
|
|
|
+ phone: '',
|
|
|
+ to_phone: '',
|
|
|
+ marker: [],
|
|
|
+ specificAdd: '',
|
|
|
+ addressData: {
|
|
|
+ name: '',
|
|
|
+ mobile: '',
|
|
|
+ latitude: 0, //纬度
|
|
|
+ longitude: 0, //经度
|
|
|
+ address: {
|
|
|
+ province: '',
|
|
|
+ city: '',
|
|
|
+ district: '',
|
|
|
+ detail: '',
|
|
|
+ },
|
|
|
+ area: '',
|
|
|
+ default: false
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- let obj = this;
|
|
|
- console.log('开始加载事件');
|
|
|
- obj.loadBaseData();
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中',
|
|
|
- mask: true
|
|
|
+ let obj = this;
|
|
|
+ console.log('开始加载事件');
|
|
|
+ obj.loadBaseData();
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true
|
|
|
});
|
|
|
obj.loadData();
|
|
|
try {
|
|
|
let locationAddress
|
|
|
- // #ifdef H5
|
|
|
+ // #ifdef H5
|
|
|
let wxOjb = require('jweixin-module');
|
|
|
locationAddress = wxOjb.getLocation;
|
|
|
// #endif
|
|
|
// #ifdef MP
|
|
|
locationAddress = uni.getLocation;
|
|
|
- // #endif
|
|
|
- wxOjb.ready(()=>{
|
|
|
- console.log('加载完毕注册事件');
|
|
|
- locationAddress({
|
|
|
- type: 'gcj02',
|
|
|
- success: function(res) {
|
|
|
- console.log('获取经纬度', res);
|
|
|
- obj.longitude = res.longitude
|
|
|
- obj.latitude = res.latitude
|
|
|
- obj.marker = [
|
|
|
- {
|
|
|
- latitude: obj.latitude,
|
|
|
- longitude: obj.longitude,
|
|
|
- iconPath: '/static/img/img19.png',
|
|
|
- width: '45',
|
|
|
- height: '45',
|
|
|
- },
|
|
|
- ]
|
|
|
- obj.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- window.location.reload();
|
|
|
- }
|
|
|
- });
|
|
|
+ // #endif
|
|
|
+ wxOjb.ready(() => {
|
|
|
+ console.log('加载完毕注册事件');
|
|
|
+ locationAddress({
|
|
|
+ type: 'gcj02',
|
|
|
+ success: function(res) {
|
|
|
+ console.log('获取经纬度', res);
|
|
|
+ obj.longitude = res.longitude
|
|
|
+ obj.latitude = res.latitude
|
|
|
+ obj.marker = [{
|
|
|
+ latitude: obj.latitude,
|
|
|
+ longitude: obj.longitude,
|
|
|
+ iconPath: '/static/img/img19.png',
|
|
|
+ width: '45',
|
|
|
+ height: '45',
|
|
|
+ }, ]
|
|
|
+ obj.loadData();
|
|
|
+ },
|
|
|
+ fail(e) {
|
|
|
+ console.log('失败', e);
|
|
|
+ window.location.reload();
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
} catch (e) {
|
|
|
- console.log(e);
|
|
|
- let locationAddress
|
|
|
- // #ifdef H5
|
|
|
- let wxOjb = require('jweixin-module');
|
|
|
- locationAddress = wxOjb.getLocation;
|
|
|
- // #endif
|
|
|
- // #ifdef MP
|
|
|
- locationAddress = uni.getLocation;
|
|
|
- // #endif
|
|
|
- wxOjb.ready(()=>{
|
|
|
- console.log('加载完毕注册事件');
|
|
|
-
|
|
|
- locationAddress({
|
|
|
- type: 'gcj02',
|
|
|
- success: function(res) {
|
|
|
- console.log('获取经纬度1', res);
|
|
|
- obj.longitude = res.longitude
|
|
|
- obj.latitude = res.latitude
|
|
|
- obj.loadData();
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log('失败', e);
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
-
|
|
|
+ console.log(e);
|
|
|
+ let locationAddress
|
|
|
+ // #ifdef H5
|
|
|
+ let wxOjb = require('jweixin-module');
|
|
|
+ locationAddress = wxOjb.getLocation;
|
|
|
+ // #endif
|
|
|
+ // #ifdef MP
|
|
|
+ locationAddress = uni.getLocation;
|
|
|
+ // #endif
|
|
|
+ wxOjb.ready(() => {
|
|
|
+ console.log('加载完毕注册事件');
|
|
|
+
|
|
|
+ locationAddress({
|
|
|
+ type: 'gcj02',
|
|
|
+ success: function(res) {
|
|
|
+ console.log('获取经纬度1', res);
|
|
|
+ obj.longitude = res.longitude
|
|
|
+ obj.latitude = res.latitude
|
|
|
+ obj.loadData();
|
|
|
+ },
|
|
|
+ fail(e) {
|
|
|
+ console.log('失败', e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState('user', ['hasLogin', 'userInfo'])
|
|
|
},
|
|
|
- methods: {
|
|
|
- ...mapMutations('user', ['setUserInfo']),
|
|
|
- loadBaseData() {
|
|
|
- userinfo({}).then(({
|
|
|
- data
|
|
|
- }) => {
|
|
|
- console.log(123,data)
|
|
|
- this.to_phone = data.phone
|
|
|
- this.setUserInfo(data);
|
|
|
- });
|
|
|
- },
|
|
|
- // 选择当前位置
|
|
|
- // 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.latitude = res.latitude;
|
|
|
- // obj.longitude = res.longitude;
|
|
|
- // obj.marker = [
|
|
|
- // {
|
|
|
- // latitude: obj.latitude,
|
|
|
- // longitude: obj.longitude,
|
|
|
- // iconPath: '/static/img/img19.png',
|
|
|
- // width: '48',
|
|
|
- // height: '48',
|
|
|
- // },
|
|
|
- // ]
|
|
|
- // 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 )
|
|
|
- // obj.loadData()
|
|
|
- // // 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('保存成功')
|
|
|
- // // }
|
|
|
- // // })
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
+ computed: {
|
|
|
+ ...mapState('user', ['hasLogin', 'userInfo'])
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapMutations('user', ['setUserInfo']),
|
|
|
+ loadBaseData() {
|
|
|
+ userinfo({}).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ console.log(123, data)
|
|
|
+ this.to_phone = data.phone
|
|
|
+ this.setUserInfo(data);
|
|
|
+ });
|
|
|
+ },
|
|
|
// 地图渲染完毕事件
|
|
|
mapChange(e) {
|
|
|
console.log(e);
|
|
|
@@ -271,115 +219,111 @@
|
|
|
getdis({
|
|
|
lng1: obj.longitude,
|
|
|
lat1: obj.latitude
|
|
|
- }).then((res) => {
|
|
|
- // uni.showModal({
|
|
|
- // title:'值',
|
|
|
- // content:JSON.stringify(res)
|
|
|
- // })
|
|
|
- let data = res.data;
|
|
|
+ }).then((res) => {
|
|
|
+ let data = res.data;
|
|
|
uni.hideLoading();
|
|
|
- console.log('请求数据', data);
|
|
|
- // obj.phone = data.phone
|
|
|
- console.log('data.phone333',data.phone)
|
|
|
+ console.log('请求数据', data);
|
|
|
+ // obj.phone = data.phone
|
|
|
+ console.log('data.phone333', data.phone)
|
|
|
data = data.map(d => {
|
|
|
return {
|
|
|
...d,
|
|
|
iscall: true
|
|
|
}
|
|
|
- })
|
|
|
- obj.list = 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.marker = obj.marker.concat(arr)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
+ obj.list = 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.marker = obj.marker.concat(arr)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}).catch(err => {
|
|
|
- console.log(err);
|
|
|
- uni.hideLoading();
|
|
|
- // uni.showModal({
|
|
|
- // title: '失败',
|
|
|
- // content: JSON.stringify(err)
|
|
|
+ console.log(err);
|
|
|
+ uni.hideLoading();
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '失败',
|
|
|
+ // content: JSON.stringify(err)
|
|
|
// });
|
|
|
});
|
|
|
- },
|
|
|
- cancel(){
|
|
|
- this.$refs.popup.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;
|
|
|
- }
|
|
|
- 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.longitude,
|
|
|
- latitude: obj.latitude,
|
|
|
- to_phone:obj.to_phone
|
|
|
- }).then((data) => {
|
|
|
- console.log(99988,data)
|
|
|
- uni.showModal({
|
|
|
- title:'请耐心等待救援',
|
|
|
- success: res => {
|
|
|
- if (res.confirm) {
|
|
|
- window.location.reload(); //重新刷新页面
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- obj.$refs.popup.close();
|
|
|
- obj.iscall = false
|
|
|
- console.log(123,obj.iscall)
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // comfirm2:function (item,index) {
|
|
|
- // let obj = this
|
|
|
-
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.$refs.popup.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;
|
|
|
+ }
|
|
|
+ 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.longitude,
|
|
|
+ latitude: obj.latitude,
|
|
|
+ to_phone: obj.to_phone
|
|
|
+ }).then((data) => {
|
|
|
+ console.log(99988, data)
|
|
|
+ uni.showModal({
|
|
|
+ title: '请耐心等待救援',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ window.location.reload(); //重新刷新页面
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ obj.$refs.popup.close();
|
|
|
+ obj.iscall = false
|
|
|
+ console.log(123, obj.iscall)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // comfirm2:function (item,index) {
|
|
|
+ // let obj = this
|
|
|
+
|
|
|
// },
|
|
|
// 立即救援
|
|
|
rescue(item, index) {
|
|
|
- let obj = this;
|
|
|
- uni.showModal({
|
|
|
- content: '是否发起求救?',
|
|
|
- success: res => {
|
|
|
- if (res.confirm) {
|
|
|
- this.$refs.popup.open(item,index);
|
|
|
- obj.name = item.name;
|
|
|
- obj.uid = item.uid;
|
|
|
- obj.phone = item.phone;
|
|
|
- obj.iscall = false
|
|
|
- console.log('点击救援时item.phone:',obj.phone)
|
|
|
- }
|
|
|
- }
|
|
|
+ let obj = this;
|
|
|
+ uni.showModal({
|
|
|
+ content: '是否发起求救?',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$refs.popup.open(item, index);
|
|
|
+ obj.name = item.name;
|
|
|
+ obj.uid = item.uid;
|
|
|
+ obj.phone = item.phone;
|
|
|
+ obj.iscall = false
|
|
|
+ console.log('点击救援时item.phone:', obj.phone)
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
@@ -398,235 +342,249 @@
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
background-color: #fff;
|
|
|
- }
|
|
|
- .map{
|
|
|
- width: 100%;
|
|
|
- height: 600rpx;
|
|
|
}
|
|
|
-
|
|
|
- /* #ifdef H5 */
|
|
|
- .location {
|
|
|
- overflow-y: scroll; //溢出就滑动起来
|
|
|
- // z-index: 990;
|
|
|
- position: fixed;
|
|
|
- bottom: 0;
|
|
|
- height: 55%;
|
|
|
- width: 100%;
|
|
|
- background-color: #fff;
|
|
|
- padding: 24rpx;
|
|
|
- //搜索框
|
|
|
- .Search-box {
|
|
|
- // z-index: 999;
|
|
|
- height: 80rpx;
|
|
|
- // position: fixed;
|
|
|
- // top: 0;
|
|
|
- // left: 0;
|
|
|
- // width: 100%;
|
|
|
- // background: #FFFFFF;
|
|
|
- // padding-top: 10rpx;
|
|
|
- padding-right: 24rpx;
|
|
|
- padding-left: 24rpx;
|
|
|
-
|
|
|
- .Search-box-sort {
|
|
|
- float: left;
|
|
|
- margin-left: 32rpx;
|
|
|
- margin-right: 19rpx;
|
|
|
-
|
|
|
- .sort-text {
|
|
|
- width: 57rpx;
|
|
|
- height: 29rpx;
|
|
|
- font-size: 30rpx;
|
|
|
- font-weight: 500;
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- line-height: 58rpx;
|
|
|
- margin-right: 19rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .sort-img {
|
|
|
- width: 21rpx;
|
|
|
- height: 11rpx;
|
|
|
- margin-bottom: 4rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .Search-box-size {
|
|
|
- // width:70%;
|
|
|
- height: 58rpx;
|
|
|
- border-radius: 32rpx;
|
|
|
- background-color: #f1f1f1;
|
|
|
- padding-left: 36rpx;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .box-img {
|
|
|
- height: 32rpx;
|
|
|
- width: 32rpx;
|
|
|
- margin-right: 16rpx;
|
|
|
- }
|
|
|
-
|
|
|
- // .box-right{
|
|
|
- // height: 58rpx;
|
|
|
- // // width: 100%;
|
|
|
- // background-color: pink;
|
|
|
- // }
|
|
|
-
|
|
|
- .box-word {
|
|
|
- width: 100%;
|
|
|
- font-size: 26rpx;
|
|
|
- font-weight: 500;
|
|
|
- color: rgba(205, 203, 203, 1);
|
|
|
- line-height: 55rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .location-item {
|
|
|
- z-index: 1000;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- border-bottom: 1rpx solid #E7E8EA;
|
|
|
- padding: 15rpx 0;
|
|
|
- .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_row{
|
|
|
- // 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;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- /* #endif */
|
|
|
|
|
|
+ .map {
|
|
|
+ width: 100%;
|
|
|
+ height: 600rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* #ifdef H5 */
|
|
|
+ .location {
|
|
|
+ overflow-y: scroll; //溢出就滑动起来
|
|
|
+ // z-index: 990;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ height: 55%;
|
|
|
+ width: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 24rpx;
|
|
|
+
|
|
|
+ //搜索框
|
|
|
+ .Search-box {
|
|
|
+ // z-index: 999;
|
|
|
+ height: 80rpx;
|
|
|
+ // position: fixed;
|
|
|
+ // top: 0;
|
|
|
+ // left: 0;
|
|
|
+ // width: 100%;
|
|
|
+ // background: #FFFFFF;
|
|
|
+ // padding-top: 10rpx;
|
|
|
+ padding-right: 24rpx;
|
|
|
+ padding-left: 24rpx;
|
|
|
+
|
|
|
+ .Search-box-sort {
|
|
|
+ float: left;
|
|
|
+ margin-left: 32rpx;
|
|
|
+ margin-right: 19rpx;
|
|
|
+
|
|
|
+ .sort-text {
|
|
|
+ width: 57rpx;
|
|
|
+ height: 29rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ line-height: 58rpx;
|
|
|
+ margin-right: 19rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sort-img {
|
|
|
+ width: 21rpx;
|
|
|
+ height: 11rpx;
|
|
|
+ margin-bottom: 4rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .Search-box-size {
|
|
|
+ // width:70%;
|
|
|
+ height: 58rpx;
|
|
|
+ border-radius: 32rpx;
|
|
|
+ background-color: #f1f1f1;
|
|
|
+ padding-left: 36rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .box-img {
|
|
|
+ height: 32rpx;
|
|
|
+ width: 32rpx;
|
|
|
+ margin-right: 16rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ // .box-right{
|
|
|
+ // height: 58rpx;
|
|
|
+ // // width: 100%;
|
|
|
+ // background-color: pink;
|
|
|
+ // }
|
|
|
+
|
|
|
+ .box-word {
|
|
|
+ width: 100%;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(205, 203, 203, 1);
|
|
|
+ line-height: 55rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .location-item {
|
|
|
+ z-index: 1000;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1rpx solid #E7E8EA;
|
|
|
+ padding: 15rpx 0;
|
|
|
+
|
|
|
+ .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_row {
|
|
|
+ // 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /* #endif */
|
|
|
</style>
|