Browse Source

Merge branch 'master' of http://git.liuniu946.com/xuhaolan/xhlred

hwq 3 years ago
parent
commit
fcf796f70e

+ 18 - 0
api/help.js

@@ -43,4 +43,22 @@ export function userApply(data) {
 		method: 'post',
 		data
 	})
+}
+
+// 获取我帮扶的列表
+export function userapplylst(data) {
+	return request({
+		url: '/api/help/userapplylst',
+		method: 'get',
+		data
+	})
+}
+
+// 申请帮扶
+export function apply(data) {
+	return request({
+		url: '/api/help/apply',
+		method: 'post',
+		data
+	})
 }

+ 1 - 1
api/money.js

@@ -158,7 +158,7 @@ export function getOrderInfo(data) {
 	})
 }
 
-//user_list
+// user_list
 // export function getUserList(data) {
 // 	return request({
 // 		url: '/api/project/user_list',

+ 8 - 41
pages.json

@@ -280,17 +280,6 @@
 				"navigationBarTitleText": "申请登记表"
 			}
 		},
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifndef MP
-				"app-plus": {
-					"titleNView": false
-				},
-				// #endif
-				"navigationBarTitleText": "救护员登记"
-			}
-		},
 		{
 			"path": "pages/cart/cart",
 			"style": {
@@ -524,12 +513,6 @@
 				"navigationBarTitleText": "救护员登记"
 			}
 		},
-		{
-			"path": "pages/joinSuc/joinSuc",
-			"style": {
-				"navigationBarTitleText": "报名成功"
-			}
-		},
 		{
 			"path": "pages/joinSuc/joinNow",
 			"style": {
@@ -705,11 +688,6 @@
 		},
 		{
 			"path": "pages/train/index",
-			// "style": {
-			// 	"navigationBarTitleText": "救护培训报名",
-			// 	"navigationBarBackgroundColor":"#E62129",
-			// 	"navigationBarTextStyle":"white"
-			// }
 			"style": {
 				"navigationBarTitleText": "培训报名",
 				"app-plus": {
@@ -721,11 +699,6 @@
 		},
 		{
 			"path": "pages/train/sign",
-			// "style": {
-			// 	"navigationBarTitleText": "救护培训报名",
-			// 	"navigationBarBackgroundColor":"#E62129",
-			// 	"navigationBarTextStyle":"white"
-			// }
 			"style": {
 				"navigationBarTitleText": "报名",
 				"app-plus": {
@@ -770,18 +743,6 @@
 			
 			}
 		},
-		// {
-		// 	"path": "pages/applic/detail",
-		// 	"style": {
-		// 		// #ifndef MP
-		// 		"app-plus": {
-		// 			"titleNView": false
-		// 		},
-		// 		// #endif
-		// 		"navigationBarTitleText": "资讯详情"
-			
-		// 	}
-		// },
 		{
 			"path": "pages/applic/other",
 			"style": {
@@ -967,8 +928,15 @@
 			"style": {
 				"navigationBarTitleText": "上传资料"
 			}
+		},
+		{
+			"path": "pages/user/myFu",
+			"style": {
+				"navigationBarTitleText": "我的帮扶",
+				"navigationBarBackgroundColor": "#FF727E",
+				"navigationBarTextStyle":"white"
+			}
 		}
-		
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
@@ -1013,7 +981,6 @@
 				"iconPath": "static/tabBar/user.png",
 				"selectedIconPath": "static/tabBar/user-action.png",
 				"text": "我的"
-				// "visible":false
 			}
 		]
 	}

+ 36 - 27
pages/applic/aed.vue

@@ -1,27 +1,9 @@
 <template>
 	<view class="content">
-		<view id="map" class="map">
-			<map @updated='mapChange' id="map_1" ref='map_1' style="width:750rpx;" :style="{'height': height}"
+		<view class="map">
+			<map @updated='mapChange' ref='map_1' style="width:750rpx;" :style="{'height': height}"
 				:latitude="latitude" :longitude="longitude" :markers="marker" @markertap="lookmore"></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.name }}</view>
-							<view class="addr">地址:{{ item.install_address }}</view>
-						</view>
-					</view>
-					<view class="image">
-						<image src="../../static/img/img10.png"></image>
-						<view class="tip">{{item.distance >= 1000 ? item.range + 'km': item.distance + 'm'}}</view>
-					</view>
-				</template>
-			</view>
-			<uni-load-more :status="loadingType"></uni-load-more>
-		</scroll-view> -->
 		<uni-popup ref="popup" type="bottom" @click="close">
 			<view class="popup_row">
 				<view class="rows">
@@ -198,10 +180,36 @@
 			getLocal() {
 				let obj = this;
 				console.log('ddddddddddddddddddddddddd')
-				let wxOjb = require('jweixin-module');
-				wxOjb.ready(() => {
-					console.log('加载完毕注册事件');
-					wxOjb.getLocation({
+				let weichatBrowser = uni.getStorageSync('weichatBrowser')
+				if(weichatBrowser) {
+					let wxOjb = require('jweixin-module');
+					wxOjb.ready(() => {
+						console.log('加载完毕注册事件');
+						wxOjb.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)
+								let item = {
+									id: 0,
+									latitude: obj.latitude,
+									longitude: obj.longitude,
+									iconPath: '/static/img/img19.png',
+									width: '35',
+									height: '35',
+								}
+								obj.marker.push(item)
+								obj.loadData()
+							},
+							fail(err) {
+								obj.getLocal()
+							}
+						})
+					})
+				}else {
+					uni.getLocation({
 						type: 'gcj02',
 						success(e) {
 							console.log(e)
@@ -223,7 +231,8 @@
 							obj.getLocal()
 						}
 					})
-				})
+				}
+				
 				
 			},
 			// 地图渲染完毕事件
