Selaa lähdekoodia

修改复用草稿箱

zs 1 vuosi sitten
vanhempi
commit
96d5359a9f

+ 6 - 0
pages.json

@@ -146,6 +146,12 @@
 					"style": {
 					"style": {
 						"navigationBarTitleText": "报名队员"
 						"navigationBarTitleText": "报名队员"
 					}
 					}
+				},
+				{
+					"path": "draft/index",
+					"style": {
+						"navigationBarTitleText": "草稿箱"
+					}
 				}
 				}
 			]
 			]
 		},
 		},

+ 138 - 10
pagesHome/activity/info.vue

@@ -4,11 +4,11 @@
 			<scroll-view scroll-y="true" class="scroll-view">
 			<scroll-view scroll-y="true" class="scroll-view">
 				<view class="list-scroll-view">
 				<view class="list-scroll-view">
 					<view class="one">
 					<view class="one">
-						<view class="one_1" v-if="info.status=='0'&&info.type=='0'">
-							<text>约战</text> ·{{getNumber(info?.matchInfo?.number)}}
+						<view class="one_1" v-if="info.type=='0'">
+							<text v-if="info.status=='0'">约战</text> ·{{getNumber(info?.matchInfo?.number)}}
 						</view>
 						</view>
 						<view class="one_1" v-else>
 						<view class="one_1" v-else>
-							·{{info.number||0}}制 | 共{{info.wheel||0}}轮
+							·{{getNumber(info?.matchInfo?.number)}} | 共{{info.wheel||0}}轮
 						</view>
 						</view>
 						<view class="one_2">
 						<view class="one_2">
 							<view class="left">
 							<view class="left">
@@ -28,7 +28,10 @@
 							<text>{{getDayOfWeek(info.startTime)}}</text>
 							<text>{{getDayOfWeek(info.startTime)}}</text>
 							{{info.time||'暂无时间'}}
 							{{info.time||'暂无时间'}}
 						</view>
 						</view>
-						<view class="one_4 textOne"><text>{{info?.matchInfo?.address||'暂无地点'}}</text> </view>
+						<view class="one_4 textOne">
+							<text v-if="info.type=='0'">{{info?.matchInfo?.address||'暂无地点'}}</text>
+							<text v-else>{{info?.leagueInfo?.address||'暂无地点'}}</text>
+						</view>
 					</view>
 					</view>
 					<view class="position">
 					<view class="position">
 						<view class="two">
 						<view class="two">
@@ -58,24 +61,35 @@
 										</view>
 										</view>
 									</view>
 									</view>
 									<view class="count">
 									<view class="count">
-										<view class="count_1">
+										<view :class="[info.status=='3'?'count_1':'count_2']">
 											<view class="left"><text>报名</text></view>
 											<view class="left"><text>报名</text></view>
 											<view class="right">
 											<view class="right">
 												<text style="color: red;">{{info?.matchInfo?.member||'0'}}</text>
 												<text style="color: red;">{{info?.matchInfo?.member||'0'}}</text>
 												<text>人</text>
 												<text>人</text>
 											</view>
 											</view>
 										</view>
 										</view>
-										<view class="count_1">
+										<view :class="[info.status=='3'?'count_1':'count_2']">
 											<view class="left"><text>请假</text></view>
 											<view class="left"><text>请假</text></view>
 											<view class="right">
 											<view class="right">
 												<text style="color: red;">{{info?.matchInfo?.member||'0'}}</text>
 												<text style="color: red;">{{info?.matchInfo?.member||'0'}}</text>
 												<text>人</text>
 												<text>人</text>
 											</view>
 											</view>
 										</view>
 										</view>
+										<view :class="[info.status=='3'?'count_1':'count_2']"  v-if="info.status=='3'">
+											<view class="left"><text>出勤</text></view>
+											<view class="right">
+												<text style="color: red;">{{info?.matchInfo?.member||'0'}}</text>
+												<text>人</text>
+											</view>
+										</view>
 									</view>
 									</view>
 								</view>
 								</view>
 								<view v-show="current === 1">
 								<view v-show="current === 1">
-									数据统计
+									<view class="technology_1">技术统计</view>
+									<view class="technology_2">
+										<view class="other_1">暂无数据</view>
+										<view class="other_2">比赛结束后记得统计数据哦</view>
+									</view>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -100,6 +114,19 @@
 				<button class="button2" type="warn" size="mini" @tap="onEnroll">报名</button>
 				<button class="button2" type="warn" size="mini" @tap="onEnroll">报名</button>
 			</view>
 			</view>
 		</view>
 		</view>
+		<!-- 编辑 -->
+		<uni-popup ref="popup" background-color="rgba(0,0,0,0)" type="center" @change="change">
+			<view class="popup">
+				<view class="popup_1">
+					<view class="name">编辑</view>
+				</view>
+				<view class="info">
+					<view class="info_1" @tap="toAgain">重新编辑</view>
+					<view class="info_1" @tap="toCancel">取消比赛</view>
+					<view class="close" @tap="toClose">取消</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -122,6 +149,8 @@
 	const user = ref({});
 	const user = ref({});
 	// 字典表
 	// 字典表
 	const numberList = ref([]);
 	const numberList = ref([]);
+	// 弹框
+	const popup = ref(null);
 	onLoad(async (options) => {
 	onLoad(async (options) => {
 		id.value = options && options.id
 		id.value = options && options.id
 		uni.setNavigationBarTitle({
 		uni.setNavigationBarTitle({
@@ -186,7 +215,7 @@
 		if (value) {
 		if (value) {
 			const data = numberList.value.find(i => i.dictValue == value)
 			const data = numberList.value.find(i => i.dictValue == value)
 			if (data) return data.dictLabel
 			if (data) return data.dictLabel
-		} else return 0;
+		} else return '0制';
 	};
 	};
 	// 查看队员
 	// 查看队员
 	const toInfo = (name : string) => {
 	const toInfo = (name : string) => {
@@ -196,11 +225,40 @@
 	};
 	};
 	// 编辑
 	// 编辑
 	const toEdit = async () => {
 	const toEdit = async () => {
-		console.log('编辑');
+		popup.value.open();
+	};
+	// 重新编辑
+	const toAgain = async () => {
+		console.log('重新编辑');
+	};
+	// 取消比赛
+	const toCancel = async () => {
+		uni.showModal({
+			title: '提示',
+			content: '您确定取消比赛吗?',
+			success: async function (res) {
+				if (res.confirm) {
+					const res = await $api(`game/${info.value.id}`, 'DELETE', {})
+					if (res.code == 200) {
+						uni.navigateBack({
+							delta: 1
+						})
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
+				}
+			}
+		});
 	};
 	};
 	// 复用
 	// 复用
 	const toCopy = async () => {
 	const toCopy = async () => {
 		console.log('复用');
 		console.log('复用');
+		uni.navigateTo({
+			url: `/pagesHome/draft/index?id=${info.value.id}`,
+		})
 	};
 	};
 	// 请假
 	// 请假
 	const onLeave = async () => {
 	const onLeave = async () => {
@@ -212,11 +270,18 @@
 	};
 	};
 	// 邀请分享配置
 	// 邀请分享配置
 	const searchShare = () => {
 	const searchShare = () => {
+		let titleName = '';
+		if (info.value.type == '0') titleName = '友谊赛';
+		else if (info.value.type == '1') titleName = '联赛';
 		$config.share = {
 		$config.share = {
-			title: `${user.value.name || '暂无名称'}邀请你报名${info.value.title || '暂无比赛名称'}`,
+			title: `${user.value.name || user.value.nickname || '暂无昵称'}邀请你报名${titleName || '暂无比赛名称'}`,
 			path: `/pagesHome/share/index?id=${info.value.id}` //后面是路径上要传递的参数
 			path: `/pagesHome/share/index?id=${info.value.id}` //后面是路径上要传递的参数
 		}
 		}
 	}
 	}
+	// 关闭弹框
+	const toClose = () => {
+		popup.value.close();
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.content {
 	.content {
@@ -299,6 +364,7 @@
 				.one_4 {
 				.one_4 {
 					text-align: center;
 					text-align: center;
 					margin: 2vw;
 					margin: 2vw;
+					border-radius: 10vw;
 
 
 					text {
 					text {
 						font-size: var(--font14Size);
 						font-size: var(--font14Size);
@@ -351,6 +417,15 @@
 							margin: 2vw 4vw;
 							margin: 2vw 4vw;
 
 
 							.count_1 {
 							.count_1 {
+								display: flex;
+								justify-content: space-between;
+								width: 17vw;
+								padding: 4vw;
+								border-radius: 2px;
+								font-size: var(--font12Size);
+								background-color: var(--footColor);
+							}
+							.count_2 {
 								display: flex;
 								display: flex;
 								justify-content: space-between;
 								justify-content: space-between;
 								width: 35vw;
 								width: 35vw;
@@ -360,6 +435,26 @@
 								background-color: var(--footColor);
 								background-color: var(--footColor);
 							}
 							}
 						}
 						}
+
+						.technology_1 {
+							padding: 2vw;
+							margin: 2vw 0 0 0;
+							font-size: var(--font16Size);
+						}
+
+						.technology_2 {
+							padding: 2vw;
+							text-align: center;
+
+							.other_1 {
+								color: var(--f85Color);
+								font-size: var(--font14Size);
+							}
+
+							.other_2 {
+								font-size: var(--font16Size);
+							}
+						}
 					}
 					}
 				}
 				}
 			}
 			}
@@ -406,6 +501,39 @@
 				}
 				}
 			}
 			}
 		}
 		}
