Преглед на файлове

增加个人活动信息,优化部分信息展示

wangshuo преди 4 месеца
родител
ревизия
f0c0c300d2
променени са 6 файла, в които са добавени 390 реда и са изтрити 13 реда
  1. 8 2
      config/api.js
  2. 1 1
      index_fenbao/XuanJiangYuan/XuanJiangYuan.vue
  3. 8 0
      pages.json
  4. 35 6
      user_fenbao/houTai/zhiYuanZhe.vue
  5. 199 0
      user_fenbao/huoDong/details.vue
  6. 139 4
      user_fenbao/huoDong/huoDong.vue

+ 8 - 2
config/api.js

@@ -6,14 +6,14 @@ import * as common from './common.js' //引入common
 import * as db from './db.js' //引入common
 // 需要登陆的,都写到这里,否则就是不需要登陆的接口
 let methodsToken = ['profile', 'refreshUser', 'wxLogin', 'changeMobile', 'addCart',
-	'previewOrder', 'getWuyuanUser', 'archives_post', 'get_channel_fields', 'get_channel', 'lists', 'details',
+	'previewOrder', 'getWuyuanUser', 'archives_post', 'get_channel_fields', 'get_channel', 'lists', 'details', 'daishenhe',
 	'logOffVolunteer', 'getCrProperty', 'joinTeam', 'getTeamMember', 'getPatrolTask', 'claimCr',
 	'getPatrolLog', 'claimCrList', 'claimCrDetails', 'editMainBodyUser', , 'contribute',
 	'getPatrolTaskDetails', 'getContentDetail', 'examineVolunteer', 'userManageRegionCrAuth', 'applyVolunteer',
 	'getPhoneNumber', 'editApplyVolunteer', 'mobileBindVolunteer', 'getTeamDetails', 'examineTask', 'removeMemberm',
 	'getScoreLog', 'rankingList', 'getMainBodyColumnContentList', 'regionData', 'cityData', 'checkIn',
 	'getMainBodyUser', 'getUserContribute', 'getUserHonor', 'submitTask', 'exportPatrolRecord', 'userManageCrAuth',
-	'getDevices', 'submitIdentityInfo', 'submitActivitySignupInfo'
+	'getDevices', 'submitIdentityInfo', 'submitActivitySignupInfo','getUserSignupActivity', 'getUserSignupActivityDetails'
 ];
 const post = (method, data, callback, type, orgurl) => {
 	//填入默认主体id为1
@@ -461,6 +461,8 @@ export const applyVolunteer = (data, callback) => post('applyVolunteer', data, c
 export const lists = (data, callback) => post('lists', data, callback, '', 'api/volunteer/volunteer/lists');
 // 志愿者详情
 export const details = (data, callback) => post('details', data, callback, '', 'api/volunteer/volunteer/details');
+//待审核志愿者数量
+export const daishenhe = (data, callback) => post('daishenhe', data, callback, 'volunteer/volunteer');
 // 注销志愿者
 export const logOffVolunteer = (data, callback) => post('logOffVolunteer', data, callback, '',
 	'api/volunteer/volunteer/logOffVolunteer');
@@ -554,6 +556,10 @@ export const submitActivitySignupInfo = (data, callback) => post('submitActivity
 export const getXuanjiangList = (data, callback) => get('api/volunteer/volunteer/getXuanjiangList' + queryParams(data, true), callback);
 // 获取志愿者宣讲员详情
 export const getXuanjiangDetails = (data, callback) => get('api/volunteer/volunteer/getXuanjiangDetails' + queryParams(data, true), callback);
+// 获取用户报名活动列表
+export const getUserSignupActivity = (data, callback) => post('getUserSignupActivity', data, callback, 'content/main_body_user');
+// 获取用户报名活动详情
+export const getUserSignupActivityDetails = (data, callback) => post('getUserSignupActivityDetails', data, callback, 'content/main_body_user');
 	
 	
 	

+ 1 - 1
index_fenbao/XuanJiangYuan/XuanJiangYuan.vue

@@ -66,7 +66,7 @@ export default {
 						return;
 					} else {
 						that.xuangjiangyuanList = data.data;
-						console.log(that.xuangjiangyuanList, '文物跑活动宣讲员');
+						// console.log(that.xuangjiangyuanList, '文物跑活动宣讲员');
 					}
 				}
 			);

+ 8 - 0
pages.json

@@ -699,6 +699,14 @@
 						"navigationBarTitleText": "",
 						"enablePullDownRefresh": false
 					}
