lhl 3 년 전
부모
커밋
ed0e5e4d63

+ 17 - 1
api/category.js

@@ -7,6 +7,14 @@ export function getMechanismList(data) {
 		method:'get',
 		data
 	})
+}
+// 获取aed列表
+export function getAed(data) {
+	return request({
+		url: '/api/institution/aed',
+		method: 'get',
+		data
+	})
 }
 
 //申请成为救援者
@@ -45,7 +53,7 @@ export function sos(data) {
 	})
 }
 
-//
+//逆解析地址
 export function geocoder(data) {
 	return request({
 		url:'/api/geocoder',
@@ -61,4 +69,12 @@ export function getRescueList(data) {
 		method:'get',
 		data
 	})
+}
+
+export function changeRescue(data) {
+	return request({
+		url:'/api/rescue/setstatus',
+		method:'post',
+		data
+	})
 }

+ 212 - 210
api/index.js

@@ -1,211 +1,213 @@
-import request from '@/utils/request'
-import {upFilse} from '@/utils/request'
-
-// 获取轮播图
-export function loadIndexs(data) {
-	return request({
-		url: '/api/index',
-		method: 'get',
-		data
-	});
+import request from '@/utils/request'
+import {
+	upFilse
+} from '@/utils/request'
+
+// 获取轮播图
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}
+
+// 获取科普文章列表
+export function getArticList(data, id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 获取博爱项目文章列表
+export function itemList(data) {
+	return request({
+		url: '/api/article/list/4',
+		method: 'get',
+		data
+	});
+}
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/upload/image',
+		method: 'post',
+		data
+	});
+}
+// 促销商品
+export function groom4(data) {
+	return request({
+		url: '/api/groom/list/4',
+		method: 'get',
+		data
+	});
+}
+
+
+// 造血干细胞捐献
+export function getList(data) {
+	return request({
+		url: '/api/sign_cell',
+		method: 'post',
+		data
+	});
+}
+
+// 救护者页面获取参与人数  
+export function getNumber(data) {
+	return request({
+		url: '/api/get_rescuer',
+		method: 'get',
+		data
+	});
+}
+
+// 志愿者报名
+export function add_volunteers(data) {
+	return request({
+		url: '/api/add_registration',
+		method: 'post',
+		data
+	});
+}
+
+// joinSec
+export function joinSec(data) {
+	return request({
+		url: '/api/add_volunteers',
+		method: 'post',
+		data
+	});
+}
+// joinSecc 器官捐赠
+export function joinSecc(data) {
+	return request({
+		url: '/api/add_donation',
+		method: 'post',
+		data
+	});
+}
+
+// 获取定位
+export function getdis(data) {
+	return request({
+		url: '/api/getdis',
+		method: 'get',
+		data
+	});
+}
+// 立即救援
+export function tocall(data) {
+	return request({
+		url: '/api/do_getdis',
+		method: 'get',
+		data
+	});
+}
+
+// 救护培训报名 
+export function training(data) {
+	return request({
+		url: '/api/training',
+		method: 'get',
+		data
+	});
+}
+
+// 求助记录 getsee
+export function getseek(data) {
+	return request({
+		url: '/api/seek',
+		method: 'get',
+		data
+	});
+}
+
+// getcomAddress 获取常用地址
+export function getcomAddress(data) {
+	return request({
+		url: '/api/get_commonly',
+		method: 'get',
+		data
+	});
+}
+
+// 救援记录 rescue
+export function getrescue(data) {
+	return request({
+		url: '/api/rescueee',
+		method: 'get',
+		data
+	});
+}
+
+export function change_rescue(data) {
+	return request({
+		url: '/api/change_rescue',
+		method: 'get',
+		data
+	});
+}
+
+// 获取ADE经纬度 getListAED getDistance
+export function getListAED(data) {
+	return request({
+		url: '/api/getAed',
+		method: 'get',
+		data
+	});
+}
+
+export function getDistance(data) {
+	return request({
+		url: '/api/aeddiss',
+		method: 'get',
+		data
+	});
+}
+
+// deleteList 删除救援地址
+export function deleteList(data) {
+	return request({
+		url: '/api/rescue/sos_del',
+		method: 'get',
+		data
+	});
+}
+//获取机构
+export function getListMechanism(data) {
+	return request({
+		url: '/api/mechanism',
+		method: 'get',
+		data
+	});
+}
+
+
+export function add_company(data) {
+	return request({
+		url: '/api/add_company',
+		method: 'post',
+		data
+	});
+}
+
+// 爱心帮扶
+export function one_help(data) {
+	return request({
+		url: '/api/one_help',
+		method: 'get',
+		data
+	});
+}
+
+export function getCompany(data) {
+	return request({
+		url: '/api/index/company',
+		method: 'get',
+		data
+	});
 }
-
-// 获取科普文章列表
-export function getArticList(data,id) {
-	return request({
-		url: '/api/article/list/' + id,
-		method: 'get',
-		data
-	});
-}
-
-// 获取博爱项目文章列表
-export function itemList(data) {
-	return request({
-		url: '/api/article/list/4',
-		method: 'get',
-		data
-	});
-}
-//上传图片
-export function upload(data) {
-	return upFilse({
-		url: '/api/upload/image',
-		method: 'post',
-		data
-	});
-}
-// 促销商品
-export function groom4(data) {
-	return request({
-		url: '/api/groom/list/4',
-		method: 'get',
-		data
-	});
-}
-
-
-// 造血干细胞捐献
-export function getList(data) {
-	return request({
-		url: '/api/sign_cell',
-		method: 'post',
-		data
-	});
-}
-
-// 救护者页面获取参与人数  
-export function getNumber(data) {
-	return request({
-		url: '/api/get_rescuer',
-		method: 'get',
-		data
-	});
-}
-
-// 志愿者报名
-export function add_volunteers(data) {
-	return request({
-		url: '/api/add_registration',
-		method: 'post',
-		data
-	});
-}
-
-// joinSec
-export function joinSec(data) {
-	return request({
-		url: '/api/add_volunteers',
-		method: 'post',
-		data
-	});
-}
-// joinSecc 器官捐赠
-export function joinSecc(data) {
-	return request({
-		url: '/api/add_donation',
-		method: 'post',
-		data
-	});
-}
-
-// 获取定位
-export function getdis (data) {
-	return request({
-		url: '/api/getdis',
-		method: 'get',
-		data
-	});
-}
-// 立即救援
-export function tocall (data) {
-	return request({
-		url: '/api/do_getdis',
-		method: 'get',
-		data
-	});
-}
-
-// 救护培训报名 
-export function training(data) {
-	return request({
-		url: '/api/training',
-		method: 'get',
-		data
-	});
-}
-
-// 求助记录 getsee
-export function getseek(data) {
-	return request({
-		url: '/api/seek',
-		method: 'get',
-		data
-	});
-}
-
-// getcomAddress 获取常用地址
-export function getcomAddress(data) {
- return request({
-  url: '/api/get_commonly',
-  method: 'get',
-  data
- });
-}
-
-// 救援记录 rescue
-export function getrescue(data) {
-	return request({
-		url: '/api/rescueee',
-		method: 'get',
-		data
-	});
-}
-
-export function change_rescue(data) {
-	return request({
-		url: '/api/change_rescue',
-		method: 'get',
-		data
-	});
-}
-
-// 获取ADE经纬度 getListAED getDistance
-export function getListAED(data) {
-	return request({
-		url: '/api/getAed',
-		method: 'get',
-		data
-	});
-}
-
-export function getDistance(data) {
-	return request({
-		url: '/api/aeddiss',
-		method: 'get',
-		data
-	});
-}
-
-// deleteList 删除救援地址
-export function deleteList(data) {
- return request({
-  url: '/api/del_resc',
-  method: 'get',
-  data
- });
-}
-//获取机构
-export function getListMechanism(data) {
-	return request({
-		url: '/api/mechanism',
-		method: 'get',
-		data
-	});
-}
-
-
-export function add_company(data) {
-	return request({
-		url: '/api/add_company',
-		method: 'post',
-		data
-	});
-}
-
-// 爱心帮扶
-export function one_help(data) {
-	return request({
-		url: '/api/one_help',
-		method: 'get',
-		data
-	});
-}
-
-export function getCompany(data) {
-	return request({
-		url: '/api/index/company',
-		method: 'get',
-		data
-	});
-}

