Explorar el Código

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

hwq hace 3 años
padre
commit
148393e934
Se han modificado 9 ficheros con 1195 adiciones y 1007 borrados
  1. 19 0
      api/help.js
  2. 6 0
      pages.json
  3. 789 760
      pages/applic/contribution.vue
  4. 40 23
      pages/fu/axjz.vue
  5. 279 179
      pages/fu/fuInfo.vue
  6. 29 19
      pages/fu/helpDetail.vue
  7. 33 26
      pages/index/index.vue
  8. BIN
      static/tabBar/zuce-action.png
  9. BIN
      static/tabBar/zuce.png

+ 19 - 0
api/help.js

@@ -18,10 +18,29 @@ export function getHelpList(data) {
 	})
 }
 
+// 获取帮扶分类
 export function getHelpIfy(data) {
 	return request({
 		url: '/api/help/ify',
 		method: 'get',
 		data
 	})
+}
+
+// 帮扶详情
+export function getHelpDetail(data,id) {
+	return request({
+		url: '/api/help/view?id='+ id,
+		method: 'get',
+		data
+	})
+}
+
+// 申请帮扶
+export function userApply(data) {
+	return request({
+		url: '/api/help/userapply',
+		method: 'post',
+		data
+	})
 }

+ 6 - 0
pages.json

@@ -1001,6 +1001,12 @@
 				"selectedIconPath": "static/tabBar/dengji-action.png",
 				"text": "救在身边"
 				// "visible":false
