lhl 3 роки тому
батько
коміт
6927d9bc22

+ 9 - 0
api/index.js

@@ -124,6 +124,15 @@ export function training(data) {
 		method: 'get',
 		data
 	});
+}
+
+// 救护培训报名 
+export function myTrainingList(data) {
+	return request({
+		url: '/api/training/mylst',
+		method: 'get',
+		data
+	});
 }
 
 // 求助记录 getsee

+ 34 - 25
pages.json

@@ -377,18 +377,6 @@
 				"navigationBarTitleText": "报名成功"
 			}
 		},
-		{
-			"path": "pages/user/user",
-			"style": {
-				// #ifndef MP
-				"app-plus": {
-					"titleNView": false
-				},
-				// #endif
-				"navigationBarTitleText": "我的"
-			}
-		},
-		// appliSystem  tohelpActi toOrgan
 		{
 			"path": "pages/applic/tohelpActi",
 			"style": {
@@ -540,6 +528,28 @@
 					// #endif
 				"navigationBarTitleText": "捐款记录"
 			}
+		},
+		{
+			"path": "pages/user/jkjl",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+					// #endif
+				"navigationBarTitleText": "捐款记录"
+			}
+		},
+		{
+			"path": "pages/user/userSet",
+			"style": {
+				// #ifndef MP
+				"app-plus": {
+					"titleNView": false
+				},
+					// #endif
+				"navigationBarTitleText": "用户设置"
+			}
 		},
 		{
 			"path": "pages/category/search",
@@ -552,7 +562,6 @@
 				"navigationBarTitleText": "搜索"
 			}
 		},