+ 8 - 0
api/user.js

@@ -25,4 +25,12 @@ export function userinfoid(data) {
 		method: 'post',
 		data
 	});
+}
+
+export function getMyloveList(data) {
+	return request({
+		url: '/api/lave/mylst',
+		method: 'get',
+		data
+	})
 }

+ 1 - 1
components/uni-swipe-action-item/uni-swipe-action-item.vue

@@ -250,7 +250,7 @@
 			rightOptions: {
 				type: Array,
 				default () {
-					return []
+					return ['取消','删除']
 				}
 			}
 

+ 11 - 0
pages.json

@@ -557,6 +557,17 @@
 					// #endif
 				"navigationBarTitleText": "我的"
 			}
+		},
+		{
+			"path": "pages/user/jkjl",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+					// #endif
+				"navigationBarTitleText": "捐款记录"
+			}
 		},
 		{
 			"path": "pages/category/search",

+ 534 - 549
pages/applic/aed.vue

@@ -1,550 +1,535 @@
-<template>
-	<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="aedmarker"></map>
-		</view>
-		<scroll-view scroll-y="true" class="scroll-wrapper" :style="{'height': height}" @scrolltolower="loadData">
-			<espempty v-if="loaded && AEDList.length === 0" :tit="'智能AED列表为空'"></espempty>
-			<view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id">
-				<template>
-					<view class="list-left">
-						<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" v-if="item.space > 999">>999m</view>
-						<view class="tip" v-else>{{ item.space }}m</view>
-					</view>
-				</template>
-			</view>
-			<uni-load-more :status="loadtype"></uni-load-more>
-		</scroll-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>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import espempty from '@/components/espempty';
-	import uniPopup from '@/components/uni-popup/uni-popup.vue';
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import {
-		getdis,
-		tocall,
-		getListAED
-	} from '@/api/index.js';
-	import {
-		userinfo
-	} from '@/api/user.js';
-	import {
-		getcomAddress
-	} from '@/api/index.js';
-	export default {
-		components: {
-			uniPopup,
-			espempty,
-			uniLoadMore
-		},
-		//相关配置参数
-		data() {
-			return {
-				aedmarker: [],
-				loaded: false,
-				loadtype: 'more',
-				page: 1,
-				limit: 10,
-				AEDList: [],
-				height: '',
-				list: [],
-				latitude: '',
-				longitude: '',
-				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
-				},
-			}
-		},
-		onReady(res) {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.scroll-wrapper').boundingClientRect();
-					query.exec(function(res) {
-						console.log(res, 'ddddddddddddd');
-						_this.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		onLoad() {
-			let obj = this;
-			console.log('开始加载事件');
-			// obj.loadBaseData();
-			// obj.loadData();
-			try {
-				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('获取经纬度', 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);
-						}
-					});
-				})
-
-			}
-		},
-		computed: {
-			...mapState('user', ['hasLogin', 'userInfo'])
-		},
-		methods: {
-			...mapMutations('user', ['setUserInfo']),
-			// 地图渲染完毕事件
-			mapChange(e) {
-				console.log(e);
-			},
-			// 载入数据
-			async loadData() {
-				let obj = this;
-				if(obj.loadtype == 'loading' || obj.loadtype == 'noMore') {
-					return 
-				}
-				obj.loadtype = 'loading'
-				getListAED({
-					page: obj.page,
-					limit: obj.limit,
-				}).then(({data}) => {
-					console.log(data, 999);
-					for (let i = 0; i < data.length; i++) {
-						data[i].space = obj.space(obj.latitude, obj.longitude, data[i].latitude, data[i].longitude);
-					}
-					obj.AEDList = obj.AEDList.concat(data);
-					console.log(obj.AEDList, 'obj.AEDList+++++++');
-					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)
-					// obj.markerList = data;
-					obj.loaded = true
-					obj.page++;
-					if (obj.limit == data.length) {
-						obj.loadtype = 'more';
-						
-					} else {
-						obj.loadtype = 'noMore';
-					}
-				})
-			},
-			space(lat1, lng1, 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; // 单位米
-			},
-			openAddress(item) {
-				let obj = this;
-				obj.latitude2 = item.latitude;
-				obj.longitude2 = item.longitude;
-				obj.address = item.address;
-				this.$refs.popup.open();
-			},
-			// 调用高德
-			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=${longitude},${latitude}&name=${address}`;
-			},
-			// 调用腾讯
-			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.latitude;
-				let longitude6 = this.longitude;
-				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&region=${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 `
-			},
-			
-		}
-	}
-</script>
-
-<style lang="scss">
-	body,
-	page {
-		height: 100%;
-		width: 100%;
-		background-color: #fff;
-	}
-
-	.content {
-		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;
-				}
-			}
-		}
-	}
-
-	/* #endif */
-
-	.list-tpl {
-		background-color: #ffffff;
-		margin: 25rpx 0rpx;
-		padding: 25rpx 25rpx;
-		font-size: 28rpx;
-		border-radius: 15rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		border-bottom: 1px solid #f1f1f1;
-
-		.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 {
-					width: 400rpx;
-					margin-top: 20rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-				}
-			}
-		}
-
-		.image {
-			width: 10%;
-			text-align: center;
-
-			image {
-				width: 50rpx;
-				height: 50rpx;
-			}
-
-			.tip {
-				color: #7f7f7f;
-				font-size: 21rpx;
-			}
-		}
-	}
-	.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;
-			}
-		}
-	}
+<template>
+	<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>
+		<scroll-view scroll-y="true" class="scroll-wrapper" :style="{'height': height}" @scrolltolower="loadData">
+			<espempty v-if="loaded && AEDList.length === 0" :tit="'智能AED列表为空'"></espempty>
+			<view class="list-tpl flex" @click="openAddress(item)" v-for="(item, index) in AEDList" :key="item.id">
+				<template>
+					<view class="list-left">
+						<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" v-if="item.space > 999">>999m</view>
+						<view class="tip" v-else>{{ item.space }}m</view>
+					</view>
+				</template>
+			</view>
+			<uni-load-more :status="loadtype"></uni-load-more>
+		</scroll-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>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import espempty from '@/components/espempty';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import {
+		getdis,
+		tocall,
+		getListAED
+	} from '@/api/index.js';
+	import {
+		userinfo
+	} from '@/api/user.js';
+	import {
+		getcomAddress
+	} from '@/api/index.js';
+	import {
+		getAed
+	} from '@/api/category.js'
+	export default {
+		components: {
+			uniPopup,
+			espempty,
+			uniLoadMore
+		},
+		//相关配置参数
+		data() {
+			return {
+				aedmarker: [],
+				loaded: false,
+				loadtype: 'more',
+				page: 1,
+				limit: 10,
+				AEDList: [],
+				height: '',
+				list: [],
+				latitude: '',
+				// 本地坐标
+				longitude: '',
+				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
+				},
+			}
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.scroll-wrapper').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		onLoad() {
+			let obj = this;
+			this.getLocal()
+
+		},
+		computed: {
+			...mapState('user', ['hasLogin', 'userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo']),
+			// 获取本地坐标
+			getLocal() {
+				let obj = this;
+				console.log('ddddddddddddddddddddddddd')
+				uni.getLocation({
+					type: 'gcj02',
+					success(e) {
+						console.log(e)
+						obj.latitude = Math.abs(e.latitude)
+						obj.longitude = Math.abs(e.longitude)
+						console.log('本地坐标', obj.latitude, obj.longitude)
+						obj.loadData()
+						// 逆地址解析
+						// geocoder({
+						// 	latitude: obj.latitude,
+						// 	longitude: obj.longitude
+						// }).then(res => {
+						// 	console.log(res)
+						// 	obj.user_address = res.data.result.address
+						// 	console.log(obj.user_address, 'obj.user_address')
+						// })
+						let item = {
+							id: 0,
+							latitude: obj.latitude,
+							longitude: obj.longitude,
+							iconPath: '/static/img/img19.png',
+							width: '35',
+							height: '35',
+						}
+						obj.marker.push(item)
+						// obj.getRescuerList(obj.latitude, obj.longitude)
+					}
+				})
+			},
+			// 地图渲染完毕事件
+			mapChange(e) {
+				console.log(e);
+			},
+			// 载入数据
+			async loadData() {
+				let obj = this;
+				if (obj.loadtype == 'loading' || obj.loadtype == 'noMore') {
+					return
+				}
+				obj.loadtype = 'loading'
+				getAed({
+					latitude: obj.latitude,
+					longitude: obj.longitude,
+					page: obj.page,
+					limit: obj.limit,
+				}).then(({
+					data
+				}) => {
+					console.log(data,'aed++++++++++++++')
+					// console.log(data, 999);
+					// for (let i = 0; i < data.length; i++) {
+					// 	data[i].space = obj.space(obj.latitude, obj.longitude, data[i].latitude, data[i]
+					// 		.longitude);
+					// }
+					// obj.AEDList = obj.AEDList.concat(data);
+					// console.log(obj.AEDList, 'obj.AEDList+++++++');
+					// 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)
+					// obj.loaded = true
+					// obj.page++;
+					// if (obj.limit == data.length) {
+					// 	obj.loadtype = 'more';
+
+					// } else {
+					// 	obj.loadtype = 'noMore';
+					// }
+				})
+			},
+			space(lat1, lng1, 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; // 单位米
+			},
+			openAddress(item) {
+				let obj = this;
+				obj.latitude2 = item.latitude;
+				obj.longitude2 = item.longitude;
+				obj.address = item.address;
+				this.$refs.popup.open();
+			},
+			// 调用高德
+			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=${longitude},${latitude}&name=${address}`;
+			},
+			// 调用腾讯
+			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.latitude;
+				let longitude6 = this.longitude;
+				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&region=${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 `
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	body,
+	page {
+		height: 100%;
+		width: 100%;
+		background-color: #fff;
+	}
+
+	.content {
+		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;
+				}
+			}
+		}
+	}
+
+	/* #endif */
+
+	.list-tpl {
+		background-color: #ffffff;
+		margin: 25rpx 0rpx;
+		padding: 25rpx 25rpx;
+		font-size: 28rpx;
+		border-radius: 15rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		border-bottom: 1px solid #f1f1f1;
+
+		.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 {
+					width: 400rpx;
+					margin-top: 20rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+
+		.image {
+			width: 10%;
+			text-align: center;
+
+			image {
+				width: 50rpx;
+				height: 50rpx;
+			}
+
+			.tip {
+				color: #7f7f7f;
+				font-size: 21rpx;
+			}
+		}
+	}
+
+	.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;
+			}
+		}
+	}
 </style>