+				},
+				{
+					"path" : "details",
+					"style" : 
+					{
+						"navigationBarTitleText" : "",
+						"enablePullDownRefresh" : false
+					}
 				}
 
 			]

+ 35 - 6
user_fenbao/houTai/zhiYuanZhe.vue

@@ -3,7 +3,10 @@
 		<u-navbar :autoBack="true" title="志愿者管理" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
 		<view class="filter-box">
 			<view class="b-item" v-for="(item, index) in tabList" :key="index" :class="{ active: index == tab }" @click="tabBtn(index)">
-				<view class="">{{ item.name }}</view>
+				<view class="">
+					{{ item.name }}
+					<view v-if="item.name === '审核' && daishenhe > 0" class="badge">{{ daishenhe }}</view>
+				</view>
 			</view>
 		</view>
 
@@ -117,8 +120,9 @@
 					<view class="">认领文物:{{ detailsList.cr_list[0].title }}</view>
 					<view class="">住址:{{ detailsList.address }}</view>
 					<view class="">单位:{{ detailsList.unit_name }}</view>
+					<view class="">身份证:{{ detailsList.id_card }}</view>
+					<view class="">申请时间:{{ detailsList.created_at }}</view>
 				</view>
-				<view class="">身份证:{{ detailsList.id_card }}</view>
 				<view style="height: 300rpx; overflow: scroll">个人简介:{{ detailsList.intro || '暂无介绍' }}</view>
 				<view class="bt_box">
 					<view class="bt1" @click="(detailsShow = false), (returnShow = true)">驳回</view>