-
 		{
 			"path": "pages/applic/applic",
 			"style": {
@@ -909,18 +918,18 @@
 			"style": {
 				"navigationBarTitleText": "爱心帮扶",
 				"navigationBarBackgroundColor": "#FF727E",
-				"navigationBarTextStyle":"white",
-				"app-plus": {
-					"titleNView": {
-						"buttons": [ {
-							"color": "#FFFFFF",
-							"fontSize": "16px",
-							"colorPressed": "#fc5c82",
-							"float": "right",
-							"text": "筛选 "
-						}]
-					}
-				}
+				"navigationBarTextStyle":"white"
+				// "app-plus": {
+				// 	"titleNView": {
+				// 		"buttons": [ {
+				// 			"color": "#FFFFFF",
+				// 			"fontSize": "16px",
+				// 			"colorPressed": "#fc5c82",
+				// 			"float": "right",
+				// 			"text": "筛选 "
+				// 		}]
+				// 	}
+				// }
 			}
 		},
 		{

+ 2 - 2
pages/applic/rescuerecords.vue

@@ -10,7 +10,7 @@
 								<view class="box-time">
 									求救时间:{{item.createtime | time}}
 								</view>
-								<view class="box-time">
+								<view class="box-time" v-if="item.address">
 									救援地址:{{item.address}}
 								</view>
 								<view class="box-time" v-if="item.status == 1">
@@ -38,7 +38,7 @@
 							<view class="red-font" v-if="item.status == -1">
 								已拒绝
 							</view>
-							<view class="sub-box3" @click="tocall(item.user_phone)">
+							<view class="sub-box3" v-if="item.status == 1">
 								<image src="../../static/icon/call.png" mode="" class="call"></image>
 								拨打电话
 							</view>

+ 3 - 3
pages/form/certificatesList.vue

@@ -9,7 +9,7 @@
 					<!-- 空白页 -->
 					<empty v-if="loadingType === true && list.length === 0"></empty>
 					<!-- 订单列表 -->
-					<view class="order-item" @click="ToDetail(item)" v-for="(item, index) in list" :key="index" v-if="item.project_area == 0">
+					<view class="order-item" @click="ToDetail(item)" v-for="(item, index) in list" :key="index">
 						<view class="list-cell">
 							<image class="image" :src="item.img"></image>
 							<view class="list-tpl">{{ item.title }}</view>
@@ -24,7 +24,7 @@
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 import uniPopup from '@/components/uni-popup/uni-popup.vue';
-import { training } from '@/api/index.js';
+import { myTrainingList } from '@/api/index.js';
 export default {
 	components: {
 		uniLoadMore,
@@ -61,7 +61,7 @@ export default {
 				//当重新加载数据时更新状态为可继续添加数据
 				obj.loadingType = 'more';
 			}
-			training({})
+			myTrainingList({})
 				.then(data => {
 					if (type === 'refresh') {
 						obj.list = [];

+ 55 - 3
pages/index/index.vue

@@ -77,7 +77,7 @@
 										救护员{{ index +1 }}
 									</view>
 									<view class="distance">
-										{{ item.num }}km
+										{{item.range >= 1 ? (item.range + 'km') : (item.distance + 'm')}}
 									</view>
 									<view class="location-icon">
 										<image src="../../static/img/location-icon.png" mode=""></image>
@@ -185,6 +185,15 @@
 				</view>
 			</view>
 		</uni-popup>
+		<view class="ewm" @click="openewm()">
+			<image :src="wechat_qrcode" mode=""></image>
+		</view>
+		<uni-popup ref="popup" type="center">
+			<view class="popup-box">
+				<image :src="wechat_qrcode" mode="" class="gzhqr"></image>
+				<view>长按关注公众号</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
@@ -232,6 +241,7 @@
 		},
 		data() {
 			return {
+				shareShow: true,
 				user_id: '',
 				rescuers_id: '',
 				name: '',
@@ -745,8 +755,8 @@
 					sos({
 						mobile: obj.to_phone,
 						address: obj.user_address,
-						latitude: obj.latitude,
-						longitude: obj.longitude,
+						latitude: obj.latitude4,
+						longitude: obj.longitude4,
 						rescuers_id: obj.rescuers_id,
 						rescuers_user_id: obj.user_id
 					}).then(res => {
@@ -1353,4 +1363,46 @@
 			}
 		}
 	}
+	.ewm {
+		width: 75rpx;
+		height: 75rpx;
+		position: absolute;
+		right: 10rpx;
+		bottom: 200rpx;
+		background-color: #fff;
+		border-radius: 50%;
+	
+		box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: 0.6);
+	
+		image {
+			width: 50rpx;
+			height: 50rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			bottom: 0;
+			right: 0;
+			margin: auto;
+		}
+	
+		.ewm-tit {
+			position: absolute;
+			bottom: 10rpx;
+			font-size: 10rpx;
+		}
+	
+		.closeEwm {
+			width: 40rpx;
+			height: 40rpx;
+			position: absolute;
+			top: -40rpx;
+			right: -20rpx;
+	
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	
+	}
 </style>

+ 9 - 1
pages/train/index.vue

@@ -129,7 +129,15 @@ export default {
 		//跳转到详情
 		ToDetail(e) {
 			let type = e.type;
-			let id = e.id;
+			let id = e.id;
+			// console.log(e.)
+			if(e.is_create) {
+				uni.showModal({
+					title: '提示',
+					content: '您已报名,无需再次报名'
+				})
+				return
+			}
 			uni.navigateTo({
 				url: '/pages/train/sign?id=' + id
 			});

+ 14 - 20
pages/user/user.vue

@@ -23,7 +23,7 @@
 			</view>
 			<view class="nav-item flex" @click="torreco">
 				<view class="item-left flex">
-					<image src="../../static/icon/i7.png" mode="" class="img2"></image>
+					<image src="../../static/icon/u-help.png" mode="" class="img2"></image>
 					<view class="title">救援记录</view>
 				</view>
 				<view class="item-right">
@@ -32,7 +32,7 @@
 			</view>
 			<view class="nav-item flex" @click="navTo('/pages/user/myaid')">
 				<view class="item-left flex">
-					<image src="../../static/icon/i6.png" mode="" class="img1"></image>
+					<image src="../../static/icon/u-jz.png" mode="" class="img1"></image>
 					<view class="title">捐赠记录</view>
 				</view>
 				<view class="item-right">
@@ -41,22 +41,13 @@
 			</view>
 			<view class="nav-item flex" @click="tojkjl">
 				<view class="item-left flex">
-					<image src="../../static/icon/i6.png" mode="" class="img1"></image>
+					<image src="../../static/icon/u-jk.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">
-					<image src="../../static/icon/i8.png" mode="" class="img3"></image>
-					<view class="title">常用地址</view>
-				</view>
-				<view class="item-right">
-					>
-				</view>
-			</view>
 			<view class="nav-item flex" @click="tocertificates" >
 				<view class="item-left flex">
 					<image src="../../static/icon/i9.png" mode="" class="img4"></image>
@@ -68,7 +59,7 @@
 			</view>
 			<view class="nav-item flex" @click="navTo('/pages/applyHelp/cation')" >
 				<view class="item-left flex">
-					<image src="../../static/icon/i9.png" mode="" class="img4"></image>
+					<image src="../../static/icon/i7.png" mode="" class="img4"></image>
 					<view class="title">申请帮扶</view>
 				</view>
 				<view class="item-right">
@@ -77,16 +68,17 @@
 			</view>
 			<view class="nav-item flex" @click="navTo('/pages/user/myFu')" >
 				<view class="item-left flex">
-					<image src="../../static/icon/i9.png" mode="" class="img4"></image>
+					<image src="../../static/icon/u-m-f.png" mode="" class="img4"></image>
 					<view class="title">我的帮扶</view>
 				</view>
 				<view class="item-right">
 					>
 				</view>
 			</view>
-			<view class="nav-item flex" @click="loginout" >
+			<!-- @click="loginout"  -->
+			<view class="nav-item flex" @click="navTo('/pages/user/userSet')" >
 				<view class="item-left flex">
-					<image src="../../static/icon/i9.png" mode="" class="img4"></image>
+					<image src="../../static/icon/u-set.png" mode="" class="img4"></image>
 					<view class="title">退出</view>
 				</view>
 				<view class="item-right">
@@ -236,7 +228,8 @@
 					url: '/pages/form/certificatesList' 
 				})
 			},
-			navTo(url) {
+			navTo(url) {
+				console.log(url)
 				uni.navigateTo({
 					url: url
 				})
@@ -247,7 +240,8 @@
 
 <style lang="scss">
 	page {
-		height: 100%;
+		min-height: 100%;
+		height: auto;
 		background: #fff;
 	}
 	.content {
@@ -261,7 +255,7 @@
 			display: flex;
 			flex-direction: column;
 			align-items: center;
-			padding-left: 55rpx;
+			// padding-left: 55rpx;
 			align-items: center;
 			justify-content: center;
 			background-image: url(../../static/img/userbg.png);
@@ -269,7 +263,7 @@
 			.avater {
 				width: 150rpx;
 				height: 150rpx;
-				margin-right: 28rpx;
+				// margin-right: 28rpx;
 
 				.avater-img {
 					width: 100%;

+ 239 - 0
pages/user/userSet.vue

@@ -0,0 +1,239 @@
+<template>
+	<view class="container">
+		<view class="row b-b flex jg">
+			<text class="tit">头像</text>
+			<!-- @click.stop="imgsub" -->
+			<image :src="userInfo.avatar" ></image>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">昵称</text>
+			<input class="input" v-model="userInfo.nickname" type="text" placeholder-class="placeholder" disabled/>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">ID</text>
+			<input class="input" v-model="userInfo.id" type="text" disabled="true" placeholder-class="placeholder" />
+		</view>
+		<!-- <view class="row b-b flex">
+			<text class="tit">用户账号</text>
+			<input class="input" v-model="userInfo.account || userInfo.phone" type="number" disabled="true"
+				placeholder-class="placeholder" />
+		</view> -->
+		<view class="submit-box ">
+			<!-- <view class="submit" @click="edit">确认修改</view> -->
+			<view class="submit submit1" @click="toLogout">退出登录</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import uniList from '@/components/uni-list/uni-list.vue';
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		logout
+	} from '@/api/set.js';
+
+	import {
+		uploads,
+		edit,
+		// upload
+	} from '@/api/user.js';
+	import { upload } from '@/api/ask.js'
+	export default {
+		components: {
+			uniList,
+			uniListItem
+		},
+		data() {
+			return {
+				// nickName:'李淡淡',
+				// id:'HFBNXISN',
+				// account:'13745262356',
+				userInfo: {},
+				pics: []
+			};
+		},
+		onLoad() {
+			this.userInfo = uni.getStorageSync('userInfo') || '';
+			console.log(this.userInfo)
+		},
+		methods: {
+			...mapMutations('user', ['logout']),
+			//退出登录
+			toLogout() {
+				let obj = this;
+				uni.showModal({
+					content: '确定要退出登录么',
+					success: e => {
+						if (e.confirm) {
+							logout({}).then(e => {
+									obj.logout();
+									uni.switchTab({
+										url: '/pages/index/index'
+									})
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						}
+					}
+				});
+			},
+			imgsub() {
+				let obj = this
+				// 		console.log('上传头像')
+				// this.$util.uploadImageOne('upload/image', function(res) {
+				// 	console.log('------',res);
+				// 	// this.pics.push(res.data.pathreplace(/http:\/\/mer.crmeb.net/,'http://zccy.liuniu946.com'));
+				// 	obj.userInfo.avatar = res.data.path.replace(/http:\/\/mer.crmeb.net/,'http://zccy.frp.liuniu946.com')
+				// 	// obj.$set(this, 'pics', this.pics);
+				// 	// obj.$set(this, 'extract_pic', this.pics[0])
+				// });
+				// uploads({
+				// 	filename: ''
+				// }).then(data => {
+				// 	console.log("data",data);
+				// 	this.userInfo.avatar = data[0].url;
+				// })
+				upload({
+					filename: ''
+				}).then(res => {
+					console.log(res, '上传图片')
+					console.log(res[0].url)
+					obj.userInfo.avatar = res[0].url
+					// console.log(obj.userInfo.avatar)
+				});
+			},
+			edit() {
+				const that = this;
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				edit({
+					avatar: this.userInfo.avatar,
+					nickname: this.userInfo.nickname
+				}).then(e => {
+					uni.hideLoading()
+					that.$api.msg('修改成功');
+					setTimeout(() => {
+						uni.switchTab({
+							url: '/pages/user/user'
+						});
+					}, 1000);
+				}).catch(e => {
+					console.log(e);
+					that.$api.msg('修改失败');
+				})
+			}
+		}
+	};
+</script>
+
+<style lang='scss'>
+	/* page{
+		background: $page-color-base;
+	}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	} */
+	page {
+		background-color: #f3f3f3;
+		min-height: 100%;
+
+		.container {
+			height: 100%;
+
+		}
+	}
+
+	.row {
+		background-color: #fff;
+		padding: 42rpx 25rpx;
+		font-size: 30rpx;
+		color: #333333;
+
+		image {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+		}
+
+		.input {
+			text-align: right;
+			color: #333333;
+		}
+	}
+
+	.submit-box {
+		padding-top: 157rpx;
+
+		.submit {
+			margin: 40rpx auto;
+			width: 560rpx;
+			background-color: #901b21;
+			color: #FFFFFF;
+			text-align: center;
+			padding: 26rpx 0rpx;
+			border-radius: 50rpx;
+		}
+
+		.submit1 {
+			background-color: #FFFFFF;
+			color:#fa7e67 ;
+			border: 1px solid #fa7e67;
+		}
+	}
+
+	.jg {
+		margin-bottom: 20rpx;
+	}
+
+	.out {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		margin: 0 auto 30rpx;
+		width: 560rpx;
+		height: 80rpx;
+		border: 1px solid #58BAB0;
+		background: #FFFFFF;
+		border-radius: 40px;
+		color: #58BAB0;
+	}
+	.b-b {
+		justify-content: space-between;
+	}
+</style>
+

BIN
static/icon/u-help.png


BIN
static/icon/u-jk.png


BIN
static/icon/u-jz.png


BIN
static/icon/u-m-f.png


BIN
static/icon/u-set.png


BIN
static/tabBar/dengji-action.png


BIN
static/tabBar/dengji.png


BIN
static/tabBar/home-action.png


BIN
static/tabBar/home.png


BIN
static/tabBar/tab-fu-current.png


BIN
static/tabBar/tab-fu.png


BIN
static/tabBar/user-action.png


BIN
static/tabBar/user.png