+
+		.popup {
+			display: flex;
+			flex-direction: column;
+			background: var(--mainColor);
+			width: 70vw;
+			height: 26vh;
+			padding: 2vw;
+			border-radius: 5px;
+
+			.popup_1 {
+				text-align: center;
+				padding: 2vw;
+				font-size: var(--font16Size);
+				color: var(--f85Color);
+			}
+
+			.info {
+				.info_1 {
+					padding: 3vw 0;
+					font-size: var(--font16Size);
+					text-align: center;
+				}
+
+				.close {
+					text-align: center;
+					font-size: var(--font16Size);
+					color: var(--f85Color);
+					padding: 2vw;
+					border-top: 1px solid var(--footColor);
+				}
+			}
+		}
 	}
 	}
 
 
 	.scroll-view {
 	.scroll-view {

+ 98 - 91
pagesHome/create/components/match.vue

@@ -1,107 +1,107 @@
 <template>
 <template>
 	<view class="form">
 	<view class="form">
-		<view class="value other">
-			<view class="title">类型</view>
-			<view class="label">
-				<picker name="type" @change="typeChange" :value="index" :range="typeList" range-key="dictLabel">
-					<view class="picker">{{type_name||'请选择类型'}}</view>
-				</picker>
+		<form @submit="formSubmit">
+			<view class="value other">
+				<view class="title">类型</view>
+				<view class="label">
+					<picker name="type" @change="typeChange" :value="index" :range="typeList" range-key="dictLabel">
+						<view class="picker">{{type_name||'请选择类型'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other margin">
-			<view class="title">人数</view>
-			<view class="label">
-				<picker name="number" @change="numberChange" :value="index" :range="numberList" range-key="dictLabel">
-					<view class="picker">{{number_name||'请选择人数'}}</view>
-				</picker>
+			<view class="value other margin">
+				<view class="title">人数</view>
+				<view class="label">
+					<picker name="number" @change="numberChange" :value="index" :range="numberList"
+						range-key="dictLabel">
+						<view class="picker">{{number_name||'请选择人数'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">对手</view>
-			<view class="label" @tap="toOpponent">
-				<text v-if="form.opponent">{{opponent_name}}</text>
-				<text v-else>请选择</text>
+			<view class="value other">
+				<view class="title">对手</view>
+				<view class="label" @tap="toOpponent">
+					<text v-if="form.opponent">{{opponent_name}}</text>
+					<text v-else>请选择</text>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">日期</view>
-			<view class="label">
-				<picker name="date" mode="date" @change="dateChange" :value="index">
-					<view class="picker">{{form.date||'请选择日期'}}</view>
-				</picker>
+			<view class="value other">
+				<view class="title">日期</view>
+				<view class="label">
+					<picker name="date" mode="date" @change="dateChange" :value="index">
+						<view class="picker">{{form.date||'请选择日期'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">时间</view>
-			<view class="label">
-				<picker name="time" mode="time" @change="timeChange" :value="index">
-					<view class="picker">{{form.time||'请选择时间'}}</view>
-				</picker>
+			<view class="value other">
+				<view class="title">时间</view>
+				<view class="label">
+					<picker name="time" mode="time" @change="timeChange" :value="index">
+						<view class="picker">{{form.time||'请选择时间'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">时长</view>
-			<view class="label">
-				<picker name="duration" @change="durationChange" :value="index" :range="durationList"
-					range-key="dictLabel">
-					<view class="picker">{{duration_name||'请选择时长'}}</view>
-				</picker>
+			<view class="value other">
+				<view class="title">时长</view>
+				<view class="label">
+					<picker name="duration" @change="durationChange" :value="index" :range="durationList"
+						range-key="dictLabel">
+						<view class="picker">{{duration_name||'请选择时长'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other margin">
-			<view class="title">地点</view>
-			<view class="label" @tap="toLocaltion">
-				<text v-if="form.address">{{form.address}}</text>
-				<text v-else>请选择</text>
+			<view class="value other margin">
+				<view class="title">地点</view>
+				<view class="label" @tap="toLocaltion">
+					<text v-if="form.address">{{form.address}}</text>
+					<text v-else>请选择</text>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">费用</view>
-			<view class="label">
-				<input name="money" class="input" :value="form.money" placeholder="请输入费用" />
+			<view class="value other">
+				<view class="title">费用</view>
+				<view class="label">
+					<input name="money" type="number" class="input" :value="money" placeholder="请输入费用" />
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">人数上限</view>
-			<view class="label">
-				<input name="name" class="input" :value="form.max_person" placeholder="请输入人数上限" />
+			<view class="value other">
+				<view class="title">人数上限</view>
+				<view class="label">
+					<input name="maxPerson" class="input" :value="maxPerson" placeholder="请输入人数上限" />
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">公开报名</view>
-			<view class="label">
-				<picker name="is_open" @change="openChange" :value="index" :range="openList" range-key="dictLabel">
-					<view class="picker">{{open_name||'请选择'}}</view>
-				</picker>
+			<view class="value other">
+				<view class="title">公开报名</view>
+				<view class="label">
+					<picker name="isOpen" @change="openChange" :value="index" :range="openList" range-key="dictLabel">
+						<view class="picker">{{open_name||'请选择'}}</view>
+					</picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other" v-if="form.date&&form.time">
-			<view class="title">报名截止时间</view>
-			<view class="label">
-				<uni-datetime-picker :start="form.date" :border="false" v-model="form.end_time" />
+			<view class="value other" v-if="form.date&&form.time">
+				<view class="title">报名截止时间</view>
+				<view class="label">
+					<uni-datetime-picker :start="form.date" :border="false" v-model="form.endTime" />
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="value other">
-			<view class="title">活动标题</view>
-			<view class="label">
-				<input name="title" class="input" :value="form.title" placeholder="请输入活动标题" />
+			<view class="value other">
+				<view class="title">活动标题</view>
+				<view class="label">
+					<input name="title" class="input" :value="title" placeholder="请输入活动标题" />
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="remark margin">
-			<view class="label">
-				<textarea name="brief" :value="form.brief" placeholder="请输入简介" />
+			<view class="remark margin">
+				<view class="label">
+					<textarea name="brief" :value="brief" placeholder="请输入简介" />
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="remark">
-			<view class="title">上传图片</view>
-			<view class="label">
-				<uni-file-picker v-model="form.file" fileMediatype="image" :list-styles="imageStyles" limit="6"
-					title="最多选择6张图片" @select="toUpload" @delete="toDelete"></uni-file-picker>
+			<view class="remark">
+				<view class="title">上传图片</view>
+				<view class="label">
+					<uni-file-picker v-model="form.file" fileMediatype="image" :list-styles="imageStyles" limit="6"
+						title="最多选择6张图片" @select="toUpload" @delete="toDelete"></uni-file-picker>
+				</view>
 			</view>
 			</view>
-		</view>
-		<view class="btn" style="display: none;">
-			<button form-type="submit">保存</button>
-		</view>
+		</form>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -123,6 +123,10 @@
 	const number_name = ref('5人制');
 	const number_name = ref('5人制');
 	// 是否公开
 	// 是否公开
 	const open_name = ref('');
 	const open_name = ref('');
+	const money = ref('');
+	const maxPerson = ref('');
+	const title = ref('');
+	const brief = ref('');
 	// 时长
 	// 时长
 	const duration_name = ref('2.0小时');
 	const duration_name = ref('2.0小时');
 	const listStyles = ref({
 	const listStyles = ref({
@@ -210,7 +214,6 @@
 				name: arr.originalFilename,
 				name: arr.originalFilename,
 				url: arr.url
 				url: arr.url
 			})
 			})
-			console.log(form.value.file);
 		} else {
 		} else {
 			uni.showToast({
 			uni.showToast({
 				title: arr.msg,
 				title: arr.msg,
@@ -221,7 +224,6 @@
 	// 删除图片
 	// 删除图片
 	const toDelete = async (e) => {
 	const toDelete = async (e) => {
 		form.value.file = form.value.file.filter(i => i.name != e.tempFile.name)
 		form.value.file = form.value.file.filter(i => i.name != e.tempFile.name)
-		console.log(form.value.file);
 	};
 	};
 	// 对手选择
 	// 对手选择
 	const toOpponent = () => {
 	const toOpponent = () => {
@@ -246,19 +248,24 @@
 		} else {
 		} else {
 			if (form.value.file && form.value.file.length == 0) delete form.value.file
 			if (form.value.file && form.value.file.length == 0) delete form.value.file
 			form.value.teamId = id.value
 			form.value.teamId = id.value
+			form.value.money = money.value
+			form.value.maxPerson = maxPerson.value
+			form.value.title = title.value
+			form.value.brief = brief.value
 			const arr = await $api(`friendship`, 'POST', form.value);
 			const arr = await $api(`friendship`, 'POST', form.value);
 			if (arr.code === 200) {
 			if (arr.code === 200) {
 				const data = {
 				const data = {
 					matchId: arr.id,
 					matchId: arr.id,
 					type: '0',
 					type: '0',
 					red: form.value.teamId,
 					red: form.value.teamId,
+					redStatus: '1',
 					blue: form.value.opponent,
 					blue: form.value.opponent,
 					startTime: moment(form.value.date + ' ' + form.value.time).format("YYYY-MM-DD HH:mm"),
 					startTime: moment(form.value.date + ' ' + form.value.time).format("YYYY-MM-DD HH:mm"),
 					endTime: moment(form.value.startTime).add(form.value.duration, 'hours').format("YYYY-MM-DD HH:mm"),
 					endTime: moment(form.value.startTime).add(form.value.duration, 'hours').format("YYYY-MM-DD HH:mm"),
 				}
 				}
 				const res = await $api(`game`, 'POST', data);
 				const res = await $api(`game`, 'POST', data);
 				if (res.code === 200) {
 				if (res.code === 200) {
-					uni.navigateTo({
+					uni.redirectTo({
 						url: `/pagesHome/activity/info?id=${res.id}`,
 						url: `/pagesHome/activity/info?id=${res.id}`,
 					})
 					})
 				}
 				}

+ 123 - 0
pagesHome/draft/index.vue

@@ -0,0 +1,123 @@
+<template>
+	<view class="content">
+		<view class="one">
+			<view class="one_1">
+				<uni-segmented-control :current="current" :values="list" @clickItem="onClickItem" styleType="text"
+					activeColor="#dd524d"></uni-segmented-control>
+			</view>
+			<view class="one_2">
+				<view v-show="current === 0">
+					<view class="list" v-for="(item, index) in historyList" :key="index">
+						<view class="left" style = "outline-width:3px;outline-style:groove;"></view>
+						<view class="right">
+							<view class="name">{{item.title||'暂无名称'}}</view>
+							<view class="type textOne">类型:{{item.title||'暂无类型'}} 人均:{{item.per||'0'}}元/人</view>
+							<view class="type textOne">地址:{{item.address||'暂无地址'}}</view>
+						</view>
+						<view class="button">
+							<text>复用</text>
+						</view>
+					</view>
+				</view>
+				<view v-show="current === 1">
+					<view class="list" v-for="(item, index) in draftsList" :key="index">
+						<view class="left"></view>
+						<view class="right">
+							<view class="name">{{item.title||'暂无名称'}}</view>
+							<view class="type">类型:{{item.title||'暂无类型'}}</view>
+							<view class="type">地址:{{item.address||'暂无地址'}}</view>
+						</view>
+						<view class="button">
+							<text>复用</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup lang="ts">
+	import { getCurrentInstance, ref } from 'vue';
+	//该依赖已内置不需要单独安装
+	import { onLoad } from "@dcloudio/uni-app";
+	// 请求接口
+	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	// 详情信息id
+	const id = ref('');
+	// 基本信息
+	const config = ref({ logoUrl: '' });
+	const list = ref(['历史记录', '草稿箱']);
+	const current = ref(0);
+	// 历史记录
+	const historyList = ref([{ id: 1, title: '友谊赛' }, { id: 1, title: '肝帝联赛' }])
+	// 草稿箱
+	const draftsList = ref([{ id: 1, title: '友谊赛' }, { id: 1, title: '友谊赛' }])
+	onLoad(async (options) => {
+		id.value = options && options.id
+		await searchConfig();
+		await search();
+	})
+	// config信息
+	const searchConfig = async () => {
+		config.value = uni.getStorageSync('config');
+	};
+	// 查询
+	const search = async () => {
+		if (id.value) { }
+	};
+	// 点击分页器
+	const onClickItem = (e) => {
+		if (current.value !== e.currentIndex) current.value = e.currentIndex
+	};
+</script>
+<style lang="scss" scoped>
+	.content {
+		display: flex;
+		flex-direction: column;
+
+		.one {
+			.one_2 {
+				padding: 2vw;
+				background-color: var(--footColor);
+
+				.list {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					background-color: var(--mainColor);
+					margin: 4vw 2vw 0 2vw;
+					padding: 4vw;
+					border-radius: 2vw;
+					.left{
+						
+					}
+
+					.right {
+						width: 50vw;
+
+						.name {
+							font-size: var(--font16Size);
+							font-weight: bold;
+						}
+
+						.type {
+							font-size: var(--font14Size);
+							color: var(--f85Color);
+							margin: 1vw 0 0 0;
+						}
+					}
+
+					.button {
+						text {
+							font-size: var(--font14Size);
+							border: 1px solid var(--f12Color);
+							padding: 1vw 3vw;
+							border-radius: 5vw;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 1 - 1
pagesHome/match/info.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		<view class="one">
 		<view class="one">
-			报名队员
+			草稿箱
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>

+ 60 - 13
pagesHome/team/info.vue

@@ -46,9 +46,19 @@
 									{{actInfo?.blueInfo?.name}}
 									{{actInfo?.blueInfo?.name}}
 								</view>
 								</view>
 							</view>
 							</view>
-							<view class="address textOne">{{actInfo?.matchInfo?.address||'暂无地址'}}</view>
+							<view class="address textOne" v-if="actInfo.type=='0'">
+								{{actInfo?.matchInfo?.address||'暂无地址'}}
+							</view>
+							<view class="address textOne" v-else>{{actInfo?.leagueInfo?.address||'暂无地址'}}</view>
 						</view>
 						</view>
 					</view>
 					</view>
+					<view class="bottom">
+						<text class="text1" @tap="onEnroll">报名</text>
+						<text>|</text>
+						<text class="text2" @tap="onLeave">请假</text>
+						<text v-if="actInfo?.blueInfo?.userId==user.id">|</text>
+						<text v-if="actInfo?.blueInfo?.userId==user.id" class="text3" @tap="onAgree">同意</text>
+					</view>
 				</view>
 				</view>
 				<view class="two_4" @tap="toInfo({route: '/pagesHome/activity/index'})">
 				<view class="two_4" @tap="toInfo({route: '/pagesHome/activity/index'})">
 					<uni-icons type="list" size="18"></uni-icons>
 					<uni-icons type="list" size="18"></uni-icons>
@@ -144,24 +154,21 @@
 	import { getCurrentInstance, ref } from 'vue';
 	import { getCurrentInstance, ref } from 'vue';
 	import circle from './components/circle.vue';
 	import circle from './components/circle.vue';
 	//该依赖已内置不需要单独安装
 	//该依赖已内置不需要单独安装
-	import { onLoad } from "@dcloudio/uni-app";
+	import { onLoad, onShow } from "@dcloudio/uni-app";
 	// 请求接口
 	// 请求接口
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	interface PropsItem {
 	interface PropsItem {
 		id ?: number,
 		id ?: number,
-		name ?: string,
-		date ?: string,
-		red_name ?: string,
-		red_score ?: number,
-		red_logo ?: string,
-		blue_name ?: string,
-		blue_score ?: number,
-		blue_logo ?: string,
+		sartTime ?: string,
+		endTime ?: string,
+		redInfo ?: object,
+		blueInfo ?: object,
+		matchInfo ?: object,
+		leagueInfo ?: object,
 		status ?: string,
 		status ?: string,
-		status_name ?: string,
 	};
 	};
 	// 列表
 	// 列表
-	const list = ref<PropsItem[]>([{ id: 1, name: '测试球队' }, { id: 1, name: '肝帝集团队' }]);
+	const list = ref<PropsItem[]>([{ id: 1, title: '测试球队' }, { id: 1, title: '肝帝集团队' }]);
 	// 分页
 	// 分页
 	const pageNum = ref(1);
 	const pageNum = ref(1);
 	const pageSize = ref(10);
 	const pageSize = ref(10);
@@ -182,6 +189,8 @@
 	const statusList = ref([]);
 	const statusList = ref([]);
 	onLoad(async (options) => {
 	onLoad(async (options) => {
 		id.value = options && options.id
 		id.value = options && options.id
+	})
+	onShow(async () => {
 		await searchConfig();
 		await searchConfig();
 		await searchOther();
 		await searchOther();
 		await search();
 		await search();
@@ -294,6 +303,18 @@
 			if (data) return data.dictLabel
 			if (data) return data.dictLabel
 		} else return '暂无状态';
 		} else return '暂无状态';
 	};
 	};
+	// 请假
+	const onLeave = async () => {
+		console.log('请假');
+	};
+	// 报名
+	const onEnroll = async () => {
+		console.log('报名');
+	};
+	// 同意
+	const onAgree = async () => {
+		console.log('同意');
+	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 	.content {
 	.content {
@@ -377,10 +398,10 @@
 
 
 				.two_3 {
 				.two_3 {
 					margin: 0 3vw 3vw 3vw;
 					margin: 0 3vw 3vw 3vw;
-					background-color: var(--f9Color);
 
 
 					.active {
 					.active {
 						display: flex;
 						display: flex;
+						background-color: var(--f9Color);
 
 
 						.left {
 						.left {
 							padding: 4vw;
 							padding: 4vw;
@@ -434,6 +455,32 @@
 							}
 							}
 						}
 						}
 					}
 					}
+
+					.bottom {
+						display: flex;
+						align-items: center;
+						justify-content: space-around;
+						padding: 2vw;
+
+						text {
+							color: var(--f1Color);
+						}
+
+						.text1 {
+							color: var(--f3CColor);
+							font-size: var(--font12Size);
+						}
+
+						.text2 {
+							color: var(--fF0Color);
+							font-size: var(--font12Size);
+						}
+
+						.text3 {
+							color: var(--fFFColor);
+							font-size: var(--font12Size);
+						}
+					}
 				}
 				}
 
 
 				.two_4 {
 				.two_4 {

+ 1 - 1
pagesHome/team/person.vue

@@ -194,7 +194,7 @@
 	// 邀请分享配置
 	// 邀请分享配置
 	const searchShare = () => {
 	const searchShare = () => {
 		$config.share = {
 		$config.share = {
-			title: `${user.value.name || '暂无名称'}邀请你加入${teamInfo.value.name || '暂无团队'}`,
+			title: `${user.value.name || user.value.nickname || '暂无昵称'}邀请你加入${teamInfo.value.name || '暂无团队'}`,
 			path: `/pagesHome/share/index?id=${id.value}` //后面是路径上要传递的参数
 			path: `/pagesHome/share/index?id=${id.value}` //后面是路径上要传递的参数
 		}
 		}
 	}
 	}

+ 1 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -25,6 +25,7 @@ if (!Math) {
   "./pagesHome/create/person.js";
   "./pagesHome/create/person.js";
   "./pagesHome/share/index.js";
   "./pagesHome/share/index.js";
   "./pagesHome/enroll/index.js";
   "./pagesHome/enroll/index.js";
+  "./pagesHome/draft/index.js";
   "./pagesMy/basic/index.js";
   "./pagesMy/basic/index.js";
 }
 }
 const _sfc_main = {
 const _sfc_main = {

+ 2 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -24,7 +24,8 @@
         "create/index",
         "create/index",
         "create/person",
         "create/person",
         "share/index",
         "share/index",
-        "enroll/index"
+        "enroll/index",
+        "draft/index"
       ]
       ]
     },
     },
     {
     {

+ 6 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -11189,6 +11189,12 @@ const subPackages = [
         style: {
         style: {
           navigationBarTitleText: "报名队员"
           navigationBarTitleText: "报名队员"
         }
         }
+      },
+      {
+        path: "draft/index",
+        style: {
+          navigationBarTitleText: "草稿箱"
+        }
       }
       }
     ]
     ]
   },
   },

+ 107 - 43
unpackage/dist/dev/mp-weixin/pagesHome/activity/info.js

@@ -3,12 +3,14 @@ const common_vendor = require("../../common/vendor.js");
 if (!Array) {
 if (!Array) {
   const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
   const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
   const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
   const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
-  (_easycom_uni_segmented_control2 + _easycom_uni_icons2)();
+  const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
+  (_easycom_uni_segmented_control2 + _easycom_uni_icons2 + _easycom_uni_popup2)();
 }
 }
 const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
 const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
 const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
 const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
+const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
 if (!Math) {
 if (!Math) {
-  (_easycom_uni_segmented_control + _easycom_uni_icons)();
+  (_easycom_uni_segmented_control + _easycom_uni_icons + _easycom_uni_popup)();
 }
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "info",
   __name: "info",
@@ -23,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const id = common_vendor.ref("");
     const id = common_vendor.ref("");
     const user = common_vendor.ref({});
     const user = common_vendor.ref({});
     const numberList = common_vendor.ref([]);
     const numberList = common_vendor.ref([]);
+    const popup = common_vendor.ref(null);
     common_vendor.onLoad(async (options) => {
     common_vendor.onLoad(async (options) => {
       id.value = options && options.id;
       id.value = options && options.id;
       common_vendor.index.setNavigationBarTitle({
       common_vendor.index.setNavigationBarTitle({
@@ -86,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         if (data)
         if (data)
           return data.dictLabel;
           return data.dictLabel;
       } else
       } else
-        return 0;
+        return "0制";
     };
     };
     const toInfo = (name) => {
     const toInfo = (name) => {
       common_vendor.index.navigateTo({
       common_vendor.index.navigateTo({
@@ -94,10 +97,37 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       });
       });
     };
     };
     const toEdit = async () => {
     const toEdit = async () => {
-      console.log("编辑");
+      popup.value.open();
+    };
+    const toAgain = async () => {
+      console.log("重新编辑");
+    };
+    const toCancel = async () => {
+      common_vendor.index.showModal({
+        title: "提示",
+        content: "您确定取消比赛吗?",
+        success: async function(res) {
+          if (res.confirm) {
+            const res2 = await $api(`game/${info.value.id}`, "DELETE", {});
+            if (res2.code == 200) {
+              common_vendor.index.navigateBack({
+                delta: 1
+              });
+            } else {
+              common_vendor.index.showToast({
+                title: res2.msg,
+                icon: "none"
+              });
+            }
+          }
+        }
+      });
     };
     };
     const toCopy = async () => {
     const toCopy = async () => {
       console.log("复用");
       console.log("复用");
+      common_vendor.index.navigateTo({
+        url: `/pagesHome/draft/index?id=${info.value.id}`
+      });
     };
     };
     const onLeave = async () => {
     const onLeave = async () => {
       console.log("请假");
       console.log("请假");
@@ -106,82 +136,116 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       console.log("报名");
       console.log("报名");
     };
     };
     const searchShare = () => {
     const searchShare = () => {
+      let titleName = "";
+      if (info.value.type == "0")
+        titleName = "友谊赛";
+      else if (info.value.type == "1")
+        titleName = "联赛";
       $config.share = {
       $config.share = {
-        title: `${user.value.name || "暂无名称"}邀请你报名${info.value.title || "暂无比赛名称"}`,
+        title: `${user.value.name || user.value.nickname || "暂无昵称"}邀请你报名${titleName || "暂无比赛名称"}`,
         path: `/pagesHome/share/index?id=${info.value.id}`
         path: `/pagesHome/share/index?id=${info.value.id}`
         //后面是路径上要传递的参数
         //后面是路径上要传递的参数
       };
       };
     };
     };
+    const toClose = () => {
+      popup.value.close();
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
+      var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
       return common_vendor.e({
       return common_vendor.e({
-        a: info.value.status == "0" && info.value.type == "0"
-      }, info.value.status == "0" && info.value.type == "0" ? {
-        b: common_vendor.t(getNumber((_b2 = (_a2 = info.value) == null ? void 0 : _a2.matchInfo) == null ? void 0 : _b2.number))
-      } : {
-        c: common_vendor.t(info.value.number || 0),
-        d: common_vendor.t(info.value.wheel || 0)
+        a: info.value.type == "0"
+      }, info.value.type == "0" ? common_vendor.e({
+        b: info.value.status == "0"
+      }, info.value.status == "0" ? {} : {}, {
+        c: common_vendor.t(getNumber((_b2 = (_a2 = info.value) == null ? void 0 : _a2.matchInfo) == null ? void 0 : _b2.number))
+      }) : {
+        d: common_vendor.t(getNumber((_d = (_c = info.value) == null ? void 0 : _c.matchInfo) == null ? void 0 : _d.number)),
+        e: common_vendor.t(info.value.wheel || 0)
       }, {
       }, {
-        e: ((_d = (_c = info.value) == null ? void 0 : _c.redInfo) == null ? void 0 : _d.logo) || config.value.logoUrl,
-        f: common_vendor.t(((_f = (_e = info.value) == null ? void 0 : _e.redInfo) == null ? void 0 : _f.name) || "暂无红方名称"),
-        g: info.value.status == "0"
+        f: ((_f = (_e = info.value) == null ? void 0 : _e.redInfo) == null ? void 0 : _f.logo) || config.value.logoUrl,
+        g: common_vendor.t(((_h = (_g = info.value) == null ? void 0 : _g.redInfo) == null ? void 0 : _h.name) || "暂无红方名称"),
+        h: info.value.status == "0"
       }, info.value.status == "0" ? {} : {
       }, info.value.status == "0" ? {} : {
-        h: common_vendor.t(info.value.redScore || 0),
-        i: common_vendor.t(info.value.blueScore || 0)
+        i: common_vendor.t(info.value.redScore || 0),
+        j: common_vendor.t(info.value.blueScore || 0)
+      }, {
+        k: ((_j = (_i = info.value) == null ? void 0 : _i.blueInfo) == null ? void 0 : _j.logo) || config.value.logoUrl,
+        l: common_vendor.t(((_l = (_k = info.value) == null ? void 0 : _k.blueInfo) == null ? void 0 : _l.name) || "暂无蓝方名称"),
+        m: common_vendor.t(getDayOfWeek(info.value.startTime)),
+        n: common_vendor.t(info.value.time || "暂无时间"),
+        o: info.value.type == "0"
+      }, info.value.type == "0" ? {
+        p: common_vendor.t(((_n = (_m = info.value) == null ? void 0 : _m.matchInfo) == null ? void 0 : _n.address) || "暂无地点")
+      } : {
+        q: common_vendor.t(((_p = (_o = info.value) == null ? void 0 : _o.leagueInfo) == null ? void 0 : _p.address) || "暂无地点")
       }, {
       }, {
-        j: ((_h = (_g = info.value) == null ? void 0 : _g.blueInfo) == null ? void 0 : _h.logo) || config.value.logoUrl,
-        k: common_vendor.t(((_j = (_i = info.value) == null ? void 0 : _i.blueInfo) == null ? void 0 : _j.name) || "暂无蓝方名称"),
-        l: common_vendor.t(getDayOfWeek(info.value.startTime)),
-        m: common_vendor.t(info.value.time || "暂无时间"),
-        n: common_vendor.t(((_l = (_k = info.value) == null ? void 0 : _k.matchInfo) == null ? void 0 : _l.address) || "暂无地点"),
-        o: common_vendor.o(onClickItem),
-        p: common_vendor.p({
+        r: common_vendor.o(onClickItem),
+        s: common_vendor.p({
           current: current.value,
           current: current.value,
           values: list.value,
           values: list.value,
           styleType: "text",
           styleType: "text",
           activeColor: "#dd524d"
           activeColor: "#dd524d"
         }),
         }),
-        q: common_vendor.t(((_n = (_m = info.value) == null ? void 0 : _m.matchInfo) == null ? void 0 : _n.member) || "0"),
-        r: common_vendor.p({
+        t: common_vendor.t(((_r = (_q = info.value) == null ? void 0 : _q.matchInfo) == null ? void 0 : _r.member) || "0"),
+        v: common_vendor.p({
           type: "right",
           type: "right",
           size: "20",
           size: "20",
           color: "#999999"
           color: "#999999"
         }),
         }),
-        s: common_vendor.o(($event) => toInfo("未回应队员")),
-        t: common_vendor.p({
+        w: common_vendor.o(($event) => toInfo("未回应队员")),
+        x: common_vendor.p({
           type: "redo-filled",
           type: "redo-filled",
           size: "15",
           size: "15",
           color: "#ffffff"
           color: "#ffffff"
         }),
         }),
-        v: common_vendor.t(((_p = (_o = info.value) == null ? void 0 : _o.matchInfo) == null ? void 0 : _p.member) || "0"),
-        w: common_vendor.p({
+        y: common_vendor.t(((_t = (_s = info.value) == null ? void 0 : _s.matchInfo) == null ? void 0 : _t.member) || "0"),
+        z: common_vendor.p({
           type: "right",
           type: "right",
           size: "20",
           size: "20",
           color: "#999999"
           color: "#999999"
         }),
         }),
-        x: common_vendor.o(($event) => toInfo("已回应队员")),
-        y: common_vendor.t(((_r = (_q = info.value) == null ? void 0 : _q.matchInfo) == null ? void 0 : _r.member) || "0"),
-        z: common_vendor.t(((_t = (_s = info.value) == null ? void 0 : _s.matchInfo) == null ? void 0 : _t.member) || "0"),
-        A: current.value === 0,
-        B: current.value === 1,
-        C: info.value.status == "0" || info.value.status == "1"
+        A: common_vendor.o(($event) => toInfo("已回应队员")),
+        B: common_vendor.t(((_v = (_u = info.value) == null ? void 0 : _u.matchInfo) == null ? void 0 : _v.member) || "0"),
+        C: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2"),
+        D: common_vendor.t(((_x = (_w = info.value) == null ? void 0 : _w.matchInfo) == null ? void 0 : _x.member) || "0"),
+        E: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2"),
+        F: info.value.status == "3"
+      }, info.value.status == "3" ? {
+        G: common_vendor.t(((_z = (_y = info.value) == null ? void 0 : _y.matchInfo) == null ? void 0 : _z.member) || "0"),
+        H: common_vendor.n(info.value.status == "3" ? "count_1" : "count_2")
+      } : {}, {
+        I: current.value === 0,
+        J: current.value === 1,
+        K: info.value.status == "0" || info.value.status == "1"
       }, info.value.status == "0" || info.value.status == "1" ? {
       }, info.value.status == "0" || info.value.status == "1" ? {
-        D: common_vendor.o(toEdit),
-        E: common_vendor.p({
+        L: common_vendor.o(toEdit),
+        M: common_vendor.p({
           type: "compose",
           type: "compose",
           size: "20",
           size: "20",
           color: "#696969"
           color: "#696969"
         }),
         }),
-        F: common_vendor.o(toCopy),
-        G: common_vendor.p({
+        N: common_vendor.o(toCopy),
+        O: common_vendor.p({
           ["custom-prefix"]: "iconfont",
           ["custom-prefix"]: "iconfont",
           type: "icon-icon_cz",
           type: "icon-icon_cz",
           size: "20",
           size: "20",
           color: "#696969"
           color: "#696969"
         }),
         }),
-        H: common_vendor.o(onLeave),
-        I: common_vendor.o(onEnroll)
-      } : {});
+        P: common_vendor.o(onLeave),
+        Q: common_vendor.o(onEnroll)
+      } : {}, {
+        R: common_vendor.o(toAgain),
+        S: common_vendor.o(toCancel),
+        T: common_vendor.o(toClose),
+        U: common_vendor.sr(popup, "24c37ea1-6", {
+          "k": "popup"
+        }),
+        V: common_vendor.o(_ctx.change),
+        W: common_vendor.p({
+          ["background-color"]: "rgba(0,0,0,0)",
+          type: "center"
+        })
+      });
     };
     };
   }
   }
 });
 });

+ 2 - 1
unpackage/dist/dev/mp-weixin/pagesHome/activity/info.json

@@ -2,6 +2,7 @@
   "navigationBarTitleText": "活动详情",
   "navigationBarTitleText": "活动详情",
   "usingComponents": {
   "usingComponents": {
     "uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
     "uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
-    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
+    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
+    "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
   }
   }
 }
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/activity/info.wxml


+ 53 - 0
unpackage/dist/dev/mp-weixin/pagesHome/activity/info.wxss

@@ -69,6 +69,7 @@
 .content .info .one .one_4.data-v-24c37ea1 {
 .content .info .one .one_4.data-v-24c37ea1 {
   text-align: center;
   text-align: center;
   margin: 2vw;
   margin: 2vw;
+  border-radius: 10vw;
 }
 }
 .content .info .one .one_4 text.data-v-24c37ea1 {
 .content .info .one .one_4 text.data-v-24c37ea1 {
   font-size: var(--font14Size);
   font-size: var(--font14Size);
@@ -114,6 +115,15 @@
   margin: 2vw 4vw;
   margin: 2vw 4vw;
 }
 }
 .content .info .position .two .two_1 .count .count_1.data-v-24c37ea1 {
 .content .info .position .two .two_1 .count .count_1.data-v-24c37ea1 {
+  display: flex;
+  justify-content: space-between;
+  width: 17vw;
+  padding: 4vw;
+  border-radius: 2px;
+  font-size: var(--font12Size);
+  background-color: var(--footColor);
+}
+.content .info .position .two .two_1 .count .count_2.data-v-24c37ea1 {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;
   width: 35vw;
   width: 35vw;
@@ -122,6 +132,22 @@
   font-size: var(--font12Size);
   font-size: var(--font12Size);
   background-color: var(--footColor);
   background-color: var(--footColor);
 }
 }
+.content .info .position .two .two_1 .technology_1.data-v-24c37ea1 {
+  padding: 2vw;
+  margin: 2vw 0 0 0;
+  font-size: var(--font16Size);
+}
+.content .info .position .two .two_1 .technology_2.data-v-24c37ea1 {
+  padding: 2vw;
+  text-align: center;
+}
+.content .info .position .two .two_1 .technology_2 .other_1.data-v-24c37ea1 {
+  color: var(--f85Color);
+  font-size: var(--font14Size);
+}
+.content .info .position .two .two_1 .technology_2 .other_2.data-v-24c37ea1 {
+  font-size: var(--font16Size);
+}
 .content .foot.data-v-24c37ea1 {
 .content .foot.data-v-24c37ea1 {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;
@@ -157,6 +183,33 @@
   width: 50vw;
   width: 50vw;
   font-size: var(--font16Size);
   font-size: var(--font16Size);
 }
 }
+.content .popup.data-v-24c37ea1 {
+  display: flex;
+  flex-direction: column;
+  background: var(--mainColor);
+  width: 70vw;
+  height: 26vh;
+  padding: 2vw;
+  border-radius: 5px;
+}
+.content .popup .popup_1.data-v-24c37ea1 {
+  text-align: center;
+  padding: 2vw;
+  font-size: var(--font16Size);
+  color: var(--f85Color);
+}
+.content .popup .info .info_1.data-v-24c37ea1 {
+  padding: 3vw 0;
+  font-size: var(--font16Size);
+  text-align: center;
+}
+.content .popup .info .close.data-v-24c37ea1 {
+  text-align: center;
+  font-size: var(--font16Size);
+  color: var(--f85Color);
+  padding: 2vw;
+  border-top: 1px solid var(--footColor);
+}
 .scroll-view.data-v-24c37ea1 {
 .scroll-view.data-v-24c37ea1 {
   position: absolute;
   position: absolute;
   top: 0;
   top: 0;

+ 18 - 10
unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.js

@@ -29,6 +29,10 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const type_name = common_vendor.ref("足球");
     const type_name = common_vendor.ref("足球");
     const number_name = common_vendor.ref("5人制");
     const number_name = common_vendor.ref("5人制");
     const open_name = common_vendor.ref("");
     const open_name = common_vendor.ref("");
+    const money = common_vendor.ref("");
+    const maxPerson = common_vendor.ref("");
+    const title = common_vendor.ref("");
+    const brief = common_vendor.ref("");
     const duration_name = common_vendor.ref("2.0小时");
     const duration_name = common_vendor.ref("2.0小时");
     common_vendor.ref({
     common_vendor.ref({
       width: 64,
       width: 64,
@@ -103,7 +107,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           name: arr.originalFilename,
           name: arr.originalFilename,
           url: arr.url
           url: arr.url
         });
         });
-        console.log(form.value.file);
       } else {
       } else {
         common_vendor.index.showToast({
         common_vendor.index.showToast({
           title: arr.msg,
           title: arr.msg,
@@ -113,7 +116,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     };
     const toDelete = async (e) => {
     const toDelete = async (e) => {
       form.value.file = form.value.file.filter((i) => i.name != e.tempFile.name);
       form.value.file = form.value.file.filter((i) => i.name != e.tempFile.name);
-      console.log(form.value.file);
     };
     };
     const toOpponent = () => {
     const toOpponent = () => {
       common_vendor.index.navigateTo({
       common_vendor.index.navigateTo({
@@ -137,19 +139,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         if (form.value.file && form.value.file.length == 0)
         if (form.value.file && form.value.file.length == 0)
           delete form.value.file;
           delete form.value.file;
         form.value.teamId = id.value;
         form.value.teamId = id.value;
+        form.value.money = money.value;
+        form.value.maxPerson = maxPerson.value;
+        form.value.title = title.value;
+        form.value.brief = brief.value;
         const arr = await $api(`friendship`, "POST", form.value);
         const arr = await $api(`friendship`, "POST", form.value);
         if (arr.code === 200) {
         if (arr.code === 200) {
           const data = {
           const data = {
             matchId: arr.id,
             matchId: arr.id,
             type: "0",
             type: "0",
             red: form.value.teamId,
             red: form.value.teamId,
+            redStatus: "1",
             blue: form.value.opponent,
             blue: form.value.opponent,
             startTime: common_vendor.hooks(form.value.date + " " + form.value.time).format("YYYY-MM-DD HH:mm"),
             startTime: common_vendor.hooks(form.value.date + " " + form.value.time).format("YYYY-MM-DD HH:mm"),
             endTime: common_vendor.hooks(form.value.startTime).add(form.value.duration, "hours").format("YYYY-MM-DD HH:mm")
             endTime: common_vendor.hooks(form.value.startTime).add(form.value.duration, "hours").format("YYYY-MM-DD HH:mm")
           };
           };
           const res = await $api(`game`, "POST", data);
           const res = await $api(`game`, "POST", data);
           if (res.code === 200) {
           if (res.code === 200) {
-            common_vendor.index.navigateTo({
+            common_vendor.index.redirectTo({
               url: `/pagesHome/activity/info?id=${res.id}`
               url: `/pagesHome/activity/info?id=${res.id}`
             });
             });
           }
           }
@@ -194,23 +201,23 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         x: common_vendor.t(form.value.address)
         x: common_vendor.t(form.value.address)
       } : {}, {
       } : {}, {
         y: common_vendor.o(toLocaltion),
         y: common_vendor.o(toLocaltion),
-        z: form.value.money,
-        A: form.value.max_person,
+        z: money.value,
+        A: maxPerson.value,
         B: common_vendor.t(open_name.value || "请选择"),
         B: common_vendor.t(open_name.value || "请选择"),
         C: common_vendor.o(openChange),
         C: common_vendor.o(openChange),
         D: _ctx.index,
         D: _ctx.index,
         E: common_vendor.unref(openList),
         E: common_vendor.unref(openList),
         F: form.value.date && form.value.time
         F: form.value.date && form.value.time
       }, form.value.date && form.value.time ? {
       }, form.value.date && form.value.time ? {
-        G: common_vendor.o(($event) => form.value.end_time = $event),
+        G: common_vendor.o(($event) => form.value.endTime = $event),
         H: common_vendor.p({
         H: common_vendor.p({
           start: form.value.date,
           start: form.value.date,
           border: false,
           border: false,
-          modelValue: form.value.end_time
+          modelValue: form.value.endTime
         })
         })
       } : {}, {
       } : {}, {
-        I: form.value.title,
-        J: form.value.brief,
+        I: title.value,
+        J: brief.value,
         K: common_vendor.o(toUpload),
         K: common_vendor.o(toUpload),
         L: common_vendor.o(toDelete),
         L: common_vendor.o(toDelete),
         M: common_vendor.o(($event) => form.value.file = $event),
         M: common_vendor.o(($event) => form.value.file = $event),
@@ -220,7 +227,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
           limit: "6",
           limit: "6",
           title: "最多选择6张图片",
           title: "最多选择6张图片",
           modelValue: form.value.file
           modelValue: form.value.file
-        })
+        }),
+        O: common_vendor.o(formSubmit)
       });
       });
     };
     };
   }
   }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.wxml


+ 71 - 0
unpackage/dist/dev/mp-weixin/pagesHome/draft/index.js

@@ -0,0 +1,71 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+if (!Array) {
+  const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
+  _easycom_uni_segmented_control2();
+}
+const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
+if (!Math) {
+  _easycom_uni_segmented_control();
+}
+const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
+  __name: "index",
+  setup(__props) {
+    var _a;
+    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    const id = common_vendor.ref("");
+    const config = common_vendor.ref({ logoUrl: "" });
+    const list = common_vendor.ref(["历史记录", "草稿箱"]);
+    const current = common_vendor.ref(0);
+    const historyList = common_vendor.ref([{ id: 1, title: "友谊赛" }, { id: 1, title: "肝帝联赛" }]);
+    const draftsList = common_vendor.ref([{ id: 1, title: "友谊赛" }, { id: 1, title: "友谊赛" }]);
+    common_vendor.onLoad(async (options) => {
+      id.value = options && options.id;
+      await searchConfig();
+      await search();
+    });
+    const searchConfig = async () => {
+      config.value = common_vendor.index.getStorageSync("config");
+    };
+    const search = async () => {
+      if (id.value)
+        ;
+    };
+    const onClickItem = (e) => {
+      if (current.value !== e.currentIndex)
+        current.value = e.currentIndex;
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.o(onClickItem),
+        b: common_vendor.p({
+          current: current.value,
+          values: list.value,
+          styleType: "text",
+          activeColor: "#dd524d"
+        }),
+        c: common_vendor.f(historyList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.title || "暂无名称"),
+            b: common_vendor.t(item.title || "暂无类型"),
+            c: common_vendor.t(item.per || "0"),
+            d: common_vendor.t(item.address || "暂无地址"),
+            e: index
+          };
+        }),
+        d: current.value === 0,
+        e: common_vendor.f(draftsList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.title || "暂无名称"),
+            b: common_vendor.t(item.title || "暂无类型"),
+            c: common_vendor.t(item.address || "暂无地址"),
+            d: index
+          };
+        }),
+        f: current.value === 1
+      };
+    };
+  }
+});
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-872b3c9c"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/draft/index.vue"]]);
+wx.createPage(MiniProgramPage);

+ 6 - 0
unpackage/dist/dev/mp-weixin/pagesHome/draft/index.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "草稿箱",
+  "usingComponents": {
+    "uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control"
+  }
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/draft/index.wxml


+ 37 - 0
unpackage/dist/dev/mp-weixin/pagesHome/draft/index.wxss

@@ -0,0 +1,37 @@
+/* 水平间距 */
+/* 水平间距 */
+.content.data-v-872b3c9c {
+  display: flex;
+  flex-direction: column;
+}
+.content .one .one_2.data-v-872b3c9c {
+  padding: 2vw;
+  background-color: var(--footColor);
+}
+.content .one .one_2 .list.data-v-872b3c9c {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  background-color: var(--mainColor);
+  margin: 4vw 2vw 0 2vw;
+  padding: 4vw;
+  border-radius: 2vw;
+}
+.content .one .one_2 .list .right.data-v-872b3c9c {
+  width: 50vw;
+}
+.content .one .one_2 .list .right .name.data-v-872b3c9c {
+  font-size: var(--font16Size);
+  font-weight: bold;
+}
+.content .one .one_2 .list .right .type.data-v-872b3c9c {
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+  margin: 1vw 0 0 0;
+}
+.content .one .one_2 .list .button text.data-v-872b3c9c {
+  font-size: var(--font14Size);
+  border: 1px solid var(--f12Color);
+  padding: 1vw 3vw;
+  border-radius: 5vw;
+}

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/match/info.wxml

@@ -1 +1 @@
-<view class="content data-v-dc3bb826"><view class="one data-v-dc3bb826"> 报名队员 </view></view>
+<view class="content data-v-dc3bb826"><view class="one data-v-dc3bb826"> 草稿箱 </view></view>

+ 39 - 16
unpackage/dist/dev/mp-weixin/pagesHome/team/info.js

@@ -14,7 +14,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   setup(__props) {
   setup(__props) {
     var _a;
     var _a;
     const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
-    const list = common_vendor.ref([{ id: 1, name: "测试球队" }, { id: 1, name: "肝帝集团队" }]);
+    const list = common_vendor.ref([{ id: 1, title: "测试球队" }, { id: 1, title: "肝帝集团队" }]);
     const pageNum = common_vendor.ref(1);
     const pageNum = common_vendor.ref(1);
     const pageSize = common_vendor.ref(10);
     const pageSize = common_vendor.ref(10);
     const total = common_vendor.ref(0);
     const total = common_vendor.ref(0);
@@ -27,6 +27,8 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const statusList = common_vendor.ref([]);
     const statusList = common_vendor.ref([]);
     common_vendor.onLoad(async (options) => {
     common_vendor.onLoad(async (options) => {
       id.value = options && options.id;
       id.value = options && options.id;
+    });
+    common_vendor.onShow(async () => {
       await searchConfig();
       await searchConfig();
       await searchOther();
       await searchOther();
       await search();
       await search();
@@ -132,8 +134,17 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       } else
       } else
         return "暂无状态";
         return "暂无状态";
     };
     };
+    const onLeave = async () => {
+      console.log("请假");
+    };
+    const onEnroll = async () => {
+      console.log("报名");
+    };
+    const onAgree = async () => {
+      console.log("同意");
+    };
     return (_ctx, _cache) => {
     return (_ctx, _cache) => {
-      var _a2, _b, _c, _d, _e, _f;
+      var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
       return common_vendor.e({
       return common_vendor.e({
         a: info.value.logo || "/static/qiudui.png",
         a: info.value.logo || "/static/qiudui.png",
         b: common_vendor.t(info.value.name || "暂无名称"),
         b: common_vendor.t(info.value.name || "暂无名称"),
@@ -158,17 +169,29 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       }, actInfo.value.type == "0" ? {} : {}, {
       }, actInfo.value.type == "0" ? {} : {}, {
         n: ((_b = (_a2 = actInfo.value) == null ? void 0 : _a2.blueInfo) == null ? void 0 : _b.logo) || "/static/qiudui.png",
         n: ((_b = (_a2 = actInfo.value) == null ? void 0 : _a2.blueInfo) == null ? void 0 : _b.logo) || "/static/qiudui.png",
         o: common_vendor.t((_d = (_c = actInfo.value) == null ? void 0 : _c.blueInfo) == null ? void 0 : _d.name),
         o: common_vendor.t((_d = (_c = actInfo.value) == null ? void 0 : _c.blueInfo) == null ? void 0 : _d.name),
-        p: common_vendor.t(((_f = (_e = actInfo.value) == null ? void 0 : _e.matchInfo) == null ? void 0 : _f.address) || "暂无地址"),
-        q: common_vendor.o(($event) => toActivity(actInfo.value))
-      }), {
-        r: common_vendor.p({
+        p: actInfo.value.type == "0"
+      }, actInfo.value.type == "0" ? {
+        q: common_vendor.t(((_f = (_e = actInfo.value) == null ? void 0 : _e.matchInfo) == null ? void 0 : _f.address) || "暂无地址")
+      } : {
+        r: common_vendor.t(((_h = (_g = actInfo.value) == null ? void 0 : _g.leagueInfo) == null ? void 0 : _h.address) || "暂无地址")
+      }, {
+        s: common_vendor.o(($event) => toActivity(actInfo.value)),
+        t: common_vendor.o(onEnroll),
+        v: common_vendor.o(onLeave),
+        w: ((_j = (_i = actInfo.value) == null ? void 0 : _i.blueInfo) == null ? void 0 : _j.userId) == user.value.id
+      }, ((_l = (_k = actInfo.value) == null ? void 0 : _k.blueInfo) == null ? void 0 : _l.userId) == user.value.id ? {} : {}, {
+        x: ((_n = (_m = actInfo.value) == null ? void 0 : _m.blueInfo) == null ? void 0 : _n.userId) == user.value.id
+      }, ((_p = (_o = actInfo.value) == null ? void 0 : _o.blueInfo) == null ? void 0 : _p.userId) == user.value.id ? {
+        y: common_vendor.o(onAgree)
+      } : {}), {
+        z: common_vendor.p({
           type: "list",
           type: "list",
           size: "18"
           size: "18"
         }),
         }),
-        s: common_vendor.o(($event) => toInfo({
+        A: common_vendor.o(($event) => toInfo({
           route: "/pagesHome/activity/index"
           route: "/pagesHome/activity/index"
         })),
         })),
-        t: common_vendor.f(menuList.value, (item, index, i0) => {
+        B: common_vendor.f(menuList.value, (item, index, i0) => {
           return {
           return {
             a: "b14ffc51-2-" + i0,
             a: "b14ffc51-2-" + i0,
             b: common_vendor.p({
             b: common_vendor.p({
@@ -182,40 +205,40 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
             e: common_vendor.o(($event) => toInfo(item), index)
             e: common_vendor.o(($event) => toInfo(item), index)
           };
           };
         }),
         }),
-        v: common_vendor.t(total.value || 0),
-        w: common_vendor.p({
+        C: common_vendor.t(total.value || 0),
+        D: common_vendor.p({
           pro: 16 / 100,
           pro: 16 / 100,
           border_back_color: "#f1f1f1",
           border_back_color: "#f1f1f1",
           border_color: "#FF0000",
           border_color: "#FF0000",
           content: "16"
           content: "16"
         }),
         }),
-        x: common_vendor.p({
+        E: common_vendor.p({
           pro: 5 / 100,
           pro: 5 / 100,
           border_back_color: "#f1f1f1",
           border_back_color: "#f1f1f1",
           border_color: "#35BD7B",
           border_color: "#35BD7B",
           content: "5"
           content: "5"
         }),
         }),
-        y: common_vendor.p({
+        F: common_vendor.p({
           pro: 17 / 100,
           pro: 17 / 100,
           border_back_color: "#f1f1f1",
           border_back_color: "#f1f1f1",
           border_color: "#FFA500",
           border_color: "#FFA500",
           content: "17"
           content: "17"
         }),
         }),
-        z: common_vendor.p({
+        G: common_vendor.p({
           type: "forward",
           type: "forward",
           size: "25",
           size: "25",
           color: "#858585"
           color: "#858585"
         }),
         }),
-        A: common_vendor.p({
+        H: common_vendor.p({
           ["custom-prefix"]: "iconfont",
           ["custom-prefix"]: "iconfont",
           type: "icon-xiangce",
           type: "icon-xiangce",
           size: "20",
           size: "20",
           color: "#333333"
           color: "#333333"
         }),
         }),
-        B: common_vendor.o(($event) => toInfo({
+        I: common_vendor.o(($event) => toInfo({
           route: "/pagesHome/team/album"
           route: "/pagesHome/team/album"
         })),
         })),
-        C: common_vendor.f(list.value, (item, index, i0) => {
+        J: common_vendor.f(list.value, (item, index, i0) => {
           var _a3, _b2, _c2, _d2, _e2, _f2;
           var _a3, _b2, _c2, _d2, _e2, _f2;
           return common_vendor.e({
           return common_vendor.e({
             a: common_vendor.t(common_vendor.unref(common_vendor.hooks)(item.startTime).format("MM-DD") || "暂无日期"),
             a: common_vendor.t(common_vendor.unref(common_vendor.hooks)(item.startTime).format("MM-DD") || "暂无日期"),

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/team/info.wxml


+ 22 - 1
unpackage/dist/dev/mp-weixin/pagesHome/team/info.wxss

@@ -69,10 +69,10 @@
 }
 }
 .content .position .two .two_3.data-v-b14ffc51 {
 .content .position .two .two_3.data-v-b14ffc51 {
   margin: 0 3vw 3vw 3vw;
   margin: 0 3vw 3vw 3vw;
-  background-color: var(--f9Color);
 }
 }
 .content .position .two .two_3 .active.data-v-b14ffc51 {
 .content .position .two .two_3 .active.data-v-b14ffc51 {
   display: flex;
   display: flex;
+  background-color: var(--f9Color);
 }
 }
 .content .position .two .two_3 .active .left.data-v-b14ffc51 {
 .content .position .two .two_3 .active .left.data-v-b14ffc51 {
   padding: 4vw;
   padding: 4vw;
@@ -117,6 +117,27 @@
   font-size: var(--font14Size);
   font-size: var(--font14Size);
   color: var(--f85Color);
   color: var(--f85Color);
 }
 }
+.content .position .two .two_3 .bottom.data-v-b14ffc51 {
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  padding: 2vw;
+}
+.content .position .two .two_3 .bottom text.data-v-b14ffc51 {
+  color: var(--f1Color);
+}
+.content .position .two .two_3 .bottom .text1.data-v-b14ffc51 {
+  color: var(--f3CColor);
+  font-size: var(--font12Size);
+}
+.content .position .two .two_3 .bottom .text2.data-v-b14ffc51 {
+  color: var(--fF0Color);
+  font-size: var(--font12Size);
+}
+.content .position .two .two_3 .bottom .text3.data-v-b14ffc51 {
+  color: var(--fFFColor);
+  font-size: var(--font12Size);
+}
 .content .position .two .two_4.data-v-b14ffc51 {
 .content .position .two .two_4.data-v-b14ffc51 {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/team/person.js

@@ -102,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     };
     const searchShare = () => {
     const searchShare = () => {
       $config.share = {
       $config.share = {
-        title: `${user.value.name || "暂无名称"}邀请你加入${teamInfo.value.name || "暂无团队"}`,
+        title: `${user.value.name || user.value.nickname || "暂无昵称"}邀请你加入${teamInfo.value.name || "暂无团队"}`,
         path: `/pagesHome/share/index?id=${id.value}`
         path: `/pagesHome/share/index?id=${id.value}`
         //后面是路径上要传递的参数
         //后面是路径上要传递的参数
       };
       };