@@ -195,7 +199,8 @@ export default {
 			// 名单
 			recordList: [],
 			/* 审核数据列表 */
-			toExamine: []
+			toExamine: [],
+			daishenhe: 0
 		};
 	},
 	onLoad(o) {
@@ -203,14 +208,26 @@ export default {
 		this.id = o.id;
 		this.id2 = o.id;
 		this.lists();
+		this.getDaishenhe();
 		this.getCulturalRelicCategory();
 	},
 	methods: {
+		//待审核数量
+		getDaishenhe() {
+			this.$api.daishenhe({}, function (res) {
+				if (res.code == 1) {
+					that.daishenhe = res.data;
+				// console.log(that.daishenhe, '待审核数量');
+				} else {
+					that.$common.errorToShow(res.msg);
+				}
+			});
+		},
 		// 名单
 		lists(id) {
 			this.isLoading = true;
 			this.$api.lists({ region_id: id || this.id, status: this.statusId, keywords: this.value, page: this.page, pageSize: 30, main_body_id: 1 }, function (res) {
-				console.log(res, '名单');
+				// console.log(res, '名单');
 				if (res.code == 1) {
 					that.isLoading = false;
 					that.recordList = [...that.recordList, ...res.data];
@@ -222,7 +239,7 @@ export default {
 		auditingLists() {
 			this.isLoading = true;
 			this.$api.lists({ status: '0,-2', page: this.page, pageSize: 10, main_body_id: 1 }, function (res) {
-				console.log(res, '审核列表');
+				// console.log(res, '审核列表');
 				if (res.code == 1) {
 					that.isLoading = false;
 					that.toExamine = [...that.toExamine, ...res.data];
@@ -350,7 +367,7 @@ export default {
 						};
 						return acc;
 					}, {});
-					console.log(itemsById, 1212);
+					// console.log(itemsById, 1212);
 					// 构建树结构
 					const tree = res.data
 						.filter((item) => {
@@ -397,6 +414,18 @@ export default {
 	background-repeat: repeat-y;
 	height: 100%;
 }
+.badge {
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
+  width: 20px;
+  height: 20px;
+  background-color: red;
+  color: white;
+  border-radius: 50%; /* 创建圆形 */
+  font-size: 12px;
+  margin-left: 8px; /* 根据需要调整间距 */
+}
 .zhuxiao {
 	color: #f73131;
 }

+ 199 - 0
user_fenbao/huoDong/details.vue

@@ -0,0 +1,199 @@
+<template>
+	<view class="box">
+		<u-navbar :autoBack="true" title="详情" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
+		<view class="ban">
+			<view class="order">
+				<view class="attribute">
+					<view class="label">
+						<text>活动:</text>
+					</view>
+					<view class="value">
+						<text>{{item.activity_title}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>姓名:</text>
+					</view>
+					<view class="value">
+						<text>{{item.name}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>手机号:</text>
+					</view>
+					<view class="value">
+						<text>{{item.mobile}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>身份证号:</text>
+					</view>
+					<view class="value">
+						<text>{{item.id_card}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>日程安排:</text>
+					</view>
+					<view class="value">
+						<text>{{item.start_time}}~{{item.end_time}}</text>
+					</view>
+				</view>
+
+				<view class="attribute">
+					<view class="label">
+						<text>描述:</text>
+					</view>
+					<view class="value">
+						<text>{{item.desc}}</text>
+					</view>
+				</view>
+				<view class="attribute" v-for="(value,key) in item.params" :key="key">
+					<view class="label">
+						<text>{{ key }}:</text>
+					</view>
+					<view class="value">
+						<text>{{value}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>费用:</text>
+					</view>
+					<view class="value">
+						<text>¥{{item.price}}</text>
+					</view>
+				</view>
+				<view class="attribute">
+					<view class="label">
+						<text>积分:</text>
+					</view>
+					<view class="value">
+						<text>{{item.price}}</text>
+					</view>
+				</view>
+			</view>
+
+		</view>
+	</view>
+
+</template>
+
+<script>
+let that;
+	export default {
+		data() {
+			return {
+				scrollTop: 0,
+				item: []
+			};
+		},
+		onLoad(option) {
+			that = this;
+			that.getUserSignupActivityDetails(option.id);
+		},
+		methods: {
+			getUserSignupActivityDetails(id) {
+				this.$api.getUserSignupActivityDetails(
+					{
+						signup_id: id
+					},
+					data => {
+						if (data.code == 0) {
+							that.$common.errorToShow(data.msg);
+							return;
+						} else {
+							that.item = data.data;
+							if (that.item.params === 'undefined' || that.item.params === '' || that.item.params === [] || that.item.params === null) {
+							}else {
+								that.item.params = Object.assign({}, ...that.item.params);
+							}
+							console.log(that.item, 'item');
+						}
+					}
+				);
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.box {
+	width: 100%;
+	padding-bottom: 50rpx;
+	background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xbg_2.png');
+	background-size: 100% 100%;
+	background-attachment: fixed;
+	background-repeat: repeat-y;
+	height: 100%;
+	
+	.ban {
+		position: relative;
+		width: 92%;
+		margin: auto;
+	}
+	
+	.order {
+		.attribute {
+			display: flex;
+			margin-bottom: 10rpx;
+			background: #f0f0f0;
+			padding: 20rpx;
+
+			.label {
+				display: inline-block;
+				width: 140rpx;
+
+				.icon-daohang {
+					color: #000000;
+					font-size: 40rpx;
+					margin-right: 20rpx;
+					display: block;
+				}
+			}
+
+			.value {}
+		}
+	}
+
+	.bottom {
+		padding: 20rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		width: 100%;
+
+		.tips {
+			text-align: center;
+			color: $uni-color-primary;
+			font-size: 24rpx;
+		}
+	}
+
+	.friend {
+		text-align: center;
+	}
+
+	.footer {
+		position: fixed;
+		z-index: 99;
+		left: 0;
+		bottom: 126rpx;
+		width: 100%;
+
+		.tips {
+			text-align: center;
+			color: #ff7950;
+			font-size: 24rpx;
+		}
+	}
+	.scroll-Y {
+			height: 400rpx;
+		}
+}
+</style>

+ 139 - 4
user_fenbao/huoDong/huoDong.vue

@@ -1,20 +1,88 @@
 <template>
 	<view class="box">
 		<u-navbar :autoBack="true" title="我的活动" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
-		<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"></u-empty>
+		<view class="order-list" v-if="signupActivityList.length > 0">
+			<view class="item" @click="details(item.id)" v-for="(item,index) in signupActivityList" :key="index">
+				<view class="no">
+					<view><text class="label">活动:</text><text>{{item.activity_title}}</text></view>
+					<text class="create-time"></text>
+				</view>
+
+				<view class="order-content">
+					<view class="pay-item">
+						<view>
+							<text class="label">姓名:</text>
+							<text>{{item.name}}</text>
+						</view>
+						<view style="text-align: right;">
+							<text class="label">手机号:</text>
+							<text>{{item.mobile}}</text>
+						</view>
+					</view>
+					<view class="pay-item">
+						<view>
+							<text class="label">活动时段:</text>
+							<text>{{item.start_time}}~{{item.end_time}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="footer">
+					<text class="price">¥{{item.price}}</text>
+					<view class="status">
+						<text class="label">订单状态:</text><text>{{item.status_text}}</text>
+						<!-- <button @click="details(item.id)" class="cu-btn round bg-gradual-orange"
+							v-if="item.status ==='0'">去付款</button>
+						<button @click="cancelGym" class="cu-btn round bg-gradual-orange"
+							v-if="item.status==1">取消订单</button> -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-empty v-else text="暂未报名活动" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"></u-empty>
 	</view>
 </template>
 
 <script>
+let that;
 export default {
+	onLoad(option) {
+		that = this;
+	},
+	onShow(option) {
+		that.getUserSignupActivity();
+	},
 	data() {
-		return {};
+		return {
+			signupActivityList: []
+		};
 	},
-	methods: {}
+	methods: {
+		details(id) {
+			console.log('details')
+			uni.navigateTo({
+				url: '/user_fenbao/huoDong/details?id=' + id
+			});
+		},
+		getUserSignupActivity() {
+			this.$api.getUserSignupActivity(
+				{
+				},
+				data => {
+					if (data.code == 0) {
+						that.$common.errorToShow(data.msg);
+						return;
+					} else {
+						that.signupActivityList = data.data;
+						// console.log(that.bannerlist);
+					}
+				}
+			);
+		},
+	}
 };
 </script>
 
-<style>
+<style lang="scss" scoped>
 .box {
 	width: 100%;
 	padding-bottom: 50rpx;
@@ -23,5 +91,72 @@ export default {
 	background-attachment: fixed;
 	background-repeat: repeat-y;
 	height: 100%;
+	
+		.order-list {
+			.label {
+	
+				display: inline-block;
+				margin-right: 6rpx;
+			}
+	
+			.item {
+				background: #f9f9f9;
+				color: #000;
+				margin: 20rpx;
+				font-size: 24rpx;
+				border-radius: 10rpx;
+				border: 5rpx solid #fde6d2;
+	
+				.label {
+					color: #000;
+				}
+	
+				.no {
+					border-bottom: 2rpx solid #cfcfcf;
+					display: flex;
+					padding: 20rpx;
+	
+					.create-time {
+						flex: 1;
+						text-align: right;
+					}
+				}
+	
+				.footer {
+					padding: 20rpx;
+					display: flex;
+					align-items: center;
+	
+					.price {
+						color: #4e4e4e;
+						font-weight: 600;
+					}
+	
+					.status {
+						flex: 1;
+						text-align: right;
+					}
+	
+					u-button {
+						margin-left: 20rpx;
+					}
+				}
+	
+				.order-content {
+					border-bottom: 2rpx solid #cfcfcf;
+					padding-top: 20rpx;
+	
+					.pay-item {
+						padding: 0 20rpx;
+						margin-bottom: 20rpx;
+						display: flex;
+	
+						>view {
+							flex: 1;
+						}
+					}
+				}
+			}
+		}
 }
 </style>