+			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/zuce.png",
+				"selectedIconPath": "static/tabBar/zuce-action.png",
+				"text": "会员报名"
 			},
 			{
 				"pagePath": "pages/user/user",

+ 789 - 760
pages/applic/contribution.vue

@@ -1,762 +1,791 @@
-<template>
-	<view class="content">
-		<!-- <view class="top">
-			爱心捐款
-		</view> -->
-		<view class="box">
-			<view class="box-item">
-				<view class="box-left">
-					<text class="imp">*</text>捐款意向
-				</view>
-				<view class="box-right">
-					<picker :value="index" @change="PickerDire" :range="chooseDire" class="box-right" @click="addType">
-						<text>{{ intention || '请选择捐款意向'}}</text>
-					</picker>
-				</view>
-			</view>
-			<view class="box-item">
-				<view class="box-left">
-					<text class="imp">*</text>捐款方式
-				</view>
-				<view class="box-right">
-					<!-- <input type="text" placeholder="请选择捐款方式" /> -->
-					<picker @change="PickerType" :value="index" :range="chooseType" class="box-right">
-						<text>{{ way || '请选择捐款方式'}}</text>
-					</picker>
-				</view>
-			</view>
-			<!-- <view class="box-item">
-					<view class="box-left">
-						捐款金额
-					</view>
-					<view class="box-right">
-						<picker @change="PickerMoney" :value="index" :range="chooseMoney" class="box-right">
-							<text>{{ money || '请选择捐款金额'}}</text>
-						</picker>
-					</view>
-			</view> -->
-			<view class="box-item1" @click="tochooseMoney">
-				<!-- <view class="box-item1" @click="tochooseMoney"> -->
-				<view class="box-main">
-					<view class="box-left">
-						<text class="imp">*</text>捐款金额
-					</view>
-					<view class="box-right">
-						<input type="text" placeholder="请选择金额" v-model="money" disabled />
-						<!-- <picker @change="PickerMoney" :value="index" :range="chooseMoney" class="box-right">
-							<text>{{ money || '请选择捐款金额'}}</text>
-						</picker> -->
-					</view>
-
-				</view>
-
-				<view class="box-bottom">
-					个人满500,单位满2000可打印纸质证书
-				</view>
-			</view>
-
-		</view>
-		<!-- <view class="infoOptional">
-			信息(选填)
-		</view> -->
-		<view class="box">
-			<view class="box-item">
-				<view class="box-left">
-					<view v-if="is_show">
-						<text class="imp">*</text>姓名
-					</view>
-					<view v-else>
-						<text class="imp">*</text>单位
-					</view>
-				</view>
-				<view class="box-right">
-					<input type="text" placeholder="请真实填写" v-model="donate_er" />
-				</view>
-			</view>
-			<view class="box-item">
-				<view class="box-left">
-					<text class="imp">*</text>手机号
-				</view>
-				<view class="box-right">
-					<input type="text" placeholder="请填写手机号" v-model="mobile" />
-				</view>
-			</view>
-		</view>
-
-		<view class="switch-box">
-			<view class="switch-left">
-				实名公开
-			</view>
-			<view class="switch-right">
-				<switch :checked="public" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch1Change" />
-			</view>
-		</view>
-
-		<view class="switch-box">
-			<view class="switch-left">
-				寄发票
-			</view>
-			<view class="switch-right">
-				<switch :checked="receipts" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch2Change" />
-			</view>
-
-		</view>
-
-		<view class="box">
-			<view class="box-item">
-				<view class="box-left">
-					联系地址
-				</view>
-				<view class="box-right">
-					<input type="text" placeholder="请输入联系地址" v-model="address" />
-				</view>
-			</view>
-		</view>
-		<view class="submit" @click="confirm()">
-			立即提交
-		</view>
-		<uni-popup ref="popup" type="bottom" @click="close">
-			<view class="popup_row">
-				<view class="title">
-
-					<view class="title-left">
-						一份爱心,一份力量!
-					</view>
-					<view class="cancel" @click="cancel">
-						<!-- <image src="../../static/img/取消.png" mode=""></image> -->
-					</view>
-				</view>
-				<view class="money-btn">
-					<view class="btn" v-for="item in moneyList" :key="item.id">
-						<button type="default" @click="addmoney(item)">{{ item.money}}</button>
-					</view>
-				</view>
-				<view class="pop-main">
-					<view class="money-left">
-						金额数
-					</view>
-					<view class="money-iup">
-						<input type="text" value="" v-model="popmoney" placeholder="请选择金额或者自定义金额" />
-					</view>
-					<view class="">
-						元
-					</view>
-				</view>
-				<view class="comfirm">
-					<view class="comfirm1" @click="comfirm1()">
-						确认
-					</view>
-				</view>
-
-			</view>
-		</uni-popup>
-		<uni-popup ref="popup1" type="center">
-			<view class="popup-box">
-				<!-- <view class="img">
-					<image src="../../static/img/WechatIMG662.png" mode=""></image>
-				</view> -->
-				<view class="mian">
-					<view class="delivery">
-						支付失败
-						<!-- {{ i18n.qrhwsdm }} -->
-					</view>
-					<view class="nocancel">
-						请退出页面,重新登录
-						<!-- {{ i18n.wfcx }} -->
-					</view>
-					<view class="comfirm-box">
-						<view class="cancel" @click="cancel1">
-							取消
-						</view>
-						<view class="comfirm" @click="comfirmExit()">
-							 确认
-						</view>
-					</view>
-				</view>
-			</view>
-		
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		chosintention,
-		joinDona
-	} from '@/api/ask.js';
-	import uniPopup from '@/components/uni-popup/uni-popup.vue';
-	import {
-		computedOrderkey,
-		balance,
-		createOrderkey,
-		orderPay
-	} from '@/api/money.js';
-	import {
-		saveUrl,
-		interceptor
-	} from '@/utils/loginUtils.js';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import {
-		userinfo
-	} from '@/api/user.js';
-	export default {
-		components: {
-			uniPopup,
-			// uniLoadMore
-		},
-		data() {
-			return {
-				index: 0,
-				intention: '', // 捐款意向
-				category_id:'',// 捐款意向ID
-				way: '', // 捐款方式
-				way_id: '',// 捐款方式id
-				money: '', // 捐款金额
-				// elsemoney: '', // 其他金额
-				popmoney: '', // 按钮金额 弹窗金额
-				is_show: true,
-				moneyList: [{
-						id: 0,
-						money: 500
-					},
-					{
-						id: 1,
-						money: 200
-					},
-					{
-						id: 2,
-						money: 100
-					},
-					{
-						id: 3,
-						money: 50
-					},
-					{
-						id: 4,
-						money: 20
-					},
-				],
-				is_public: '0', // 是否实名公开
-				is_receipts: '1', // 是否开发票
-				public: true, // 是否实名公开
-				receipts: false, // 是否开发票
-				donate_er: '', // 捐款人/单位
-				mobile: '', // 手机号
-				isshowMoney: false, // 其他金额是否展示
-				address: '', // 联系地址
-				// chooseDire: ['请选择捐款意向','红十字人道事业(非定向捐赠)','疫情防控','其他','红十字博爱送万家','AED救护及科普','青少年生命安全教育基地建设项目','关注重度失能老人项目','青少年白血病救护项目','地芯行动-关爱地中海贫血儿童','会费缴纳'],
-				chooseDire: [],
-				chooseList: [],//捐款意向真实列表
-				chooseType: ['个人', '单位'],
-				chooseMoney: ['5元', '10元', '50元', '其他金额'],
-				payLoding: false, //判断是否支付中
-				froms: '', //保存h5中数据来源对象
-				type: '', //判断是否从订单中进入
-				payName: 'weixin',
-				// orderInfo: {},
-			}
-		},
-		onLoad(options) {
-			// console.log(333,options)
-		},
-		onShow() {
-			if (!this.hasLogin) {
-				// 登录拦截
-				uni.showModal({
-					title: '登录',
-					content: '您未登录,是否马上登陆?',
-					success: e => {
-						if (e.confirm) {
-							saveUrl()
-							interceptor();
-						}
-					},
-					fail: e => {
-						console.log(e);
-						uni.showModal({
-							title: '错误',
-							content: JSON.stringify(e),
-						})
-					}
-				});
-			} else {
-				// this.loadData();
-			}
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
-			...mapState(['weichatObj']),
-		},
-		methods: {
-			// 点击捐赠意向
-			addType(e) {
-				chosintention({}).then(({
-					data
-				}) => {
-					this.chooseDire = data.map(item => item.name)
-					this.chooseList = data
-				}).catch()
-			},
-			// 选择捐赠意向
-			PickerDire: function(e) {
-				console.log(334, e)
-				this.intention = this.chooseDire[e.target.value];
-				this.category_id = this.chooseList[e.target.value].id;
-			},
-			// 选择捐款方式
-			PickerType: function(e) {
-				this.way = this.chooseType[e.target.value];
-				this.way_id = e.target.value;
-				this.index = e.target.value;
-				console.log('选择捐款方式', this.way_id)
-				if (this.index == 1) {
-					this.is_show = true
-				} else {
-					this.is_show = false
-				}
-				// if ( )
-			},
-			// 选择捐款金额
-			PickerMoney: function(e) {
-				this.money = this.chooseMoney[e.target.value];
-				this.index = e.target.value + 1;
-				console.log('选择金额', this.money)
-				if (this.money == '其他金额') {
-					this.isshowMoney = true
-				} else {
-					this.isshowMoney = false
-					this.elsemoney = ''
-				}
-
-			},
-			// 其他金额 选择
-			tochooseMoney: function() {
-				this.$refs.popup.open();
-			},
-			addmoney(mon) {
-				console.log('点击金额按钮', mon.money)
-				this.popmoney = mon.money
-				console.log(123, this.popmoney)
-			},
-			cancel() {
-				this.$refs.popup.close();
-			},
-			cancel1() {
-				this.$refs.popup1.close();
-			},
-			comfirm1: function() {
-				let obj = this
-				if (obj.popmoney.toString().trim() == '') {
-					console.log('输入框为空')
-				} else {
-					console.log('输入框为不为空')
-					obj.money = obj.popmoney
-					obj.popmoney = ''
-					this.$refs.popup.close();
-				}
-			},
-			comfirmExit() {
-				console.log('点击comfirmExit')
-				this.$refs.popup1.close()
-				uni.switchTab({
-				    url: '/pages/home/home'
-				});
-				
-			},
-			// 是否实名公开
-			switch1Change(e) {
-				this.public = e.detail.value
-				if(e.detail.value){
-					this.is_public = '1'
-				}else {
-					this.is_public = '0'
-				}
-				console.log(this.is_public)
-			},
-			//是都寄发票
-			switch2Change(e) {
-				this.is_receipts = e.detail.value
-				if(e.detail.value){
-					this.is_receipts = '1'
-				}else {
-					this.is_receipts = '0'
-				}
-				console.log('is_receipts', this.is_receipts)
-			},
-			// 提交
-			confirm: async function() {
-				let obj = this
-				if (!obj.way) {
-					this.$api.msg('请选择捐款方式!');
-					return;
-				}
-				if (!obj.money) {
-					this.$api.msg('请输入捐款金额!');
-					return;
-				}
-				if (this.is_show) {
-					if (!obj.donate_er) {
-						this.$api.msg('请填写您的姓名');
-						return;
-					}
-				} else {
-					if (!obj.donate_er) {
-						this.$api.msg('请填写您的单位');
-						return;
-					}
-				}
-
-				const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
-				if (!reg.test(obj.mobile)) {
-					obj.$api.msg('请填写正确的手机号码');
-					return;
-				}
-				if (this.is_receipts == '0') {
-					// obj.address = '用户未填写联系地址'
-					if (!obj.address) {
-						this.$api.msg('请输入联系地址');
-						return;
-					}
-				}
-
-				if (!obj.address) {
-					obj.address = '用户未填写联系地址'
-				}
-				createOrderkey({
-					order_name: obj.intention, //捐款意向
-					category_id: obj.category_id,//捐款意向id
-					amount: obj.money, //捐款金额
-					name: obj.donate_er, //捐款人/单位
-					// contact: obj, //单位联系人(企业有效)
-					tel: obj.mobile, //手机号
-					address: obj.address, //联系地址
-					is_open: obj.is_public, //是否实名公开
-					is_ticket: obj.is_receipts, //是否开发票
-					pay_type:0,//支付方式0微信1支付宝
+<template>
+	<view class="content">
+		<!-- <view class="top">
+			爱心捐款
+		</view> -->
+		<view class="box">
+			<view class="box-item" v-if="!isHelp">
+				<view class="box-left">
+					<text class="imp">*</text>捐款意向
+				</view>
+				<view class="box-right">
+					<picker :value="index" @change="PickerDire" :range="chooseDire" class="box-right" @click="addType">
+						<text>{{ intention || '请选择捐款意向'}}</text>
+					</picker>
+				</view>
+			</view>
+			<view class="box-item">
+				<view class="box-left">
+					<text class="imp">*</text>捐款方式
+				</view>
+				<view class="box-right">
+					<!-- <input type="text" placeholder="请选择捐款方式" /> -->
+					<picker @change="PickerType" :value="index" :range="chooseType" class="box-right">
+						<text>{{ way || '请选择捐款方式'}}</text>
+					</picker>
+				</view>
+			</view>
+			<!-- <view class="box-item">
+					<view class="box-left">
+						捐款金额
+					</view>
+					<view class="box-right">
+						<picker @change="PickerMoney" :value="index" :range="chooseMoney" class="box-right">
+							<text>{{ money || '请选择捐款金额'}}</text>
+						</picker>
+					</view>
+			</view> -->
+			<view class="box-item1" @click="tochooseMoney">
+				<!-- <view class="box-item1" @click="tochooseMoney"> -->
+				<view class="box-main">
+					<view class="box-left">
+						<text class="imp">*</text>捐款金额
+					</view>
+					<view class="box-right">
+						<input type="text" placeholder="请选择金额" v-model="money" disabled />
+						<!-- <picker @change="PickerMoney" :value="index" :range="chooseMoney" class="box-right">
+							<text>{{ money || '请选择捐款金额'}}</text>
+						</picker> -->
+					</view>
+
+				</view>
+
+				<view class="box-bottom">
+					个人满500,单位满2000可打印纸质证书
+				</view>
+			</view>
+
+		</view>
+		<!-- <view class="infoOptional">
+			信息(选填)
+		</view> -->
+		<view class="box">
+			<view class="box-item">
+				<view class="box-left">
+					<view v-if="is_show">
+						<text class="imp">*</text>姓名
+					</view>
+					<view v-else>
+						<text class="imp">*</text>单位
+					</view>
+				</view>
+				<view class="box-right">
+					<input type="text" placeholder="请真实填写" v-model="donate_er" />
+				</view>
+			</view>
+			<view class="box-item">
+				<view class="box-left">
+					<text class="imp">*</text>手机号
+				</view>
+				<view class="box-right">
+					<input type="text" placeholder="请填写手机号" v-model="mobile" />
+				</view>
+			</view>
+		</view>
+
+		<view class="switch-box">
+			<view class="switch-left">
+				实名公开
+			</view>
+			<view class="switch-right">
+				<switch :checked="public" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch1Change" />
+			</view>
+		</view>
+
+		<view class="switch-box">
+			<view class="switch-left">
+				寄发票
+			</view>
+			<view class="switch-right">
+				<switch :checked="receipts" color='#E63931' style="transform: scale(0.7,0.7)" @change="switch2Change" />
+			</view>
+
+		</view>
+
+		<view class="box">
+			<view class="box-item">
+				<view class="box-left">
+					联系地址
+				</view>
+				<view class="box-right">
+					<input type="text" placeholder="请输入联系地址" v-model="address" />
+				</view>
+			</view>
+		</view>
+		<view class="submit" @click="confirm()">
+			立即提交
+		</view>
+		<uni-popup ref="popup" type="bottom" @click="close">
+			<view class="popup_row">
+				<view class="title">
+
+					<view class="title-left">
+						一份爱心,一份力量!
+					</view>
+					<view class="cancel" @click="cancel">
+						<!-- <image src="../../static/img/取消.png" mode=""></image> -->
+					</view>
+				</view>
+				<view class="money-btn">
+					<view class="btn" v-for="item in moneyList" :key="item.id">
+						<button type="default" @click="addmoney(item)">{{ item.money}}</button>
+					</view>
+				</view>
+				<view class="pop-main">
+					<view class="money-left">
+						金额数
+					</view>
+					<view class="money-iup">
+						<input type="text" value="" v-model="popmoney" placeholder="请选择金额或者自定义金额" />
+					</view>
+					<view class="">
+						元
+					</view>
+				</view>
+				<view class="comfirm">
+					<view class="comfirm1" @click="comfirm1()">
+						确认
+					</view>
+				</view>
+
+			</view>
+		</uni-popup>
+		<uni-popup ref="popup1" type="center">
+			<view class="popup-box">
+				<!-- <view class="img">
+					<image src="../../static/img/WechatIMG662.png" mode=""></image>
+				</view> -->
+				<view class="mian">
+					<view class="delivery">
+						支付失败
+						<!-- {{ i18n.qrhwsdm }} -->
+					</view>
+					<view class="nocancel">
+						请退出页面,重新登录
+						<!-- {{ i18n.wfcx }} -->
+					</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="cancel1">
+							取消
+						</view>
+						<view class="comfirm" @click="comfirmExit()">
+							确认
+						</view>
+					</view>
+				</view>
+			</view>
+
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		chosintention,
+		joinDona
+	} from '@/api/ask.js';
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	import {
+		computedOrderkey,
+		balance,
+		createOrderkey,
+		orderPay
+	} from '@/api/money.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		userinfo
+	} from '@/api/user.js';
+	export default {
+		components: {
+			uniPopup,
+			// uniLoadMore
+		},
+		data() {
+			return {
+				index: 0,
+				intention: '', // 捐款意向
+				category_id: '', // 捐款意向ID
+				way: '', // 捐款方式
+				way_id: '', // 捐款方式id
+				money: '', // 捐款金额
+				// elsemoney: '', // 其他金额
+				popmoney: '', // 按钮金额 弹窗金额
+				is_show: true,
+				moneyList: [{
+						id: 0,
+						money: 500
+					},
+					{
+						id: 1,
+						money: 200
+					},
+					{
+						id: 2,
+						money: 100
+					},
+					{
+						id: 3,
+						money: 50
+					},
+					{
+						id: 4,
+						money: 20
+					},
+				],
+				is_public: '0', // 是否实名公开
+				is_receipts: '1', // 是否开发票
+				public: true, // 是否实名公开
+				receipts: false, // 是否开发票
+				donate_er: '', // 捐款人/单位
+				mobile: '', // 手机号
+				isshowMoney: false, // 其他金额是否展示
+				address: '', // 联系地址
+				// chooseDire: ['请选择捐款意向','红十字人道事业(非定向捐赠)','疫情防控','其他','红十字博爱送万家','AED救护及科普','青少年生命安全教育基地建设项目','关注重度失能老人项目','青少年白血病救护项目','地芯行动-关爱地中海贫血儿童','会费缴纳'],
+				chooseDire: [],
+				chooseList: [], //捐款意向真实列表
+				chooseType: ['个人', '单位'],
+				chooseMoney: ['5元', '10元', '50元', '其他金额'],
+				payLoding: false, //判断是否支付中
+				froms: '', //保存h5中数据来源对象
+				type: '', //判断是否从订单中进入
+				payName: 'weixin',
+				// orderInfo: {},
+				help_id: 0,
+				isHelp: false,
+				order_name: '',
+			}
+		},
+		onLoad(options) {
+			// console.log(333,options)
+			if (options.helpid) {
+				this.help_id = options.helpid
+				this.order_name = options.order_name
+				this.isHelp = true
+			}
+		},
+		onShow() {
+			if (!this.hasLogin) {
+				// 登录拦截
+				uni.showModal({
+					title: '登录',
+					content: '您未登录,是否马上登陆?',
+					success: e => {
+						if (e.confirm) {
+							saveUrl()
+							interceptor();
+						}
+					},
+					fail: e => {
+						console.log(e);
+						uni.showModal({
+							title: '错误',
+							content: JSON.stringify(e),
+						})
+					}
+				});
+			} else {
+				// this.loadData();
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'baseURL', 'hasLogin']),
+			...mapState(['weichatObj']),
+		},
+		methods: {
+			// 点击捐赠意向
+			addType(e) {
+				chosintention({}).then(({
+					data
+				}) => {
+					this.chooseDire = data.map(item => item.name)
+					this.chooseList = data
+				}).catch()
+			},
+			// 选择捐赠意向
+			PickerDire: function(e) {
+				console.log(334, e)
+				this.intention = this.chooseDire[e.target.value];
+				this.category_id = this.chooseList[e.target.value].id;
+			},
+			// 选择捐款方式
+			PickerType: function(e) {
+				this.way = this.chooseType[e.target.value];
+				this.way_id = e.target.value;
+				this.index = e.target.value;
+				console.log('选择捐款方式', this.way_id)
+				if (this.index == 1) {
+					this.is_show = true
+				} else {
+					this.is_show = false
+				}
+				// if ( )
+			},
+			// 选择捐款金额
+			PickerMoney: function(e) {
+				this.money = this.chooseMoney[e.target.value];
+				this.index = e.target.value + 1;
+				console.log('选择金额', this.money)
+				if (this.money == '其他金额') {
+					this.isshowMoney = true
+				} else {
+					this.isshowMoney = false
+					this.elsemoney = ''
+				}
+
+			},
+			// 其他金额 选择
+			tochooseMoney: function() {
+				this.$refs.popup.open();
+			},
+			addmoney(mon) {
+				console.log('点击金额按钮', mon.money)
+				this.popmoney = mon.money
+				console.log(123, this.popmoney)
+			},
+			cancel() {
+				this.$refs.popup.close();
+			},
+			cancel1() {
+				this.$refs.popup1.close();
+			},
+			comfirm1: function() {
+				let obj = this
+				if (obj.popmoney.toString().trim() == '') {
+					console.log('输入框为空')
+				} else {
+					console.log('输入框为不为空')
+					obj.money = obj.popmoney
+					obj.popmoney = ''
+					this.$refs.popup.close();
+				}
+			},
+			comfirmExit() {
+				console.log('点击comfirmExit')
+				this.$refs.popup1.close()
+				uni.switchTab({
+					url: '/pages/home/home'
+				});
+
+			},
+			// 是否实名公开
+			switch1Change(e) {
+				this.public = e.detail.value
+				if (e.detail.value) {
+					this.is_public = '0'
+				} else {
+					this.is_public = '1'
+				}
+				console.log(this.is_public)
+			},
+			//是都寄发票
+			switch2Change(e) {
+				this.is_receipts = e.detail.value
+				if (e.detail.value) {
+					this.is_receipts = '0'
+				} else {
+					this.is_receipts = '1'
+				}
+				console.log('is_receipts', this.is_receipts)
+			},
+			// 提交
+			confirm: async function() {
+				let obj = this
+				if (!obj.way) {
+					this.$api.msg('请选择捐款方式!');
+					return;
+				}
+				if (!obj.money) {
+					this.$api.msg('请输入捐款金额!');
+					return;
+				}
+				if (this.is_show) {
+					if (!obj.donate_er) {
+						this.$api.msg('请填写您的姓名');
+						return;
+					}
+				} else {
+					if (!obj.donate_er) {
+						this.$api.msg('请填写您的单位');
+						return;
+					}
+				}
+
+				const reg = /^(\+?0?86-?)?1[\d]\d{9}$/;
+				if (!reg.test(obj.mobile)) {
+					obj.$api.msg('请填写正确的手机号码');
+					return;
+				}
+				if (this.is_receipts == '0') {
+					// obj.address = '用户未填写联系地址'
+					if (!obj.address) {
+						this.$api.msg('请输入联系地址');
+						return;
+					}
+				}
+
+				if (!obj.address) {
+					obj.address = '用户未填写联系地址'
+				}
+				if(!obj.isHelp) {
+					if (!obj.intention) {
+						this.$api.msg('请选择捐款意向');
+						return;
+					}
+				}
+				let updata = {
+					// category_id: obj.category_id, //捐款意向id
+					amount: obj.money, //捐款金额
+					name: obj.donate_er, //捐款人/单位
+					// contact: obj, //单位联系人(企业有效)
+					tel: obj.mobile, //手机号
+					address: obj.address, //联系地址
+					is_open: obj.is_public, //是否实名公开
+					is_ticket: obj.is_receipts, //是否开发票
+					pay_type: 0, //支付方式0微信1支付宝
 					type: obj.way_id,
-					// form: 
-				}).then(({
-					data
-				}) => {
-					console.log(345, data)
-					console.log(666, obj)
-					let res = data.jsConfig;
-					console.log(res)
-					// 仅作为示例,非真实参数信息。
-					obj.weichatObj.chooseWXPay({
-						timestamp: res.timestamp,
-						nonceStr: res.nonceStr,
-						package: res.package,
-						signType: res.signType,
-						paySign: res.paySign,
-						success: function(res) {
-							// obj.$api.msg('支付成功')
-							let date = new Date()
-							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=' + obj.money + '&name=' + obj.donate_er + '&time=' + year + '年' + month + '月' + day +'日'
-							})
-						},
-						fail: function(res) {
-							this.$refs.popup1.open()
-							console.log(res, "失败")
-							console.log(res.errMsg)
-						}
-					});
-				})
-				// 支付中
-				obj.payLoding = true;
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	.content {}
-
-	.top {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		background-color: #E63931;
-		color: #FFFFFF;
-		padding: 22rpx 0;
-	}
-
-	.box {
-		margin-top: 10rpx;
-		.box-item2{
-			background-color: #FFFFFF;
-			padding: 18rpx 24rpx;
-			// display: flex;
-			border-bottom: 1rpx solid #F2F2F2;
-			.box-left{
-				color: #E63931;
-			}
-			.box-info{
-				text-indent: 68rpx;
-				margin-top: 16rpx;
-				color: #7b7b7b;
-			}
-			.box-phone{
-				text-indent: 68rpx;
-				margin-top: 6rpx;
-				// text-align: center;
-				color: #7b7b7b;
-			}
-		}
-		.box-item1 {
-			background-color: #FFFFFF;
-			padding: 18rpx 24rpx;
-			// display: flex;
-			border-bottom: 1rpx solid #F2F2F2;
-
-		}
-
-		.box-main {
-			display: flex;
-
-			.box-left {
-				width: 200rpx;
-				flex-shrink: 0;
-				// flex: 0;
-			}
-
-			.box-right {
-				width: 100%;
-				color: #999999;
-				text-align: right;
-			}
-		}
-
-		.box-bottom {
-			color: #999999;
-			// padding-left: 12rpx;
-			padding-top: 12rpx;
-			font-size: 26rpx;
-		}
-
-		.box-item {
-			background-color: #FFFFFF;
-			padding: 24rpx;
-			display: flex;
-			border-bottom: 1rpx solid #F2F2F2;
-		}
-
-		.box-left {
-			width: 200rpx;
-			flex-shrink: 0;
-
-			// flex: 0;
-			.imp {
-				color: #E63931;
-				margin-right: 2rpx;
-			}
-		}
-
-		.box-right {
-			width: 100%;
-			color: #999999;
-			text-align: right;
-		}
-	}
-
-	.switch-box {
-		margin-top: 24rpx;
-		display: flex;
-		align-items: center;
-		padding: 16rpx 24rpx;
-		color: #7b7b7b;
-		background-color: #FFFFFF;
-		border-bottom: 1rpx solid #F2F2F2;
-		justify-content: space-between;
-
-		.switch-right {
-			// background-color: #E63931;
-		}
-	}
-
-	.infoOptional {
-		padding: 20rpx 24rpx;
-	}
-
-	.submit {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		width: 750rpx;
-		height: 100rpx;
-		background: #FA7E67;
-		color: #FFFFFF;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.popup_row {
-		height: 500rpx;
-		width: 100%;
-		padding: 24rpx;
-		background-color: #FFFFFF;
-
-		.title {
-			border-bottom: 2rpx solid #F2F2F2;
-			color: #E63931;
-			font-size: 32rpx;
-			padding-left: 4rpx;
-			padding-bottom: 16rpx;
-			display: flex;
-			justify-content: space-between;
-
-			// align-items: center;
-			.cancel {
-				width: 36rpx;
-				height: 36rpx;
-
-				image {
-					width: 36rpx;
-					height: 36rpx;
-				}
-			}
-		}
-
-		.money-btn {
-			display: flex;
-			justify-content: space-around;
-			margin-top: 28rpx;
-
-			.btn {
-				// 	width: 20%;
-				// 	display: flex;
-				// 	button{
-				// 		background-color: #FFFFFF;
-				// 	}
-			}
-		}
-
-		.pop-main {
-			margin-top: 32rpx;
-			font-size: 34rpx;
-			display: flex;
-
-			.money-left {
-				// width: 100rpx;
-				padding: 0 6rpx;
-				flex-shrink: 0;
-				color: #E63931;
-				// background-color: #457DBF;
-			}
-
-			.money-iup {
-				width: 100%;
-				padding-left: 22rpx;
-
-				input {
-					font-size: 32rpx;
-					// color: #1B1B1B;
-					color: #FF9797;
-
-					.input-placeholder {
-						// height: 70rpx;
-						font-size: 32rpx;
-						color: #FF9797;
-					}
-				}
-
-				// background-color: pink;
-			}
-		}
-
-		.comfirm {
-			display: flex;
-			justify-content: flex-end;
-			margin-top: 54rpx;
-
-			.comfirm1 {
-				padding: 12rpx 24rpx;
-				border-radius: 12rpx;
-				color: #FFFFFF;
-				background-color: #E63931;
-			}
-		}
-	}
-	.popup-box {
-		width: 522rpx;
-		height: 605rpx;
-		background-color: #FFFFFF;
-		border-radius: 20rpx;
-	
-		.img {
-			border-radius: 20rpx 20rpx 0 0;
-			width: 522rpx;
-			height: 307rpx;
-	
-			image {
-				border-radius: 20rpx 20rpx 0 0;
-				width: 522rpx;
-				height: 307rpx;
-			}
-		}
-	
-		.mian {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			padding: 32rpx 32rpx;
-			background-color: #FFFFFF;
-			border-radius: 0 0 20rpx 20rpx;
-			text-align: center;
-	
-			.delivery {
-				font-size: 36rpx;
-				color: #333333;
-				// margin-top: 46rpx;
-			}
-	
-			.nocancel {
-				font-size: 30rpx;
-				color: #999999;
-				margin-top: 26rpx;
-			}
-	
-			.comfirm-box {
-				margin-top: 52rpx;
-				display: flex;
-				// margin-bottom: 32rpx;
-	
-				// justify-content: space-around;
-				.cancel {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					width: 197rpx;
-					height: 61rpx;
-					border: 1px solid #C90F1B;
-					border-radius: 31rpx;
-	
-					font-size: 24rpx;
-					color: #C90F1B;
-				}
-	
-				.comfirm {
-					margin-left: 32rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					width: 197rpx;
-					height: 61rpx;
-					background: #FA7E67;
-					border-radius: 31px;
-					font-size: 24rpx;
-					color: #FFFFFF;
-				}
-			}
-		}
-	}
+				}
+				if (obj.isHelp) {
+					updata.help_id = obj.help_id
+					updata.order_name = obj.order_name
+				} else {
+					updata.order_name = obj.intention //捐款意向
+					updata.category_id = obj.category_id //捐款意向id
+				}
+				createOrderkey(updata).then(({
+					data
+				}) => {
+					console.log(345, data)
+					console.log(666, obj)
+					let res = data.jsConfig;
+					console.log(res)
+					// 仅作为示例,非真实参数信息。
+					obj.weichatObj.chooseWXPay({
+						timestamp: res.timestamp,
+						nonceStr: res.nonceStr,
+						package: res.package,
+						signType: res.signType,
+						paySign: res.paySign,
+						success: function(res) {
+							// obj.$api.msg('支付成功')
+							let date = new Date()
+							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=' + obj.money +
+									'&name=' + obj.donate_er + '&time=' + year + '年' +
+									month + '月' + day + '日'
+							})
+						},
+						fail: function(res) {
+							this.$refs.popup1.open()
+							console.log(res, "失败")
+							console.log(res.errMsg)
+						}
+					});
+				})
+				// 支付中
+				obj.payLoding = true;
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.content {}
+
+	.top {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background-color: #E63931;
+		color: #FFFFFF;
+		padding: 22rpx 0;
+	}
+
+	.box {
+		margin-top: 10rpx;
+
+		.box-item2 {
+			background-color: #FFFFFF;
+			padding: 18rpx 24rpx;
+			// display: flex;
+			border-bottom: 1rpx solid #F2F2F2;
+
+			.box-left {
+				color: #E63931;
+			}
+
+			.box-info {
+				text-indent: 68rpx;
+				margin-top: 16rpx;
+				color: #7b7b7b;
+			}
+
+			.box-phone {
+				text-indent: 68rpx;
+				margin-top: 6rpx;
+				// text-align: center;
+				color: #7b7b7b;
+			}
+		}
+
+		.box-item1 {
+			background-color: #FFFFFF;
+			padding: 18rpx 24rpx;
+			// display: flex;
+			border-bottom: 1rpx solid #F2F2F2;
+
+		}
+
+		.box-main {
+			display: flex;
+
+			.box-left {
+				width: 200rpx;
+				flex-shrink: 0;
+				// flex: 0;
+			}
+
+			.box-right {
+				width: 100%;
+				color: #999999;
+				text-align: right;
+			}
+		}
+
+		.box-bottom {
+			color: #999999;
+			// padding-left: 12rpx;
+			padding-top: 12rpx;
+			font-size: 26rpx;
+		}
+
+		.box-item {
+			background-color: #FFFFFF;
+			padding: 24rpx;
+			display: flex;
+			border-bottom: 1rpx solid #F2F2F2;
+		}
+
+		.box-left {
+			width: 200rpx;
+			flex-shrink: 0;
+
+			// flex: 0;
+			.imp {
+				color: #E63931;
+				margin-right: 2rpx;
+			}
+		}
+
+		.box-right {
+			width: 100%;
+			color: #999999;
+			text-align: right;
+		}
+	}
+
+	.switch-box {
+		margin-top: 24rpx;
+		display: flex;
+		align-items: center;
+		padding: 16rpx 24rpx;
+		color: #7b7b7b;
+		background-color: #FFFFFF;
+		border-bottom: 1rpx solid #F2F2F2;
+		justify-content: space-between;
+
+		.switch-right {
+			// background-color: #E63931;
+		}
+	}
+
+	.infoOptional {
+		padding: 20rpx 24rpx;
+	}
+
+	.submit {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 100rpx;
+		background: #FA7E67;
+		color: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.popup_row {
+		height: 500rpx;
+		width: 100%;
+		padding: 24rpx;
+		background-color: #FFFFFF;
+
+		.title {
+			border-bottom: 2rpx solid #F2F2F2;
+			color: #E63931;
+			font-size: 32rpx;
+			padding-left: 4rpx;
+			padding-bottom: 16rpx;
+			display: flex;
+			justify-content: space-between;
+
+			// align-items: center;
+			.cancel {
+				width: 36rpx;
+				height: 36rpx;
+
+				image {
+					width: 36rpx;
+					height: 36rpx;
+				}
+			}
+		}
+
+		.money-btn {
+			display: flex;
+			justify-content: space-around;
+			margin-top: 28rpx;
+
+			.btn {
+				// 	width: 20%;
+				// 	display: flex;
+				// 	button{
+				// 		background-color: #FFFFFF;
+				// 	}
+			}
+		}
+
+		.pop-main {
+			margin-top: 32rpx;
+			font-size: 34rpx;
+			display: flex;
+
+			.money-left {
+				// width: 100rpx;
+				padding: 0 6rpx;
+				flex-shrink: 0;
+				color: #E63931;
+				// background-color: #457DBF;
+			}
+
+			.money-iup {
+				width: 100%;
+				padding-left: 22rpx;
+
+				input {
+					font-size: 32rpx;
+					// color: #1B1B1B;
+					color: #FF9797;
+
+					.input-placeholder {
+						// height: 70rpx;
+						font-size: 32rpx;
+						color: #FF9797;
+					}
+				}
+
+				// background-color: pink;
+			}
+		}
+
+		.comfirm {
+			display: flex;
+			justify-content: flex-end;
+			margin-top: 54rpx;
+
+			.comfirm1 {
+				padding: 12rpx 24rpx;
+				border-radius: 12rpx;
+				color: #FFFFFF;
+				background-color: #E63931;
+			}
+		}
+	}
+
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+
+		.img {
+			border-radius: 20rpx 20rpx 0 0;
+			width: 522rpx;
+			height: 307rpx;
+
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 522rpx;
+				height: 307rpx;
+			}
+		}
+
+		.mian {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			padding: 32rpx 32rpx;
+			background-color: #FFFFFF;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+
+			.delivery {
+				font-size: 36rpx;
+				color: #333333;
+				// margin-top: 46rpx;
+			}
+
+			.nocancel {
+				font-size: 30rpx;
+				color: #999999;
+				margin-top: 26rpx;
+			}
+
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 61rpx;
+					border: 1px solid #C90F1B;
+					border-radius: 31rpx;
+
+					font-size: 24rpx;
+					color: #C90F1B;
+				}
+
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 61rpx;
+					background: #FA7E67;
+					border-radius: 31px;
+					font-size: 24rpx;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
 </style>