@@ -593,7 +602,7 @@
 	.aedxq-wrap {
 		margin: auto;
 		width: 710rpx;
-		height: 462rpx;
+		min-height: 400rpx;
 		border-radius: 20rpx;
 		padding: 0 25rpx;
 		background-color: rgba($color: #000000, $alpha: 0.9);
@@ -603,7 +612,7 @@
 		.xq-top {
 			padding-top: 25rpx;
 			width: 660rpx;
-			height: 297rpx;
+			min-height: 210rpx;
 			border-bottom: 1px solid #fff;
 
 			.aed-name {

+ 31 - 4
pages/applic/aid.vue

@@ -193,9 +193,35 @@
 			getLocal() {
 				let obj = this;
 				console.log('ddddddddddddddddddddddddd')
-				let wxOjb = require('jweixin-module');
-				wxOjb.ready(()=> {
-					wxOjb.getLocation({
+				let weichatBrowser = uni.getStorageSync('weichatBrowser')
+				if(weichatBrowser) {
+					let wxOjb = require('jweixin-module');
+					wxOjb.ready(()=> {
+						wxOjb.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)
+								let item = {
+									id: 0,
+									latitude: obj.latitude,
+									longitude: obj.longitude,
+									iconPath: '/static/img/img19.png',
+									width: '35',
+									height: '35',
+								}
+								obj.marker.push(item)
+								obj.loadData()
+							},
+							fail(err) {
+								obj.getLocal()
+							}
+						})
+					})
+				}else {
+					uni.getLocation({
 						type: 'gcj02',
 						success(e) {
 							console.log(e)
@@ -217,7 +243,8 @@
 							obj.getLocal()
 						}
 					})
-				})
+				}
+				
 			},
 			// 地图渲染完毕事件
 			mapChange(e) {

+ 44 - 13
pages/applic/location.vue

@@ -1,7 +1,7 @@
 <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"
+		<view class="map">
+			<map @updated='mapChange' ref='map_1' style="width:750rpx; height: 600rpx" :latitude="latitude"
 				:longitude="longitude" :markers="marker"></map>
 		</view>
 		<view class="location">
@@ -157,10 +157,45 @@
 			// 获取本地坐标
 			getLocal() {
 				let obj = this;
-				let wxOjb = require('jweixin-module');
-				wxOjb.ready(() => {
-					console.log('加载完毕注册事件');
-					wxOjb.getLocation({
+				
+				let weichatBrowser = uni.getStorageSync('weichatBrowser')
+				if(weichatBrowser) {
+					let wxOjb = require('jweixin-module');
+					wxOjb.ready(() => {
+						console.log('加载完毕注册事件');
+						wxOjb.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)
+								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)
+							},
+							fail(err) {
+								obj.getLocal()
+							}
+						})
+					})
+				}else {
+					uni.getLocation({
 						type: 'gcj02',
 						success(e) {
 							console.log(e)
@@ -190,13 +225,9 @@
 							obj.getLocal()
 						}
 					})
-				})
-				uni.getLocation({
-					type: 'gcj02',
-					success(e) {
-						
-					}
-				})
+				}
+				
+				
 			},
 			// 获取救援者列表
 			getRescuerList(lat, lon) {

+ 7 - 7
pages/applyHelp/cation.vue

@@ -18,10 +18,10 @@
 					<view class="list">
 						<view class="list-item" v-for="ls in tabItem.orderList"> <!-- @click="ToIndex(ls)" -->
 							<view class="item-top">
-								<view class="tip-info flex-shrink-false" v-if="ls.cname">{{ls.cname}}</view>
-								<view class="name clamp flex-grow-true">{{ls.explain}}</view>
+								<view class="tip-info flex-shrink-false" v-if="ls.category">{{ls.category}}</view>
+								<view class="name clamp flex-grow-true">{{ls.title}}</view>
 							</view>
-							<view class="title">申请人:{{ls.name}}</view>
+							<view class="title">申请人:{{ls.full_name}}</view>
 							<view class="title">状态:{{ls.status == 0 ? '正在审核' : ls.status == 1 ? '审核通过' :'审核驳回' }} {{ ls.status == 2 ? ls.fail_msg : ''}}</view>
 						</view>
 					</view>
@@ -48,7 +48,7 @@ export default {
 			tabCurrentIndex: 0,
 			navList: [
 				{
-					state: 1,
+					state: 0,
 					text: '审核中',
 					loadingType: 'more',
 					orderList: [],
@@ -56,7 +56,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 2,
+					state: 1,
 					text: '已通过',
 					loadingType: 'more',
 					orderList: [],
@@ -64,7 +64,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 3,
+					state: -1,
 					text: '已拒绝',
 					loadingType: 'more',
 					orderList: [],
@@ -109,7 +109,7 @@ export default {
 			getMyHelpApplyList({
 				page: navItem.page,
 				limit:navItem.limit,
-				type: state,
+				status: state,
 			})
 				.then(({ data }) => {
 					navItem.orderList = navItem.orderList.concat(data);

+ 252 - 157
pages/applyHelp/index.vue

@@ -9,37 +9,23 @@
 				<input class="input" type="text" :disabled="disabled" v-model="full_name" placeholder="请填写您的姓名"
 					placeholder-class="placeholder" />
 			</view>
-			<!-- <view class="row b-b">
-				<text class="tit">年龄</text>
-				<input class="input" type="text" :disabled="disabled" v-model="age" placeholder="请填写您的年龄"
-					placeholder-class="placeholder" />
-			</view> -->
 			<view class="row b-b">
 				<text class="tit">性别</text>
-				<input class="input" type="text" :disabled="disabled" v-model="sex" placeholder="请填写您的性别"
-					placeholder-class="placeholder" />
+				<picker mode="selector" :range="sexList" @change="changeSex" style="flex-grow: 1;">
+					<input class="input" type="text" :disabled="disabled" v-model="sex" placeholder="请选择您的性别"
+						placeholder-class="placeholder" />
+				</picker>
 			</view>
 		</view>
 		<view class="content_box">
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">政治面貌</text>
 				<picker mode="selector" :range="checkedList" @change="changeChecked" style="flex-grow: 1;">
 					<input class="input" disabled v-model="checked" placeholder="请选择政治面貌"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status ==2 ">
-				<text class="tit">政治面貌</text>
-				<input class="input" :disabled="disabled" v-model="address" placeholder="省市区"
-					placeholder-class="placeholder" />
-			</view>
-			<view class="row" v-if="status == ''" @click="selectDatePicker(type)">
-				<text class="tit">出生日期:</text>
-				<input class="input" type="text" v-model="birthday" disabled="true" placeholder-class="placeholder" />
-				<datetime ref='date-time' :type='type' :datestring='dateString' @change='dateTimeChange'>
-				</datetime>
-			</view>
-			<view class="row" v-if="status == 2">
+			<view class="row" @click="selectDatePicker(type)">
 				<text class="tit">出生日期:</text>
 				<input class="input" type="text" v-model="birthday" disabled="true" placeholder-class="placeholder" />
 				<datetime ref='date-time' :type='type' :datestring='dateString' @change='dateTimeChange'>
@@ -47,18 +33,19 @@
 			</view>
 			<view class="row b-b">
 				<text class="tit">身份证号</text>
-				<input class="input" type="number" :disabled="disabled" v-model="id_card" placeholder="请填写身份证号"
+				<input class="input" type="text" :disabled="disabled" v-model="id_card" placeholder="请填写身份证号"
+					placeholder-class="placeholder" />
+			</view>
+			<view class="row b-b">
+				<text class="tit">申请标题</text>
+				<input class="input" type="text" v-model="title" placeholder="请填写申请标题"
 					placeholder-class="placeholder" />
 			</view>
-			<!-- <view class="row b-b" v-if="status =='' ">
-				<text class="tit">省市区</text>
-				<pickerAddress class="input" @change="onCityClick">{{address||'请选择省市区'}}</pickerAddress>
-			</view> -->
-			<!-- <view class="row b-b" v-if="status ==2 ">
-				<text class="tit">省市区</text>
-				<input class="input" :disabled="disabled" v-model="address" placeholder="省市区"
+			<view class="row b-b">
+				<text class="tit">帮扶金额</text>
+				<input class="input" type="number" :disabled="disabled" v-model="amount" placeholder="请填写帮扶金额"
 					placeholder-class="placeholder" />
-			</view> -->
+			</view>
 			<view class="row b-b">
 				<text class="tit">家庭住址</text>
 				<input class="input" v-model="address" :disabled="disabled" placeholder="请填写详细地址"
@@ -74,53 +61,48 @@
 				<input class="input" type="text" :disabled="disabled" v-model="work" placeholder="请填写工作单位"
 					placeholder-class="placeholder" />
 			</view>
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">单位性质</text>
 				<picker mode="selector" :range="checkedtList" @change="changeCheckedt" style="flex-grow: 1;">
 					<input class="input" disabled v-model="checked1" placeholder="请选择单位性质"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status ==2 ">
-				<text class="tit">单位性质</text>
-				<input class="input" :disabled="disabled" v-model="checked1" placeholder="请选择单位性质"
-					placeholder-class="placeholder" />
-			</view>
 		</view>
 		<view class="tit-tip">
 			信息选择
 		</view>
 		<view class="content_box">
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">身份</text>
 				<picker mode="selector" :range="identityList" @change="changeidentity" style="flex-grow: 1;">
 					<input class="input" disabled v-model="identity" placeholder="请选择身份"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">婚姻状态</text>
 				<picker mode="selector" :range="maritalList" @change="changeMarital" style="flex-grow: 1;">
 					<input class="input" disabled v-model="marital" placeholder="请选择婚姻状态"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">是否医保</text>
 				<picker mode="selector" :range="insuranceList" @change="changeInsurance" style="flex-grow: 1;">
 					<input class="input" disabled v-model="insurance" placeholder="请选择是否医保"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status =='' ">
+			<view class="row b-b">
 				<text class="tit">对象特征</text>
 				<picker mode="selector" :range="characteristicsList" @change="changeCharacteristics"
 					style="flex-grow: 1;">
-					<input class="input" disabled v-model="characteristics" placeholder="请选择是否医保"
+					<input class="input" disabled v-model="characteristics" placeholder="请选择对象特征"
 						placeholder-class="placeholder" />
 				</picker>
 			</view>
-			<view class="row b-b" v-if="status =='' " style="border-bottom: none;">
+			<view class="row b-b" style="border-bottom: none;">
 				<text class="tit" style="width: 400rpx;">制困原因(最多选三项)</text>
 			</view>
 			<view class="" style="padding-left: 50rpx;border-bottom: 1rpx solid #f8f6f6;" v-if="ready">
@@ -207,14 +189,10 @@
 		<view class="content_box">
 			<view class="examine_list">
 				<view class="examine_name">申请帮扶类型</view>
-				<view class="textarea-box" @tap="handleTap('picker')" v-if="status == ''">
-					<input class="input" @focus='outFocus' v-model="hpleType" type="text" placeholder="请选择您的申请帮扶类型"
-						placeholder-class="placeholder" />
-				</view>
-				<view class="textarea-box" v-if="status == 2">
-					<input class="input" @focus='outFocus' v-model="hpleType" type="text" placeholder="请选择您的申请帮扶类型"
-						placeholder-class="placeholder" />
-				</view>
+				<picker mode="selector" :range="hpleTypeList" @change="changehpleType" style="flex-grow: 1;">
+					<input class="input" v-model="hpleType" type="text" placeholder="请选择您的申请帮扶类型"
+						placeholder-class="placeholder" style="padding-left: 20rpx;" />
+				</picker>
 			</view>
 		</view>
 		<lb-picker ref="picker" mode="selector" :list="list" @change="handleChange" @touchmove.prevent
@@ -224,9 +202,8 @@
 			<view class="examine_list">
 				<view class="examine_name">帮扶说明</view>
 				<view class="textarea-box">
-					<textarea class="textarea" :disabled="disabled" v-model="explain" maxlength="-1"
-						placeholder-style="color:#999999" placeholder="如:关爱父母敬老爱幼等" @blur="bindTextAreaBlur"
-						auto-height />
+					<textarea class="textarea" v-model="info" maxlength="-1" placeholder-style="color:#999999"
+						placeholder="如:关爱父母敬老爱幼等" auto-height />
 				</view>
 			</view>
 		</view>
@@ -234,38 +211,49 @@
 			<view class="examine_list">
 				<view class="examine_name">帮扶情况描述</view>
 				<view class="textarea-box">
-					<textarea class="textarea" :disabled="disabled" v-model="content" maxlength="-1"
-						placeholder-style="color:#999999"
+					<textarea class="textarea" v-model="content" maxlength="-1" placeholder-style="color:#999999"
 						placeholder="注:1.为了更加详细了解您的困难情况,请您陈述材料完整详细不少于500字。2.请您附上相关证明材料,如医疗材料:入院病案首页、出入院记录、检查报告、医疗票据选取三种以上,其他证明材料。"
-						@blur="bindTextAreaBlur1" auto-height />
+						auto-height />
 				</view>
 			</view>
 		</view>
-		<view class="content_box mar-b">
+		<view class="content_box">
 			<view class="examine_list">
-				<view class="examine_name">上传凭证<text>(请您上传相关证明材料)</text></view>
+				<view class="examine_name">上传申请封面<text></text></view>
 				<view class="examine_img">
-					<view class="add-img-box flex_item" v-if="status == ''">
-						<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
-							<image class="add-img" @click.stop="imgInfo(index)" :src="item.fullurl" mode="aspectFill">
+					<view class="add-img-box flex_item">
+						<view class="add-img-item" v-if="userimage">
+							<image class="add-img" :src="baseURL + userimage" mode="aspectFill">
 							</image>
-							<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
+							<image class="add-img-del" @click.stop="delImgt()" src="/static/img/delete.png"></image>
 						</view>
-						<view v-if='imgCount > 0' class="add-img-item" @click.stop="scImg()">
+						<view v-if="userimage == ''" class="add-img-item" @click.stop="scImgt()">
 							<image class="add-img" src="/static/img/add.png"></image>
 						</view>
 					</view>
-					<view class="add-img-box flex_item" v-if="status == 2">
-						<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
-							<image class="add-img" @click.stop="imgInfo(index)" :src="item.fullurl" mode="aspectFill">
+				</view>
+			</view>
+		</view>
+		<view class="content_box mar-b">
+			<view class="examine_list">
+				<view class="examine_name">上传凭证<text>(请您上传相关证明材料)</text></view>
+				<view class="examine_img">
+					<view class="add-img-box flex_item">
+						<view class="add-img-item" v-for="(item, index) in imgList">
+							<image class="add-img" :src="item.fullurl" mode="aspectFill">
 							</image>
+							<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
+						</view>
+						<view class="add-img-item" @click.stop="scImg()">
+							<image class="add-img" src="/static/img/add.png"></image>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<!-- <view class="add-btn" v-if="status == ''" @click="confirm">下一步</view>
-		<view class="add-btn" v-if="status == 2" @click="Tosecond">下一步</view> -->
+		<view class="add-btn" @click="apply()">
+			申请帮扶
+		</view>
 	</view>
 </template>
 <script>
@@ -279,9 +267,17 @@
 		getList,
 		helpdetail
 	} from '@/api/applyHelp.js';
+	import {
+		getHelpIfy,
+		apply
+	} from '@/api/help.js'
 	import datetime from '@/components/DateTimePicker/DateTimePicker.vue'
 	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
 	import LbPicker from '@/components/lb-picker/index.vue';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
 	export default {
 		components: {
 			uniList,
@@ -290,6 +286,9 @@
 			datetime,
 			LbPicker
 		},
+		computed: {
+			...mapState(['baseURL'])
+		},
 		data() {
 			return {
 				ready: true,
@@ -302,12 +301,13 @@
 				address: '', //家庭住址
 				addr: '',
 				work: '', //工作单位
-				checkedList: ['团员', '预备党员', '党员', '群众'], //政治面貌列表
+				sexList: ['男', '女'],
+				checkedList: ['群众', '团员', '党员'], //政治面貌列表
 				politics: '', //政治面貌
 				checkedtList: ['国有企业', '私营企业', '外资企业', '事业单位', '个位经营', '无'], //单位性质列表
 				identityList: ['居民', '村民', '农民工', '在岗', '下岗', '离退休', '病退病休'], //身份列表
-				maritalList: ['已婚', '未婚', '离异', '丧偶'], //婚姻状况列表
-				insuranceList: ['是', '否'], //是否医保列表
+				maritalList: ['未婚', '已婚'], //婚姻状况列表
+				insuranceList: ['否', '是'], //是否医保列表
 				characteristicsList: ['低保对象', '重度残疾', '低保边缘对象', '孤儿、孤寡老人', '因灾、因病致穷家庭', '其它'], //对象特征列表
 				maleLikeList: [{ //致困原因(最多选三项)
 					cheched: false,
@@ -362,6 +362,8 @@
 				all: '',
 				cid: '',
 				hpleType: '',
+				hpleTypeList: [], //帮扶分类列表
+				hpleTypeFullList: [], //帮扶分类完整列表
 				explain: '',
 				content: '', //孝善情况
 				imgList: [],
@@ -369,6 +371,11 @@
 				imgCount: 9, //最多支持6张上传,可以修改
 				id: '',
 				list: [], //筹款类型
+				hpleTypeid: '', //帮扶分类id
+				title: '', //标题
+				info: '',
+				amount: '', //帮扶金额
+				userimage: '', //封面
 			};
 		},
 		onLoad(option) {
@@ -380,6 +387,7 @@
 				this.status = option.status;
 				this.disabled = true;
 			}
+			this.getHelpIfy()
 		},
 		onUnload() {
 			uni.navigateTo({
@@ -387,6 +395,20 @@
 			});
 		},
 		methods: {
+			changehpleType(e) {
+				this.hpleType = this.hpleTypeList[e.detail.value]
+				this.hpleTypeid = this.hpleTypeFullList[e.detail.value].id
+			},
+			getHelpIfy() {
+				getHelpIfy().then(({
+					data
+				}) => {
+					this.hpleTypeFullList = data
+					data.forEach(item => {
+						this.hpleTypeList.push(item.name)
+					})
+				})
+			},
 			// 选择政治面貌
 			changeChecked(e) {
 				console.log(e)
@@ -414,6 +436,9 @@
 			changeCharacteristics(e) {
 				this.characteristics = this.characteristicsList[e.detail.value]
 			},
+			changeSex(e) {
+				this.sex = this.sexList[e.detail.value]
+			},
 			// 制困原因选择限制
 			checkMaleLikes(e) {
 				let arr = e.detail.value
@@ -467,15 +492,28 @@
 			scImg() {
 				let obj = this;
 				upload({
-					file: ''
-				})
+						file: ''
+					})
 					.then(e => {
 						obj.imgList = [...obj.imgList, ...e];
-						console.log(obj.imgList,'imgList')
+						console.log(obj.imgList, 'imgList')
 						obj.imgCount = 6 - obj.imgList.length;
 					})
 					.catch(e => {});
 			},
+			// 上传封面
+			scImgt() {
+				let obj = this;
+				upload({
+						file: ''
+					})
+					.then(e => {
+						console.log(e)
+						obj.userimage = e[0].url
+						console.log(obj.userimage, e.url, 'obj.userimage')
+					})
+					.catch(e => {});
+			},
 			//点击图片显示大图
 			imgInfo(i) {
 				let tempList = [];
@@ -490,6 +528,28 @@
 					indicator: 'default'
 				});
 			},
+			// 删除图片
+			delImg(i) {
+				uni.showModal({
+					content: '确定删除这张吗',
+					success: res => {
+						if (res.confirm) {
+							this.imgList.splice(i, 1);
+							this.imgCount++;
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			delImgt() {
+				uni.showModal({
+					content: '确定删除这张吗',
+					success: res => {
+						if (res.confirm) {
+							this.userimage = '';
+						} else if (res.cancel) {}
+					}
+				});
+			},
 			// 显示日期选择器
 			selectDatePicker(type, index) {
 				this.type = type;
@@ -509,6 +569,119 @@
 				obj.address = province + city + district;
 				console.log(obj.address, '城市');
 			},
+			// 提交申请
+			apply() {
+				let obj = this
+				if (obj.hpleTypeid == '') {
+					return obj.$api.msg('请选择帮扶类型')
+				}
+				if (obj.full_name == '') {
+					return obj.$api.msg('请输入姓名')
+				}
+				if (obj.phone == '') {
+					return obj.$api.msg('请输入联系方式')
+				}
+				if (obj.id_card == '') {
+					return obj.$api.msg('请输入身份证')
+				}
+				if (obj.title == '') {
+					return obj.$api.msg('请输入申请标题')
+				}
+				if (obj.info == '') {
+					return obj.$api.msg('请输入申请简介')
+				}
+				if (obj.sex == '') {
+					return obj.$api.msg('请选择您的性别')
+				}
+				if (obj.politics == '') {
+					return obj.$api.msg('请选择您的政治面貌')
+				}
+
+				if (obj.birthday == '') {
+					return obj.$api.msg('请选择您的出生日期')
+				}
+				if (obj.address == '') {
+					return obj.$api.msg('请填写您的详细地址')
+				}
+				if (obj.company == '') {
+					return obj.$api.msg('请填写您的工作单位')
+				}
+				if (obj.unit_nature == '') {
+					return obj.$api.msg('请填写您的单位性质')
+				}
+				if (obj.yue == '') {
+					return obj.$api.msg('请填写您的月收入')
+				}
+				if (obj.nian == '') {
+					return obj.$api.msg('请填写您的家庭年收入')
+				}
+				if (obj.all == '') {
+					return obj.$api.msg('请填写您的家庭年人均收入')
+				}
+				if (obj.identity == '') {
+					return obj.$api.msg('请填写您的身份')
+				}
+				if (obj.marital == '') {
+					return obj.$api.msg('请选择您的婚姻状况')
+				}
+				if (obj.insurance == '') {
+					return obj.$api.msg('请选择您的医保情况')
+				}
+				if (obj.characteristics == '') {
+					return obj.$api.msg('请选择您的对象特征')
+				}
+				if (obj.maleLike == '') {
+					return obj.$api.msg('请选择您的制困原因')
+				}
+				let ok = 0
+				for (let i = 0; i < obj.datalist.length; i++) {
+					if (obj.datalist[i].full_name != '' && obj.datalist[i].relation != '' && obj.datalist[i].id_card != '' &&
+						obj.datalist[i].work_unit != '' && obj.datalist[i].healthy != '' && obj.datalist[i].monthly_income != '') {
+						ok = 1;
+					}else {
+						ok = 0
+					}
+				}
+				if(ok == 0) {
+					return obj.$api.msg('请请填写完整的家庭成员信息')
+				}
+				apply({
+					category_id: obj.hpleTypeid, //帮扶类型
+					full_name: obj.full_name,
+					contact: obj.phone,
+					id_card: obj.id_card,
+					title: obj.title,
+					info: obj.info,
+					sex: obj.sex == '男' ? '0' : '1',
+					politics: obj.checkedList.indexOf(obj.checked) + '',
+					birthday: obj.birthday,
+					address: obj.address,
+					company: obj.work,
+					unit_nature: obj.checked1,
+					monthly_income: obj.yue, //本人月收入
+					annual_household_income: obj.nian, //家庭年收入
+					annual_household_income_average: obj.all, //家庭年人均收入
+					identity: obj.identity, //身份
+					marriage: obj.maritalList.indexOf(obj.marital), //婚姻状况:0=未婚,1=已婚
+					medical_insurance: obj.insuranceList.indexOf(obj.insurance), //是否医保:0=否,1=是
+					object_features: obj.characteristics, //对象特征
+					reason: obj.maleLike, //	制困原因
+					family: obj.datalist //家庭成员
+				}).then(({
+					data
+				}) => {
+					console.log(data)
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(function(){
+						uni.navigateTo({
+							url:'/pages/applyHelp/cation'
+						})
+					}, 2000);
+				})
+			},
 			//申请详情
 			helpDetail() {
 				let obj = this;
@@ -566,86 +739,6 @@
 						console.log(err);
 					});
 			},
-			Tosecond() {
-				uni.navigateTo({
-					url: '/pages/applyHelp/second?id=' + this.id + '&status=2'
-				})
-			},
-			//提交
-			confirm() {
-
-				let obj = this;
-				if (obj.full_name == '') {
-					this.$api.msg('请填写您的姓名!');
-					return;
-				}
-				// if (obj.age == '') {
-				// 	this.$api.msg('请填写您的年龄!');
-				// 	return;
-				// }
-				if (obj.sex == '') {
-					this.$api.msg('请填写您的性别!');
-					return;
-				}
-				if (obj.checked == '') {
-					this.$api.msg('请填写您的政治面貌!');
-					return;
-				}
-				if (obj.birthday == '' || obj.birthday == '请选择出生日期') {
-					this.$api.msg('请选择出生日期!');
-					return;
-				}
-				if (obj.card == '') {
-					this.$api.msg('请填写您的身份证号!');
-					return;
-				}
-				if (obj.address == '') {
-					this.$api.msg('请选择省市区!');
-					return;
-				}
-				if (obj.addr == '') {
-					this.$api.msg('请填写您的详细地址!');
-					return;
-				}
-				if (obj.phone == '') {
-					this.$api.msg('请填写您的联系电话!');
-					return;
-				}
-				if (obj.work == '') {
-					this.$api.msg('请填写您的工作单位!');
-					return;
-				}
-				if (obj.checked1 == '') {
-					this.$api.msg('请填写您的单位性质!');
-					return;
-				}
-
-				let data = {
-					// category_id: , 
-					// full_name: ,
-					// contact: ,
-					// id_card: ,
-					// title: ,
-					// info: ,
-					// userimage: ,
-					// userimages: ,
-					// sex: , 
-					// politics: , 
-					// birthday: ,
-					// address: ,
-					// company: ,
-					// unit_nature: ,
-					// monthly_income: ,
-					// annual_household_income: ,
-					// annual_household_income_average: ,
-					// identity: ,
-					// marriage: , 
-					// medical_insurance: , 
-					// object_features: , 
-					// reason: , 
-					// family: ,
-				}
-			},
 			navTo(url) {
 				uni.navigateTo({
 					url
@@ -834,10 +927,12 @@
 	}
 
 	.add-btn {
-		position: fixed;
-		bottom: 0rpx;
-		left: 0rpx;
-		width: 100%;
+		// position: fixed;
+		// bottom: 0rpx;
+		// left: 0rpx;
+		width: 600rpx;
+		border-radius: 50rpx;
+		margin: auto;
 		height: 100rpx;
 		font-size: 28rpx;
 		color: #FFFFFF;

+ 21 - 42
pages/donate/donate.vue

@@ -2,9 +2,6 @@
 	<view class="donate-wrapper">
 		<view class="top-select flex" style=" position: relative; z-index: 99;">
 			<view class="">选择项目状态</view>
-			<!-- <picker @change="bindAreaChange" :range="areas" range-key="name">
-				<view class="area select" :class="{ action: area }">{{ area || '点击选择地区' }}</view>
-			</picker> -->
 			<picker @change="bindStatusChange" :range="statuss" range-key="name">
 				<view class="status select" :class="{ action: status }">{{ status }}</view>
 			</picker>
@@ -14,13 +11,13 @@
 			<empty v-if="list.length === 0  "></empty>
 			<template>
 				<view class="item flex" v-for="item in list"  @click="join(item.id)" :key="item.id">
-					<view class="item-left"><image :src="item.img" mode=""></image></view>
+					<view class="item-left"><image :src="item.image" mode=""></image></view>
 					<view class="item-right">
 						<view class="item-title clamp">{{ item.title }}</view>
 						<view class="item-content clamp2">{{ item.info }}</view>
 						<view class="item-status">
 							捐赠进度
-							<text>{{ item.project_progress*100 }}%</text>
+							<text>{{ item.progress }}%</text>
 						</view>
 						<view class="item-btn" :class="{ 'btn-active': item.status == 1 }">{{ item.status == 2 ? '已结束' : item.status == 0?'未开始':'我要捐赠'}}</view>
 					</view>
@@ -48,7 +45,7 @@ export default {
 			area: '',
 			select_area: null,
 			area_id: 0,
-			statuss: [{id: -2,name: '全部'},{id: 1,name: '进行中'}, {id: 2,name: '已结束'}],
+			statuss: [{id: -2,name: '全部'},{id: 2,name: '进行中'}, {id: 3,name: '已结束'}],
 			status: '全部',
 			select_status: -2,
 			list: [],
@@ -64,18 +61,14 @@ export default {
 		this.getHeight()
 	},
 	onShow() {
-		// console.log(this.list.length,'********************************************444')
-		// location.reload()
 
 	},
 	computed: {
 		
 	},
 	onLoad() {
-		console.log('****************************************')
 		this.loadDate();
-		// this.showList = this.list;
-		this.getAllArea();
+		// this.getAllArea();
 		
 	},
 	methods: {
@@ -106,20 +99,7 @@ export default {
 				this.select_status = this.statuss[e.target.value].id;
 			}
 			this.list = []
-			uni.showLoading({
-				title: '加载中...'
-			})
 			this.loadDate()
-			// if (this.status !== this.statuss[e.target.value]) {
-			// 	this.status = this.statuss[e.target.value];
-			// 	if(this.status == '全部') {
-			// 		this.showList = this.list
-			// 	}else if(this.status == '进行中'){
-			// 		this.showList = this.list.map( item => {
-			// 			return item
-			// 		})
-			// 	}
-			// }
 		},
 		join(id) {
 			console.log(id);
@@ -133,7 +113,7 @@ export default {
 				return
 			}
 			getProjectList({
-				project_area: this.select_area,
+				// project_area: this.select_area,
 				page: this.page,
 				status: this.select_status,
 				limit: this.limit
@@ -143,23 +123,22 @@ export default {
 				this.page++;
 				// console.log(this.page)
 				let list = [];
-				list = data.list.map(item => {
-					getProjectInfo({
-						id: item.id
-					}).then(res => {
-						// let data = JSON.parse(res.msg);
-						let data = res.data
-						console.log(res,'9999999999999999999999999999999999999999')
-						item.project_progress = data.project_progress;
-						item.info = item.info.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, '').replace(/<[^>]+>/g, '');
-						console.log(item);
-						this.list.push(item);
-						console.log(this.list, '/////////////////////////////////////');
-						return item;
-					});
-				});
-				// this.list.push(list)
-				uni.hideLoading()
+				this.list = this.list.concat(data.list)
+				// .map(item => {
+				// 	getProjectInfo({
+				// 		id: item.id
+				// 	}).then(res => {
+				// 		// let data = JSON.parse(res.msg);
+				// 		let data = res.data
+				// 		console.log(res,'9999999999999999999999999999999999999999')
+				// 		item.project_progress = data.project_progress;
+				// 		item.info = item.info.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, '').replace(/<[^>]+>/g, '');
+				// 		console.log(item);
+				// 		this.list.push(item);
+				// 		console.log(this.list, '/////////////////////////////////////');
+				// 		return item;
+				// 	});
+				// });
 				console.log(this.list.length, '5555555');
 				
 				if(this.limit == data.list.length) {

+ 10 - 9
pages/donate/donateDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="detail">
 		<view class="top">
-			<image :src="proInfo.img" mode=""></image>
+			<image :src="proInfo.image" mode=""></image>
 			<view class="title clamp">{{ proInfo.title }}</view>
 			<view class="tip">
 				<view class=""></view>
@@ -14,7 +14,7 @@
 				</view>
 				<view class="item">
 					<text>创立时间</text>
-					{{ proInfo.add_time | time }}
+					{{ proInfo.start_time | time }}
 				</view>
 				<view class="item">
 					<text>开始时间</text>
@@ -107,7 +107,7 @@
 						<view class="item-top">
 							<image src="../../static/img/002.png" mode=""></image>
 							<view class="item-name-time">
-								<view class="item-name">神农架林区捐赠</view>
+								<view class="item-name">孝感捐赠</view>
 								<view class="item-time">{{ item.time | time }}</view>
 							</view>
 						</view>
@@ -122,7 +122,7 @@
 						<view class="item-top">
 							<image src="../../static/img/002.png" mode=""></image>
 							<view class="item-name-time">
-								<view class="item-name">神农架林区捐赠</view>
+								<view class="item-name">孝感捐赠</view>
 								<view class="item-time">{{ item.time | time }}</view>
 							</view>
 						</view>
@@ -137,7 +137,7 @@
 						<view class="item-top">
 							<image src="../../static/img/002.png" mode=""></image>
 							<view class="item-name-time">
-								<view class="item-name">荆州捐赠</view>
+								<view class="item-name">孝感捐赠</view>
 								<view class="item-time">{{ item.time | time }}</view>
 							</view>
 						</view>
@@ -152,7 +152,7 @@
 		<view class="jg" style="height: 99rpx;"></view>
 		<view class="btn-wrapper flex">
 			<view class="btn1 btn" @click="navTo('/pages/donate/progress?id=' + proInfo.id)">实时进展</view>
-			<view class="btn2 btn" @click="proInfo.status === 1 ? want() : cant()">我要捐款</view>
+			<view class="btn2 btn" @click="proInfo.status == 1 ? want() : cant()">我要捐款</view>
 		</view>
 		<uni-popup ref="popup" type="center">
 			<view class="type-box">
@@ -233,10 +233,11 @@ export default {
 			let arr = typeList;
 			let len = arr.length;
 			for (let i = 0; i < len; i++) {
-				if (arr[i].id === val) {
-					return (str = arr[i].name);
+				if (arr[i].id == val) {
+					str = arr[i].name
 				}
-			}
+			}
+			return str
 		},
 		name(val, typeList) {
 			let str = '';

+ 936 - 797
pages/donate/idonate.vue

@@ -1,798 +1,937 @@
-<template>
-	<view class="idonate">
-		<view class="one" v-show="limit === 1">
-			<view class="item">
-				<view class="item-tit">捐赠个体<text>*</text></view>
-				<radio-group @change="typeChange" class="check-box">
-					<label  v-for="(item, index) in items" :key="item.value">
-						<radio :value="item.iid" :checked="index === type" color="#f3392c" style="transform:scale(0.7)" />
-						<text style="color: #000000;">{{ item.value }}</text>
-					</label>
-				</radio-group>
-			</view>
-			<template v-if="type === 1">
-				<view class="item">
-					<view class="item-tit">捐赠单位<text>*</text></view>
-					<input type="text" v-model="unit" placeholder="请填写捐赠单位"/>
-				</view>
-				<view class="item">
-					<view class="item-tit">单位联系人<text>*</text></view>
-					<input type="text" v-model="contacts" placeholder="请填写捐赠方联系人"/>
-				</view>
-				<view class="item">
-					<view class="item-tit">单位电话<text>*</text></view>
-					<input type="text" v-model="tel" placeholder="请填写单位联系方式"/>
-				</view>
-				<view class="item">
-					<view class="item-tit">企业信用代码</view>
-					<input type="text" v-model="qyxydm" placeholder="请填写单位的企业信用代码"/>
-				</view>
-			</template>
-			<template v-if="type === 0">
-				<view class="item">
-					<view class="item-tit">姓名<text>*</text></view>
-					<input type="text" v-model="name" placeholder="请填写您的姓名"/>
-				</view>
-				<view class="item">
-					<view class="item-tit">联系方式<text>*</text></view>
-					<input type="text" v-model="phone" placeholder="请填写您的联系方式"/>
-				</view>
-				<view class="item">
-					<view class="item-tit">身份证号</view>
-					<input type="text" v-model="identityNumber" placeholder="请填写您的身份证号"/>
-				</view>
-			</template>
-			<view class="item">
-				<view class="item-tit">是否匿名</view>
-				<radio-group @change="anonymousChange" class="check-box">
-					<label>
-						<radio value="1" :checked="IsAnonymous" color="#f3392c" style="transform:scale(0.7)" />
-						<text style="color: #000000;">是</text>
-					</label>
-					<label>
-						<radio value="0" :checked="!IsAnonymous" color="#f3392c" style="transform:scale(0.7)" />
-						<text style="color: #000000;">否</text>
-					</label>
-				</radio-group>
-			</view>
-			<view class="item">
-				<view class="item-tit">物流方式<text>*</text></view>
-				<picker @change="bindLogChange" :range="logs" range-key="name">
-					<view class="log " :class="{'select': log }">{{ log || '请选择物流方式' }}</view>
-				</picker>
-			</view>
-			<view class="item" v-if="jxdz_show">
-				<view class="item-tit">捐赠地址<text>*</text></view>
-				<picker @change="bindAreaChange" :range="areas" range-key="name">
-					<view class="log " :class="{'select': area }">{{ area || '请选择捐赠地址' }}</view>
-				</picker>
-			</view>
-			<view class="item no-border-b">
-				<view class="item-tit">开具发票<text>*</text></view>
-				<radio-group @change="openChange" class="check-box">
-					<label>
-						<radio value="1" :checked="Isopen" color="#f3392c" style="transform:scale(0.7)" />
-						<text style="color: #000000;">是</text>
-					</label>
-					<label>
-						<radio value="0" :checked="!Isopen" color="#f3392c" style="transform:scale(0.7)" />
-						<text style="color: #000000;">否</text>
-					</label>
-				</radio-group>
-			</view>
-			<view class="mask">
-				<textarea :value="mask" placeholder="如果有备注请填写"/>
-			</view>
-			<view class="bbtm"></view>
-			<view class="jzwz">
-				<view class="item-tit">捐赠物资<text>*</text></view>
-				<view class="choose-box">
-					<view class="choose-item" v-for="(item,index) in wzList" :key="index" @click="dianji(index)">
-						<picker @change="bindWzChange" :range="wzs" range-key="name">
-							<view class="wz select clamp" :class="{'action': item.project_donation_name }">{{ item.project_donation_name || '请选择物资分类' }}</view>
-						</picker>
-						<input type="number" v-model="item.project_donation_num" placeholder="填写数量"/>
-						<!-- <view class="dele"  v-if="index != 0">
-							<view class="lef"></view>
-							<view class="rig"></view>
-						</view> -->
-					</view>
-					<view class="flex act">
-						<view class="more" @click="addMore" v-show="wzs.length > wzList.length">
-							+添加更多
-						</view>
-						<view class=" del" @click="dele" v-show=" wzList.length > 1">
-							删除
-						</view>
-					</view>
-					
-				</view>
-			</view>
-		</view>
-		<view class="tow" v-show="limit === 2">
-			<view class="t-item">
-				<view class="t-tit">
-					实物照片(必填)<text>{{swimg | much}}/3</text>
-				</view>
-				<view class="img-list flex">
-					<template v-for="(item,index) in swimg">
-						<image src="../../static/images/upload.png" mode="" v-if="!item"  @click.stop="imgsub(swimg,index)" :key="index"></image>
-						<image :src="item" mode="" v-if="item"  @click.stop="imgsub(item)"  :key="index"></image>
-					</template>
-				</view>
-			</view>
-			<!-- <view class="t-item" v-if="type === 1">
-				<view class="t-tit">
-					营业执照(必填)<text>{{yyimg | much}}/3</text>
-				</view>
-				<view class="img-list flex">
-					<template v-for="(item,index) in yyimg">
-						<image src="../../static/images/upload.png" mode="" v-if="!item"  @click.stop="imgsub(yyimg,index)" :key="index"></image>
-						<image :src="item" mode="" v-if="item"  @click.stop="imgsub(yyimg,index)"  :key="index"></image>
-					</template>
-				</view>
-			</view> -->
-			<view class="t-item">
-				<view class="t-tit">
-					质量合格书(必填)<text>{{zlimg | much}}/3</text>
-				</view>
-				<view class="img-list flex">
-					<template v-for="(item,index) in zlimg">
-						<image src="../../static/images/upload.png" mode="" v-if="!item"  @click.stop="imgsub(zlimg,index)" :key="index"></image>
-						<image :src="item" mode="" v-if="item"  @click.stop="imgsub(zlimg,index)"  :key="index"></image>
-					</template>
-				</view>
-			</view>
-			<view class="t-item">
-				<view class="t-tit">
-					价值凭证<text>{{jzimg | much}}/3</text>
-				</view>
-				<view class="img-list flex">
-					<template v-for="(item,index) in jzimg">
-						<image src="../../static/images/upload.png" mode="" v-if="!item"  @click.stop="imgsub(jzimg,index)" :key="index"></image>
-						<image :src="item" mode="" v-if="item"  @click.stop="imgsub(jzimg,index)"  :key="index"></image>
-					</template>
-				</view>
-			</view>
-		</view>
-		<view class="jg">
-			
-		</view>
-		<view class="btn">
-			<view class="next" v-show="limit === 1" @click="nextLimit()">
-				下一页
-			</view>
-			<view class="prev" v-show="limit === 2" @click="prevLimit()">
-				上一步
-			</view>
-			<view class="sub" v-show="limit === 2" @click="sub">
-				提交
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import { upload } from '@/api/ask.js';
-	import { getProjectInfo, createProject, getLogistics, getDonationInfo, createUser,getAllArea } from '../../api/money.js';
-	export default {
-		data() {
-			return {
-				project_area: 226,
-				areas: [{
-					id: 0,
-					name: '市本级'
-				}],
-				area: '',
-				items: [
-					{
-						value: '个人',
-						iid: '0'
-					},
-					{
-						value: '企业(团体)',
-						iid: '1'
-					}
-				],
-				IsAnonymous: false,
-				limit: 1,
-				type: 0,//捐赠个体0位个人 1为团体(企业)
-				unit: '',//捐赠单位
-				contacts: '',//捐赠方联系人
-				tel: '',//单位电话
-				log: '',//物流方式
-				logistics: '',//物流编号
-				// Logistics: '',//物流方式id
-				logs: ['顺丰','邮政'],
-				Isopen: false,//是否开具发票
-				mask: '',//备注
-				qyxydm: '',//企业信用代码
-				name: '',// 捐赠人姓名
-				phone: '',//捐赠人联系方式
-				identityNumber: '',//身份证号
-				wzs: [],//物资分类列表
-				wzList: [
-					{
-						project_donation_id: null,
-						project_donation_num: null,
-						project_donation_name: null
-					}
-				],
-				swimg: [''],//实物照片
-				yyimg: [''],//营业执照
-				zlimg: [''],//质量合格证书
-				jzimg: [''],//价值凭证
-				true_wzList: [],//最终捐赠的物资列表
-				hadadd: [],//已添加分类
-				project_id: 0,//项目ID
-				jxdz_show: false,
-			}
-		},
-		filters:{
-			much(val) {
-				let num =  0
-				val.forEach(item => {
-					if(item) {
-						num += 1
-					}
-				})
-				return num
-			}
-		},
-		onLoad(ops) {
-			if(ops.type) {
-				this.type = ops.type*1
-				console.log(this.type,'++++++++')
-			}
-			if(ops.id) {
-				this.project_id = ops.id*1
-			}
-			if(ops.wzlist) {
-				this.wzs = JSON.parse(ops.wzlist)
-				
-			}else {
-				this.getDonationInfo()
-				this.getAllArea()
-				this.jxdz_show = true
-			}
-			
-			this.getLogistics()
-		},
-		mounted() {
-			// this.$set(this,'wzList',[this.wz1,this.wz2])
-		},
-		methods: {
-			//下一页
-			nextLimit() {
-				this.limit = 2
-			},
-			//下一页
-			prevLimit() {
-				this.limit = 1
-			},
-			//选择捐赠是个人或团体
-			typeChange(e) {
-				this.type = e.detail.value*1
-				console.log(this.type,'this.typ+++++++++++++++++++++')
-			},
-			//选择是否匿名
-			anonymousChange(e) {
-				if(e.detail.value !== '1') {
-					this.IsAnonymous = false
-				}else {
-					this.IsAnonymous = true
-				}
-			},
-			//选择物流方式
-			bindLogChange(e) {
-				this.log = this.logs[e.detail.value].name
-				this.logistics = this.logs[e.detail.value].id
-			},
-			//选择捐献物资分类
-			bindWzChange(e){
-				if(this.hadadd.indexOf(e.detail.value) === -1) {
-					this.hadadd.push(e.detail.value)
-					this.wzList[this.currentWzIndex].project_donation_name = this.wzs[e.detail.value].name
-					this.wzList[this.currentWzIndex].project_donation_id = this.wzs[e.detail.value].id
-				}else {
-					this.$api.msg('该分类已添加');
-					return 
-				}
-				
-				console.log(this.wzList)
-				// this.wz = this.logs[e.detail.value].name
-				
-			},
-			// 选择捐赠地址
-			bindAreaChange(e) {
-				this.project_area = this.areas[e.detail.value].id
-				this.area = this.areas[e.detail.value].name
-			},
-			openChange(e) {
-				if(e.detail.value !== '1') {
-					this.Isopen = false
-				}else {
-					this.Isopen = true
-				}
-			},
-			imgsub(item,index) {
-				console.log(index,item)
-				
-				upload({
-					filename: ''
-				}).then(data => {
-					console.log(data,'6666666666')
-					this.$set(item,index,data[0].url)
-					if(index < 2) {
-						this.$set(item,index+1,'')
-					}
-				});
-			},
-			
-			dianji(index) {
-				this.currentWzIndex = index
-			},
-			//添加更多
-			addMore() {
-				this.wzList.push({
-					project_donation_id: null,
-					project_donation_num: null,
-					project_donation_name: null
-				})
-			},
-			//提交
-			sub() {
-				// uni.navigateTo({
-				// 	url: '/pages/joinSuc/joinsuccess'
-				// })
-				
-				let obj = this;
-				
-				if(obj.type === 0) {
-					if (obj.name == '') {
-						obj.$api.msg('请输入您的姓名');
-						return;
-					}
-					const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
-					if (!reg.test(obj.phone)) {
-						obj.$api.msg('请填写正确的手机号码');
-						return;
-					}
-					
-				}else {
-					if(obj.unit =='') {
-						obj.$api.msg('请输入捐赠单位');
-						return;
-					}
-					if(obj.dwPeople =='') {
-						obj.$api.msg('请输入联系人');
-						return;
-					}
-					if(obj.tel == '') {
-						obj.$api.msg('请输入单位电话');
-						return;
-					}
-				}
-				if(obj.log == '') {
-					obj.$api.msg('请选择物流方式');
-					return;
-				}
-				if(obj.jxdz_show == true) {
-					if(obj.area == '') {
-						obj.$api.msg('请选择捐赠地址');
-						return;
-					}
-				}
-				
-				try{
-					obj.wzList.forEach( item => {
-						if(!item.project_donation_id){
-							 throw '请选择物资类别'
-						}
-						if(!item.project_donation_num || item.project_donation_num == 0) {
-							 throw '请填写捐赠数量'
-						}
-					})
-				}catch(e) {
-					obj.$api.msg(e);
-					return
-				}
-				
-				let matter =obj.swimg.toString().replace(/,$/,''),
-					qc = obj.zlimg.toString().replace(/,$/,''),
-					worth = obj.jzimg.toString().replace(/,$/,''),
-					item = obj.wzList
-					console.log(item,'物资参数')
-				if(matter== ''){
-					obj.$api.msg('请上传实物照片');
-					return
-				}
-					
-				if(qc == ''){
-					obj.$api.msg('请上传质量合格证书');
-					return
-				}
-				console.log(matter,'5555555555555555')
-				uni.showLoading({
-					title: '提交中...',
-					mask: true
-				})
-				createUser({
-					project_area: obj.project_area,
-					name: obj.type === 0? obj.name: obj.unit,
-					phone: obj.phone,
-					tel: obj.tel,
-					contacts: obj.contacts,
-					user_type: obj.type,
-					logistics: obj.logistics,
-					anonymous: obj.IsAnonymous? 1:0,
-					invoice: obj.Isopen? 1:0
-				}).then( res => {
-					console.log(JSON.parse(res.msg),'99999999999999999999999999')
-					let info = JSON.parse(res.msg)
-					console.log(info.name,'8888888888888')
-					
-					createProject({
-						project_area: obj.project_area,
-						name: obj.type === 0? obj.name: obj.unit,
-						project_id: obj.project_id,
-						project_user_id: +info.id,
-						matter,
-						qc,
-						worth,
-						logistics: obj.logistics,
-						item,
-						// mask
-					}).then( res => {
-						console.log(JSON.parse(res.msg),'77777777777777777777')
-						uni.hideLoading()
-						uni.navigateTo({
-							url: '/pages/joinSuc/joinsuccess'
-						})
-					}).catch( err => {
-						uni.hideLoading()
-						console.log(err)
-					})
-				}).catch(err => {
-					uni.hideLoading()
-					console.log(err)
-				})
-				
-			},
-			//获取物资分类列表
-			getDonationInfo() {
-				getDonationInfo().then(({data} )=>{
-					
-					this.wzs = data
-					console.log(this.wzs,'获取所有物资')
-				})
-			},
-			getLogistics() {
-				getLogistics().then( ({data}) => {
-					console.log('88888888888888888888',data)
-					this.logs = data
-				})
-			},
-			dele() {
-				this.$delete(this.wzList,this.wzList.length-1)
-			},
-			// 获取捐赠地址列表
-			getAllArea() {
-				getAllArea().then(({
-					data
-				}) => {
-					console.log(data, '6666666666');
-					this.areas = this.areas.concat(data);
-				});
-			},
-			
-			
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page {
-		height: 100%;
-		background-color: #fff;
-	}
-	.idonate {
-		padding: 0 30rpx;
-		margin-top: 20rpx;
-		background-color: #fff;
-	}
-	.btn {
-		
-		// height: 196rpx;
-		// width: 100%;
-		width: 690rpx;
-		text-align: center;
-		display: flex;
-		justify-content: center;
-		line-height: 75rpx;
-		padding-bottom: 54rpx;
-		// padding-top: 54rpx;
-		// position: fixed;
-		// bottom: 0;
-		background-color: #fff;
-		z-index: 9;
-		.next {
-			width: 478rpx;
-			height: 75rpx;
-			// margin: 0 auto;
-			background: #FA7E67;
-			border-radius: 35rpx;
-			color: #fff;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FFFFFF;
-		}
-		.prev {
-			width: 264rpx;
-			height: 75rpx;
-			border: 1px solid #FA7E67;
-			border-radius: 35rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FA7E67;
-			margin-right: 60rpx;
-			line-height: 70rpx;
-		}
-		.sub {
-			width: 264rpx;
-			height: 75rpx;
-			background: #FA7E67;
-			border-radius: 35rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FFFFFF;
-			line-height: 70rpx;
-		}
-	}
-	.item {
-		display: flex;
-		align-items: center;
-		height: 102rpx;
-		border-bottom: 1px #ECECEC solid;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #222222;
-		line-height: 102rpx;
-		.item-tit {
-			flex-shrink: 0;
-			display: inline-block;
-			width: 200rpx;
-		}
-		text {
-			color: #F3392C;
-		}
-		input {
-			display: inline-block;
-			width: 100%;
-		}
-		.log {
-			// display: inline-block;
-			width: 400rpx;
-			color: #999;
-		}
-		.select {
-			color: #000;
-		}
-		
-	}
-	.mask {
-		padding-left: 202rpx;
-		textarea {
-			width: 396rpx;
-			height: 166rpx;
-			border: 1rpx solid #ccc;
-			border-radius: 10rpx;
-			font-size: 24rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #000;
-			line-height: 32rpx;
-			padding: 24rpx 16rpx;
-		}
-	}
-	.check-box {
-		flex-grow: 0;
-		display: flex;
-		display: inline-block;
-	}
-	.no-border-b {
-		border-bottom: none;
-	}
-	.bbtm {
-		margin-top: 40rpx;
-		width: 689rpx;
-		height: 1rpx;
-		background: #ECECEC;
-	}
-	.t-item {
-		padding: 35rpx 0;
-		border-bottom: 1px #ECECEC solid;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #222222;
-		&:last-of-type {
-			border-bottom: none;
-		}
-		image {
-			display: block;
-			width: 160rpx;
-			height: 160rpx;
-			// background: red;
-			border-radius: 5rpx;
-			// margin: 0 auto;
-		}
-		.t-tit {
-			position: relative;
-			text {
-				display: inline-block;
-				width: 73rpx;
-				height: 31rpx;
-				background: #F0433C;
-				border-radius: 14rpx;
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FFFFFF;
-				line-height: 31rpx;
-				text-align: center;
-				position: absolute;
-				right: 0;
-				// left: 0;
-				top: 0;
-				bottom: 0;
-				margin: auto;
-			}
-			
-		}
-		.img-list {
-			margin-top: 20rpx;
-			justify-content: center;
-			image {
-				margin-right: 20rpx;
-			}
-		}
-	}
-	.jzwz {
-		display: flex;
-		.item-tit {
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #222222;
-			padding-top: 39rpx;
-			line-height: 1;
-			width: 200rpx;
-			text {
-				color: #F3392C;
-			}
-		}
-		.choose-box {
-			padding-top: 24rpx;
-			.choose-item {
-				display: flex;
-				margin-bottom: 15rpx;
-				position: relative;
-				.wz {
-					padding-left: 58rpx;
-					width: 297rpx;
-					height: 66rpx;
-					background: #F3F3F3;
-					border-radius: 5rpx;
-					font-size: 28rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #222222;
-					line-height: 66rpx;
-					&::after {
-						content: '';
-						width: 0;
-						height: 0;
-						border-left: 10rpx solid transparent;
-						border-right: 10rpx solid transparent;
-						border-top: 10rpx solid #808080;
-						position: absolute;
-						right: 10rpx;
-						bottom: 26rpx;
-					}
-				}
-				input {
-					width: 189rpx;
-					height: 66rpx;
-					background: #F3F3F3;
-					border-radius: 5rpx;
-					line-height: 66rpx;
-					margin-left: 15rpx;
-					text-align: center;
-				}
-			}
-			.act {
-				width: 510rpx;
-				height: 68rpx;
-				position: relative;
-				.more {
-					width: 245rpx;
-					height: 66rpx;
-					background: #FFFFFF;
-					border: 1px solid #FA7E67;
-					border-radius: 5rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #FA7E67;
-					line-height: 66rpx;
-					text-align: center;
-					margin-right: 10rpx;
-					position: absolute;
-					left: 0;
-				}
-				.del {
-					width: 245rpx;
-					height: 66rpx;
-					background: #FFFFFF;
-					border: 1px solid #FA7E67;
-					border-radius: 5rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #FA7E67;
-					line-height: 66rpx;
-					text-align: center;
-					margin-right: 10rpx;
-					position: absolute;
-					right: 0;
-				}
-			}
-			
-		}
-	}
-	.jg {
-		height: 150rpx;
-		background-color: #fff;
-	}
-	// .dele{
-	// 	width: 40rpx;
-	// 	height: 40rpx;
-	// 	border-radius: 50%;
-	// 	background-color: #F3392C;
-	// 	transform: rotate(45deg);
-	// 	position: absolute;
-	// 	top: 0;
-	// 	bottom: 0;
-	// 	left: -45rpx;
-	// 	margin: auto;
-		
-	// 	.lef {
-	// 		width: 30rpx;
-	// 		height: 5rpx;
-	// 		position: absolute;
-	// 		top: 0;
-	// 		left: 0;
-	// 		right: 0;
-	// 		bottom: 0;
-	// 		margin: auto;
-	// 		background-color: #fff;
-	// 	}
-	// 	.rig {
-	// 		width: 5rpx;
-	// 		height: 30rpx;
-	// 		background-color: #fff;
-	// 		position: absolute;
-	// 		top: 0;
-	// 		left: 0;
-	// 		right: 0;
-	// 		bottom: 0;
-	// 		margin: auto;
-	// 		background-color: #fff;
-	// 	}
-	// }
+<template>
+	<view class="idonate">
+		<view class="one" v-show="limit === 1">
+			<view class="item">
+				<view class="item-tit">捐赠个体<text>*</text></view>
+				<radio-group @change="typeChange" class="check-box">
+					<label v-for="(item, index) in items" :key="item.value">
+						<radio :value="item.iid" :checked="index === type" color="#f3392c"
+							style="transform:scale(0.7)" />
+						<text style="color: #000000;">{{ item.value }}</text>
+					</label>
+				</radio-group>
+			</view>
+			<template v-if="type === 1">
+				<view class="item">
+					<view class="item-tit">捐赠单位<text>*</text></view>
+					<input type="text" v-model="unit" placeholder="请填写捐赠单位" />
+				</view>
+				<view class="item">
+					<view class="item-tit">单位联系人<text>*</text></view>
+					<input type="text" v-model="contacts" placeholder="请填写捐赠方联系人" />
+				</view>
+				<view class="item">
+					<view class="item-tit">单位电话<text>*</text></view>
+					<input type="text" v-model="tel" placeholder="请填写单位联系方式" />
+				</view>
+				<view class="item">
+					<view class="item-tit">企业信用代码</view>
+					<input type="text" v-model="qyxydm" placeholder="请填写单位的企业信用代码" />
+				</view>
+			</template>
+			<template v-if="type === 0">
+				<view class="item">
+					<view class="item-tit">姓名<text>*</text></view>
+					<input type="text" v-model="name" placeholder="请填写您的姓名" />
+				</view>
+				<view class="item">
+					<view class="item-tit">联系方式<text>*</text></view>
+					<input type="text" v-model="phone" placeholder="请填写您的联系方式" />
+				</view>
+				<view class="item">
+					<view class="item-tit">身份证号</view>
+					<input type="text" v-model="identityNumber" placeholder="请填写您的身份证号" />
+				</view>
+			</template>
+			<view class="item">
+				<view class="item-tit">是否匿名</view>
+				<radio-group @change="anonymousChange" class="check-box">
+					<label>
+						<radio value="1" :checked="IsAnonymous" color="#f3392c" style="transform:scale(0.7)" />
+						<text style="color: #000000;">是</text>
+					</label>
+					<label>
+						<radio value="0" :checked="!IsAnonymous" color="#f3392c" style="transform:scale(0.7)" />
+						<text style="color: #000000;">否</text>
+					</label>
+				</radio-group>
+			</view>
+			<view class="item">
+				<view class="item-tit">物流方式<text>*</text></view>
+				<picker @change="bindLogChange" :range="logs" range-key="name">
+					<view class="log " :class="{'select': log }">{{ log || '请选择物流方式' }}</view>
+				</picker>
+			</view>
+			<!-- <view class="item" v-if="jxdz_show">
+				<view class="item-tit">捐赠地址<text>*</text></view>
+				<picker @change="bindAreaChange" :range="areas" range-key="name">
+					<view class="log " :class="{'select': area }">{{ area || '请选择捐赠地址' }}</view>
+				</picker>
+			</view> -->
+			<view class="item no-border-b">
+				<view class="item-tit">开具发票<text>*</text></view>
+				<radio-group @change="openChange" class="check-box">
+					<label>
+						<radio value="1" :checked="Isopen" color="#f3392c" style="transform:scale(0.7)" />
+						<text style="color: #000000;">是</text>
+					</label>
+					<label>
+						<radio value="0" :checked="!Isopen" color="#f3392c" style="transform:scale(0.7)" />
+						<text style="color: #000000;">否</text>
+					</label>
+				</radio-group>
+			</view>
+			<!-- <view class="mask">
+				<textarea :value="mask" placeholder="如果有备注请填写" />
+			</view> -->
+			<!-- <view class="bbtm"></view> -->
+			<view class="jzwz">
+				<view class="item-tit">捐赠物资<text>*</text></view>
+				<view class="choose-box">
+					<view class="choose-item" v-for="(item,index) in wzList" :key="index" @click="dianji(index)">
+						<picker @change="bindWzChange" :range="wzs" range-key="name">
+							<view class="wz select clamp" :class="{'action': item.project_donation_name }">
+								{{ item.project_donation_name || '请选择物资分类' }}</view>
+						</picker>
+						<input type="number" v-model="item.project_donation_num" placeholder="填写数量" />
+						<!-- <view class="dele"  v-if="index != 0">
+							<view class="lef"></view>
+							<view class="rig"></view>
+						</view> -->
+					</view>
+					<view class="flex act">
+						<view class="more" @click="addMore" v-show="wzs.length > wzList.length">
+							+添加更多
+						</view>
+						<view class=" del" @click="dele" v-show=" wzList.length > 1">
+							删除
+						</view>
+					</view>
+
+				</view>
+			</view>
+		</view>
+		<view class="tow" v-show="limit === 2">
+			<view class="t-item">
+				<view class="t-tit">
+					实物照片(必填)<text>{{swimg | much}}/3</text>
+				</view>
+				<view class="img-list flex">
+					<template v-for="(item,index) in swimg">
+						<image src="../../static/images/upload.png" mode="" v-if="!item"
+							@click.stop="imgsub(swimg,index)" :key="index"></image>
+						<image :src="item" mode="" v-if="item" @click.stop="imgsub(item)" :key="index"></image>
+					</template>
+				</view>
+			</view>
+			<!-- <view class="t-item" v-if="type === 1">
+				<view class="t-tit">
+					营业执照(必填)<text>{{yyimg | much}}/3</text>
+				</view>
+				<view class="img-list flex">
+					<template v-for="(item,index) in yyimg">
+						<image src="../../static/images/upload.png" mode="" v-if="!item"  @click.stop="imgsub(yyimg,index)" :key="index"></image>
+						<image :src="item" mode="" v-if="item"  @click.stop="imgsub(yyimg,index)"  :key="index"></image>
+					</template>
+				</view>
+			</view> -->
+			<view class="t-item">
+				<view class="t-tit">
+					质量合格书(必填)<text>{{zlimg | much}}/3</text>
+				</view>
+				<view class="img-list flex">
+					<template v-for="(item,index) in zlimg">
+						<image src="../../static/images/upload.png" mode="" v-if="!item"
+							@click.stop="imgsub(zlimg,index)" :key="index"></image>
+						<image :src="item" mode="" v-if="item" @click.stop="imgsub(zlimg,index)" :key="index"></image>
+					</template>
+				</view>
+			</view>
+			<view class="t-item">
+				<view class="t-tit">
+					价值凭证<text>{{jzimg | much}}/3</text>
+				</view>
+				<view class="img-list flex">
+					<template v-for="(item,index) in jzimg">
+						<image src="../../static/images/upload.png" mode="" v-if="!item"
+							@click.stop="imgsub(jzimg,index)" :key="index"></image>
+						<image :src="item" mode="" v-if="item" @click.stop="imgsub(jzimg,index)" :key="index"></image>
+					</template>
+				</view>
+			</view>
+		</view>
+		<view class="jg">
+
+		</view>
+		<view class="btn">
+			<view class="next" v-show="limit === 1" @click="nextLimit()">
+				下一页
+			</view>
+			<view class="prev" v-show="limit === 2" @click="prevLimit()">
+				上一步
+			</view>
+			<view class="sub" v-show="limit === 2" @click="sub">
+				提交
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		upload
+	} from '@/api/ask.js';
+	import {
+		getProjectInfo,
+		createProject,
+		getLogistics,
+		getDonationInfo,
+		createUser,
+		getAllArea,
+		getUserList
+	} from '../../api/money.js';
+	export default {
+		data() {
+			return {
+				project_area: 226,
+				areas: [{
+					id: 0,
+					name: '市本级'
+				}],
+				area: '',
+				items: [{
+						value: '个人',
+						iid: '0'
+					},
+					{
+						value: '企业(团体)',
+						iid: '1'
+					}
+				],
+				IsAnonymous: false,
+				limit: 1,
+				type: 0, //捐赠个体0位个人 1为团体(企业)
+				unit: '', //捐赠单位
+				contacts: '', //捐赠方联系人
+				tel: '', //单位电话
+				log: '', //物流方式
+				logistics: '', //物流编号
+				// Logistics: '',//物流方式id
+				logs: ['顺丰', '邮政'],
+				Isopen: false, //是否开具发票
+				mask: '', //备注
+				qyxydm: '', //企业信用代码
+				name: '', // 捐赠人姓名
+				phone: '', //捐赠人联系方式
+				identityNumber: '', //身份证号
+				wzs: [], //物资分类列表
+				wzList: [{
+					project_donation_id: null,
+					project_donation_num: null,
+					project_donation_name: null
+				}],
+				swimg: [''], //实物照片
+				yyimg: [''], //营业执照
+				zlimg: [''], //质量合格证书
+				jzimg: [''], //价值凭证
+				true_wzList: [], //最终捐赠的物资列表
+				hadadd: [], //已添加分类
+				project_id: 0, //项目ID
+				jxdz_show: false,
+				myUserList: [],
+				beforeUser: {
+					name: '',
+					log: '',
+					Isopen: false,
+					IsAnonymous: true,
+					tel: '',
+					phone: '',
+					contacts: '',
+					name: '',
+					identityNumber: '',
+					qyxydm: ''
+				},
+				userId: 0,
+				showCreate: false
+			}
+		},
+		filters: {
+			much(val) {
+				let num = 0
+				val.forEach(item => {
+					if (item) {
+						num += 1
+					}
+				})
+				return num
+			}
+		},
+		onLoad(ops) {
+			if (ops.type) {
+				this.type = ops.type * 1
+				console.log(this.type, '++++++++')
+			}
+			if (ops.id) {
+				this.project_id = ops.id * 1
+			}
+			if (ops.wzlist) {
+				this.wzs = JSON.parse(ops.wzlist)
+
+			} else {
+				this.getDonationInfo()
+				// this.getAllArea()
+				this.jxdz_show = true
+			}
+			this.getUserList()
+			// this.getLogistics()
+		},
+		mounted() {
+			// this.$set(this,'wzList',[this.wz1,this.wz2])
+		},
+		methods: {
+			// 获取我的用户列表
+			getUserList() {
+				let obj =this
+				getUserList().then(({data})=> {
+					this.myUserList = data
+					if(data.length == 0) {
+						obj.showCreate = true
+					}else {
+						this.autoT()
+					}
+					
+				})
+			},
+			//自动填充表格
+			autoT() {
+				let obj = this
+				
+				obj.myUserList.forEach(item => {
+					if(item.user_type == obj.type) {
+						obj.showCreate = false
+						obj.userId = item.id
+						obj.log = item.logistics
+						obj.beforeUser.log = item.logistics
+						
+						obj.Isopen = item.invoice == 1? true: false
+						obj.beforeUser.Isopen = item.invoice == 1? true: false
+						
+						obj.IsAnonymous = item.anonymous == 1? true: false
+						obj.beforeUser.IsAnonymous = item.anonymous == 1? true: false
+						
+						obj.tel = item.tel
+						obj.beforeUser.tel = item.tel
+						
+						obj.phone = item.phone
+						obj.beforeUser.phone = item.phone
+						
+						obj.contacts = item.contacts
+						obj.beforeUser.contacts = item.contacts
+						
+						
+						if(obj.type == 0) {
+							obj.name = item.name
+							obj.beforeUser.name = item.name
+							
+							this.identityNumber = item.card_id
+							obj.beforeUser.identityNumber = item.card_id
+						}
+						if(obj.type == 1) {
+							obj.unit = item.name
+							obj.beforeUser.unit = item.name
+							
+							this.qyxydm = item.card_id
+							obj.beforeUser.qyxydm = item.card_id
+						}
+					}else {
+						obj.showCreate = true
+					}
+				})
+				
+			},
+			//下一页
+			nextLimit() {
+				this.limit = 2
+			},
+			//下一页
+			prevLimit() {
+				this.limit = 1
+			},
+			//选择捐赠是个人或团体
+			typeChange(e) {
+				this.type = e.detail.value * 1
+				console.log(this.type, 'this.typ+++++++++++++++++++++')
+				if(this.myUserList.length > 0) {
+					console.log('遍历')
+					this.autoT()
+				}
+				
+			},
+			//选择是否匿名
+			anonymousChange(e) {
+				if (e.detail.value !== '1') {
+					this.IsAnonymous = false
+				} else {
+					this.IsAnonymous = true
+				}
+			},
+			//选择物流方式
+			bindLogChange(e) {
+				this.log = this.logs[e.detail.value]
+				// this.logistics = this.logs[e.detail.value].id
+			},
+			//选择捐献物资分类
+			bindWzChange(e) {
+				if (this.hadadd.indexOf(e.detail.value) === -1) {
+					this.hadadd.push(e.detail.value)
+					this.wzList[this.currentWzIndex].project_donation_name = this.wzs[e.detail.value].name
+					this.wzList[this.currentWzIndex].project_donation_id = this.wzs[e.detail.value].id
+				} else {
+					this.$api.msg('该分类已添加');
+					return
+				}
+
+				console.log(this.wzList)
+				// this.wz = this.logs[e.detail.value].name
+
+			},
+			// 选择捐赠地址
+			bindAreaChange(e) {
+				this.project_area = this.areas[e.detail.value].id
+				this.area = this.areas[e.detail.value].name
+			},
+			openChange(e) {
+				if (e.detail.value !== '1') {
+					this.Isopen = false
+				} else {
+					this.Isopen = true
+				}
+			},
+			imgsub(item, index) {
+				console.log(index, item)
+
+				upload({
+					filename: ''
+				}).then(data => {
+					console.log(data, '6666666666')
+					this.$set(item, index, data[0].url)
+					if (index < 2) {
+						this.$set(item, index + 1, '')
+					}
+				});
+			},
+
+			dianji(index) {
+				this.currentWzIndex = index
+			},
+			//添加更多
+			addMore() {
+				this.wzList.push({
+					project_donation_id: null,
+					project_donation_num: null,
+					project_donation_name: null
+				})
+			},
+			//提交
+			sub() {
+				// uni.navigateTo({
+				// 	url: '/pages/joinSuc/joinsuccess'
+				// })
+
+				let obj = this;
+
+				if (obj.type === 0) {
+					if (obj.name == '') {
+						obj.$api.msg('请输入您的姓名');
+						return;
+					}
+					const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
+					if (!reg.test(obj.phone)) {
+						obj.$api.msg('请填写正确的手机号码');
+						return;
+					}
+
+				} else {
+					if (obj.unit == '') {
+						obj.$api.msg('请输入捐赠单位');
+						return;
+					}
+					if (obj.dwPeople == '') {
+						obj.$api.msg('请输入联系人');
+						return;
+					}
+					if (obj.tel == '') {
+						obj.$api.msg('请输入单位电话');
+						return;
+					}
+				}
+				if (obj.log == '') {
+					obj.$api.msg('请选择物流方式');
+					return;
+				}
+				// if(obj.jxdz_show == true) {
+				// 	if(obj.area == '') {
+				// 		obj.$api.msg('请选择捐赠地址');
+				// 		return;
+				// 	}
+				// }
+
+				try {
+					obj.wzList.forEach(item => {
+						if (!item.project_donation_id) {
+							throw '请选择物资类别'
+						}
+						if (!item.project_donation_num || item.project_donation_num == 0) {
+							throw '请填写捐赠数量'
+						}
+					})
+				} catch (e) {
+					obj.$api.msg(e);
+					return
+				}
+
+				let matter = obj.swimg.toString().replace(/,$/, ''),
+					qc = obj.zlimg.toString().replace(/,$/, ''),
+					worth = obj.jzimg.toString().replace(/,$/, ''),
+					item = obj.wzList
+				console.log(item, '物资参数')
+				if (matter == '') {
+					obj.$api.msg('请上传实物照片');
+					return
+				}
+
+				if (qc == '') {
+					obj.$api.msg('请上传质量合格证书');
+					return
+				}
+				console.log(matter, '5555555555555555')
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				// if(obj.type === 0) {
+				// 	if((obj.beforeUser.name != obj.name) || (obj.beforeUser.phone !== obj.phone) || (obj.beforeUser.log != obj.log) || (obj.beforeUser.IsAnonymous != obj.IsAnonymous) || (obj.) ) {
+						
+				// 	}
+				// }
+				createUser({
+					// project_area: obj.project_area,
+					name: obj.type === 0 ? obj.name : obj.unit,
+					phone: obj.phone,
+					tel: obj.tel,
+					contacts: obj.contacts,
+					user_type: obj.type,
+					logistics: obj.log,
+					anonymous: obj.IsAnonymous ? 0 : 1,
+					invoice: obj.Isopen ? 1 : 0,
+					card_id: obj.type == 0?obj.identityNumber:obj.qyxydm
+					
+				}).then(res => {
+					// console.log(JSON.parse(res.msg),'99999999999999999999999999')
+					// let info = JSON.parse(res.msg)
+					// console.log(info.name,'8888888888888')
+					console.log(res, 'res+++++++++++++++++++++')
+					createProject({
+						// project_area: obj.project_area,
+						name: obj.type === 0 ? obj.name : obj.unit,
+						project_id: obj.project_id,
+						project_user_id: res.data.id,
+						matter,
+						qc,
+						worth,
+						logistics: obj.log,
+						item,
+						// mask
+					}).then(res => {
+						// console.log(JSON.parse(res.msg),'77777777777777777777')
+						uni.hideLoading()
+						uni.navigateTo({
+							url: '/pages/joinSuc/joinsuccess'
+						})
+					}).catch(err => {
+						uni.hideLoading()
+						console.log(err)
+					})
+				}).catch(err => {
+					uni.hideLoading()
+					console.log(err, 'err')
+				})
+
+			},
+			//获取物资分类列表
+			getDonationInfo() {
+				getDonationInfo().then(({
+					data
+				}) => {
+
+					this.wzs = data
+					console.log(this.wzs, '获取所有物资')
+				})
+			},
+			getLogistics() {
+				getLogistics().then(({
+					data
+				}) => {
+					console.log('88888888888888888888', data)
+					this.logs = data
+				})
+			},
+			dele() {
+				this.$delete(this.wzList, this.wzList.length - 1)
+			},
+			// 获取捐赠地址列表
+			getAllArea() {
+				getAllArea().then(({
+					data
+				}) => {
+					console.log(data, '6666666666');
+					this.areas = this.areas.concat(data);
+				});
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+
+	.idonate {
+		padding: 0 30rpx;
+		margin-top: 20rpx;
+		background-color: #fff;
+	}
+
+	.btn {
+
+		// height: 196rpx;
+		// width: 100%;
+		width: 690rpx;
+		text-align: center;
+		display: flex;
+		justify-content: center;
+		line-height: 75rpx;
+		padding-bottom: 54rpx;
+		// padding-top: 54rpx;
+		// position: fixed;
+		// bottom: 0;
+		background-color: #fff;
+		z-index: 9;
+
+		.next {
+			width: 478rpx;
+			height: 75rpx;
+			// margin: 0 auto;
+			background: #FA7E67;
+			border-radius: 35rpx;
+			color: #fff;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+
+		.prev {
+			width: 264rpx;
+			height: 75rpx;
+			border: 1px solid #FA7E67;
+			border-radius: 35rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FA7E67;
+			margin-right: 60rpx;
+			line-height: 70rpx;
+		}
+
+		.sub {
+			width: 264rpx;
+			height: 75rpx;
+			background: #FA7E67;
+			border-radius: 35rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FFFFFF;
+			line-height: 70rpx;
+		}
+	}
+
+	.item {
+		display: flex;
+		align-items: center;
+		height: 102rpx;
+		border-bottom: 1px #ECECEC solid;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #222222;
+		line-height: 102rpx;
+
+		.item-tit {
+			flex-shrink: 0;
+			display: inline-block;
+			width: 200rpx;
+		}
+
+		text {
+			color: #F3392C;
+		}
+
+		input {
+			display: inline-block;
+			width: 100%;
+		}
+
+		.log {
+			// display: inline-block;
+			width: 400rpx;
+			color: #999;
+		}
+
+		.select {
+			color: #000;
+		}
+
+	}
+
+	.mask {
+		padding-left: 202rpx;
+
+		textarea {
+			width: 396rpx;
+			height: 166rpx;
+			border: 1rpx solid #ccc;
+			border-radius: 10rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #000;
+			line-height: 32rpx;
+			padding: 24rpx 16rpx;
+		}
+	}
+
+	.check-box {
+		flex-grow: 0;
+		display: flex;
+		display: inline-block;
+	}
+
+	.no-border-b {
+		border-bottom: none;
+	}
+
+	.bbtm {
+		margin-top: 40rpx;
+		width: 689rpx;
+		height: 1rpx;
+		background: #ECECEC;
+	}
+
+	.t-item {
+		padding: 35rpx 0;
+		border-bottom: 1px #ECECEC solid;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #222222;
+
+		&:last-of-type {
+			border-bottom: none;
+		}
+
+		image {
+			display: block;
+			width: 160rpx;
+			height: 160rpx;
+			// background: red;
+			border-radius: 5rpx;
+			// margin: 0 auto;
+		}
+
+		.t-tit {
+			position: relative;
+
+			text {
+				display: inline-block;
+				width: 73rpx;
+				height: 31rpx;
+				background: #F0433C;
+				border-radius: 14rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 31rpx;
+				text-align: center;
+				position: absolute;
+				right: 0;
+				// left: 0;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+			}
+
+		}
+
+		.img-list {
+			margin-top: 20rpx;
+			justify-content: center;
+
+			image {
+				margin-right: 20rpx;
+			}
+		}
+	}
+
+	.jzwz {
+		display: flex;
+
+		.item-tit {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #222222;
+			padding-top: 39rpx;
+			line-height: 1;
+			width: 200rpx;
+
+			text {
+				color: #F3392C;
+			}
+		}
+
+		.choose-box {
+			padding-top: 24rpx;
+
+			.choose-item {
+				display: flex;
+				margin-bottom: 15rpx;
+				position: relative;
+
+				.wz {
+					padding-left: 58rpx;
+					width: 297rpx;
+					height: 66rpx;
+					background: #F3F3F3;
+					border-radius: 5rpx;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #222222;
+					line-height: 66rpx;
+
+					&::after {
+						content: '';
+						width: 0;
+						height: 0;
+						border-left: 10rpx solid transparent;
+						border-right: 10rpx solid transparent;
+						border-top: 10rpx solid #808080;
+						position: absolute;
+						right: 10rpx;
+						bottom: 26rpx;
+					}
+				}
+
+				input {
+					width: 189rpx;
+					height: 66rpx;
+					background: #F3F3F3;
+					border-radius: 5rpx;
+					line-height: 66rpx;
+					margin-left: 15rpx;
+					text-align: center;
+				}
+			}
+
+			.act {
+				width: 510rpx;
+				height: 68rpx;
+				position: relative;
+
+				.more {
+					width: 245rpx;
+					height: 66rpx;
+					background: #FFFFFF;
+					border: 1px solid #FA7E67;
+					border-radius: 5rpx;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FA7E67;
+					line-height: 66rpx;
+					text-align: center;
+					margin-right: 10rpx;
+					position: absolute;
+					left: 0;
+				}
+
+				.del {
+					width: 245rpx;
+					height: 66rpx;
+					background: #FFFFFF;
+					border: 1px solid #FA7E67;
+					border-radius: 5rpx;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FA7E67;
+					line-height: 66rpx;
+					text-align: center;
+					margin-right: 10rpx;
+					position: absolute;
+					right: 0;
+				}
+			}
+
+		}
+	}
+
+	.jg {
+		height: 150rpx;
+		background-color: #fff;
+	}
+
+	// .dele{
+	// 	width: 40rpx;
+	// 	height: 40rpx;
+	// 	border-radius: 50%;
+	// 	background-color: #F3392C;
+	// 	transform: rotate(45deg);
+	// 	position: absolute;
+	// 	top: 0;
+	// 	bottom: 0;
+	// 	left: -45rpx;
+	// 	margin: auto;
+
+	// 	.lef {
+	// 		width: 30rpx;
+	// 		height: 5rpx;
+	// 		position: absolute;
+	// 		top: 0;
+	// 		left: 0;
+	// 		right: 0;
+	// 		bottom: 0;
+	// 		margin: auto;
+	// 		background-color: #fff;
+	// 	}
+	// 	.rig {
+	// 		width: 5rpx;
+	// 		height: 30rpx;
+	// 		background-color: #fff;
+	// 		position: absolute;
+	// 		top: 0;
+	// 		left: 0;
+	// 		right: 0;
+	// 		bottom: 0;
+	// 		margin: auto;
+	// 		background-color: #fff;
+	// 	}
+	// }
 </style>

+ 2 - 2
pages/donate/progress.vue

@@ -44,7 +44,7 @@
 				<image src="../../static/icon/xq2.png" mode=""></image>
 				<view class="item-info">
 					<view class="item-tit">新建项目</view>
-					<view class="item-time">{{proInfo.add_time | time}} {{proInfo.title}}</view>
+					<view class="item-time">{{proInfo.createtime | time}} {{proInfo.title}}</view>
 				</view>
 				<view class="line1"></view>
 			</view>
@@ -55,7 +55,7 @@
 						审核时间
 						<text>已通过</text>
 					</view>
-					<view class="item-time">{{proInfo.add_time | time}} {{proInfo.title}}</view>
+					<view class="item-time">{{proInfo.createtime | time}} {{proInfo.title}}</view>
 				</view>
 			</view>
 			<view class="item">

+ 1 - 1
pages/donate/progresst.vue

@@ -60,7 +60,7 @@
 				<image src="../../static/icon/xq5.png" mode=""></image>
 				<view class="item-info">
 					<view class="item-tit">用户寄件方式</view>
-					<view class="item-time">{{info.logistics | log(logisticsList)}}</view>
+					<view class="item-time">{{info.logistics}}</view>
 				</view>
 				<view class="line5"></view>
 			</view>

+ 38 - 6
pages/fu/axjz.vue

@@ -1,5 +1,10 @@
 <template>
 	<view class="container">
+		<scroll-view class="scroll-list" scroll-x style="margin-bottom: 10rpx;">
+			<view class="scoll-box" v-for="(itemz,indez) in navList" :key="indez" :class="{ active: indez == currentIndex }" @click="tabtap1(itemz,indez)">
+				<view class="scoll-name">{{ itemz.name }}</view>
+			</view>
+		</scroll-view>
 		<scroll-view class="scroll-list" scroll-x>
 			<view class="scoll-box" v-for="(ls,index) in cationList" :key="index" :class="{ active: index === tabCurrentIndex }" @click="tabtap(ls.id,index)">
 				<view class="scoll-name">{{ ls.name }}</view>
@@ -15,20 +20,20 @@
 						<view class="fu-box" v-for='(item, index) in list' :key="index" @click="toDetail(item)">
 							<view class="img-box">
 								<image class="fu-img" :src="baseURL + item.userimage" mode="aspectFill"></image>
-								<text class="fu-cname">{{ item.cname }}</text>
+								<text class="fu-cname">{{ item.category }}</text>
 							</view>
 							<view class="fu-right">
 								<view>
 									<view class="fu-tit">{{ item.title }}</view>
 									<view class="fu-text">{{ item.info }}</view>
 								</view>
-								<view class="fu-bottom" v-if="item.is_show == 1">
-									<view class="fu-shenqing">已有{{ item.sales }}人申请</view>
+								<view class="fu-bottom" v-if="item.apply_user_id == 0">
+									<view class="fu-shenqing">已有{{ item.apply_sum }}人申请</view>
 									<text class="fu-jifen">+{{ item.integral }}积分</text>
 								</view>
-								<view class="fu-bottom" v-if="item.is_show == 0">
-									<text class="fu-shenqing">资金:{{ item.money }}</text>
-									<view class="fu-shenqing">帮扶人:{{ item.name }}</view>
+								<view class="fu-bottom" v-else>
+									<text class="fu-shenqing">资金:{{ item.amount || '暂无' }}</text>
+									<view class="fu-shenqing">帮扶人:{{ item.apply_user.full_name }}</view>
 								</view>
 							</view>
 						</view>
@@ -90,6 +95,24 @@
 		},
 		data() {
 			return {
+				currentIndex: 0,
+				navList: [{
+					name: '未帮扶',
+					type: 1
+				},
+				{
+					name: '帮扶中',
+					type: 2
+				},
+				{
+					name: '公示中',
+					type: 3
+				},
+				{
+					name: '已完结',
+					type: 4
+				}
+				],
 				category_id: 0,
 				tabCurrentIndex:0,
 				page: 1, //当前页数
@@ -193,6 +216,15 @@
 				obj.list = [];
 				obj.loadData()
 			},
+			tabtap1(item,index) {
+				console.log(item)
+				this.type = item.type;
+				this.currentIndex = index
+				this.page = 1;
+				this.loadingType = 'more';
+				this.list = [];
+				this.loadData()
+			},
 			toDetail(item) {
 				uni.navigateTo({
 					url: '/pages/fu/fuInfo?id=' + item.id

+ 7 - 4
pages/fu/fuInfo.vue

@@ -16,8 +16,8 @@
 
 		<view class="info-item">
 			<view class="flex_item flex">
-				<!-- <view class="list-tip" style="display: inline-block;">{{cname}}</view> -->
-				<view class="info-title clamp">{{list.full_name}}</view>
+				<view class="list-tip" style="display: inline-block;">{{list.category}}</view>
+				<view class="info-title clamp">{{list.title}}</view>
 			</view>
 			<view class="info-tip">{{list.info}}</view>
 			<view class="info-number">
@@ -58,8 +58,8 @@
 				<view class="submit yijieshu" v-if="(list.is_apply) && (starting == true)"><text class="">已申请援助</text></view>
 				<view class="submit yijieshu" v-if="starting == false"><text class="">已结束</text></view>
 			</view>
-			<view class="btn-right">
-				<view class="" @click="loveDona">
+			<view class="btn-right" :class="{'yijieshu': starting == false}">
+				<view class="" @click="starting?loveDona(): ''">
 					爱心捐款
 				</view>
 			</view>
@@ -483,6 +483,9 @@
 		text {
 			color: #C3C3C3;
 		}
+		view {
+			color: #C3C3C3;
+		}
 	}
 
 	.red {

+ 1 - 1
pages/fu/upLoadInfo.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<view class="up-tit">请退供相关图片描述 以便我们后续跟进</view>
+		<view class="up-tit">请供相关图片描述 以便我们后续跟进</view>
 		<view class="add-img-box flex_item">
 			<view class="add-img-item"  v-for="(item, index) in imgList" :key="index">
 				<image class="add-img" @click.stop="imgInfo(index)" :src="item" mode="aspectFill"></image>

+ 113 - 97
pages/index/index.vue

@@ -55,7 +55,7 @@
 		<view class="system">
 			<top-title :title="'救在身边'" navurl="/pages/applic/location" :show_more="true"></top-title>
 			<view class="system-map">
-				<map class="map-box" id="map" show-location :markers="jzsbmarker" :scale="scale" :latitude="latitude4"
+				<map class="map-box" show-location :markers="jzsbmarker" :scale="scale" :latitude="latitude4"
 					:longitude="longitude4" ref="map" @markertap="markertap" :show-location="false"></map>
 			</view>
 			<view class="" style="padding-top: 80rpx;">
@@ -92,7 +92,7 @@
 							<view class="img" v-if="item.is_create == 0"  @click="rescue(item,index)">
 								<image src="../../static/img/rescue.png" mode=""></image>
 							</view>
-							<view class="called" v-if="item.is">
+							<view class="called" v-else>
 								已呼叫
 							</view>
 						</view>
@@ -105,7 +105,7 @@
 				<top-title :title="'救护站'" :navurl="'/pages/applic/aid'" :show_more="true"></top-title>
 			</view>
 			<view id="container">
-				<map class="map-box" id="map" show-location :markers="jhzmarker" :scale="scale" :latitude="latitude4"
+				<map class="map-box" show-location :markers="jhzmarker" :scale="scale" :latitude="latitude4"
 					:longitude="longitude4" ref="map" style="height: 450rpx" @markertap="jhzmarkertap" :show-location="false"></map>
 			</view>
 			<view class="">
@@ -133,7 +133,7 @@
 				<top-title :title="'智能AED'" :navurl="'/pages/applic/aed'" :show_more="true"></top-title>
 			</view>
 			<view id="container">
-				<map class="map-box" id="map" show-location :markers="aedmarker" :scale="scale" :latitude="latitude4"
+				<map class="map-box" show-location :markers="aedmarker" :scale="scale" :latitude="latitude4"
 					:longitude="longitude4" ref="map" style="height: 450rpx" @markertap="aedmarkertap" :show-location="false"></map>
 			</view>
 			<view class="">
@@ -192,7 +192,8 @@
 	import {
 		getAed,
 		getAidList,
-		getRescuerList
+		getRescuerList,
+		sos,
 	} from '@/api/category.js'
 	import {
 		loadIndexs,
@@ -231,6 +232,7 @@
 		},
 		data() {
 			return {
+				user_id: '',
 				rescuers_id: '',
 				name: '',
 				uid: '',
@@ -298,24 +300,52 @@
 					}
 				});
 			} else {
+				
 				// this.loadData();
 			}
 		},
 		onLoad() {
+			this.loadIndex()
 			saveUrl();
 			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('加载完毕注册事件');
+			let weichatBrowser = uni.getStorageSync('weichatBrowser')
+			if(weichatBrowser) {
+				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: 'gcj02',
+							success: function(res) {
+								console.log('获取经纬度', res);
+								obj.longitude4 = res.longitude;
+								obj.latitude4 = res.latitude;
+								obj.marker = [{
+									longitude: res.longitude,
+									latitude: res.latitude,
+									iconPath: '/static/img/img19.png',
+									width: '45',
+									height: '45'
+								}];
+								obj.loadData();
+							},
+							fail(e) {
+								console.log('失败', e);
+								// window.location.reload();
+							}
+						});
+					});
+					// #endif
+				
+					// #ifdef MP
 					locationAddress({
 						type: 'gcj02',
 						success: function(res) {
@@ -333,47 +363,38 @@
 						},
 						fail(e) {
 							console.log('失败', e);
-							// window.location.reload();
 							obj.tishi()
 						}
 					});
-				});
-				// #endif
-
-				// #ifdef MP
-				locationAddress({
-					type: 'gcj02',
-					success: function(res) {
-						console.log('获取经纬度', res);
-						obj.longitude4 = res.longitude;
-						obj.latitude4 = res.latitude;
-						obj.marker = [{
-							longitude: res.longitude,
-							latitude: res.latitude,
-							iconPath: '/static/img/img19.png',
-							width: '45',
-							height: '45'
-						}];
-						obj.loadData();
-					},
-					fail(e) {
-						console.log('失败', e);
-						obj.tishi()
-					}
-				});
-				// #endif
-			} catch (e) {
-				let locationAddress;
-				// #ifdef H5
-				let wxOjb = require('jweixin-module');
-				locationAddress = wxOjb.getLocation;
-				// #endif
-				// #ifdef MP
-				locationAddress = uni.getLocation;
-				// #endif
-				// #ifdef H5
-				wxOjb.ready(() => {
-					console.log('加载完毕注册事件');
+					// #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: 'gcj02',
+							success: function(res) {
+								console.log('获取经纬度', res);
+								obj.longitude4 = res.longitude;
+								obj.latitude4 = res.latitude;
+								obj.loadData();
+							},
+							fail(e) {
+								console.log('失败', e);
+								obj.tishi()
+							}
+						});
+					});
+					// #endif
+					// #ifdef MP
 					locationAddress({
 						type: 'gcj02',
 						success: function(res) {
@@ -387,24 +408,31 @@
 							obj.tishi()
 						}
 					});
-				});
-				// #endif
-				// #ifdef MP
-				locationAddress({
+					// #endif
+				}
+			}else {
+				uni.getLocation({
 					type: 'gcj02',
 					success: function(res) {
 						console.log('获取经纬度', res);
 						obj.longitude4 = res.longitude;
 						obj.latitude4 = res.latitude;
+						obj.marker = [{
+							longitude: res.longitude,
+							latitude: res.latitude,
+							iconPath: '/static/img/img19.png',
+							width: '45',
+							height: '45'
+						}];
 						obj.loadData();
 					},
 					fail(e) {
 						console.log('失败', e);
-						obj.tishi()
+						// window.location.reload();
 					}
-				});
-				// #endif
+				})
 			}
+			
 		},
 		computed: {
 			...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
@@ -416,6 +444,14 @@
 		// },
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			loadIndex() {
+				loadIndexs({}).then(({
+					data
+				}) => {
+					console.log(data,'index')
+					this.carouselList = data.banner; //轮播图
+				});
+			},
 			tocontribution() {
 				uni.navigateTo({
 					// url: "/pages/applic/contribution"
@@ -543,18 +579,8 @@
 					data
 				}) => {
 					obj.setUserInfo(data);
-					loadIndexs({}).then(({
-						data
-					}) => {
-						console.log(data,'index')
-						obj.carouselList = data.banner; //轮播图
-						bannerlist().then(({
-							data
-						}) => {
-							console.log(data);
-							obj.science = data;
-						});
-					});
+					obj.to_phone = data.mobile || ''
+					
 				});
 				if (obj.loadingType === 'noMore') {
 					//防止重复加载
@@ -695,20 +721,20 @@
 					content: '是否发起求救?',
 					success: res => {
 						if (res.confirm) {
-							this.$refs.popup.open(item, index);
+							this.$refs.popup2.open(item, index);
 							obj.rescuers_id = item.id
 							obj.user_id = item.user_id
 						}
 					}
 				})
 			},
+			close2() {
+				this.$refs.popup2.close()
+			},
 			comfirm1: function() {
 				let obj = this
 				if (obj.to_phone.toString().trim() == '') {
-					// uni.showModal({
-					// 	title:'输入框为空',
-					// 	// content:JSON.stringify(obj)
-					// })
+					return obj.$api.msg('请输入手机号码')
 				} else {
 					console.log('obj.to_phone1111', obj.to_phone)
 					const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
@@ -716,22 +742,14 @@
 						obj.$api.msg('请填写正确的手机号码');
 						return;
 					}
-					console.log('name:', obj.name)
-					console.log('uid:', obj.uid)
-					console.log('phone', obj.phone)
-					console.log('to_phone', obj.to_phone)
-					console.log('longitude', obj.longitude)
-					console.log('latitude', obj.latitude)
-					console.log('iscall', obj.iscall)
-					tocall({
-						name: obj.name,
-						uid: obj.uid,
-						phone: obj.phone,
-						longitude: obj.longitude4,
-						latitude: obj.latitude4,
-						to_phone: obj.to_phone
-					}).then((data) => {
-						console.log(99988, data)
+					sos({
+						mobile: obj.to_phone,
+						address: obj.user_address,
+						latitude: obj.latitude,
+						longitude: obj.longitude,
+						rescuers_id: obj.rescuers_id,
+						rescuers_user_id: obj.user_id
+					}).then(res => {
 						uni.showModal({
 							title: '请耐心等待救援',
 							success: res => {
@@ -741,8 +759,6 @@
 							}
 						})
 						obj.$refs.popup2.close();
-						obj.iscall = false
-						console.log(123, obj.iscall)
 					})
 				}
 			},

+ 17 - 3
pages/user/jkjl.vue

@@ -3,7 +3,7 @@
 		<view class="jg" style="height: 20rpx;">
 			
 		</view>
-		<view class="love-item" v-for="item in list" :key="item.id">
+		<view class="love-item" v-for="item in list" :key="item.id" @click="navto(item)">
 			<view class="">
 				证书编号:{{item.SN}}
 			</view>
@@ -53,6 +53,16 @@
 			this.getMyloveList()
 		},
 		methods:{
+			navto(item) {
+				let date = new Date(item.paytime*1000)
+				let year = date.getFullYear()
+				let month = date.getMonth() >= 9 ? date.getMonth() + 1 : '0' + (date
+					.getMonth() + 1)
+				let day = date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()
+				uni.navigateTo({
+					url: '/pages/form/donaSuccess?money=' + item.amount + '&name=' + item.contact + '&time=' + year + '年' + month + '月' + day + '日' 
+				})
+			},
 			getMyloveList() {
 				let obj = this
 				getMyloveList({
@@ -60,9 +70,9 @@
 					limit: obj.limit,
 					status: 1
 				}).then(({data}) => {
-					obj.list = obj.list.concat(data)
+					obj.list = obj.list.concat(data.data)
 					obj.page++
-					if(obj.limit == data.length) {
+					if(obj.limit == data.data.length) {
 						obj.loadingType = 'more'
 					}else {
 						obj.loadingType = 'noMore'
@@ -78,5 +88,9 @@
 	.love-item {
 		padding: 10rpx;
 		margin-bottom: 20rpx;
+		width: 700rpx;
+		margin: auto;
+		border-radius: 20rpx;
+		box-shadow: 0px 0px 5rpx rgba($color: #fa7e67, $alpha: 0.6);
 	}
 </style>

+ 50 - 38
pages/user/myFu.vue

@@ -11,24 +11,24 @@
 		
 					<!-- 订单列表 -->
 					<view class="fu-box" v-for="(item, index) in tabItem.orderList" :key='index' @click="toDetail(item)" v-if="item.info.title">
-						<image class="fu-img" :src="item.info.image" mode="aspectFill"></image>
+						<image class="fu-img" :src="baseURL + item.info.userimage" mode="aspectFill"></image>
 						<view class="fu-right">
 							<view>
 								<view class="fu-tit">{{ item.info.title }}</view>
 								<view class="fu-text">{{ item.info.info }}</view>
 							</view>
 							<view class="fu-bottom" v-if="tabCurrentIndex == 2 && item.info && item.info.title">
-								<!-- <text class="fu-jifen">+{{ item.info.integral }}积分</text> -->
+								<text class="fu-jifen">+{{ item.info.integral }}积分</text>
 								<view class="fu-sczl" v-if="!item.remark" @click.stop="upInfo(item.hid)">上传资料</view>
 								<view class="fu-shenqing" v-if="item.status == 3">公示中</view>
 							</view>
 							<view class="fu-bottom" v-if="tabCurrentIndex == 3 && item.info && item.info.title">
-								<!-- <text class="fu-jifen">+{{ item.info.integral }}积分</text> -->
+								<text class="fu-jifen">+{{ item.info.integral }}积分</text>
 								<view class="fu-sczl" @click.stop="upInfo(item.hid, 1)">修改资料</view>
 							</view>
 							<view class="fu-bottom" v-if="tabCurrentIndex !== 2 && tabCurrentIndex !== 3 && tabCurrentIndex !== 4 && item.info && item.info.title ">
-								<view class="fu-shenqing">已有{{ item.info.sales }}人申请</view>
-								<!-- <text class="fu-jifen">+{{ item.info.integral }}积分</text> -->
+								<view class="fu-shenqing">已有{{ item.info.apply_sum }}人申请</view>
+								<text class="fu-jifen">+{{ item.info.integral }}积分</text>
 							</view>
 							<view class="fu-bottom" v-if="tabCurrentIndex == 4 && item.info && item.info.title ">
 								<view class="fu-shenqing"></view>
@@ -49,20 +49,28 @@
 </template>
 
 <script>
-import { my_enroll } from '@/api/applyHelp.js';
+import { my_enroll } from '@/api/applyHelp.js';
+import { userapplylst } from '@/api/help.js'
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
+import empty from '@/components/empty';
+import {
+		mapState,
+		mapMutations
+	} from 'vuex';
 export default {
 	components: {
 		uniLoadMore,
 		empty
+	},
+	computed: {
+		...mapState(['baseURL'])
 	},
 	data() {
 		return {
 			tabCurrentIndex: 0,
 			navList: [
 				{
-					state: 2,
+					state: 0,
 					text: '审核中',
 					loadingType: 'more',
 					orderList: [],
@@ -70,7 +78,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 3,
+					state: -1,
 					text: '已拒绝',
 					loadingType: 'more',
 					orderList: [],
@@ -85,22 +93,22 @@ export default {
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
-				{
-					state: 5,
-					text: '公示中',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已结束',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
+				// {
+				// 	state: 5,
+				// 	text: '公示中',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// },
+				// {
+				// 	state: 4,
+				// 	text: '已结束',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// },
 			],
 		}
 	},
@@ -125,7 +133,8 @@ export default {
 		tabClick(index) {
 			this.tabCurrentIndex = index;
 		},
-		loadData(source) {
+		loadData(source) {
+			console.log(getApp(),'getapp')
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
 			let state = navItem.state;
@@ -139,10 +148,10 @@ export default {
 			}
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
-			my_enroll({
+			userapplylst({
 				page: navItem.page,
 				limit:navItem.limit,
-				type: state,
+				status: state,
 			}).then(res => {
 				navItem.orderList = navItem.orderList.concat(res.data.filter(word => !!word.info.title));
 				navItem.page++;
@@ -170,16 +179,19 @@ export default {
 			})
 		},
 		// 跳转详情
-		toDetail(item) {
-			if (item.remark) {
-				uni.navigateTo({
-					url: '/pages/fu/helpDetail?id=' + item.hid
-				})
-			} else {
-				uni.navigateTo({
-					url: '/pages/fu/fuInfo?id=' + item.hid
-				})
-			}
+		toDetail(item) {
+			uni.navigateTo({
+				url: '/pages/fu/fuInfo?id=' + item.id
+			})
+			// if (item.remark) {
+			// 	uni.navigateTo({
+			// 		url: '/pages/fu/helpDetail?id=' + item.id
+			// 	})
+			// } else {
+			// 	uni.navigateTo({
+			// 		url: '/pages/fu/fuInfo?id=' + item.id
+			// 	})
+			// }
 				
 		}
 	}

+ 21 - 29
pages/user/user.vue

@@ -30,6 +30,15 @@
 					>
 				</view>
 			</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>
+					<view class="title">捐赠记录</view>
+				</view>
+				<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>
@@ -66,6 +75,15 @@
 					>
 				</view>
 			</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>
+					<view class="title">我的帮扶</view>
+				</view>
+				<view class="item-right">
+					>
+				</view>
+			</view>
 			<view class="nav-item flex" @click="loginout" >
 				<view class="item-left flex">
 					<image src="../../static/icon/i9.png" mode="" class="img4"></image>
@@ -76,33 +94,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- <view class="tt">
-			<view class="tt-box " @click="tohelp" style="background-color:#FEFAF2;">
-				<image src="../../static/icon/icon-04.png" class="tt-icon1" mode="" style="width: 52rpx; height: 62rpx;"></image>
-				<view class="tt-txt">
-					求救记录
-				</view>
-			</view>
-			<view class="tt-box " @click="torreco" style="background-color:#FDF4F4;">
-				<image src="../../static/icon/icon-05.png" class="tt-icon1" mode=""></image>
-				<view class="tt-txt">
-					救援记录
-				</view>
-			</view>
-			<view class="tt-box " @click="commonaddress" style="background-color:#F2F6FE;margin-right: 0">
-				<image src="../../static/icon/icon-06.png" class="tt-icon1" mode=""></image>
-				<view class="tt-txt">
-					常用地址
-				</view>
-			</view>
-			pages/form/certificates
-			<view class="tt-box" @click="tocertificates" style="background-color:#EEFFFC;">
-				<image src="../../static/icon/icon-07.png" class="tt-icon1" mode=""></image>
-				<view class="tt-txt">
-					我的证书
-				</view>
-			</view>
-		 </view> -->
 	</view>
 </template>
 
@@ -260,8 +251,9 @@
 		background: #fff;
 	}
 	.content {
-		line-height: 1;
-		background-color: #fff;
+		line-height: 1.5;
+		background-color: #fff;
+		height: 100%;
 		.top {
 			width: 750rpx;
 			height: 312rpx;

BIN
static/img/delete.png