+ 3 - 2
pages/applic/contribution.vue

@@ -436,13 +436,14 @@
 					is_open: obj.is_public, //是否实名公开
 					is_ticket: obj.is_receipts, //是否开发票
 					pay_type:0,//支付方式0微信1支付宝
-					type: obj.way_id
+					type: obj.way_id,
+					// form: 
 				}).then(({
 					data
 				}) => {
 					console.log(345, data)
 					console.log(666, obj)
-					let res = data.result.jsConfig;
+					let res = data.jsConfig;
 					console.log(res)
 					// 仅作为示例,非真实参数信息。
 					obj.weichatObj.chooseWXPay({

+ 0 - 387
pages/applic/helprecords copy.vue

@@ -1,387 +0,0 @@
-<template>
-	<view class="container">
-		<uni-swipe-action>
-			<uni-swipe-action-item :right-options="options" @click="bindClick" @change="swipeChange($event, item.id)" v-for="(item,index) in list">
-			<view class="list">
-				<view class="list-left" >
-					<view class="list-top">
-						救援者姓名:{{item.to_name}}
-					</view>
-					<view class="list-phone">
-						手机号:{{item.to_phone}}
-					</view>
-					<view class="list-time">
-						救援时间:{{item.add_time}}
-					</view>
-					<view class="list-box">
-						<view class="list-type" v-if="item.status == 1">
-							已接受
-						</view>
-						<view class="list-type" v-if="item.status == 0">
-							未接受
-						</view>
-						<view class="list-type" v-if="item.status == 2">
-							已拒绝
-						</view>
-						<view class="box-item" @click="tocall(item.to_phone)">
-							<image src="../../static/icon/call.png" mode="" class="call"></image>
-							拨打电话
-						</view>
-					</view>
-				</view>
-			</view>
-		
-			</uni-swipe-action-item>
-		</uni-swipe-action>
-		<!-- <view class="list" v-for="(item,index) in list" :key='index'>
-		</view> -->
-		<uni-popup ref="popup1" type="center">
-			<view class="popup-box">
-				<view class="img">
-					<image src="../../static/img/map.jpg" mode=""></image>
-				</view>
-				<view class="mian">
-					<view class="delivery">
-						求救记录
-						<!-- {{ i18n.qrhwsdm }} -->
-					</view>
-					<view class="nocancel">
-						确认删除该记录吗?
-						<!-- {{ i18n.wfcx }} -->
-					</view>
-					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">
-							取消
-						</view>
-						<view class="comfirm" @click="comfirm(tmp)">
-							 确认
-						</view>
-					</view>
-				</view>
-			</view>
-		
-		</uni-popup>
-		<empty v-if="list.length === 0"></empty>
-		<uni-load-more :status="loadingType"></uni-load-more>
-	</view>
-</template>
-
-<script>
-	import {
-		deleteList,
-		getseek
-	} from '@/api/index.js';
-	import empty from '@/components/empty';
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import uniSwipeAction from '@/components/uni-swipe-action/uni-swipe-action.vue';
-	import uniSwipeActionItem from '@/components/uni-swipe-action-item/uni-swipe-action-item.vue';
-	export default {
-		components: {
-			empty,
-			uniLoadMore,
-			uniSwipeAction,
-			uniSwipeActionItem
-		},
-		data() {
-			return {
-				id:'',
-				options: [{
-					text: '取消',
-					style: {
-						backgroundColor: '#007aff'
-					}
-				}, {
-					text: '确认',
-					style: {
-						backgroundColor: '#C90F1B'
-					}
-				}],
-				page: 1,
-				limit: 10,
-				delBtnWidth: 60, //删除按钮宽度单位(rpx)
-				startX:'',
-				isDel:false,
-				list: [],
-				loadingType: 'more',
-			}
-		},
-		onLoad() {
-			this.loadData();
-		},
-		// 下拉加载
-		onReachBottom() {
-			this.loadData();
-		},
-		methods: {
-			bindClick(e) {
-				// console.log(333,e)
-				// console.log('e.index',e.index)
-				// console.log('this.tmp',this.tmp)
-				// console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
-				if ( e.content.text == '取消' ) {
-					console.log('点击了左侧取消按钮')
-				} else {
-					console.log('点击了右侧确认按钮')
-					// this.$refs.popup1.open(this.tmp);
-					this.open(this.id)
-				}
-			},
-			swipeChange(e, id) {
-			// 	// console.log('当前状态:' + open + ',下标:' + index)
-				// console.log('index',index)
-				this.id = id
-				console.log('id111111111',id)
-			// 	if ( e == 'right' ) {
-			// 		this.index = index
-			// 		console.log('当前index值:',this.index)
-			// 	}
-			// 	// console.log(222,e)
-			},
-			// 确认删除吗?
-			comfirm (id) {
-				console.log(9999888,id)
-				deleteList({
-					id: this.id
-				}).then(({ data }) => {
-					window.location.reload(); //重新刷新页面
-					this.loadData()
-					this.cancel()
-				})
-			},
-			// 取消
-			cancel(){
-				this.$refs.popup1.close();
-			},
-			// 打开弹窗
-			open(tmp) {
-				console.log('打开弹窗',tmp)
-				this.$refs.popup1.open(tmp)
-			},
-			tocall(num) {
-				console.log(num);
-				uni.makePhoneCall({
-					phoneNumber: num //仅为示例
-				});
-			},
-			// touchS: function(e) {
-			// 	// console.log('touchS')
-			// 	if (e.touches.length == 1) {
-			// 		//设置触摸起始点水平方向位置
-			// 		this.startX = e.touches[0].clientX
-			// 		console.log(this.startX)
-			// 		this.isDel = true
-			// 	}
-			// },
-			// // 删除
-			// deleteMember() {
-			// 	console.log('删除')
-			// 	uni.showModal({
-			// 		title:'点击删除'
-			// 	})
-			// },
-			// cancelDel() {
-			// 	console.log('取消删除')
-			// 	this.isDel = false
-			// },
-			async loadData() {
-				let obj = this;
-				if (obj.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				obj.loadingType = 'loading';
-				getseek({
-					page: obj.page,
-					limit: obj.limit
-				}).then(({
-					data
-				}) => {
-					obj.list = obj.list.concat(data);
-					obj.page++;
-					if (obj.limit == data.length) {
-						obj.loadingType = 'more';
-					} else {
-						obj.loadingType = 'noMore';
-					}
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.container {
-		line-height: 1;
-
-		.list {
-			width: 710rpx;
-			background: #FFFFFF;
-			box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
-			border-radius: 10rpx;
-			margin: 20rpx auto 0;
-			display: flex;
-			justify-content: space-between;
-			.list-left{
-				width: 100%;
-				padding: 24rpx 0 24rpx 24rpx;
-			}
-			.cancel{
-				background-color: #C9101B;
-				display: flex;
-				align-items: center;
-				padding: 0 30rpx;
-				color: #FFFFFF;
-			}
-
-			.list-top {
-				font-size: 28rpx;
-				font-weight: 500;
-				color: #333333;
-				line-height: 36px;
-			}
-
-			.list-phone {
-				font-size: 24rpx;
-				font-weight: 500;
-				color: #666666;
-				margin-top: 20rpx;
-			}
-
-			.list-time {
-				font-size: 24rpx;
-				font-weight: 500;
-				color: #666666;
-				margin-top: 20rpx;
-			}
-
-			.list-type {
-				font-size: 28rpx;
-				font-weight: 500;
-				color: #C9101B;
-				margin-top: 20rpx;
-			}
-
-			.list-box {
-				display: flex;
-				justify-content: space-between;
-				// justify-content: center;
-				padding: 0 40rpx;
-				margin-top: 20rpx;
-
-				.box-item {
-					width: 210rpx;
-					height: 65rpx;
-					background: #C9101B;
-					border-radius: 30rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #FFFFFF;
-
-					.call {
-						width: 28rpx;
-						height: 40rpx;
-						margin-right: 10rpx;
-					}
-
-				}
-
-				.box-item1 {
-					width: 210rpx;
-					height: 65rpx;
-					background: #FF4F4F;
-					border-radius: 30rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #FFFFFF;
-
-					.veo {
-						width: 40rpx;
-						height: 40rpx;
-						margin-right: 10rpx;
-					}
-				}
-			}
-
-		}
-		.popup-box {
-			width: 522rpx;
-			height: 605rpx;
-			background-color: #FFFFFF;
-			border-radius: 20rpx;
-		
-			.img {
-				border-radius: 20rpx 20rpx 0 0;
-				width: 522rpx;
-				height: 307rpx;
-		
-				image {
-					border-radius: 20rpx 20rpx 0 0;
-					width: 522rpx;
-					height: 307rpx;
-				}
-			}
-		
-			.mian {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				padding: 32rpx 32rpx;
-				background-color: #FFFFFF;
-				border-radius: 0 0 20rpx 20rpx;
-				text-align: center;
-		
-				.delivery {
-					font-size: 36rpx;
-					color: #333333;
-					// margin-top: 46rpx;
-				}
-		
-				.nocancel {
-					font-size: 30rpx;
-					color: #999999;
-					margin-top: 26rpx;
-				}
-		
-				.comfirm-box {
-					margin-top: 52rpx;
-					display: flex;
-					// margin-bottom: 32rpx;
-		
-					// justify-content: space-around;
-					.cancel {
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 197rpx;
-						height: 61rpx;
-						border: 1px solid #C90F1B;
-						border-radius: 31rpx;
-		
-						font-size: 24rpx;
-						color: #C90F1B;
-					}
-		
-					.comfirm {
-						margin-left: 32rpx;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 197rpx;
-						height: 61rpx;
-						background: #C90F1B;
-						border-radius: 31px;
-						font-size: 24rpx;
-						color: #FFFFFF;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 2 - 2
pages/applic/helprecords.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<uni-swipe-action>
-			<uni-swipe-action-item :right-options="options" @click="bindClick" @change="swipeChange($event, item.id)"
+			<uni-swipe-action-item :right-options="options" @click="bindClick" @change="swipeChange($event, item.sos_id)"
 				v-for="(item,index) in list">
 				<view class="list">
 					<view class="list-left">
@@ -30,7 +30,7 @@
 							<view class="list-type" v-if="item.status == -1">
 								拒绝
 							</view>
-							<view class="box-item" @click=" item.status == 1 ? tocall(item.to_phone): ''"
+							<view class="box-item" @click=" item.status == 1 ? tocall(item.rescue_phone): ''"
 								:class="{'action': (item.status == 1)}">
 								<image src="../../static/icon/call.png" mode="" class="call"></image>
 								拨打电话

+ 3 - 2
pages/applic/location.vue

@@ -44,7 +44,8 @@
 					</view>
 				</view>
 			</view>
-			<uni-load-more :status="loadingType"></uni-load-more>
+			<uni-load-more :status="loadingType"></uni-load-more>
+			<!-- <empty v-if="list.length === 0 && loaded"></empty> -->
 			<espempty v-if="list.length === 0 && loaded"></espempty>
 		</view>
 		<uni-popup ref="popup" type="center" @click="close">
@@ -254,7 +255,7 @@
 						latitude: obj.latitude,
 						longitude: obj.longitude,
 						rescuers_id: obj.rescuers_id,
-						user_id: obj.user_id
+						rescuers_user_id: obj.user_id
 					}).then(res => {
 						uni.showModal({
 							title: '请耐心等待救援',

+ 768 - 733
pages/applic/rescuerecords.vue

@@ -1,734 +1,769 @@
-<template>
-	<view class="container">
-		<uni-swipe-action>
-			<uni-swipe-action-item :right-options="options" @click="bindClick" @change="swipeChange($event, item.id)"
-				v-for="(item,index) in list">
-				<view :style="item.txtStyle" class="list">
-					<view class="box">
-						<view class="box-1">
-							<view class="box-2">
-								<view class="box-top">
-									求救者姓名:{{item.name}}
-								</view>
-								<view class="box-time">
-									求救时间:{{item.add_time}}
-								</view>
-							</view>
-							<view class="navImg" @click="toNav(item, index)">
-								<image src="../../static/img/img10.png" mode=""></image>
-								<view class="tip">导航</view>
-							</view>
-						</view>
-
-						<view class="box-sub-box" v-if="item.status == 0">
-							<view class="sub-box1" @click="agree(item,index)">
-								接受
-							</view>
-							<view class="sub-box2" @click="refuse(item,index)">
-								拒绝
-							</view>
-						</view>
-						<view class="box-sub-box" v-if="item.status === 1">
-							<view class="red-font" v-if="item.status == 1">
-								已接受
-							</view>
-							<view class="red-font" v-if="item.status == -1">
-								已拒绝
-							</view>
-							<view class="sub-box3" @click="tocall(item.phone)">
-								<image src="../../static/icon/call.png" mode="" class="call"></image>
-								拨打电话
-							</view>
-						</view>
-						<!-- <view class="remove" @click="delItem">删除</view> -->
-					</view>
-				</view>
-			</uni-swipe-action-item>
-		</uni-swipe-action>
-
-
-		<empty v-if="list.length === 0"></empty>
-		<uni-load-more :status="loadingType"></uni-load-more>
-		<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>
-			</view>
-		</uni-popup>
-
-		<uni-popup ref="popup1" type="center">
-			<view class="popup-box">
-				<view class="img">
-					<image src="../../static/img/map.jpg" mode=""></image>
-				</view>
-				<view class="mian">
-					<view class="delivery">
-						救援记录
-						<!-- {{ i18n.qrhwsdm }} -->
-					</view>
-					<view class="nocancel">
-						确认删除该记录吗?
-						<!-- {{ i18n.wfcx }} -->
-					</view>
-					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">
-							取消
-						</view>
-						<view class="comfirm" @click="comfirm(tmp)">
-							确认
-						</view>
-					</view>
-				</view>
-			</view>
-
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		deleteList,
-		getrescue,
-		change_rescue
-	} from '@/api/index.js';
-	import {
-		getRescueList
-	} from '@/api/category.js'
-
-	import empty from '@/components/empty';
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import uniPopup from '@/components/uni-popup/uni-popup.vue';
-	import uniSwipeAction from '@/components/uni-swipe-action/uni-swipe-action.vue';
-	import uniSwipeActionItem from '@/components/uni-swipe-action-item/uni-swipe-action-item.vue';
-	export default {
-		components: {
-			empty,
-			uniPopup,
-			uniLoadMore,
-			uniSwipeAction,
-			uniSwipeActionItem
-		},
-		data() {
-			return {
-				id: '',
-				tmp: '',
-				options: [{
-					text: '取消',
-					style: {
-						backgroundColor: '#007aff'
-					}
-				}, {
-					text: '确认',
-					style: {
-						backgroundColor: '#C90F1B'
-					}
-				}],
-				page: 1,
-				limit: 10,
-				list: [],
-				loadingType: 'more',
-				latitude2: '',
-				longitude2: '',
-				longitude4: '',
-				latitude4: '',
-				address: '',
-			}
-		},
-		onLoad() {
-			this.loadData();
-			// this.getRescueList()
-			let obj = this;
-			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.loadData();
-						},
-						fail(e) {
-							console.log('失败', e);
-							window.location.reload();
-						}
-					});
-				})
-				// #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);
-						window.location.reload();
-					}
-				});
-				// #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);
-							window.location.reload();
-						}
-					});
-				})
-				// #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);
-						window.location.reload();
-					}
-				});
-				// #endif
-			}
-
-		},
-
-		methods: {
-			getRescueList() {
-				getRescueList({
-					type: 1,
-					page: 1,
-					limit: 10
-				}).then(res => {
-					console.log(res)
-				})
-			},
-			bindClick(e) {
-				// console.log(333,e)
-				// console.log('e.index',e.index)
-				// console.log('this.tmp',this.tmp)
-				// console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
-				if (e.content.text == '取消') {
-					console.log('点击了左侧取消按钮')
-				} else {
-					console.log('点击了右侧确认按钮')
-					// this.$refs.popup1.open(this.tmp);
-					this.open(this.id)
-				}
-			},
-			swipeChange(e, id) {
-				// 	// console.log('当前状态:' + open + ',下标:' + index)
-				// console.log('index',index)
-				this.id = id
-				console.log('id111111111', id)
-				// 	if ( e == 'right' ) {
-				// 		this.index = index
-				// 		console.log('当前index值:',this.index)
-				// 	}
-				// 	// console.log(222,e)
-			},
-			// 确认删除吗?
-			comfirm(id) {
-				console.log(9999888, id)
-				deleteList({
-					id: this.id
-				}).then(({
-					data
-				}) => {
-					window.location.reload(); //重新刷新页面
-					this.loadData()
-					this.cancel()
-				})
-			},
-			// 取消
-			cancel() {
-				this.$refs.popup1.close();
-			},
-			// 打开弹窗
-			open(tmp) {
-				console.log('打开弹窗', tmp)
-				this.$refs.popup1.open(tmp)
-			},
-			// bindClick(){
-			// 	console.log(2222)
-			// },
-			async loadData() {
-				let obj = this;
-				if (obj.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				obj.loadingType = 'loading';
-				getRescueList({
-					page: obj.page,
-					limit: obj.limit,
-					type: 1
-				}).then(({data}) => {
-					obj.list = obj.list.concat(data);
-					obj.page++;
-					if (obj.limit == data.length) {
-						obj.loadingType = 'more';
-					} else {
-						obj.loadingType = 'noMore';
-					}
-				})
-				// getrescue({
-				// 	page: obj.page,
-				// 	limit: obj.limit
-				// }).then(({
-				// 	data
-				// }) => {
-				// 	obj.list = obj.list.concat(data);
-				// 	obj.page++;
-				// 	if (obj.limit == data.length) {
-				// 		obj.loadingType = 'more';
-				// 	} else {
-				// 		obj.loadingType = 'noMore';
-				// 	}
-				// })
-			},
-			// 点击导航
-			toNav(item, index) {
-				console.log(item, index)
-				let obj = this
-				obj.latitude2 = item.latitude
-				obj.longitude2 = item.longitude
-				obj.address = item.address
-				this.$refs.popup.open();
-			},
-			// 调用高德
-			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&region=${ 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 `
-			},
-			// 拨打电话
-			tocall(num) {
-				console.log(num);
-				uni.makePhoneCall({
-					phoneNumber: num //仅为示例
-				});
-			},
-			//同意
-			agree(item, index) {
-				let obj = this;
-				uni.showModal({
-					content: '是否要接受该求救?',
-					success: res => {
-						if (res.confirm) {
-							change_rescue({
-								id: item.id,
-								status: 1
-							}).then((data) => {
-								obj.list[index].status = 1;
-								console.log(obj.list[index].status);
-							})
-						}
-					}
-				});
-			},
-			//拒绝
-			refuse(item, index) {
-				let obj = this;
-				uni.showModal({
-					content: '是否要拒绝该求救?',
-					success: res => {
-						if (res.confirm) {
-							change_rescue({
-								id: item.id,
-								status: 2
-							}).then((data) => {
-								obj.list[index].status = 2;
-								console.log(item);
-							})
-						}
-					}
-				})
-			},
-			// @touchstart="touchS" @touchmove="touchM" :data-index="index" @touchend="touchE"
-			// touchS(e) {
-			// 	uni.showModal({
-			// 		title: '执行touchS方法',
-			// 		content: JSON.stringify(e)
-			// 	})
-			// 	if (e.touches.length == 1) {
-			// 		//设置触摸起始点水平方向位置
-			// 		this.startX = e.touches[0].clientX
-			// 		// console.log(this.startX)
-			// 	}
-			// },
-			// touchM(e) {
-			// 	console.log('执行touchE方法', e)
-			// 	uni.showModal({
-			// 		title: '执行touchM方法',
-			// 		content: JSON.stringify(e)
-			// 	})
-			// 	if (e.touches.length == 1) {
-			// 		//手指移动时水平方向位置
-			// 		var moveX = e.touches[0].clientX;
-			// 		//手指起始点位置与移动期间的差值
-			// 		var disX = this.startX - moveX;
-			// 		var delBtnWidth = this.delBtnWidth;
-			// 		var txtStyle = "";
-			// 		if (disX == 0 || disX < 0) { //如果移动距离小于等于0,说明向右滑动,文本层位置不变
-			// 			txtStyle = "left:0px";
-			// 		} else if (disX > 0) { //移动距离大于0,文本层left值等于手指移动距离
-			// 			txtStyle = "left:-" + disX + "px";
-			// 			if (disX >= delBtnWidth) {
-			// 				//控制手指移动距离最大值为删除按钮的宽度
-			// 				txtStyle = "left:-" + delBtnWidth + "px";
-			// 			}
-			// 		}
-			// 		//获取手指触摸的是哪一项
-			// 		var index = e.currentTarget.dataset.index;
-			// 		var list = this.list;
-			// 		console.log(999, e.currentTarget.dataset)
-			// 		// list[index].txtStyle = txtStyle;
-			// 		// console.log(list[index].txtStyle)
-			// 		//更新列表的状态
-			// 		this.list = list;
-			// 	}
-			// },
-			// touchE(e) {
-			// 	console.log('执行touchE方法', e)
-			// 	uni.showModal({
-			// 		title: '执行touchE方法',
-			// 		content: JSON.stringify(e)
-			// 	})
-			// 	if (e.changedTouches.length == 1) {
-			// 		//手指移动结束后水平位置
-			// 		var endX = e.changedTouches[0].clientX;
-			// 		//触摸开始与结束,手指移动的距离
-			// 		var disX = this.startX - endX;
-			// 		var delBtnWidth = this.delBtnWidth;
-			// 		//如果距离小于删除按钮的1/2,不显示删除按钮
-			// 		var txtStyle = disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "px" : "left:0px";
-			// 		//获取手指触摸的是哪一项
-			// 		var index = e.currentTarget.dataset.index;
-			// 		var list = this.list;
-			// 		// list[index].txtStyle = txtStyle;
-			// 		// console.log(list[index].txtStyle)
-			// 		//更新列表的状态{
-			// 		this.list = list
-			// 	}
-			// }
-
-		}
-	}
-</script>
-
-<style lang="scss">
-	.container {
-		line-height: 1;
-
-		.box {
-			width: 750rpx;
-			background: #FFFFFF;
-			box-shadow: 0px 5rpx 5rpx 0px rgba(34, 24, 20, 0.06);
-			border-radius: 10rpx;
-			margin: 20rpx auto 0;
-			padding: 30rpx;
-			position: relative;
-
-			.box-top {
-				font-size: 28rpx;
-				font-weight: 500;
-				color: #333333;
-			}
-
-			.box-time {
-				margin-top: 20rpx;
-				font-size: 24rpx;
-				font-weight: 500;
-				color: #666666;
-			}
-
-			.box-1 {
-				display: flex;
-				justify-content: space-between;
-			}
-
-			.navImg {
-				width: 50rpx;
-				height: 50rpx;
-
-				image {
-					width: 50rpx;
-					height: 50rpx;
-				}
-
-				.tip {
-					margin-top: 6rpx;
-					color: #7F7F7F;
-					font-size: 21rpx;
-					text-align: right;
-					// background-color: pink;
-				}
-			}
-
-			.box-sub-box {
-				margin-top: 44rpx;
-				display: flex;
-				justify-content: space-between;
-				padding: 0 80rpx;
-
-				.red-font {
-					width: 175rpx;
-					height: 59rpx;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #C90F1B;
-				}
-
-				.sub-box1 {
-					width: 175rpx;
-					height: 59rpx;
-					background: #C90F1B;
-					border-radius: 29rpx;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #FFFFFF;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-				}
-
-				.sub-box2 {
-					width: 175rpx;
-					height: 59rpx;
-					background: #F3F3F3;
-					border-radius: 29rpx;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #333333;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-				}
-
-				.sub-box3 {
-					width: 200rpx;
-					height: 59rpx;
-					background: #C90F1B;
-					border-radius: 29rpx;
-					font-size: 28rpx;
-					font-weight: 500;
-					color: #FFFFFF;
-					display: flex;
-					justify-content: center;
-					align-items: center;
-
-					.call {
-						width: 28rpx;
-						height: 40rpx;
-						margin-right: 10rpx;
-					}
-				}
-			}
-		}
-
-		.popup-box {
-			width: 522rpx;
-			height: 605rpx;
-			background-color: #FFFFFF;
-			border-radius: 20rpx;
-
-			.img {
-				border-radius: 20rpx 20rpx 0 0;
-				width: 522rpx;
-				height: 307rpx;
-
-				image {
-					border-radius: 20rpx 20rpx 0 0;
-					width: 522rpx;
-					height: 307rpx;
-				}
-			}
-
-			.mian {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				padding: 32rpx 32rpx;
-				background-color: #FFFFFF;
-				border-radius: 0 0 20rpx 20rpx;
-				text-align: center;
-
-				.delivery {
-					font-size: 36rpx;
-					color: #333333;
-					// margin-top: 46rpx;
-				}
-
-				.nocancel {
-					font-size: 30rpx;
-					color: #999999;
-					margin-top: 26rpx;
-				}
-
-				.comfirm-box {
-					margin-top: 52rpx;
-					display: flex;
-					// margin-bottom: 32rpx;
-
-					// justify-content: space-around;
-					.cancel {
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 197rpx;
-						height: 61rpx;
-						border: 1px solid #C90F1B;
-						border-radius: 31rpx;
-
-						font-size: 24rpx;
-						color: #C90F1B;
-					}
-
-					.comfirm {
-						margin-left: 32rpx;
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 197rpx;
-						height: 61rpx;
-						background: #C90F1B;
-						border-radius: 31px;
-						font-size: 24rpx;
-						color: #FFFFFF;
-					}
-				}
-			}
-		}
-
-		.popup_row {
-			width: 100%;
-			height: 500rpx;
-			background-color: #ffffff;
-			border-radius: 20rpx 20rpx 0 0;
-			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;
-				// }
-			}
-
-		}
-
-		.remove {
-			display: flex;
-			border-radius: 0 12rpx 12rpx 0;
-			align-items: center;
-			justify-content: center;
-			// margin-right: 22rpx;
-			position: absolute;
-			right: 0;
-			top: 0;
-			font-size: 30rpx;
-			width: 110rpx;
-			height: 100%;
-			color: #FFFFFF;
-			background-color: #C90F1B;
-			;
-		}
-	}
+<template>
+	<view class="container">
+		<uni-swipe-action>
+			<uni-swipe-action-item :right-options="options" @click="bindClick" @change="swipeChange($event, item.id)"
+				v-for="(item,index) in list">
+				<view class="list">
+					<view class="box">
+						<view class="box-1">
+							<view class="box-2">
+								<view class="box-time">
+									求救时间:{{item.createtime | time}}
+								</view>
+								<view class="box-time">
+									救援地址:{{item.address}}
+								</view>
+								<view class="box-time" v-if="item.status == 1">
+									联系方式:{{item.user_phone}}
+								</view>
+							</view>
+							<view class="navImg" @click="toNav(item, index)">
+								<image src="../../static/img/img10.png" mode=""></image>
+								<view class="tip">导航</view>
+							</view>
+						</view>
+
+						<view class="box-sub-box" v-if="item.status == 0">
+							<view class="sub-box1" @click="agree(item,index)">
+								接受
+							</view>
+							<view class="sub-box2" @click="refuse(item,index)">
+								拒绝
+							</view>
+						</view>
+						<view class="box-sub-box" >
+							<view class="red-font" v-if="item.status == 1">
+								已接受
+							</view>
+							<view class="red-font" v-if="item.status == -1">
+								已拒绝
+							</view>
+							<view class="sub-box3" @click="tocall(item.user_phone)">
+								<image src="../../static/icon/call.png" mode="" class="call"></image>
+								拨打电话
+							</view>
+						</view>
+						<!-- <view class="remove" @click="delItem">删除</view> -->
+					</view>
+				</view>
+			</uni-swipe-action-item>
+		</uni-swipe-action>
+
+
+		<empty v-if="list.length === 0"></empty>
+		<uni-load-more :status="loadingType"></uni-load-more>
+		<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>
+			</view>
+		</uni-popup>
+
+		<uni-popup ref="popup1" type="center">
+			<view class="popup-box">
+				<view class="img">
+					<image src="../../static/img/map.jpg" mode=""></image>
+				</view>
+				<view class="mian">
+					<view class="delivery">
+						救援记录
+						<!-- {{ i18n.qrhwsdm }} -->
+					</view>
+					<view class="nocancel">
+						确认删除该记录吗?
+						<!-- {{ i18n.wfcx }} -->
+					</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="cancel">
+							取消
+						</view>
+						<view class="comfirm" @click="comfirm(tmp)">
+							确认
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		deleteList,
+		getrescue,
+		change_rescue
+	} from '@/api/index.js';
+	import {
+		getRescueList,
+		changeRescue,
+		geocoder
+	} from '@/api/category.js'
+
+	import empty from '@/components/empty';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	import uniSwipeAction from '@/components/uni-swipe-action/uni-swipe-action.vue';
+	import uniSwipeActionItem from '@/components/uni-swipe-action-item/uni-swipe-action-item.vue';
+	export default {
+		components: {
+			empty,
+			uniPopup,
+			uniLoadMore,
+			uniSwipeAction,
+			uniSwipeActionItem
+		},
+		filters: {
+			time(val) {
+				let str = ''
+				if (val) {
+					var time = new Date(val * 1000);
+					var y = time.getFullYear();
+					var m = time.getMonth() + 1;
+					var d = time.getDate();
+					var h = time.getHours();
+					var mm = time.getMinutes();
+					var s = time.getSeconds();
+					str = y + '-' + m + '-' + d + ' ' + h + ":" + mm
+					console.log(str)
+				}
+				return str
+			}
+		},
+		data() {
+			return {
+				id: '',
+				tmp: '',
+				options: [{
+					text: '取消',
+					style: {
+						backgroundColor: '#007aff'
+					}
+				}, {
+					text: '确认',
+					style: {
+						backgroundColor: '#C90F1B'
+					}
+				}],
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more',
+				latitude2: '',
+				longitude2: '',
+				longitude4: '',
+				latitude4: '',
+				address: '',
+			}
+		},
+		onLoad() {
+			this.loadData();
+			// this.getRescueList()
+			let obj = this;
+			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.loadData();
+						},
+						fail(e) {
+							console.log('失败', e);
+							window.location.reload();
+						}
+					});
+				})
+				// #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);
+						window.location.reload();
+					}
+				});
+				// #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);
+							window.location.reload();
+						}
+					});
+				})
+				// #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);
+						window.location.reload();
+					}
+				});
+				// #endif
+			}
+
+		},
+
+		methods: {
+			geocoder(lat, lon) {
+				geocoder({
+					latitude: lat,
+					longitude: lon
+				}).then(res => {
+					console.log(res.data.result.address)
+					return res.data.result.address
+				})
+			},
+			getRescueList() {
+				getRescueList({
+					type: 1,
+					page: 1,
+					limit: 10
+				}).then(res => {
+					console.log(res)
+				})
+			},
+			bindClick(e) {
+				// console.log(333,e)
+				// console.log('e.index',e.index)
+				// console.log('this.tmp',this.tmp)
+				// console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
+				if (e.content.text == '取消') {
+					console.log('点击了左侧取消按钮')
+				} else {
+					console.log('点击了右侧确认按钮')
+					// this.$refs.popup1.open(this.tmp);
+					this.open(this.id)
+				}
+			},
+			swipeChange(e, id) {
+				// 	// console.log('当前状态:' + open + ',下标:' + index)
+				// console.log('index',index)
+				this.id = id
+				console.log('id111111111', id)
+				// 	if ( e == 'right' ) {
+				// 		this.index = index
+				// 		console.log('当前index值:',this.index)
+				// 	}
+				// 	// console.log(222,e)
+			},
+			// 确认删除吗?
+			comfirm(id) {
+				console.log(9999888, id)
+				deleteList({
+					id: this.id
+				}).then(({
+					data
+				}) => {
+					window.location.reload(); //重新刷新页面
+					this.loadData()
+					this.cancel()
+				})
+			},
+			// 取消
+			cancel() {
+				this.$refs.popup1.close();
+			},
+			// 打开弹窗
+			open(tmp) {
+				console.log('打开弹窗', tmp)
+				this.$refs.popup1.open(tmp)
+			},
+			// bindClick(){
+			// 	console.log(2222)
+			// },
+			async loadData() {
+				let obj = this;
+				if (obj.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				obj.loadingType = 'loading';
+				getRescueList({
+					page: obj.page,
+					limit: obj.limit,
+					type: 1
+				}).then(({
+					data
+				}) => {
+					obj.list = obj.list.concat(data);
+					obj.page++;
+					if (obj.limit == data.length) {
+						obj.loadingType = 'more';
+					} else {
+						obj.loadingType = 'noMore';
+					}
+				})
+				// getrescue({
+				// 	page: obj.page,
+				// 	limit: obj.limit
+				// }).then(({
+				// 	data
+				// }) => {
+				// 	obj.list = obj.list.concat(data);
+				// 	obj.page++;
+				// 	if (obj.limit == data.length) {
+				// 		obj.loadingType = 'more';
+				// 	} else {
+				// 		obj.loadingType = 'noMore';
+				// 	}
+				// })
+			},
+			// 点击导航
+			toNav(item, index) {
+				console.log(item, index)
+				let obj = this
+				obj.latitude2 = item.latitude
+				obj.longitude2 = item.longitude
+				obj.address = item.address
+				this.$refs.popup.open();
+			},
+			// 调用高德
+			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&region=${ 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 `
+			},
+			// 拨打电话
+			tocall(num) {
+				console.log(num);
+				uni.makePhoneCall({
+					phoneNumber: num //仅为示例
+				});
+			},
+			//同意
+			agree(item, index) {
+				let obj = this;
+				uni.showModal({
+					content: '是否要接受该求救?',
+					success: res => {
+						if (res.confirm) {
+							changeRescue({
+								status: 1,
+								// process_remark: ,
+								id: item.id,
+							}).then((data) => {
+								obj.list[index].status = 1;
+								console.log(obj.list[index].status);
+							})
+						}
+					}
+				});
+			},
+			//拒绝
+			refuse(item, index) {
+				let obj = this;
+				uni.showModal({
+					content: '是否要拒绝该求救?',
+					success: res => {
+						if (res.confirm) {
+							change_rescue({
+								id: item.id,
+								status: 2
+							}).then((data) => {
+								obj.list[index].status = 2;
+								console.log(item);
+							})
+						}
+					}
+				})
+			},
+			// @touchstart="touchS" @touchmove="touchM" :data-index="index" @touchend="touchE"
+			// touchS(e) {
+			// 	uni.showModal({
+			// 		title: '执行touchS方法',
+			// 		content: JSON.stringify(e)
+			// 	})
+			// 	if (e.touches.length == 1) {
+			// 		//设置触摸起始点水平方向位置
+			// 		this.startX = e.touches[0].clientX
+			// 		// console.log(this.startX)
+			// 	}
+			// },
+			// touchM(e) {
+			// 	console.log('执行touchE方法', e)
+			// 	uni.showModal({
+			// 		title: '执行touchM方法',
+			// 		content: JSON.stringify(e)
+			// 	})
+			// 	if (e.touches.length == 1) {
+			// 		//手指移动时水平方向位置
+			// 		var moveX = e.touches[0].clientX;
+			// 		//手指起始点位置与移动期间的差值
+			// 		var disX = this.startX - moveX;
+			// 		var delBtnWidth = this.delBtnWidth;
+			// 		var txtStyle = "";
+			// 		if (disX == 0 || disX < 0) { //如果移动距离小于等于0,说明向右滑动,文本层位置不变
+			// 			txtStyle = "left:0px";
+			// 		} else if (disX > 0) { //移动距离大于0,文本层left值等于手指移动距离
+			// 			txtStyle = "left:-" + disX + "px";
+			// 			if (disX >= delBtnWidth) {
+			// 				//控制手指移动距离最大值为删除按钮的宽度
+			// 				txtStyle = "left:-" + delBtnWidth + "px";
+			// 			}
+			// 		}
+			// 		//获取手指触摸的是哪一项
+			// 		var index = e.currentTarget.dataset.index;
+			// 		var list = this.list;
+			// 		console.log(999, e.currentTarget.dataset)
+			// 		// list[index].txtStyle = txtStyle;
+			// 		// console.log(list[index].txtStyle)
+			// 		//更新列表的状态
+			// 		this.list = list;
+			// 	}
+			// },
+			// touchE(e) {
+			// 	console.log('执行touchE方法', e)
+			// 	uni.showModal({
+			// 		title: '执行touchE方法',
+			// 		content: JSON.stringify(e)
+			// 	})
+			// 	if (e.changedTouches.length == 1) {
+			// 		//手指移动结束后水平位置
+			// 		var endX = e.changedTouches[0].clientX;
+			// 		//触摸开始与结束,手指移动的距离
+			// 		var disX = this.startX - endX;
+			// 		var delBtnWidth = this.delBtnWidth;
+			// 		//如果距离小于删除按钮的1/2,不显示删除按钮
+			// 		var txtStyle = disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "px" : "left:0px";
+			// 		//获取手指触摸的是哪一项
+			// 		var index = e.currentTarget.dataset.index;
+			// 		var list = this.list;
+			// 		// list[index].txtStyle = txtStyle;
+			// 		// console.log(list[index].txtStyle)
+			// 		//更新列表的状态{
+			// 		this.list = list
+			// 	}
+			// }
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.container {
+		line-height: 1;
+
+		.box {
+			width: 750rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 5rpx 5rpx 0px rgba(34, 24, 20, 0.06);
+			border-radius: 10rpx;
+			margin: 20rpx auto 0;
+			padding: 30rpx;
+			position: relative;
+
+			.box-top {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.box-time {
+				margin-top: 20rpx;
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #666666;
+			}
+
+			.box-1 {
+				display: flex;
+				justify-content: space-between;
+			}
+
+			.navImg {
+				width: 50rpx;
+				height: 50rpx;
+
+				image {
+					width: 50rpx;
+					height: 50rpx;
+				}
+
+				.tip {
+					margin-top: 6rpx;
+					color: #7F7F7F;
+					font-size: 21rpx;
+					text-align: right;
+					// background-color: pink;
+				}
+			}
+
+			.box-sub-box {
+				margin-top: 44rpx;
+				display: flex;
+				justify-content: space-between;
+				padding: 0 80rpx;
+
+				.red-font {
+					width: 175rpx;
+					height: 59rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #C90F1B;
+				}
+
+				.sub-box1 {
+					width: 175rpx;
+					height: 59rpx;
+					background: #C90F1B;
+					border-radius: 29rpx;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+
+				.sub-box2 {
+					width: 175rpx;
+					height: 59rpx;
+					background: #F3F3F3;
+					border-radius: 29rpx;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #333333;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+
+				.sub-box3 {
+					width: 200rpx;
+					height: 59rpx;
+					background: #C90F1B;
+					border-radius: 29rpx;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+
+					.call {
+						width: 28rpx;
+						height: 40rpx;
+						margin-right: 10rpx;
+					}
+				}
+			}
+		}
+
+		.popup-box {
+			width: 522rpx;
+			height: 605rpx;
+			background-color: #FFFFFF;
+			border-radius: 20rpx;
+
+			.img {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 522rpx;
+				height: 307rpx;
+
+				image {
+					border-radius: 20rpx 20rpx 0 0;
+					width: 522rpx;
+					height: 307rpx;
+				}
+			}
+
+			.mian {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 32rpx 32rpx;
+				background-color: #FFFFFF;
+				border-radius: 0 0 20rpx 20rpx;
+				text-align: center;
+
+				.delivery {
+					font-size: 36rpx;
+					color: #333333;
+					// margin-top: 46rpx;
+				}
+
+				.nocancel {
+					font-size: 30rpx;
+					color: #999999;
+					margin-top: 26rpx;
+				}
+
+				.comfirm-box {
+					margin-top: 52rpx;
+					display: flex;
+					// margin-bottom: 32rpx;
+
+					// justify-content: space-around;
+					.cancel {
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						width: 197rpx;
+						height: 61rpx;
+						border: 1px solid #C90F1B;
+						border-radius: 31rpx;
+
+						font-size: 24rpx;
+						color: #C90F1B;
+					}
+
+					.comfirm {
+						margin-left: 32rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						width: 197rpx;
+						height: 61rpx;
+						background: #C90F1B;
+						border-radius: 31px;
+						font-size: 24rpx;
+						color: #FFFFFF;
+					}
+				}
+			}
+		}
+
+		.popup_row {
+			width: 100%;
+			height: 500rpx;
+			background-color: #ffffff;
+			border-radius: 20rpx 20rpx 0 0;
+			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;
+				// }
+			}
+
+		}
+
+		.remove {
+			display: flex;
+			border-radius: 0 12rpx 12rpx 0;
+			align-items: center;
+			justify-content: center;
+			// margin-right: 22rpx;
+			position: absolute;
+			right: 0;
+			top: 0;
+			font-size: 30rpx;
+			width: 110rpx;
+			height: 100%;
+			color: #FFFFFF;
+			background-color: #C90F1B;
+			;
+		}
+	}
 </style>

+ 82 - 0
pages/user/jkjl.vue

@@ -0,0 +1,82 @@
+<template>
+	<view class="content">
+		<view class="jg" style="height: 20rpx;">
+			
+		</view>
+		<view class="love-item" v-for="item in list" :key="item.id">
+			<view class="">
+				证书编号:{{item.SN}}
+			</view>
+			<view class="">
+				捐赠时间:{{item.paytime | time}}
+			</view>
+			<view class="">
+				捐赠意向:{{item.order_name}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getMyloveList } from '@/api/user.js'
+	export default {
+		data() {
+			return {
+				list: [],
+				page: 1,
+				limit: 10,
+				loaded: false,
+				loadingType: 'more'
+			}
+		},
+		filters: {
+			time(val) {
+				let str = ''
+				if (val) {
+					var time = new Date(val * 1000);
+					var y = time.getFullYear();
+					var m = time.getMonth() + 1;
+					var d = time.getDate();
+					var h = time.getHours();
+					var mm = time.getMinutes();
+					var s = time.getSeconds();
+					str = y + '-' + m + '-' + d + ' ' + h + ":" + mm
+					console.log(str)
+				}
+				return str
+			}
+		},
+		onLoad() {
+			this.getMyloveList()
+		},
+		onReachBottom() {
+			this.getMyloveList()
+		},
+		methods:{
+			getMyloveList() {
+				let obj = this
+				getMyloveList({
+					page: obj.page,
+					limit: obj.limit,
+					status: 1
+				}).then(({data}) => {
+					obj.list = obj.list.concat(data)
+					obj.page++
+					if(obj.limit == data.length) {
+						obj.loadingType = 'more'
+					}else {
+						obj.loadingType = 'noMore'
+					}
+					obj.$set(obj,'loaded',true)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.love-item {
+		padding: 10rpx;
+		margin-bottom: 20rpx;
+	}
+</style>

+ 15 - 1
pages/user/user.vue

@@ -29,6 +29,15 @@
 				<view class="item-right">
 					>
 				</view>
+			</view>
+			<view class="nav-item flex" @click="tojkjl">
+				<view class="item-left flex">
+					<image src="../../static/icon/i6.png" mode="" class="img1"></image>
+					<view class="title">捐款记录</view>
+				</view>
+				<view class="item-right">
+					>
+				</view>
 			</view>
 			<view class="nav-item flex" @click="commonaddress">
 				<view class="item-left flex">
@@ -147,7 +156,12 @@
 			...mapState('user', ['hasLogin', 'userInfo'])
 		},
 		methods: {
-			...mapMutations('user', ['setUserInfo']),
+			...mapMutations('user', ['setUserInfo']),
+			tojkjl() {
+				uni.navigateTo({
+					url: '/pages/user/jkjl'
+				})
+			},
 			loadBaseData() {
 				userinfo({}).then(({
 					data