+ 40 - 23
pages/fu/axjz.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container">
 		<scroll-view class="scroll-list" scroll-x>
-			<view class="scoll-box" v-for="(ls,index) in cationList" :key="index" :class="{ active: ls.id === currentId }" @click="tabtap(ls.id)">
+			<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>
 			</view>
 		</scroll-view>
-		<swiper v-if="tabCurrentIndex == 0" class="swiper-box" duration="300" @change="changeTab">
+		<swiper class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
 					<!-- 空白页 -->
@@ -14,7 +14,7 @@
 					<view >
 						<view class="fu-box" v-for='(item, index) in list' :key="index" @click="toDetail(item)">
 							<view class="img-box">
-								<image class="fu-img" :src="item.image" mode="aspectFill"></image>
+								<image class="fu-img" :src="baseURL + item.userimage" mode="aspectFill"></image>
 								<text class="fu-cname">{{ item.cname }}</text>
 							</view>
 							<view class="fu-right">
@@ -41,13 +41,13 @@
 		<u-popup v-model="show" mode="right">
 			<view class="popup-box">
 				<view class="pop-bfu">
-					<view class="bfu-btn" :class="{'checkBtn': type == 2 }" @click="shaixuan(2)">
+					<view class="bfu-btn" :class="{'checkBtn': type == 1 }" @click="shaixuan(1)">
 						未帮扶
-						<image class="btn-img" v-if="type == 2" src="../../static/images/icon_pick.png"></image>
+						<image class="btn-img" v-if="type == 1" src="../../static/images/icon_pick.png"></image>
 					</view>
-					<view class="bfu-btn" :class="{'checkBtn': type == 1 }" @click="shaixuan(1)">
+					<view class="bfu-btn" :class="{'checkBtn': type == 2}" @click="shaixuan(2)">
 						帮扶中
-						<image class="btn-img" v-if="type == 1" src="../../static/images/icon_pick.png"></image>
+						<image class="btn-img" v-if="type == 2" src="../../static/images/icon_pick.png"></image>
 					</view>
 					<view class="bfu-btn" :class="{'checkBtn': type == 3 }" @click="shaixuan(3)">
 						公示中
@@ -78,6 +78,11 @@
 	import { one_help,  } from '@/api/index.js';
 	import { getUserInfo } from '@/api/login.js';
 	import { getList } from '@/api/applyHelp.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	// import { map}
 	export default {
 		components: {
 			uniLoadMore,
@@ -85,6 +90,7 @@
 		},
 		data() {
 			return {
+				category_id: 0,
 				tabCurrentIndex:0,
 				page: 1, //当前页数
 				limit: 10,//每次信息条数
@@ -94,10 +100,10 @@
 				keyword:'',
 				money:'',//捐款金额
 				integral:'',//捐款积分
-				cationList: [],	// 分类列表
+				cationList: [{name:'全部',id: 0}],	// 分类列表
 				currentId:0,
 				show: false,	// 弹窗开关
-				type: 2,	// 筛选条件 1-帮扶中  2-未帮扶  3-公示中  4-已完成
+				type: 1,	// 筛选条件 1-帮扶中  2-未帮扶  3-公示中  4-已完成
 			};
 		},
 		onLoad() {
@@ -107,7 +113,10 @@
 			this.page = 1;
 			this.loadingType = 'more';
 			this.list = [];
-			// this.loadData();
+			this.loadData();
+		},
+		computed: {
+		...mapState(['baseURL'])
 		},
 		// 搜索按钮点击
 		onNavigationBarButtonTap() {
@@ -123,7 +132,9 @@
 			// 获取帮扶分类
 			getHelpIfy() {
 				getHelpIfy().then( ({data}) => {
-					this.cationList = data
+					this.cationList = this.cationList.concat(data)
+					// this.currentId = this.cationList[0].id
+					// this.loadData()
 				})
 			},
 			// GetCation(){
@@ -154,10 +165,12 @@
 				getHelpList({
 					page:obj.page,
 					limit:obj.limit,
-					cid:obj.currentId,
-					type: obj.type
+					// isrec:obj.type,
+					category_id: obj.currentId,
+					status: obj.type
 				})
 					.then(data => {
+						console.log(data.data)
 						obj.list = obj.list.concat(data.data);
 						obj.page++;
 						if (obj.limit == data.data.length) {
@@ -171,8 +184,9 @@
 					})
 			},
 			//一级分类点击
-			tabtap(item) {
+			tabtap(item,index) {
 				let obj = this;
+				obj.tabCurrentIndex = index
 				obj.currentId = item;
 				obj.page = 1;
 				obj.loadingType = 'more';
@@ -180,15 +194,18 @@
 				obj.loadData()
 			},
 			toDetail(item) {
-				if ( item.is_show == 1 ) {
-					uni.navigateTo({
-						url: '/pages/fu/fuInfo?id=' + item.id
-					})
-				} else {
-					uni.navigateTo({
-						url: '/pages/fu/helpDetail?id=' + item.id
-					})
-				}
+				uni.navigateTo({
+					url: '/pages/fu/fuInfo?id=' + item.id
+				})
+				// if ( item.is_show == 1 ) {
+				// 	uni.navigateTo({
+				// 		url: '/pages/fu/fuInfo?id=' + item.id
+				// 	})
+				// } else {
+				// 	uni.navigateTo({
+				// 		url: '/pages/fu/helpDetail?id=' + item.id
+				// 	})
+				// }
 				
 			},
 			// 筛选 1-帮扶中   2-未帮扶

+ 279 - 179
pages/fu/fuInfo.vue

@@ -3,16 +3,21 @@
 		<view class="swiper">
 			<view class="swiper-box">
 				<swiper circular="true" autoplay="true" @change="swiperChange">
-					<swiper-item v-for="swiper in banner" :key="swiper.id"><image :src="swiper"></image></swiper-item>
+					<swiper-item v-for="swiper in banner">
+						<image :src="baseURL + swiper"></image>
+					</swiper-item>
 				</swiper>
-				<view class="indicator"><view class="dots" v-for="(swiper, index) in banner" :class="[swiperCurrent >= index ? 'on' : '']" :key="index"></view></view>
+				<view class="indicator">
+					<view class="dots" v-for="(swiper, index) in banner" :class="[swiperCurrent >= index ? 'on' : '']"
+						:key="index"></view>
+				</view>
 			</view>
 		</view>
-		
+
 		<view class="info-item">
-			<view class="flex_item">
-				<view class="list-tip">{{list.cname}}</view>
-				<view class="info-title clamp">{{list.title}}</view>
+			<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>
 			<view class="info-tip">{{list.info}}</view>
 			<view class="info-number">
@@ -31,40 +36,43 @@
 					</view>
 				</view>
 				<view class="starting" v-if="starting == false">活动已结束</view> -->
-				<view>资金:{{list.money }}</view>
-				<view v-if="starting == true">已有{{list.sales}}人申请</view>
+				<view>资金:{{list.amount || '暂无' }}</view>
+				<view v-if="starting == true">已有{{list.apply_sum || 0}}人申请</view>
 				<view v-if="starting == false">已结束</view>
 			</view>
 		</view>
 		<view class="introduce-item">
 			<view class="introduce-title ellipsis">项目介绍</view>
 			<view class="introduce-info">
-				<rich-text :nodes="list.description"></rich-text>
+				<rich-text :nodes="list.content"></rich-text>
 			</view>
 		</view>
 		<!-- <view class="introduce-item">
 			<view class="introduce-title ellipsis">捐款通道</view>
 			<view class="introduce-info">银行账户:{{list.bank_account}}</view>
-		</view> -->
-		<view class="btn-bottom">
-			<view class="btn-left">
-				<view class="submit" v-if="starting == true && list.is == 0" @click="shenqing"><text class="">申请援助</text></view>
-				<view class="submit yijieshu"  v-if="starting == true && list.is == 1"><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>
-			</view>
+		</view> -->
+		<view class="btn-bottom">
+			<view class="btn-left">
+				<view class="submit" v-if="(!list.is_apply) && (starting == true)" @click="shenqing"><text
+						class="">申请援助</text></view>
+				<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>
+			</view>
 		</view>
-	
-		
+
+
 		<uni-popup ref="popup" type="center">
 			<view class="pop-box">
 				<image class="pop-img" src="../../static/images/sqyz.png"></image>
 				<view class="pop-frame">
-					<view class="pop-text">是否确认申请援助</view>
+					<view class="pop-text">完善申请信息</view>
+					<input class="phone-ipt" placeholder="请输入姓名" v-model="username"/>
+					<input class="phone-ipt" placeholder="请输入手机号码" v-model="phone"/>
 					<view class="pop-btnBox">
 						<view class="pop-btn" @click="close">取消</view>
 						<view class="pop-btn queren" @click="corfim()">确认</view>
@@ -72,91 +80,132 @@
 				</view>
 			</view>
 		</uni-popup>
-	</view>
+	</view>
 </template>
-
+
 <script>
 	import uniPopup from '@/components/uni-popup/uni-popup.vue';
-	import { one_detail, enroll } from '@/api/applyHelp.js';
-	import { timeComputed } from '@/utils/rocessor.js';
-	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-	import {
-			weixindata
-		} from '@/utils/wxAuthorized.js';
+	import {
+		one_detail,
+		enroll
+	} from '@/api/applyHelp.js';
+	import {
+		timeComputed
+	} from '@/utils/rocessor.js';
+	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
+	import {
+		getHelpDetail,
+		userApply
+	} from '@/api/help.js'
+	import {
+		weixindata
+	} from '@/utils/wxAuthorized.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+
 	export default {
 		components: {
 			uniPopup,
 			uniCountdown
 		},
+		computed: {
+			...mapState(['baseURL','urlFile']),
+			...mapState('user',['userInfo'])
+		},
 		data() {
 			return {
-				id:'',
-				money:99,
+				username: '',
+				phone: '',
+				cname: '',
+				id: '',
+				money: 99,
 				list: '',
-				description:'',
+				description: '',
 				swiperCurrent: 0, //轮播图
 				swiperHeight: 300,
-				banner:[],//轮播图
-				img:'',
-				startday:0,
-				starthour:0,//距离今天开始时间
-				startminute:0,
-				startsecond:0,
-				title:'',
-				endTime:'',//结束时间
+				banner: [], //轮播图
+				img: '',
+				startday: 0,
+				starthour: 0, //距离今天开始时间
+				startminute: 0,
+				startsecond: 0,
+				title: '',
+				endTime: '', //结束时间
 				starting: false, //判断活动是否结束
 			};
 		},
-		onLoad(option) {
-			console.log(333,option)
+		onLoad(option) {
+			this.cname = option.cname
+			console.log(333, option)
 			this.id = option.id;
-			this.loadData();
+			this.loadData();
 			this.IndexShare();
+			this.username = this.userInfo.ext.full_name
+			this.phone = this.userInfo.mobile
 		},
-		
+
 		methods: {
-			loadData(){
-				let obj = this;
-				let id = obj.id;
-				console.log(9090,id)
-				one_detail({
-					id: obj.id
-				}).then(data => {
-					console.log(9785,data.data)
-						obj.list = data.data;
-						obj.banner =  data.data.slider_image;
-						console.log('轮播图', obj.banner)
-						if (obj.list.description) {
-							obj.description = obj.list.description.replace(/\<img/gi, '<img class="rich-img"');
-							obj.description.repeat(/[&]quot;/g,'')
-							console.log(obj.description,'123456')
-						} //小程序商品详情图超出屏幕问题
-						let time = data.data.endActivityTime;
-						this.endTime = time*1000;
-						obj.StartDate();
-					})
-			},
-			IndexShare() {
-				let obj = this;
-				let id = obj.id
-				one_detail({
-					id: obj.id
-				}).then(data => {
-					console.log(9785,data.data)
-						let img = data.data.slider_image[0]
-						let title = data.data.title
-						let info = data.data.info
-						let item = {
-							link:  'http://dxhred.igxys.com/index/#/pages/fu/fuInfo?id=' +id,// 分享链接
-							imgUrl: img,
-							desc: info,
-							title: title,
-							success: console.log('分享加载成功')
-						};
-						console.log('分享',item)
-						weixindata(item);
-					})
-				
+			loadData() {
+				let obj = this;
+				let id = obj.id;
+				console.log(9090, id)
+				getHelpDetail({
+					// id: obj.id
+				},obj.id).then(data => {
+					console.log(9785, data.data)
+					obj.list = data.data;
+					console.log(data.data)
+
+					// if (data.data.arr.info1.img) {
+					// 	obj.imgList = data.data.arr.info1.img.split(';');	// 上传资料图片
+					// }
+
+					obj.banner = data.data.userimages.split(',');
+					if (obj.list.content) {
+						obj.list.content = obj.list.content.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					var date = obj.list.end_time + '.0';
+					date = date.substring(0,19);    
+					date = date.replace(/-/g,'/'); 
+					var timestamp = new Date(date).getTime();
+					console.log(timestamp,'timestamp++++')
+					// let time = data.data.endActivityTime;
+					// this.endTime = time*1000;
+					// obj.StartDate();
+					// console.log('轮播图', obj.banner)
+					// if (obj.list.description) {
+					// 	obj.description = obj.list.description.replace(/\<img/gi, '<img class="rich-img"');
+					// 	obj.description.repeat(/[&]quot;/g,'')
+					// 	console.log(obj.description,'123456')
+					// } //小程序商品详情图超出屏幕问题
+					// let time = data.data.endActivityTime;
+					this.endTime = timestamp;
+					obj.StartDate();
+				})
+			},
+			IndexShare() {
+				let obj = this;
+				let id = obj.id
+				getHelpDetail({
+					// id: obj.id
+				},obj.id).then(data => {
+					console.log(9785, data.data)
+					let img = data.data.slider_image[0]
+					let title = data.data.title
+					let info = data.data.info
+					let item = {
+						link: this.baseURL + this.urlFile + '/#/pages/fu/fuInfo?id=' + id, // 分享链接
+						imgUrl: img,
+						desc: info,
+						title: title,
+						success: console.log('分享加载成功')
+					};
+					console.log('分享', item)
+					weixindata(item);
+				})
+
 			},
 			StartDate() {
 				let obj = this;
@@ -172,13 +221,13 @@
 				let time = new Date(year, month, date, hour, minu, sec);
 				let nowTime = time.getTime();
 				if (nowTime < obj.endTime) {
-					console.log(nowTime,obj.endTime)
+					console.log(nowTime, obj.endTime)
 					console.log('现在时间小于活动时间,活动进行中');
 					obj.starting = true;
 					console.log(obj.starting, '显示');
 					let starTime = obj.endTime - nowTime;
-					console.log(starTime,'starTime')
-					let day =  Math.floor(starTime / 1000 / 60 / 60 / 24); //获取剩余天数
+					console.log(starTime, 'starTime')
+					let day = Math.floor(starTime / 1000 / 60 / 60 / 24); //获取剩余天数
 					let hours = Math.floor((starTime / 1000 / 60 / 60) % 24); //获取剩余小时数
 					let minutes = Math.floor((starTime / 1000 / 60) % 60); //获取分钟
 					let seconds = Math.floor((starTime / 1000) % 60); //获取秒数
@@ -186,8 +235,9 @@
 					obj.starthour = hours;
 					obj.startminute = minutes;
 					obj.startsecond = seconds;
-					console.log('时间差是: '+ obj.startday + '天, ' + obj.starthour + '小时, ' + obj.startminute + '分钟, ' + obj.startsecond + '秒', '距离活动结束还剩多少时间');
-				}else{
+					console.log('时间差是: ' + obj.startday + '天, ' + obj.starthour + '小时, ' + obj.startminute + '分钟, ' + obj
+						.startsecond + '秒', '距离活动结束还剩多少时间');
+				} else {
 					obj.starting = false;
 				}
 			},
@@ -199,14 +249,14 @@
 			// 申请援助
 			shenqing() {
 				this.$refs.popup.open()
-			},
-			// 爱心捐款
-			loveDona(){
-				console.log('爱心捐款',this.id)
-				uni.navigateTo({
-					url: '/pages/applic/loveDonate?id=' + this.id
-				});
-				// pages/applic/loveDonate
+			},
+			// 爱心捐款
+			loveDona() {
+				console.log('爱心捐款', this.id)
+				uni.navigateTo({
+					url: '/pages/applic/contribution?helpid=' + this.id + '&order_name=' + this.list.full_name
+				});
+				// pages/applic/loveDonate
 			},
 			// 关闭弹窗
 			close() {
@@ -214,8 +264,18 @@
 			},
 			// 确认
 			corfim() {
-				enroll({
-					hid: this.id,
+				let obj =this
+				if(obj.phone == '' ) {
+					return obj.$api.msg('请完善联系方式')
+				}
+				if(obj.username == '' ) {
+					return obj.$api.msg('请完善姓名')
+				}
+				userApply({
+					// hid: this.id,
+					help_id: obj.list.id,
+					phone: obj.phone,
+					full_name: obj.username
 				}).then(res => {
 					this.close();
 					this.$api.msg('申请成功');
@@ -223,37 +283,43 @@
 				})
 			}
 		}
-	}
-</script>
-
+	}
+</script>
+
 <style lang="scss">
 	page {
 		background: #F5F5F5;
-		.container{
+
+		.container {
 			height: 100%;
 			padding-bottom: 180rpx;
 		}
 	}
+
 	.rich-img {
 		width: 100% !important;
 		height: auto;
 	}
+
 	//轮播图
 	.swiper {
 		width: 100%;
 		display: flex;
 		justify-content: center;
+
 		.swiper-box {
 			width: 100%;
-			height:650rpx;
+			height: 650rpx;
 			overflow: hidden;
 			// box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2);
 			//兼容ios,微信小程序
 			position: relative;
 			z-index: 1;
+
 			swiper {
 				width: 100%;
 				height: 100%;
+
 				swiper-item {
 					image {
 						width: 100%;
@@ -261,6 +327,7 @@
 					}
 				}
 			}
+
 			.indicator {
 				position: absolute;
 				bottom: 20upx;
@@ -271,10 +338,12 @@
 				border-radius: 3upx;
 				overflow: hidden;
 				display: flex;
+
 				.dots {
 					width: 0upx;
 					background-color: rgba(255, 255, 255, 1);
 					transition: all 0.3s ease-out;
+
 					&.on {
 						width: (100%/3);
 					}
@@ -282,32 +351,37 @@
 			}
 		}
 	}
-	.info-item{
+
+	.info-item {
 		background-color: #FFFFFF;
 		padding: 45rpx 25rpx;
-		.list-tip{
+
+		.list-tip {
 			background-color: $motif-color;
 			color: #FFFFFF;
-			border-radius:8rpx;
+			border-radius: 8rpx;
 			padding: 5rpx 12rpx;
 			padding-bottom: 8rpx !important;
 			margin-right: 15rpx;
 			text-align: center;
 			font-size: 24rpx;
 		}
-		.info-title{
+
+		.info-title {
 			max-width: 75%;
-			font-size:36rpx;
-			font-weight:500;
-			color:rgba(34,34,34,1);
+			font-size: 36rpx;
+			font-weight: 500;
+			color: rgba(34, 34, 34, 1);
 		}
-		.info-tip{
-			font-weight:400;
-			color:rgba(102,102,102,1);
+
+		.info-tip {
+			font-weight: 400;
+			color: rgba(102, 102, 102, 1);
 			font-size: 28rpx;
 			padding: 15rpx 0rpx;
 		}
-		.info-number{
+
+		.info-number {
 			padding-top: 25rpx;
 			color: #EF3D28;
 			font-size: 24rpx;
@@ -315,109 +389,132 @@
 			display: flex;
 			align-items: center;
 			justify-content: space-between;
-			.name-text{
+
+			.name-text {
 				color: #666666;
 			}
-			.starting{
+
+			.starting {
 				font-size: 32rpx;
 				font-weight: bold;
 			}
 		}
 	}
-	.introduce-item{
+
+	.introduce-item {
 		background-color: #FFFFFF;
 		padding: 45rpx 25rpx;
 		margin-top: 25rpx;
-		.introduce-title{
+
+		.introduce-title {
 			padding-bottom: 40rpx;
 			font-size: 36rpx;
 			font-family: PingFang;
 			font-weight: 500;
 			color: #222222;
 		}
-		.introduce-info{
+
+		.introduce-info {
 			font-size: 28rpx;
 			font-weight: 500;
 			color: #222222;
 		}
 	}
-	.static{
+
+	.static {
 		padding: 0rpx !important;
 		width: 70%;
-		padding-left:25rpx !important;
-	}
-	.btn-bottom{
-		position:fixed;
-		bottom: 0rpx;
-		padding: 24rpx 32rpx;
-		// height: 88rpx;
-		width: 100%;
-		color: #FFFFFF;
-		background-color: #FFFFFF;
-		display: flex;
-		justify-content: space-between;
-	}
-	.btn-left{
-		padding: 12rpx 0;
-		width: 45%;
-		// padding: 25rpx 180rpx;
-		// background:rgba(223,312,18,1);
-		background: $motif-color;
-		border-radius:50rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-	.btn-right{
-		padding: 6rpx 0;
-		width: 45%;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		// padding: 25rpx 180rpx;
-		// background:rgba(223,36,18,1);
-		background: $motif-color;
-		border-radius:50rpx;
+		padding-left: 25rpx !important;
 	}
+
+	.btn-bottom {
+		position: fixed;
+		bottom: 0rpx;
+		padding: 24rpx 32rpx;
+		// height: 88rpx;
+		width: 100%;
+		color: #FFFFFF;
+		background-color: #FFFFFF;
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.btn-left {
+		padding: 12rpx 0;
+		width: 45%;
+		// padding: 25rpx 180rpx;
+		// background:rgba(223,312,18,1);
+		background: $motif-color;
+		border-radius: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.btn-right {
+		padding: 6rpx 0;
+		width: 45%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		// padding: 25rpx 180rpx;
+		// background:rgba(223,36,18,1);
+		background: $motif-color;
+		border-radius: 50rpx;
+	}
+
 	// .submit{
-		// width: 45%;
-		// text-align: center;
-		// padding: 50rpx 0rpx;
-		// font-size: $font-lg;
-		// text{
-		// 	padding: 25rpx 180rpx;
-		// 	// background:rgba(223,36,18,1);
-		// 	background: $motif-color;
-		// 	border-radius:50rpx;
-		// }
+	// width: 45%;
+	// text-align: center;
+	// padding: 50rpx 0rpx;
+	// font-size: $font-lg;
+	// text{
+	// 	padding: 25rpx 180rpx;
+	// 	// background:rgba(223,36,18,1);
+	// 	background: $motif-color;
+	// 	border-radius:50rpx;
+	// }
 	// }
-	.yijieshu {
-		// padding: 12rpx 0;
-		// width: 45%;
+	.yijieshu {
+
+		// padding: 12rpx 0;
+		// width: 45%;
 		// background-color: #999999;
-		text{
+		text {
 			color: #C3C3C3;
 		}
 	}
-	.red{
-		text{
+
+	.red {
+		text {
 			padding: 25rpx 180rpx;
-			background:rgba(223,36,18,0.6);
-			border-radius:50rpx;
+			background: rgba(223, 36, 18, 0.6);
+			border-radius: 50rpx;
 		}
 	}
+
 	.pop-box {
 		.pop-img {
 			width: 542rpx;
 			height: 280rpx;
 			display: block;
 		}
+
 		.pop-frame {
 			margin: 0 16rpx;
 			padding: 35rpx 40rpx;
 			background: #FFFFFF;
 			box-shadow: 0px 5rpx 20rpx 0px rgba(0, 0, 0, 0.1);
 			border-radius: 0 0 10rpx 10rpx;
+			.phone-ipt {
+				margin-top: 20rpx;
+				display: block;
+				border: 1px solid #ff727e;
+				height: 50rpx;
+				line-height: 50rpx;
+				padding-left: 20rpx;
+				font-size: 32rpx;
+			}
 			.pop-text {
 				margin-top: 30rpx;
 				font-size: 36rpx;
@@ -427,11 +524,13 @@
 				line-height: 40rpx;
 				text-align: center;
 			}
+
 			.pop-btnBox {
-				margin-top: 78rpx;
+				margin-top: 40rpx;
 				display: flex;
 				align-items: center;
 				justify-content: space-between;
+
 				.pop-btn {
 					width: 199rpx;
 					height: 78rpx;
@@ -445,6 +544,7 @@
 					align-items: center;
 					justify-content: center;
 				}
+
 				.queren {
 					background: #FF727E;
 					color: #FFFFFF;

+ 29 - 19
pages/fu/helpDetail.vue

@@ -3,7 +3,7 @@
 		<view class="swiper">
 			<view class="swiper-box">
 				<swiper circular="true" autoplay="true" @change="swiperChange">
-					<swiper-item v-for="swiper in banner" :key="swiper.id"><image :src="swiper"></image></swiper-item>
+					<swiper-item v-for="swiper in banner" :key="swiper"><image :src="baseURL + swiper"></image></swiper-item>
 				</swiper>
 				<view class="indicator"><view class="dots" v-for="(swiper, index) in banner" :class="[swiperCurrent >= index ? 'on' : '']" :key="index"></view></view>
 			</view>
@@ -16,18 +16,18 @@
 			</view>
 			<view class="info-tip">{{list.info}}</view>
 			<view class="info-number">
-				<view>资金:{{ list.money }}</view>
-				<view>帮扶人:{{ list.arr.name }}</view>
+				<view>资金:{{ list.amount || 0 }}</view>
+				<view>帮扶人:{{ '' }}</view>
 			</view>
 		</view>
 		<view class="introduce-item">
 			<view class="introduce-title ellipsis">项目介绍</view>
 			<view class="introduce-info">
-				<rich-text :nodes="list.description"></rich-text>
+				<rich-text :nodes="list.content"></rich-text>
 			</view>
 		</view>
 		
-		<view class="introduce-item" v-if="list.arr.info1.remark">
+		<view class="introduce-item" v-if="list.arr">
 			<view class="introduce-title ellipsis">帮扶详情</view>
 			<view class="introduce-info">
 				<view>{{ list.arr.info1.remark }}</view>
@@ -45,6 +45,11 @@
 	import uniPopup from '@/components/uni-popup/uni-popup.vue';
 	import { one_detail, enroll } from '@/api/applyHelp.js';
 	import { timeComputed } from '@/utils/rocessor.js';
+	import { getHelpDetail } from '@/api/help.js'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
 	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
 	export default {
 		components: {
@@ -54,7 +59,7 @@
 		data() {
 			return {
 				id:'',
-				list: '',
+				list: {},
 				description:'',
 				swiperCurrent: 0, //轮播图
 				swiperHeight: 300,
@@ -74,24 +79,29 @@
 			this.id = option.id;
 			this.loadData();
 		},
+		computed: {
+			...mapState(['baseURL'])
+		},
 		methods: {
 			loadData(){
 				let obj = this;
-				one_detail({
-					id: obj.id
-				}).then(data => {
+				getHelpDetail({
+					// id: obj.id
+				},obj.id).then(data => {
 						obj.list = data.data;
-						if (data.data.arr.info1.img) {
-							obj.imgList = data.data.arr.info1.img.split(';');	// 上传资料图片
-						}
+						console.log(data.data)
+						
+						// if (data.data.arr.info1.img) {
+						// 	obj.imgList = data.data.arr.info1.img.split(';');	// 上传资料图片
+						// }
 							
-						obj.banner =  data.data.slider_image;
-						if (obj.list.description) {
-							obj.description = obj.list.description.replace(/\<img/gi, '<img class="rich-img"');
-						} //小程序商品详情图超出屏幕问题
-						let time = data.data.endActivityTime;
-						this.endTime = time*1000;
-						obj.StartDate();
+						obj.banner =  data.data.userimages.split(',');
+						// if (obj.list.description) {
+						// 	obj.description = obj.list.description.replace(/\<img/gi, '<img class="rich-img"');
+						// } //小程序商品详情图超出屏幕问题
+						// let time = data.data.endActivityTime;
+						// this.endTime = time*1000;
+						// obj.StartDate();
 					})
 			},
 			StartDate() {

+ 33 - 26
pages/index/index.vue

@@ -88,8 +88,8 @@
 								</view>
 							</view>
 						</view>
-						<view class="box-right" @click="rescue(item,index)">
-							<view class="img" v-if="!item.is">
+						<view class="box-right">
+							<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">
@@ -115,13 +115,13 @@
 						<view class="list-left">
 							<view class="info">
 								<view class="title">{{ item.name }}</view>
-								<view class="addr">地址:{{ item.detailed_address }}</view>
+								<view class="addr">地址:{{ item.address }}</view>
 							</view>
 						</view>
 						<view class="image">
 							<image src="../../static/img/img10.png"></image>
-							<view class="tip" v-if="item.space > 999">>999m</view>
-							<view class="tip" v-else>{{ item.space }}m</view>
+							<!-- <view class="tip" v-if="item.space > 999">>999m</view> -->
+							<view class="tip" >{{ item.range >=1 ? (item.range + 'km') : (item.distance + 'm') }}m</view>
 						</view>
 					</template>
 				</view>
@@ -141,14 +141,13 @@
 					<template>
 						<view class="list-left">
 							<view class="info">
-								<view class="title">{{ item.introduction }}</view>
-								<view class="addr">地址:{{ item.address }}</view>
+								<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" v-if="item.space > 999">>999m</view>
-							<view class="tip" v-else>{{ item.space }}m</view>
+							<view class="tip" >{{ item.range >=1 ? (item.range + 'km') : (item.distance + 'm') }}m</view>
 						</view>
 					</template>
 				</view>
@@ -190,6 +189,11 @@
 </template>
 
 <script>
+	import {
+		getAed,
+		getAidList,
+		getRescuerList
+	} from '@/api/category.js'
 	import {
 		loadIndexs,
 		bannerlist,
@@ -227,6 +231,7 @@
 		},
 		data() {
 			return {
+				rescuers_id: '',
 				name: '',
 				uid: '',
 				phone: '',
@@ -293,7 +298,7 @@
 					}
 				});
 			} else {
-				this.loadData();
+				// this.loadData();
 			}
 		},
 		onLoad() {
@@ -406,9 +411,9 @@
 			...mapState(['baseURL']),
 		},
 		// 下拉加载
-		onReachBottom() {
-			this.loadData();
-		},
+		// onReachBottom() {
+		// 	this.loadData();
+		// },
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
 			tocontribution() {
@@ -557,7 +562,9 @@
 				}
 				// 修改当前对象状态为加载中
 				obj.loadingType = 'loading';
-				getListAED({
+				getAed({
+					longitude: obj.longitude4,
+					latitude: obj.latitude4,
 					page: 1,
 					limit: 2
 				}).then(({
@@ -582,9 +589,11 @@
 					console.log(obj.AEDList, '999++++++++++++++++++++++++++');
 					obj.markerList = data;
 				});
-				getListMechanism({
+				getAidList({
 					page: 1,
-					limit: 2
+					limit: 2,
+					longitude: obj.longitude4,
+					latitude: obj.latitude4,
 				}).then(({
 					data
 				}) => {
@@ -605,9 +614,9 @@
 					obj.Mechanism = data;
 					console.log(obj.Mechanism, '888++++++++++++++++++++++++++');
 				})
-				getdis({
-					lng1: obj.longitude4,
-					lat1: obj.latitude4,
+				getRescuerList({
+					longitude: obj.longitude4,
+					latitude: obj.latitude4,
 					page: 1,
 					limit: 2
 				}).then((res) => {
@@ -681,16 +690,14 @@
 			// 立即救援
 			rescue(item, index) {
 				let obj = this;
+				console.log(item, 'jiuzhu item')
 				uni.showModal({
 					content: '是否发起求救?',
 					success: res => {
 						if (res.confirm) {
-							this.$refs.popup2.open(item, index);
-							obj.name = item.name;
-							obj.uid = item.uid;
-							obj.phone = item.phone;
-							obj.iscall = false
-							console.log('点击救援时item.phone:', obj.phone)
+							this.$refs.popup.open(item, index);
+							obj.rescuers_id = item.id
+							obj.user_id = item.user_id
 						}
 					}
 				})
@@ -1097,7 +1104,7 @@
 			}
 
 			.image {
-				width: 10%;
+				width: 20%;
 				text-align: center;
 
 				image {

BIN
static/tabBar/zuce-action.png


BIN
static/tabBar/zuce.png