Quellcode durchsuchen

修改添加活动训练

zs vor 1 Jahr
Ursprung
Commit
7704711a91
53 geänderte Dateien mit 4100 neuen und 238 gelöschten Zeilen
  1. 98 0
      common/dateTimePicker.js
  2. 6 0
      manifest.json
  3. 6 0
      pages.json
  4. 18 19
      pages/home/components/activity.vue
  5. 18 19
      pages/home/components/game.vue
  6. 0 1
      pages/home/components/team.vue
  7. 0 1
      pagesHome/activity/index.vue
  8. 12 23
      pagesHome/create/components/activity.vue
  9. 57 39
      pagesHome/create/components/match.vue
  10. 12 9
      pagesHome/create/index.vue
  11. 256 0
      pagesHome/create/person.vue
  12. 1 1
      pagesHome/match/index.vue
  13. 1 1
      pagesHome/team/index.vue
  14. 4 4
      pagesMy/basic/index.vue
  15. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  16. 11 1
      unpackage/dist/dev/mp-weixin/app.json
  17. 7 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  18. 1 20
      unpackage/dist/dev/mp-weixin/pages/home/components/activity.js
  19. 1 20
      unpackage/dist/dev/mp-weixin/pages/home/components/game.js
  20. 0 1
      unpackage/dist/dev/mp-weixin/pages/home/components/team.js
  21. 0 1
      unpackage/dist/dev/mp-weixin/pagesHome/activity/index.js
  22. 30 16
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.js
  23. 1 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.json
  24. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.wxml
  25. 87 48
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.js
  26. 1 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.json
  27. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.wxml
  28. 13 6
      unpackage/dist/dev/mp-weixin/pagesHome/create/index.js
  29. 131 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/person.js
  30. 4 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/person.json
  31. 1 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/person.wxml
  32. 82 0
      unpackage/dist/dev/mp-weixin/pagesHome/create/person.wxss
  33. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/match/index.js
  34. 1 1
      unpackage/dist/dev/mp-weixin/pagesHome/team/index.js
  35. 4 4
      unpackage/dist/dev/mp-weixin/pagesMy/basic/index.js
  36. 58 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.js
  37. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.json
  38. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.wxml
  39. 90 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.wxss
  40. 597 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.js
  41. 8 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.json
  42. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.wxml
  43. 228 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.wxss
  44. 73 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
  45. 696 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.js
  46. 4 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.json
  47. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.wxml
  48. 104 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.wxss
  49. 822 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js
  50. 8 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.json
  51. 1 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.wxml
  52. 178 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.wxss
  53. 358 0
      unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js

+ 98 - 0
common/dateTimePicker.js

@@ -0,0 +1,98 @@
+function withData(param) {
+	return param < 10 ? '0' + param : '' + param;
+}
+
+function getLoopArray(start, end) {
+	var start = start || 0;
+	var end = end || 1;
+	var array = [];
+	for (var i = start; i <= end; i++) {
+		array.push(withData(i));
+	}
+	return array;
+}
+
+function getMonthDay(year, month) {
+	var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0),
+		array = null;
+
+	switch (month) {
+		case '01':
+		case '03':
+		case '05':
+		case '07':
+		case '08':
+		case '10':
+		case '12':
+			array = getLoopArray(1, 31)
+			break;
+		case '04':
+		case '06':
+		case '09':
+		case '11':
+			array = getLoopArray(1, 30)
+			break;
+		case '02':
+			array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28)
+			break;
+		default:
+			array = '月份格式不正确,请重新输入!'
+	}
+	return array;
+}
+
+function getNewDateArry() {
+	// 当前时间的处理 年月日时分秒
+	var newDate = new Date();
+	var year = withData(newDate.getFullYear()),
+		mont = withData(newDate.getMonth() + 1),
+		date = withData(newDate.getDate()),
+		hour = withData(newDate.getHours()),
+		minu = withData(newDate.getMinutes());
+	seco = withData(newDate.getSeconds());
+	return [year, mont, date, hour, minu, seco];
+}
+
+function dateTimePicker(startYear, endYear, date) {
+
+	// 返回默认显示的数组和联动数组的声明
+	var dateTime = [],
+		dateTimeArray = [
+			[],
+			[],
+			[],
+			[],
+			[],
+			[]
+		];
+	var start = startYear || 1978;
+	var end = endYear || 2100;
+
+	//处理传过来的字符串转化为数组
+	let dataArr = date.split(" ")[0].split('/')
+	let time = date.split(" ")[1].split(':')
+
+	// 默认开始显示数据 如果把自定义值传过来的话就使用自定义时间 否则用当前时间  ...dataArr数组解构
+	var defaultDate = date ? [...dataArr, ...time] : getNewDateArry();
+	// 处理联动列表数据
+	/*年月日 时分秒*/
+	dateTimeArray[0] = getLoopArray(start, end);
+	dateTimeArray[1] = getLoopArray(1, 12);
+	dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
+	dateTimeArray[3] = getLoopArray(0, 23);
+	dateTimeArray[4] = getLoopArray(0, 59);
+	dateTimeArray[5] = getLoopArray(0, 59);
+	//遍历dateTimeArray数组
+	dateTimeArray.forEach((current, index) => {
+		//匹配defaultDate[index]值在current数组中的位置
+		dateTime.push(current.indexOf(defaultDate[index]))
+	});
+	return {
+		dateTimeArray: dateTimeArray,
+		dateTime: dateTime
+	}
+}
+module.exports = {
+	dateTimePicker: dateTimePicker,
+	getMonthDay: getMonthDay
+}

+ 6 - 0
manifest.json

@@ -60,6 +60,12 @@
 		"optimization": {
 			"subPackages": true
 		},
+		"permission" : {
+		    "scope.userLocation" : {
+		        "desc" : "定位当前位置,选在收获地址"
+		    }
+		},
+		"requiredPrivateInfos" : [ "chooseAddress", "chooseLocation" ],
 		"lazyCodeLoading": "requiredComponents",
 		"usingComponents": true
 	},

+ 6 - 0
pages.json

@@ -128,6 +128,12 @@
 					"style": {
 						"navigationBarTitleText": "创建"
 					}
+				},
+				{
+					"path": "create/person",
+					"style": {
+						"navigationBarTitleText": "添加对手"
+					}
 				}
 			]
 		},

+ 18 - 19
pages/home/components/activity.vue

@@ -102,24 +102,24 @@
 	};
 	// 查询列表
 	const search = async () => {
-		const info = {
-			pageNum: pageNum.value,
-			pageSize: pageSize.value,
-			userId: user.value.id
-		}
-		const res = await $api('activity/list', 'GET', {
-			...info,
-			...searchInfo.value
-		});
-		if (res.code === 200) {
-			list.value = res.rows
-			total.value = res.total
-		} else {
-			uni.showToast({
-				title: res.msg || '',
-				icon: 'error',
-			});
-		}
+		// const info = {
+		// 	pageNum: pageNum.value,
+		// 	pageSize: pageSize.value,
+		// 	userId: user.value.id
+		// }
+		// const res = await $api('activity/list', 'GET', {
+		// 	...info,
+		// 	...searchInfo.value
+		// });
+		// if (res.code === 200) {
+		// 	list.value = res.rows
+		// 	total.value = res.total
+		// } else {
+		// 	uni.showToast({
+		// 		title: res.msg || '',
+		// 		icon: 'error',
+		// 	});
+		// }
 	};
 	//查询
 	const toInput = (e : any) => {
@@ -158,7 +158,6 @@
 		list.value = []
 		pageNum.value = 1
 		pageSize.value = 10
-		page.value = 0
 	};
 </script>
 <style lang="scss" scoped>

+ 18 - 19
pages/home/components/game.vue

@@ -77,24 +77,24 @@
 	};
 	// 查询列表
 	const search = async () => {
-		const info = {
-			pageNum: pageNum.value,
-			pageSize: pageSize.value,
-			userId: user.value.id
-		}
-		const res = await $api('game/list', 'GET', {
-			...info,
-			...searchInfo.value
-		});
-		if (res.code === 200) {
-			list.value = res.rows
-			total.value = res.total
-		} else {
-			uni.showToast({
-				title: res.msg || '',
-				icon: 'error',
-			});
-		}
+		// const info = {
+		// 	pageNum: pageNum.value,
+		// 	pageSize: pageSize.value,
+		// 	userId: user.value.id
+		// }
+		// const res = await $api('game/list', 'GET', {
+		// 	...info,
+		// 	...searchInfo.value
+		// });
+		// if (res.code === 200) {
+		// 	list.value = res.rows
+		// 	total.value = res.total
+		// } else {
+		// 	uni.showToast({
+		// 		title: res.msg || '',
+		// 		icon: 'error',
+		// 	});
+		// }
 	};
 	//查询
 	const toInput = (e : any) => {
@@ -133,7 +133,6 @@
 		list.value = []
 		pageNum.value = 1
 		pageSize.value = 10
-		page.value = 0
 	};
 </script>
 <style lang="scss" scoped>

+ 0 - 1
pages/home/components/team.vue

@@ -130,7 +130,6 @@
 		list.value = []
 		pageNum.value = 1
 		pageSize.value = 10
-		page.value = 0
 	};
 </script>
 <style lang="scss" scoped>

+ 0 - 1
pagesHome/activity/index.vue

@@ -137,7 +137,6 @@
 		list.value = []
 		skip.value = 0
 		limit.value = 6
-		page.value = 0
 	};
 </script>
 <style lang="scss" scoped>

+ 12 - 23
pagesHome/create/components/activity.vue

@@ -54,37 +54,21 @@
 			<view class="value other">
 				<view class="title">人数上限</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.number" placeholder="请选择" />
+					<input name="name" class="input" :value="form.max_person" placeholder="请输入人数上限" />
 				</view>
 			</view>
 			<view class="value other">
 				<view class="title">公开报名</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.sign" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other">
-				<view class="title">定时开启报名</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+					<picker name="is_open" @change="openChange" :value="index" :range="openList" range-key="dictLabel">
+						<view class="picker">{{form.is_open||'请选择'}}</view>
+					</picker>
 				</view>
 			</view>
-			<view class="value other">
+			<view class="value other" v-if="form.date&&form.time">
 				<view class="title">报名截止时间</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.time" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other">
-				<view class="title">限定人员标签</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other margin">
-				<view class="title">允许待定</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+					<uni-datetime-picker :start="form.date" :border="false" v-model="form.end_time" />
 				</view>
 			</view>
 			<view class="value other">
@@ -130,9 +114,10 @@
 		type: { type: String, default: () => '0' },
 		typeList: { type: Array, default: () => [] },
 		activityList: { type: Array, default: () => [] },
+		openList: { type: Array, default: () => [] },
 		durationList: { type: Array, default: () => [] },
 	});
-	const { type, typeList, activityList, durationList } = toRefs(props);
+	const { type, typeList, activityList, durationList, openList } = toRefs(props);
 	// 类型选择
 	const typeChange = (e) => {
 		let data
@@ -157,6 +142,10 @@
 	const timeChange = (e) => {
 		form.value.time = e.detail.value
 	};
+	// 是否公开选择器
+	const openChange = (e) => {
+		form.value.is_open = e.detail.value
+	};
 	// 上传图片
 	const toUpload = async (e) => {
 		const arr = await $apifile(`/common/upload`, 'file', e.tempFilePaths[0],

+ 57 - 39
pagesHome/create/components/match.vue

@@ -20,8 +20,9 @@
 			</view>
 			<view class="value other">
 				<view class="title">对手</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.name" placeholder="请选择" />
+				<view class="label" @tap="toOpponent">
+					<text v-if="form.opponent">{{opponent_name}}</text>
+					<text v-else>请选择</text>
 				</view>
 			</view>
 			<view class="value other">
@@ -51,8 +52,9 @@
 			</view>
 			<view class="value other">
 				<view class="title">地点</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+				<view class="label" @tap="toLocaltion">
+					<text v-if="form.address">{{form.address}}</text>
+					<text v-else>请选择</text>
 				</view>
 			</view>
 			<view class="value other margin">
@@ -70,37 +72,21 @@
 			<view class="value other">
 				<view class="title">人数上限</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+					<input name="name" class="input" :value="form.max_person" placeholder="请输入人数上限" />
 				</view>
 			</view>
 			<view class="value other">
 				<view class="title">公开报名</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other">
-				<view class="title">定时开启报名</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+					<picker name="is_open" @change="openChange" :value="index" :range="openList" range-key="dictLabel">
+						<view class="picker">{{form.is_open||'请选择'}}</view>
+					</picker>
 				</view>
 			</view>
-			<view class="value other">
+			<view class="value other" v-if="form.date&&form.time">
 				<view class="title">报名截止时间</view>
 				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other">
-				<view class="title">限定人员标签</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
-				</view>
-			</view>
-			<view class="value other margin">
-				<view class="title">允许待定</view>
-				<view class="label">
-					<input name="name" class="input" :value="form.address" placeholder="请选择" />
+					<uni-datetime-picker :start="form.date" :border="false" v-model="form.end_time" />
 				</view>
 			</view>
 			<view class="value other">
@@ -127,11 +113,15 @@
 
 <script setup lang="ts">
 	import { ref, toRefs, getCurrentInstance } from 'vue';
+	//该依赖已内置不需要单独安装
+	import { onShow } from "@dcloudio/uni-app";
 	// 请求接口
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
 	const $apifile = getCurrentInstance()?.appContext.config.globalProperties.$apifile;
 	// 信息
 	const form = ref({ file: [] });
+	// 对手名称
+	const opponent_name = ref('');
 	const listStyles = ref({
 		width: 64,
 		height: 64,
@@ -145,24 +135,25 @@
 	const props = defineProps({
 		typeList: { type: Array, default: () => [] },
 		numberList: { type: Array, default: () => [] },
+		openList: { type: Array, default: () => [] },
 		durationList: { type: Array, default: () => [] },
 	});
-	const { typeList, durationList, numberList } = toRefs(props);
+	const { typeList, durationList, numberList, openList } = toRefs(props);
+	onShow(() => {
+		uni.$on('opponentInfo', function (item) {
+			form.value.opponent = item.id
+			opponent_name.value = item.name
+		})
+	})
 	// 类型选择
 	const typeChange = (e) => {
-		let data
-		if (type.value == 0) {
-			data = typeList.value[e.detail.value]
-			if (data) form.value.type = data.dictLabel
-		} else {
-			data = activityList.value[e.detail.value]
-			if (data) form.value.type = data.dictLabel
-		}
+		const data = typeList.value[e.detail.value]
+		if (data) form.value.type = data.dictLabel
 	};
-	// 时长选择选择
-	const durationChange = (e) => {
-		const data = durationList.value[e.detail.value]
-		if (data) form.value.duration = data.dictLabel
+	// 人数选择
+	const numberChange = (e) => {
+		const data = numberList.value[e.detail.value]
+		if (data) form.value.number = data.dictLabel
 	};
 	// 日期选择器
 	const dateChange = (e) => {
@@ -172,6 +163,27 @@
 	const timeChange = (e) => {
 		form.value.time = e.detail.value
 	};
+	// 时长选择选择
+	const durationChange = (e) => {
+		const data = durationList.value[e.detail.value]
+		if (data) form.value.duration = data.dictLabel
+	};
+	// 是否公开选择器
+	const openChange = (e) => {
+		form.value.is_open = e.detail.value
+	};
+	// 定位
+	const toLocaltion = (e) => {
+		uni.chooseLocation({
+			success: function (res) {
+				searchAddress(res);
+			}
+		})
+	};
+	// 解析位置详细信息
+	const searchAddress = (e) => {
+		form.value.address = e.address
+	};
 	// 上传图片
 	const toUpload = async (e) => {
 		const arr = await $apifile(`/common/upload`, 'file', e.tempFilePaths[0],
@@ -195,6 +207,12 @@
 		form.value.file = form.value.file.filter(i => i.originalFilename != e.tempFile.name)
 		console.log(form.value.file);
 	};
+	// 对手选择
+	const toOpponent = () => {
+		uni.navigateTo({
+			url: `/pagesHome/create/person`,
+		})
+	};
 </script>
 <style lang="scss" scoped>
 	.form {

+ 12 - 9
pagesHome/create/index.vue

@@ -8,13 +8,13 @@
 						activeColor="#dd524d"></uni-segmented-control>
 					<view class="one_2">
 						<view v-show="current === 0">
-							<match :typeList="typeList" :numberList="numberList" :durationList='durationList'></match>
+							<match :typeList="typeList" :numberList="numberList" :durationList='durationList' :openList="openList"></match>
 						</view>
 						<view v-show="current === 1">
-							<activity :typeList="matchList" :durationList='durationList' type="0"></activity>
+							<activity :typeList="matchList" :durationList='durationList' :openList="openList" type="0"></activity>
 						</view>
 						<view v-show="current === 2">
-							<activity :activityList="activityList" :durationList='durationList' type="1"></activity>
+							<activity :activityList="activityList" :durationList='durationList' :openList="openList" type="1"></activity>
 						</view>
 					</view>
 				</view>
@@ -48,7 +48,6 @@
 	import match from './components/match.vue';
 	// 请求接口
 	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
-
 	// 基本信息
 	const config = ref({});
 	// 详情信息id
@@ -61,6 +60,7 @@
 	const matchList = ref([]);
 	const activityList = ref([]);
 	const durationList = ref([]);
+	const openList = ref([]);
 	onLoad(async (options) => {
 		// 球队id
 		id.value = options && options.id
@@ -76,20 +76,23 @@
 	const searchOther = async () => {
 		let res;
 		// 比赛类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type', status: '0' });
 		if (res.code === 200 && res.total > 0) typeList.value = res.rows
 		// 比赛人数
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_number' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_number', status: '0' });
 		if (res.code === 200 && res.total > 0) numberList.value = res.rows
 		// 训练类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_train_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_train_type', status: '0' });
 		if (res.code === 200 && res.total > 0) matchList.value = res.rows
 		// 活动类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_activity_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_activity_type', status: '0' });
 		if (res.code === 200 && res.total > 0) activityList.value = res.rows
 		// 时长
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_duration' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_match_duration' , status: '0'});
 		if (res.code === 200 && res.total > 0) durationList.value = res.rows
+		// 是否公开
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_yes_no' , status: '0'});
+		if (res.code === 200 && res.total > 0) openList.value = res.rows
 	};
 	// 查询
 	const search = async () => {

+ 256 - 0
pagesHome/create/person.vue

@@ -0,0 +1,256 @@
+<template>
+	<view class="content">
+		<view class="one">
+			<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="添加对手">
+		</view>
+		<view class="two">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="title">约过的战队</view>
+					<view class="list" v-for="(item, index) in list" :key="index" @tap="toSelect(item)">
+						<view class="list_1">
+							<view class="left">
+								<image class="image" mode="aspectFill" :src="item.logo||config.logoUrl"></image>
+							</view>
+							<view class="right">
+								<view class="name">
+									{{item.name||'暂无名称'}}
+								</view>
+								<view class="other">
+									<view class="other_1">{{item.address||'未入驻'}}</view>
+									<view class="other_2">胜{{item.win||0}},平{{item.flat||0}},负{{item.burden||0}}</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottomTitle||'到底了!'}}</text>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script setup lang="ts">
+	import { ref, toRefs, getCurrentInstance } from 'vue';
+	//该依赖已内置不需要单独安装
+	import { onShow } from "@dcloudio/uni-app";
+	// 请求接口
+	const $api = getCurrentInstance()?.appContext.config.globalProperties.$api;
+	interface PropsItem {
+		id ?: number,
+		name ?: string,
+		logo ?: string,
+		address ?: string,
+		win ?: string,
+		burden ?: string,
+		flat ?: string,
+	};
+	// 用户信息
+	const user = ref({});
+	// 查询
+	const searchInfo = ref({});
+	// 列表
+	const list = ref<PropsItem[]>([{ id: 1, name: '成都容城' }, { id: 1, name: 'YYDS|脏三疯' }]);
+	// 分页
+	const pageNum = ref(1);
+	const pageSize = ref(10);
+	const total = ref(0);
+	// 基本信息
+	const config = ref({});
+	// 数据是否触底
+	const scrollTop = ref(0);
+	const is_bottom = ref(false);
+
+	onShow(async () => {
+		await searchConfig();
+		await searchUser();
+		await search();
+	})
+	// config信息
+	const searchConfig = async () => {
+		config.value = uni.getStorageSync('config');
+	};
+	// 用户信息
+	const searchUser = async () => {
+		user.value = uni.getStorageSync('user');
+	};
+	// 查询约过的战队列表
+	const search = async () => {
+		const info = {
+			pageNum: pageNum.value,
+			pageSize: pageSize.value,
+			userId: user.value.id
+		}
+		const res = await $api('team/list', 'GET', {
+			...info
+		});
+		if (res.code === 200) {
+			list.value = res.rows
+			total.value = res.total
+		} else {
+			uni.showToast({
+				title: res.msg || '',
+				icon: 'error',
+			});
+		}
+	};
+	// 查询球队列表
+	const searchTeam = async () => {
+		const info = {
+			pageNum: pageNum.value,
+			pageSize: pageSize.value,
+		}
+		const res = await $api('team/list', 'GET', {
+			...info,
+			...searchInfo
+		});
+		if (res.code === 200) {
+			list.value = res.rows
+			total.value = res.total
+		} else {
+			uni.showToast({
+				title: res.msg || '',
+				icon: 'error',
+			});
+		}
+	};
+	//查询
+	const toInput = (e : any) => {
+		if (searchInfo.value.name) searchInfo.value.name = e.detail.value
+		searchInfo.value = {}
+		clearPage();
+		searchTeam();
+	};
+	// 选择战队
+	const toSelect = (item : any) => {
+		uni.$emit('opponentInfo', item);
+		// 返回上一个页面
+		uni.navigateBack({
+			delta: 1
+		})
+	};
+	// 分页
+	const toPage = () => {
+		if (total.value > list.value.length) {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			})
+			pageNum.value = pageNum.value + 1
+			pageSize.value = pageNum.value * 10;
+			search();
+			uni.hideLoading();
+		} else is_bottom.value = true
+	};
+	const toScroll = (e : any) => {
+		let up = scrollTop.value;
+		scrollTop.value = e.detail.scrollTop
+		let num = Math.sign(up - e.detail.scrollTop);
+		if (num == 1) is_bottom.value = false
+	};
+	// 清空数据
+	const clearPage = () => {
+		list.value = []
+		pageNum.value = 1
+		pageSize.value = 10
+	};
+</script>
+<style lang="scss" scoped>
+	.content {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 66vh;
+
+		.one {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			padding: 2vw;
+			border-bottom: 1px solid var(--f5Color);
+
+			input {
+				width: 100%;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.two {
+			position: relative;
+			flex-grow: 1;
+
+			.title {
+				padding: 1vw 0;
+				text-align: center;
+				background-color: var(--f9Color);
+			}
+
+			.list {
+				border-bottom: 1px solid var(--f5Color);
+				padding: 3vw;
+
+				.list_1 {
+					display: flex;
+					align-items: center;
+
+					.left {
+						width: 15vw;
+
+						.image {
+							width: 15vw;
+							height: 15vw;
+							border-radius: 2vw;
+						}
+					}
+
+					.right {
+						width: 75vw;
+						margin: 0 0 0 2vw;
+
+						.name {
+							font-size: var(--font16Size);
+						}
+
+						.other {
+							display: flex;
+							justify-content: space-between;
+							margin: 1vw 0 0 0;
+							font-size: var(--font14Size);
+							color: var(--f85Color);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		width: 100%;
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: var(--f85Color);
+			font-size: var(--font14Size);
+		}
+	}
+</style>

+ 1 - 1
pagesHome/match/index.vue

@@ -93,7 +93,7 @@
 	const searchOther = async () => {
 		let res;
 		// 类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type', status: '0' });
 		if (res.code === 200 && res.total > 0) typeList.value = res.rows
 	};
 	// 查询

+ 1 - 1
pagesHome/team/index.vue

@@ -93,7 +93,7 @@
 	const searchOther = async () => {
 		let res;
 		// 类型
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' , status: '0'});
 		if (res.code === 200 && res.total > 0) typeList.value = res.rows
 	};
 	// 类型选择

+ 4 - 4
pagesMy/basic/index.vue

@@ -135,16 +135,16 @@
 	const searchOther = async () => {
 		let res;
 		// 性别
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_sex' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_sex', status: '0' });
 		if (res.code === 200 && res.total > 0) sexList.value = res.rows
 		// 主要项目
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_type', status: '0' });
 		if (res.code === 200 && res.total > 0) typeList.value = res.rows
 		// 队内位置
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_place' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_place', status: '0' });
 		if (res.code === 200 && res.total > 0) placeList.value = res.rows
 		// 球龄
-		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_year' });
+		res = await $api(`dict/data/list`, 'GET', { dictType: 'sys_user_year', status: '0' });
 		if (res.code === 200 && res.total > 0) ballYearsList.value = res.rows
 	};
 	// config信息

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

@@ -21,6 +21,7 @@ if (!Math) {
   "./pagesHome/activity/info.js";
   "./pagesHome/person/index.js";
   "./pagesHome/create/index.js";
+  "./pagesHome/create/person.js";
   "./pagesMy/basic/index.js";
 }
 const _sfc_main = {

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

@@ -21,7 +21,8 @@
         "activity/index",
         "activity/info",
         "person/index",
-        "create/index"
+        "create/index",
+        "create/person"
       ]
     },
     {
@@ -37,6 +38,15 @@
     "navigationBarBackgroundColor": "#121212",
     "backgroundColor": "#121212"
   },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "定位当前位置,选在收获地址"
+    }
+  },
+  "requiredPrivateInfos": [
+    "chooseAddress",
+    "chooseLocation"
+  ],
   "lazyCodeLoading": "requiredComponents",
   "usingComponents": {}
 }

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

@@ -11171,6 +11171,12 @@ const subPackages = [
         style: {
           navigationBarTitleText: "创建"
         }
+      },
+      {
+        path: "create/person",
+        style: {
+          navigationBarTitleText: "添加对手"
+        }
       }
     ]
   },
@@ -13723,6 +13729,7 @@ exports.f = f$1;
 exports.getCurrentInstance = getCurrentInstance;
 exports.hooks = hooks;
 exports.index = index;
+exports.initVueI18n = initVueI18n;
 exports.n = n$1;
 exports.o = o$1;
 exports.onLoad = onLoad;

+ 1 - 20
unpackage/dist/dev/mp-weixin/pages/home/components/activity.js

@@ -9,7 +9,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   setup(__props) {
     var _a;
     const props = __props;
-    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const user = common_vendor.ref({});
     const searchInfo = common_vendor.ref({});
     const list = common_vendor.ref([{ id: 1, name: "测试球队" }, { id: 1, name: "肝帝集团队" }]);
@@ -27,24 +27,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       user.value = common_vendor.index.getStorageSync("user");
     };
     const search = async () => {
-      const info = {
-        pageNum: pageNum.value,
-        pageSize: pageSize.value,
-        userId: user.value.id
-      };
-      const res = await $api("activity/list", "GET", {
-        ...info,
-        ...searchInfo.value
-      });
-      if (res.code === 200) {
-        list.value = res.rows;
-        total.value = res.total;
-      } else {
-        common_vendor.index.showToast({
-          title: res.msg || "",
-          icon: "error"
-        });
-      }
     };
     const toInput = (e) => {
       if (searchInfo.value.name)
@@ -82,7 +64,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       list.value = [];
       pageNum.value = 1;
       pageSize.value = 10;
-      page.value = 0;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({

+ 1 - 20
unpackage/dist/dev/mp-weixin/pages/home/components/game.js

@@ -9,7 +9,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   setup(__props) {
     var _a;
     const props = __props;
-    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const user = common_vendor.ref({});
     const searchInfo = common_vendor.ref({});
     const list = common_vendor.ref([{ id: 1, name: "肝帝33联赛" }]);
@@ -27,24 +27,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       user.value = common_vendor.index.getStorageSync("user");
     };
     const search = async () => {
-      const info = {
-        pageNum: pageNum.value,
-        pageSize: pageSize.value,
-        userId: user.value.id
-      };
-      const res = await $api("game/list", "GET", {
-        ...info,
-        ...searchInfo.value
-      });
-      if (res.code === 200) {
-        list.value = res.rows;
-        total.value = res.total;
-      } else {
-        common_vendor.index.showToast({
-          title: res.msg || "",
-          icon: "error"
-        });
-      }
     };
     const toInput = (e) => {
       if (searchInfo.value.name)
@@ -82,7 +64,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       list.value = [];
       pageNum.value = 1;
       pageSize.value = 10;
-      page.value = 0;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({

+ 0 - 1
unpackage/dist/dev/mp-weixin/pages/home/components/team.js

@@ -84,7 +84,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       list.value = [];
       pageNum.value = 1;
       pageSize.value = 10;
-      page.value = 0;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({

+ 0 - 1
unpackage/dist/dev/mp-weixin/pagesHome/activity/index.js

@@ -58,7 +58,6 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       list.value = [];
       skip.value = 0;
       limit.value = 6;
-      page.value = 0;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({

+ 30 - 16
unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.js

@@ -1,12 +1,14 @@
 "use strict";
 const common_vendor = require("../../../common/vendor.js");
 if (!Array) {
+  const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
   const _easycom_uni_file_picker2 = common_vendor.resolveComponent("uni-file-picker");
-  _easycom_uni_file_picker2();
+  (_easycom_uni_datetime_picker2 + _easycom_uni_file_picker2)();
 }
+const _easycom_uni_datetime_picker = () => "../../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js";
 const _easycom_uni_file_picker = () => "../../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js";
 if (!Math) {
-  _easycom_uni_file_picker();
+  (_easycom_uni_datetime_picker + _easycom_uni_file_picker)();
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "activity",
@@ -14,6 +16,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     type: { type: String, default: () => "0" },
     typeList: { type: Array, default: () => [] },
     activityList: { type: Array, default: () => [] },
+    openList: { type: Array, default: () => [] },
     durationList: { type: Array, default: () => [] }
   },
   setup(__props) {
@@ -32,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         radius: "2px"
       }
     });
-    const { type, typeList, activityList, durationList } = common_vendor.toRefs(props);
+    const { type, typeList, activityList, durationList, openList } = common_vendor.toRefs(props);
     const typeChange = (e) => {
       let data;
       if (type.value == 0) {
@@ -56,6 +59,9 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const timeChange = (e) => {
       form.value.time = e.detail.value;
     };
+    const openChange = (e) => {
+      form.value.is_open = e.detail.value;
+    };
     const toUpload = async (e) => {
       const arr = await $apifile(
         `/common/upload`,
@@ -107,25 +113,33 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         s: common_vendor.unref(durationList),
         t: form.value.address,
         v: form.value.money,
-        w: form.value.number,
-        x: form.value.sign,
-        y: form.value.address,
-        z: form.value.time,
-        A: form.value.address,
-        B: form.value.address,
-        C: form.value.title,
-        D: form.value.brief,
-        E: common_vendor.o(toUpload),
-        F: common_vendor.o(toDelete),
-        G: common_vendor.o(($event) => form.value.file = $event),
-        H: common_vendor.p({
+        w: form.value.max_person,
+        x: common_vendor.t(form.value.is_open || "请选择"),
+        y: common_vendor.o(openChange),
+        z: _ctx.index,
+        A: common_vendor.unref(openList),
+        B: form.value.date && form.value.time
+      }, form.value.date && form.value.time ? {
+        C: common_vendor.o(($event) => form.value.end_time = $event),
+        D: common_vendor.p({
+          start: form.value.date,
+          border: false,
+          modelValue: form.value.end_time
+        })
+      } : {}, {
+        E: form.value.title,
+        F: form.value.brief,
+        G: common_vendor.o(toUpload),
+        H: common_vendor.o(toDelete),
+        I: common_vendor.o(($event) => form.value.file = $event),
+        J: common_vendor.p({
           fileMediatype: "image",
           ["list-styles"]: _ctx.imageStyles,
           limit: "6",
           title: "最多选择6张图片",
           modelValue: form.value.file
         }),
-        I: common_vendor.o(
+        K: common_vendor.o(
           //@ts-ignore
           (...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
         )

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.json

@@ -1,6 +1,7 @@
 {
   "component": true,
   "usingComponents": {
+    "uni-datetime-picker": "../../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker",
     "uni-file-picker": "../../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker"
   }
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/create/components/activity.wxml


+ 87 - 48
unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.js

@@ -1,18 +1,21 @@
 "use strict";
 const common_vendor = require("../../../common/vendor.js");
 if (!Array) {
+  const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
   const _easycom_uni_file_picker2 = common_vendor.resolveComponent("uni-file-picker");
-  _easycom_uni_file_picker2();
+  (_easycom_uni_datetime_picker2 + _easycom_uni_file_picker2)();
 }
+const _easycom_uni_datetime_picker = () => "../../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js";
 const _easycom_uni_file_picker = () => "../../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.js";
 if (!Math) {
-  _easycom_uni_file_picker();
+  (_easycom_uni_datetime_picker + _easycom_uni_file_picker)();
 }
 const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
   __name: "match",
   props: {
     typeList: { type: Array, default: () => [] },
     numberList: { type: Array, default: () => [] },
+    openList: { type: Array, default: () => [] },
     durationList: { type: Array, default: () => [] }
   },
   setup(__props) {
@@ -21,6 +24,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
     const $apifile = (_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$apifile;
     const form = common_vendor.ref({ file: [] });
+    const opponent_name = common_vendor.ref("");
     common_vendor.ref({
       width: 64,
       height: 64,
@@ -31,23 +35,22 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         radius: "2px"
       }
     });
-    const { typeList, durationList, numberList } = common_vendor.toRefs(props);
+    const { typeList, durationList, numberList, openList } = common_vendor.toRefs(props);
+    common_vendor.onShow(() => {
+      common_vendor.index.$on("opponentInfo", function(item) {
+        form.value.opponent = item.id;
+        opponent_name.value = item.name;
+      });
+    });
     const typeChange = (e) => {
-      let data;
-      if (type.value == 0) {
-        data = typeList.value[e.detail.value];
-        if (data)
-          form.value.type = data.dictLabel;
-      } else {
-        data = activityList.value[e.detail.value];
-        if (data)
-          form.value.type = data.dictLabel;
-      }
+      const data = typeList.value[e.detail.value];
+      if (data)
+        form.value.type = data.dictLabel;
     };
-    const durationChange = (e) => {
-      const data = durationList.value[e.detail.value];
+    const numberChange = (e) => {
+      const data = numberList.value[e.detail.value];
       if (data)
-        form.value.duration = data.dictLabel;
+        form.value.number = data.dictLabel;
     };
     const dateChange = (e) => {
       form.value.date = e.detail.value;
@@ -55,6 +58,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const timeChange = (e) => {
       form.value.time = e.detail.value;
     };
+    const durationChange = (e) => {
+      const data = durationList.value[e.detail.value];
+      if (data)
+        form.value.duration = data.dictLabel;
+    };
+    const openChange = (e) => {
+      form.value.is_open = e.detail.value;
+    };
+    const toLocaltion = (e) => {
+      common_vendor.index.chooseLocation({
+        success: function(res) {
+          searchAddress(res);
+        }
+      });
+    };
+    const searchAddress = (e) => {
+      form.value.address = e.address;
+    };
     const toUpload = async (e) => {
       const arr = await $apifile(
         `/common/upload`,
@@ -80,56 +101,74 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
       form.value.file = form.value.file.filter((i) => i.originalFilename != e.tempFile.name);
       console.log(form.value.file);
     };
+    const toOpponent = () => {
+      common_vendor.index.navigateTo({
+        url: `/pagesHome/create/person`
+      });
+    };
     return (_ctx, _cache) => {
-      return {
+      return common_vendor.e({
         a: common_vendor.t(form.value.type || "请选择类型"),
         b: common_vendor.o(typeChange),
         c: _ctx.index,
         d: common_vendor.unref(typeList),
         e: common_vendor.t(form.value.number || "请选择人数"),
-        f: common_vendor.o(
-          //@ts-ignore
-          (...args) => _ctx.numberChange && _ctx.numberChange(...args)
-        ),
+        f: common_vendor.o(numberChange),
         g: _ctx.index,
         h: common_vendor.unref(numberList),
-        i: form.value.name,
-        j: common_vendor.t(form.value.date || "请选择日期"),
-        k: common_vendor.o(dateChange),
-        l: _ctx.index,
-        m: common_vendor.t(form.value.time || "请选择时间"),
-        n: common_vendor.o(timeChange),
-        o: _ctx.index,
-        p: common_vendor.t(form.value.duration || "请选择时长"),
-        q: common_vendor.o(durationChange),
-        r: _ctx.index,
-        s: common_vendor.unref(durationList),
-        t: form.value.address,
-        v: form.value.color,
-        w: form.value.money,
-        x: form.value.address,
-        y: form.value.address,
-        z: form.value.address,
-        A: form.value.address,
-        B: form.value.address,
-        C: form.value.address,
-        D: form.value.title,
-        E: form.value.brief,
-        F: common_vendor.o(toUpload),
-        G: common_vendor.o(toDelete),
-        H: common_vendor.o(($event) => form.value.file = $event),
+        i: form.value.opponent
+      }, form.value.opponent ? {
+        j: common_vendor.t(opponent_name.value)
+      } : {}, {
+        k: common_vendor.o(toOpponent),
+        l: common_vendor.t(form.value.date || "请选择日期"),
+        m: common_vendor.o(dateChange),
+        n: _ctx.index,
+        o: common_vendor.t(form.value.time || "请选择时间"),
+        p: common_vendor.o(timeChange),
+        q: _ctx.index,
+        r: common_vendor.t(form.value.duration || "请选择时长"),
+        s: common_vendor.o(durationChange),
+        t: _ctx.index,
+        v: common_vendor.unref(durationList),
+        w: form.value.address
+      }, form.value.address ? {
+        x: common_vendor.t(form.value.address)
+      } : {}, {
+        y: common_vendor.o(toLocaltion),
+        z: form.value.color,
+        A: form.value.money,
+        B: form.value.max_person,
+        C: common_vendor.t(form.value.is_open || "请选择"),
+        D: common_vendor.o(openChange),
+        E: _ctx.index,
+        F: common_vendor.unref(openList),
+        G: form.value.date && form.value.time
+      }, form.value.date && form.value.time ? {
+        H: common_vendor.o(($event) => form.value.end_time = $event),
         I: common_vendor.p({
+          start: form.value.date,
+          border: false,
+          modelValue: form.value.end_time
+        })
+      } : {}, {
+        J: form.value.title,
+        K: form.value.brief,
+        L: common_vendor.o(toUpload),
+        M: common_vendor.o(toDelete),
+        N: common_vendor.o(($event) => form.value.file = $event),
+        O: common_vendor.p({
           fileMediatype: "image",
           ["list-styles"]: _ctx.imageStyles,
           limit: "6",
           title: "最多选择6张图片",
           modelValue: form.value.file
         }),
-        J: common_vendor.o(
+        P: common_vendor.o(
           //@ts-ignore
           (...args) => _ctx.formSubmit && _ctx.formSubmit(...args)
         )
-      };
+      });
     };
   }
 });

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.json

@@ -1,6 +1,7 @@
 {
   "component": true,
   "usingComponents": {
+    "uni-datetime-picker": "../../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker",
     "uni-file-picker": "../../../uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker"
   }
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/create/components/match.wxml


+ 13 - 6
unpackage/dist/dev/mp-weixin/pagesHome/create/index.js

@@ -26,6 +26,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     const matchList = common_vendor.ref([]);
     const activityList = common_vendor.ref([]);
     const durationList = common_vendor.ref([]);
+    const openList = common_vendor.ref([]);
     common_vendor.onLoad(async (options) => {
       id.value = options && options.id;
       await searchConfig();
@@ -37,21 +38,24 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const searchOther = async () => {
       let res;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         typeList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_number" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_number", status: "0" });
       if (res.code === 200 && res.total > 0)
         numberList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_train_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_train_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         matchList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_activity_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_activity_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         activityList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_duration" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_match_duration", status: "0" });
       if (res.code === 200 && res.total > 0)
         durationList.value = res.rows;
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_yes_no", status: "0" });
+      if (res.code === 200 && res.total > 0)
+        openList.value = res.rows;
     };
     const search = async () => {
       if (id.value)
@@ -79,18 +83,21 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
         c: common_vendor.p({
           typeList: typeList.value,
           numberList: numberList.value,
-          durationList: durationList.value
+          durationList: durationList.value,
+          openList: openList.value
         }),
         d: current.value === 0,
         e: common_vendor.p({
           typeList: matchList.value,
           durationList: durationList.value,
+          openList: openList.value,
           type: "0"
         }),
         f: current.value === 1,
         g: common_vendor.p({
           activityList: activityList.value,
           durationList: durationList.value,
+          openList: openList.value,
           type: "1"
         }),
         h: current.value === 2,

+ 131 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/person.js

@@ -0,0 +1,131 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
+  __name: "person",
+  setup(__props) {
+    var _a;
+    const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
+    const user = common_vendor.ref({});
+    const searchInfo = common_vendor.ref({});
+    const list = common_vendor.ref([{ id: 1, name: "成都容城" }, { id: 1, name: "YYDS|脏三疯" }]);
+    const pageNum = common_vendor.ref(1);
+    const pageSize = common_vendor.ref(10);
+    const total = common_vendor.ref(0);
+    const config = common_vendor.ref({});
+    const scrollTop = common_vendor.ref(0);
+    const is_bottom = common_vendor.ref(false);
+    common_vendor.onShow(async () => {
+      await searchConfig();
+      await searchUser();
+      await search();
+    });
+    const searchConfig = async () => {
+      config.value = common_vendor.index.getStorageSync("config");
+    };
+    const searchUser = async () => {
+      user.value = common_vendor.index.getStorageSync("user");
+    };
+    const search = async () => {
+      const info = {
+        pageNum: pageNum.value,
+        pageSize: pageSize.value,
+        userId: user.value.id
+      };
+      const res = await $api("team/list", "GET", {
+        ...info
+      });
+      if (res.code === 200) {
+        list.value = res.rows;
+        total.value = res.total;
+      } else {
+        common_vendor.index.showToast({
+          title: res.msg || "",
+          icon: "error"
+        });
+      }
+    };
+    const searchTeam = async () => {
+      const info = {
+        pageNum: pageNum.value,
+        pageSize: pageSize.value
+      };
+      const res = await $api("team/list", "GET", {
+        ...info,
+        ...searchInfo
+      });
+      if (res.code === 200) {
+        list.value = res.rows;
+        total.value = res.total;
+      } else {
+        common_vendor.index.showToast({
+          title: res.msg || "",
+          icon: "error"
+        });
+      }
+    };
+    const toInput = (e) => {
+      if (searchInfo.value.name)
+        searchInfo.value.name = e.detail.value;
+      searchInfo.value = {};
+      clearPage();
+      searchTeam();
+    };
+    const toSelect = (item) => {
+      common_vendor.index.$emit("opponentInfo", item);
+      common_vendor.index.navigateBack({
+        delta: 1
+      });
+    };
+    const toPage = () => {
+      if (total.value > list.value.length) {
+        common_vendor.index.showLoading({
+          title: "加载中",
+          mask: true
+        });
+        pageNum.value = pageNum.value + 1;
+        pageSize.value = pageNum.value * 10;
+        search();
+        common_vendor.index.hideLoading();
+      } else
+        is_bottom.value = true;
+    };
+    const toScroll = (e) => {
+      let up = scrollTop.value;
+      scrollTop.value = e.detail.scrollTop;
+      let num = Math.sign(up - e.detail.scrollTop);
+      if (num == 1)
+        is_bottom.value = false;
+    };
+    const clearPage = () => {
+      list.value = [];
+      pageNum.value = 1;
+      pageSize.value = 10;
+    };
+    return (_ctx, _cache) => {
+      return common_vendor.e({
+        a: common_vendor.o([($event) => searchInfo.value.name = $event.detail.value, toInput]),
+        b: searchInfo.value.name,
+        c: common_vendor.f(list.value, (item, index, i0) => {
+          return {
+            a: item.logo || config.value.logoUrl,
+            b: common_vendor.t(item.name || "暂无名称"),
+            c: common_vendor.t(item.address || "未入驻"),
+            d: common_vendor.t(item.win || 0),
+            e: common_vendor.t(item.flat || 0),
+            f: common_vendor.t(item.burden || 0),
+            g: index,
+            h: common_vendor.o(($event) => toSelect(item), index)
+          };
+        }),
+        d: is_bottom.value
+      }, is_bottom.value ? {
+        e: common_vendor.t(config.value.bottomTitle || "到底了!")
+      } : {}, {
+        f: common_vendor.o(toPage),
+        g: common_vendor.o(toScroll)
+      });
+    };
+  }
+});
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3a2dd265"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/create/person.vue"]]);
+wx.createPage(MiniProgramPage);

+ 4 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/person.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "添加对手",
+  "usingComponents": {}
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/person.wxml


+ 82 - 0
unpackage/dist/dev/mp-weixin/pagesHome/create/person.wxss

@@ -0,0 +1,82 @@
+/* 水平间距 */
+/* 水平间距 */
+.content.data-v-3a2dd265 {
+  display: flex;
+  flex-direction: column;
+  width: 100vw;
+  height: 66vh;
+}
+.content .one.data-v-3a2dd265 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f5Color);
+}
+.content .one input.data-v-3a2dd265 {
+  width: 100%;
+  padding: 2vw;
+  background-color: var(--f1Color);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}
+.content .two.data-v-3a2dd265 {
+  position: relative;
+  flex-grow: 1;
+}
+.content .two .title.data-v-3a2dd265 {
+  padding: 1vw 0;
+  text-align: center;
+  background-color: var(--f9Color);
+}
+.content .two .list.data-v-3a2dd265 {
+  border-bottom: 1px solid var(--f5Color);
+  padding: 3vw;
+}
+.content .two .list .list_1.data-v-3a2dd265 {
+  display: flex;
+  align-items: center;
+}
+.content .two .list .list_1 .left.data-v-3a2dd265 {
+  width: 15vw;
+}
+.content .two .list .list_1 .left .image.data-v-3a2dd265 {
+  width: 15vw;
+  height: 15vw;
+  border-radius: 2vw;
+}
+.content .two .list .list_1 .right.data-v-3a2dd265 {
+  width: 75vw;
+  margin: 0 0 0 2vw;
+}
+.content .two .list .list_1 .right .name.data-v-3a2dd265 {
+  font-size: var(--font16Size);
+}
+.content .two .list .list_1 .right .other.data-v-3a2dd265 {
+  display: flex;
+  justify-content: space-between;
+  margin: 1vw 0 0 0;
+  font-size: var(--font14Size);
+  color: var(--f85Color);
+}
+.scroll-view.data-v-3a2dd265 {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view.data-v-3a2dd265 {
+  display: flex;
+  flex-direction: column;
+}
+.is_bottom.data-v-3a2dd265 {
+  width: 100%;
+  text-align: center;
+}
+.is_bottom text.data-v-3a2dd265 {
+  padding: 2vw 0;
+  display: inline-block;
+  color: var(--f85Color);
+  font-size: var(--font14Size);
+}

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesHome/match/index.js

@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     });
     const searchOther = async () => {
       let res;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         typeList.value = res.rows;
     };

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

@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     };
     const searchOther = async () => {
       let res;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         typeList.value = res.rows;
     };

+ 4 - 4
unpackage/dist/dev/mp-weixin/pagesMy/basic/index.js

@@ -26,16 +26,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
     });
     const searchOther = async () => {
       let res;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_sex" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_sex", status: "0" });
       if (res.code === 200 && res.total > 0)
         sexList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_type", status: "0" });
       if (res.code === 200 && res.total > 0)
         typeList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_place" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_place", status: "0" });
       if (res.code === 200 && res.total > 0)
         placeList.value = res.rows;
-      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_year" });
+      res = await $api(`dict/data/list`, "GET", { dictType: "sys_user_year", status: "0" });
       if (res.code === 200 && res.total > 0)
         ballYearsList.value = res.rows;
     };

+ 58 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.js

@@ -0,0 +1,58 @@
+"use strict";
+const common_vendor = require("../../../../common/vendor.js");
+const _sfc_main = {
+  props: {
+    weeks: {
+      type: Object,
+      default() {
+        return {};
+      }
+    },
+    calendar: {
+      type: Object,
+      default: () => {
+        return {};
+      }
+    },
+    selected: {
+      type: Array,
+      default: () => {
+        return [];
+      }
+    },
+    checkHover: {
+      type: Boolean,
+      default: false
+    }
+  },
+  methods: {
+    choiceDate(weeks) {
+      this.$emit("change", weeks);
+    },
+    handleMousemove(weeks) {
+      this.$emit("handleMouse", weeks);
+    }
+  }
+};
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return common_vendor.e({
+    a: $props.selected && $props.weeks.extraInfo
+  }, $props.selected && $props.weeks.extraInfo ? {} : {}, {
+    b: common_vendor.t($props.weeks.date),
+    c: $props.calendar.fullDate === $props.weeks.fullDate && ($props.calendar.userChecked || !$props.checkHover) ? 1 : "",
+    d: $props.checkHover ? 1 : "",
+    e: $props.weeks.beforeMultiple ? 1 : "",
+    f: $props.weeks.multiple ? 1 : "",
+    g: $props.weeks.afterMultiple ? 1 : "",
+    h: $props.weeks.disable ? 1 : "",
+    i: $props.weeks.isToday ? 1 : "",
+    j: $props.weeks.disable ? 1 : "",
+    k: $props.weeks.beforeMultiple ? 1 : "",
+    l: $props.weeks.multiple ? 1 : "",
+    m: $props.weeks.afterMultiple ? 1 : "",
+    n: common_vendor.o(($event) => $options.choiceDate($props.weeks)),
+    o: common_vendor.o(($event) => $options.handleMousemove($props.weeks))
+  });
+}
+const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/project/足球比赛/match_applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue"]]);
+wx.createComponent(Component);

+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.wxml


+ 90 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.wxss

@@ -0,0 +1,90 @@
+/* 水平间距 */
+/* 水平间距 */
+.uni-calendar-item__weeks-box {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  margin: 1px 0;
+  position: relative;
+}
+.uni-calendar-item__weeks-box-text {
+  font-size: 14px;
+  font-weight: bold;
+  color: #00225c;
+}
+.uni-calendar-item__weeks-box-item {
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  width: 40px;
+  height: 40px;
+}
+.uni-calendar-item__weeks-box-circle {
+  position: absolute;
+  top: 5px;
+  right: 5px;
+  width: 8px;
+  height: 8px;
+  border-radius: 8px;
+  background-color: #dd524d;
+}
+.uni-calendar-item__weeks-box .uni-calendar-item--disable {
+  cursor: default;
+}
+.uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
+  color: #D1D1D1;
+}
+.uni-calendar-item--today {
+  position: absolute;
+  top: 10px;
+  right: 17%;
+  background-color: #dd524d;
+  width: 6px;
+  height: 6px;
+  border-radius: 50%;
+}
+.uni-calendar-item--extra {
+  color: #dd524d;
+  opacity: 0.8;
+}
+.uni-calendar-item__weeks-box .uni-calendar-item--checked {
+  background-color: #2979ff;
+  border-radius: 50%;
+  box-sizing: border-box;
+  border: 3px solid #fff;
+}
+.uni-calendar-item--checked .uni-calendar-item--checked-text {
+  color: #fff;
+}
+.uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
+  color: #333;
+}
+.uni-calendar-item--multiple {
+  background-color: #F6F7FC;
+}
+.uni-calendar-item--multiple .uni-calendar-item--before-checked,
+.uni-calendar-item--multiple .uni-calendar-item--after-checked {
+  background-color: #2979ff;
+  border-radius: 50%;
+  box-sizing: border-box;
+  border: 3px solid #F6F7FC;
+}
+.uni-calendar-item--before-checked .uni-calendar-item--checked-text,
+.uni-calendar-item--after-checked .uni-calendar-item--checked-text {
+  color: #fff;
+}
+.uni-calendar-item--before-checked-x {
+  border-top-left-radius: 50px;
+  border-bottom-left-radius: 50px;
+  box-sizing: border-box;
+  background-color: #F6F7FC;
+}
+.uni-calendar-item--after-checked-x {
+  border-top-right-radius: 50px;
+  border-bottom-right-radius: 50px;
+  background-color: #F6F7FC;
+}

+ 597 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.js

@@ -0,0 +1,597 @@
+"use strict";
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_util = require("./util.js");
+const common_vendor = require("../../../../common/vendor.js");
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index = require("./i18n/index.js");
+const calendarItem = () => "./calendar-item.js";
+const timePicker = () => "./time-picker.js";
+const { t } = common_vendor.initVueI18n(uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index.i18nMessages);
+const _sfc_main = {
+  components: {
+    calendarItem,
+    timePicker
+  },
+  props: {
+    date: {
+      type: String,
+      default: ""
+    },
+    defTime: {
+      type: [String, Object],
+      default: ""
+    },
+    selectableTimes: {
+      type: [Object],
+      default() {
+        return {};
+      }
+    },
+    selected: {
+      type: Array,
+      default() {
+        return [];
+      }
+    },
+    startDate: {
+      type: String,
+      default: ""
+    },
+    endDate: {
+      type: String,
+      default: ""
+    },
+    startPlaceholder: {
+      type: String,
+      default: ""
+    },
+    endPlaceholder: {
+      type: String,
+      default: ""
+    },
+    range: {
+      type: Boolean,
+      default: false
+    },
+    hasTime: {
+      type: Boolean,
+      default: false
+    },
+    insert: {
+      type: Boolean,
+      default: true
+    },
+    showMonth: {
+      type: Boolean,
+      default: true
+    },
+    clearDate: {
+      type: Boolean,
+      default: true
+    },
+    checkHover: {
+      type: Boolean,
+      default: true
+    },
+    hideSecond: {
+      type: [Boolean],
+      default: false
+    },
+    pleStatus: {
+      type: Object,
+      default() {
+        return {
+          before: "",
+          after: "",
+          data: [],
+          fulldate: ""
+        };
+      }
+    },
+    defaultValue: {
+      type: [String, Object, Array],
+      default: ""
+    }
+  },
+  data() {
+    return {
+      show: false,
+      weeks: [],
+      calendar: {},
+      nowDate: {},
+      aniMaskShow: false,
+      firstEnter: true,
+      time: "",
+      timeRange: {
+        startTime: "",
+        endTime: ""
+      },
+      tempSingleDate: "",
+      tempRange: {
+        before: "",
+        after: ""
+      }
+    };
+  },
+  watch: {
+    date: {
+      immediate: true,
+      handler(newVal) {
+        if (!this.range) {
+          this.tempSingleDate = newVal;
+          setTimeout(() => {
+            this.init(newVal);
+          }, 100);
+        }
+      }
+    },
+    defTime: {
+      immediate: true,
+      handler(newVal) {
+        if (!this.range) {
+          this.time = newVal;
+        } else {
+          this.timeRange.startTime = newVal.start;
+          this.timeRange.endTime = newVal.end;
+        }
+      }
+    },
+    startDate(val) {
+      if (!this.cale) {
+        return;
+      }
+      this.cale.setStartDate(val);
+      this.cale.setDate(this.nowDate.fullDate);
+      this.weeks = this.cale.weeks;
+    },
+    endDate(val) {
+      if (!this.cale) {
+        return;
+      }
+      this.cale.setEndDate(val);
+      this.cale.setDate(this.nowDate.fullDate);
+      this.weeks = this.cale.weeks;
+    },
+    selected(newVal) {
+      if (!this.cale) {
+        return;
+      }
+      this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
+      this.weeks = this.cale.weeks;
+    },
+    pleStatus: {
+      immediate: true,
+      handler(newVal) {
+        const {
+          before,
+          after,
+          fulldate,
+          which
+        } = newVal;
+        this.tempRange.before = before;
+        this.tempRange.after = after;
+        setTimeout(() => {
+          if (fulldate) {
+            this.cale.setHoverMultiple(fulldate);
+            if (before && after) {
+              this.cale.lastHover = true;
+              if (this.rangeWithinMonth(after, before))
+                return;
+              this.setDate(before);
+            } else {
+              this.cale.setMultiple(fulldate);
+              this.setDate(this.nowDate.fullDate);
+              this.calendar.fullDate = "";
+              this.cale.lastHover = false;
+            }
+          } else {
+            if (!this.cale) {
+              return;
+            }
+            this.cale.setDefaultMultiple(before, after);
+            if (which === "left" && before) {
+              this.setDate(before);
+              this.weeks = this.cale.weeks;
+            } else if (after) {
+              this.setDate(after);
+              this.weeks = this.cale.weeks;
+            }
+            this.cale.lastHover = true;
+          }
+        }, 16);
+      }
+    }
+  },
+  computed: {
+    timepickerStartTime() {
+      const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate;
+      return activeDate === this.startDate ? this.selectableTimes.start : "";
+    },
+    timepickerEndTime() {
+      const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate;
+      return activeDate === this.endDate ? this.selectableTimes.end : "";
+    },
+    /**
+     * for i18n
+     */
+    selectDateText() {
+      return t("uni-datetime-picker.selectDate");
+    },
+    startDateText() {
+      return this.startPlaceholder || t("uni-datetime-picker.startDate");
+    },
+    endDateText() {
+      return this.endPlaceholder || t("uni-datetime-picker.endDate");
+    },
+    okText() {
+      return t("uni-datetime-picker.ok");
+    },
+    yearText() {
+      return t("uni-datetime-picker.year");
+    },
+    monthText() {
+      return t("uni-datetime-picker.month");
+    },
+    MONText() {
+      return t("uni-calender.MON");
+    },
+    TUEText() {
+      return t("uni-calender.TUE");
+    },
+    WEDText() {
+      return t("uni-calender.WED");
+    },
+    THUText() {
+      return t("uni-calender.THU");
+    },
+    FRIText() {
+      return t("uni-calender.FRI");
+    },
+    SATText() {
+      return t("uni-calender.SAT");
+    },
+    SUNText() {
+      return t("uni-calender.SUN");
+    },
+    confirmText() {
+      return t("uni-calender.confirm");
+    }
+  },
+  created() {
+    this.cale = new uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.Calendar({
+      selected: this.selected,
+      startDate: this.startDate,
+      endDate: this.endDate,
+      range: this.range
+    });
+    this.init(this.date);
+  },
+  methods: {
+    leaveCale() {
+      this.firstEnter = true;
+    },
+    handleMouse(weeks) {
+      if (weeks.disable)
+        return;
+      if (this.cale.lastHover)
+        return;
+      let {
+        before,
+        after
+      } = this.cale.multipleStatus;
+      if (!before)
+        return;
+      this.calendar = weeks;
+      this.cale.setHoverMultiple(this.calendar.fullDate);
+      this.weeks = this.cale.weeks;
+      if (this.firstEnter) {
+        this.$emit("firstEnterCale", this.cale.multipleStatus);
+        this.firstEnter = false;
+      }
+    },
+    rangeWithinMonth(A, B) {
+      const [yearA, monthA] = A.split("-");
+      const [yearB, monthB] = B.split("-");
+      return yearA === yearB && monthA === monthB;
+    },
+    // 蒙版点击事件
+    maskClick() {
+      this.close();
+      this.$emit("maskClose");
+    },
+    clearCalender() {
+      if (this.range) {
+        this.timeRange.startTime = "";
+        this.timeRange.endTime = "";
+        this.tempRange.before = "";
+        this.tempRange.after = "";
+        this.cale.multipleStatus.before = "";
+        this.cale.multipleStatus.after = "";
+        this.cale.multipleStatus.data = [];
+        this.cale.lastHover = false;
+      } else {
+        this.time = "";
+        this.tempSingleDate = "";
+      }
+      this.calendar.fullDate = "";
+      this.setDate(/* @__PURE__ */ new Date());
+    },
+    bindDateChange(e) {
+      const value = e.detail.value + "-1";
+      this.setDate(value);
+    },
+    /**
+     * 初始化日期显示
+     * @param {Object} date
+     */
+    init(date) {
+      if (!this.cale) {
+        return;
+      }
+      this.cale.setDate(date || /* @__PURE__ */ new Date());
+      this.weeks = this.cale.weeks;
+      this.nowDate = this.cale.getInfo(date);
+      this.calendar = { ...this.nowDate };
+      if (!date) {
+        this.calendar.fullDate = "";
+        if (this.defaultValue && !this.range) {
+          const defaultDate = new Date(this.defaultValue);
+          const fullDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(defaultDate);
+          const year = defaultDate.getFullYear();
+          const month = defaultDate.getMonth() + 1;
+          const date2 = defaultDate.getDate();
+          const day = defaultDate.getDay();
+          this.calendar = {
+            fullDate,
+            year,
+            month,
+            date: date2,
+            day
+          }, this.tempSingleDate = fullDate;
+          this.time = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(defaultDate, this.hideSecond);
+        }
+      }
+    },
+    /**
+     * 打开日历弹窗
+     */
+    open() {
+      if (this.clearDate && !this.insert) {
+        this.cale.cleanMultipleStatus();
+        this.init(this.date);
+      }
+      this.show = true;
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.aniMaskShow = true;
+        }, 50);
+      });
+    },
+    /**
+     * 关闭日历弹窗
+     */
+    close() {
+      this.aniMaskShow = false;
+      this.$nextTick(() => {
+        setTimeout(() => {
+          this.show = false;
+          this.$emit("close");
+        }, 300);
+      });
+    },
+    /**
+     * 确认按钮
+     */
+    confirm() {
+      this.setEmit("confirm");
+      this.close();
+    },
+    /**
+     * 变化触发
+     */
+    change() {
+      if (!this.insert)
+        return;
+      this.setEmit("change");
+    },
+    /**
+     * 选择月份触发
+     */
+    monthSwitch() {
+      let {
+        year,
+        month
+      } = this.nowDate;
+      this.$emit("monthSwitch", {
+        year,
+        month: Number(month)
+      });
+    },
+    /**
+     * 派发事件
+     * @param {Object} name
+     */
+    setEmit(name) {
+      if (!this.range) {
+        if (!this.calendar.fullDate) {
+          this.calendar = this.cale.getInfo(/* @__PURE__ */ new Date());
+          this.tempSingleDate = this.calendar.fullDate;
+        }
+        if (this.hasTime && !this.time) {
+          this.time = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(/* @__PURE__ */ new Date(), this.hideSecond);
+        }
+      }
+      let {
+        year,
+        month,
+        date,
+        fullDate,
+        extraInfo
+      } = this.calendar;
+      this.$emit(name, {
+        range: this.cale.multipleStatus,
+        year,
+        month,
+        date,
+        time: this.time,
+        timeRange: this.timeRange,
+        fulldate: fullDate,
+        extraInfo: extraInfo || {}
+      });
+    },
+    /**
+     * 选择天触发
+     * @param {Object} weeks
+     */
+    choiceDate(weeks) {
+      if (weeks.disable)
+        return;
+      this.calendar = weeks;
+      this.calendar.userChecked = true;
+      this.cale.setMultiple(this.calendar.fullDate, true);
+      this.weeks = this.cale.weeks;
+      this.tempSingleDate = this.calendar.fullDate;
+      const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
+      const afterDate = new Date(this.cale.multipleStatus.after).getTime();
+      if (beforeDate > afterDate && afterDate) {
+        this.tempRange.before = this.cale.multipleStatus.after;
+        this.tempRange.after = this.cale.multipleStatus.before;
+      } else {
+        this.tempRange.before = this.cale.multipleStatus.before;
+        this.tempRange.after = this.cale.multipleStatus.after;
+      }
+      this.change();
+    },
+    changeMonth(type) {
+      let newDate;
+      if (type === "pre") {
+        newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
+      } else if (type === "next") {
+        newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
+      }
+      this.setDate(newDate);
+      this.monthSwitch();
+    },
+    /**
+     * 设置日期
+     * @param {Object} date
+     */
+    setDate(date) {
+      this.cale.setDate(date);
+      this.weeks = this.cale.weeks;
+      this.nowDate = this.cale.getInfo(date);
+    }
+  }
+};
+if (!Array) {
+  const _component_calendar_item = common_vendor.resolveComponent("calendar-item");
+  const _component_time_picker = common_vendor.resolveComponent("time-picker");
+  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
+  (_component_calendar_item + _component_time_picker + _easycom_uni_icons2)();
+}
+const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
+if (!Math) {
+  _easycom_uni_icons();
+}
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return common_vendor.e({
+    a: !$props.insert && $data.show
+  }, !$props.insert && $data.show ? {
+    b: $data.aniMaskShow ? 1 : "",
+    c: common_vendor.o((...args) => $options.maskClick && $options.maskClick(...args))
+  } : {}, {
+    d: $props.insert || $data.show
+  }, $props.insert || $data.show ? common_vendor.e({
+    e: common_vendor.o(($event) => $options.changeMonth("pre")),
+    f: common_vendor.t(($data.nowDate.year || "") + $options.yearText + ($data.nowDate.month || "") + $options.monthText),
+    g: $props.date,
+    h: common_vendor.o((...args) => $options.bindDateChange && $options.bindDateChange(...args)),
+    i: common_vendor.o(($event) => $options.changeMonth("next")),
+    j: !$props.insert
+  }, !$props.insert ? {
+    k: common_vendor.o((...args) => $options.close && $options.close(...args))
+  } : {}, {
+    l: !$props.insert ? 1 : "",
+    m: $props.showMonth
+  }, $props.showMonth ? {
+    n: common_vendor.t($data.nowDate.month)
+  } : {}, {
+    o: common_vendor.t($options.SUNText),
+    p: common_vendor.t($options.MONText),
+    q: common_vendor.t($options.TUEText),
+    r: common_vendor.t($options.WEDText),
+    s: common_vendor.t($options.THUText),
+    t: common_vendor.t($options.FRIText),
+    v: common_vendor.t($options.SATText),
+    w: common_vendor.f($data.weeks, (item, weekIndex, i0) => {
+      return {
+        a: common_vendor.f(item, (weeks, weeksIndex, i1) => {
+          return {
+            a: common_vendor.o($options.choiceDate, weeksIndex),
+            b: common_vendor.o($options.handleMouse, weeksIndex),
+            c: "2af999dc-0-" + i0 + "-" + i1,
+            d: common_vendor.p({
+              weeks,
+              calendar: $data.calendar,
+              selected: $props.selected,
+              checkHover: $props.range
+            }),
+            e: weeksIndex
+          };
+        }),
+        b: weekIndex
+      };
+    }),
+    x: !$props.insert && !$props.range && $props.hasTime
+  }, !$props.insert && !$props.range && $props.hasTime ? {
+    y: common_vendor.t($data.tempSingleDate ? $data.tempSingleDate : $options.selectDateText),
+    z: common_vendor.o(($event) => $data.time = $event),
+    A: common_vendor.p({
+      type: "time",
+      start: $options.timepickerStartTime,
+      end: $options.timepickerEndTime,
+      disabled: !$data.tempSingleDate,
+      border: false,
+      ["hide-second"]: $props.hideSecond,
+      modelValue: $data.time
+    })
+  } : {}, {
+    B: !$props.insert && $props.range && $props.hasTime
+  }, !$props.insert && $props.range && $props.hasTime ? {
+    C: common_vendor.t($data.tempRange.before ? $data.tempRange.before : $options.startDateText),
+    D: common_vendor.o(($event) => $data.timeRange.startTime = $event),
+    E: common_vendor.p({
+      type: "time",
+      start: $options.timepickerStartTime,
+      border: false,
+      ["hide-second"]: $props.hideSecond,
+      disabled: !$data.tempRange.before,
+      modelValue: $data.timeRange.startTime
+    }),
+    F: common_vendor.p({
+      type: "arrowthinright",
+      color: "#999"
+    }),
+    G: common_vendor.t($data.tempRange.after ? $data.tempRange.after : $options.endDateText),
+    H: common_vendor.o(($event) => $data.timeRange.endTime = $event),
+    I: common_vendor.p({
+      type: "time",
+      end: $options.timepickerEndTime,
+      border: false,
+      ["hide-second"]: $props.hideSecond,
+      disabled: !$data.tempRange.after,
+      modelValue: $data.timeRange.endTime
+    })
+  } : {}, {
+    J: !$props.insert
+  }, !$props.insert ? {
+    K: common_vendor.t($options.confirmText),
+    L: common_vendor.o((...args) => $options.confirm && $options.confirm(...args))
+  } : {}, {
+    M: !$props.insert ? 1 : "",
+    N: $data.aniMaskShow ? 1 : "",
+    O: $data.aniMaskShow ? 1 : ""
+  }) : {}, {
+    P: common_vendor.o((...args) => $options.leaveCale && $options.leaveCale(...args))
+  });
+}
+const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/project/足球比赛/match_applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue"]]);
+wx.createComponent(Component);

+ 8 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents": {
+    "calendar-item": "./calendar-item",
+    "time-picker": "./time-picker",
+    "uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
+  }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.wxml


+ 228 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.wxss

@@ -0,0 +1,228 @@
+/* 水平间距 */
+/* 水平间距 */
+.uni-calendar {
+  display: flex;
+  flex-direction: column;
+}
+.uni-calendar__mask {
+  position: fixed;
+  bottom: 0;
+  top: 0;
+  left: 0;
+  right: 0;
+  background-color: rgba(0, 0, 0, 0.4);
+  transition-property: opacity;
+  transition-duration: 0.3s;
+  opacity: 0;
+  z-index: 99;
+}
+.uni-calendar--mask-show {
+  opacity: 1;
+}
+.uni-calendar--fixed {
+  position: fixed;
+  bottom: calc(var(--window-bottom));
+  left: 0;
+  right: 0;
+  transition-property: transform;
+  transition-duration: 0.3s;
+  transform: translateY(460px);
+  z-index: 99;
+}
+.uni-calendar--ani-show {
+  transform: translateY(0);
+}
+.uni-calendar__content {
+  background-color: #fff;
+}
+.uni-calendar__content-mobile {
+  border-top-left-radius: 10px;
+  border-top-right-radius: 10px;
+  box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.1);
+}
+.uni-calendar__header {
+  position: relative;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+  height: 50px;
+}
+.uni-calendar__header-mobile {
+  padding: 10px;
+  padding-bottom: 0;
+}
+.uni-calendar--fixed-top {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border-top-color: rgba(0, 0, 0, 0.4);
+  border-top-style: solid;
+  border-top-width: 1px;
+}
+.uni-calendar--fixed-width {
+  width: 50px;
+}
+.uni-calendar__backtoday {
+  position: absolute;
+  right: 0;
+  top: 25rpx;
+  padding: 0 5px;
+  padding-left: 10px;
+  height: 25px;
+  line-height: 25px;
+  font-size: 12px;
+  border-top-left-radius: 25px;
+  border-bottom-left-radius: 25px;
+  color: #fff;
+  background-color: #f1f1f1;
+}
+.uni-calendar__header-text {
+  text-align: center;
+  width: 100px;
+  font-size: 15px;
+  color: #666;
+}
+.uni-calendar__button-text {
+  text-align: center;
+  width: 100px;
+  font-size: 14px;
+  color: #2979ff;
+  letter-spacing: 3px;
+}
+.uni-calendar__header-btn-box {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  width: 50px;
+  height: 50px;
+}
+.uni-calendar__header-btn {
+  width: 9px;
+  height: 9px;
+  border-left-color: #808080;
+  border-left-style: solid;
+  border-left-width: 1px;
+  border-top-color: #555555;
+  border-top-style: solid;
+  border-top-width: 1px;
+}
+.uni-calendar--left {
+  transform: rotate(-45deg);
+}
+.uni-calendar--right {
+  transform: rotate(135deg);
+}
+.uni-calendar__weeks {
+  position: relative;
+  display: flex;
+  flex-direction: row;
+}
+.uni-calendar__weeks-item {
+  flex: 1;
+}
+.uni-calendar__weeks-day {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  height: 40px;
+  border-bottom-color: #F5F5F5;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+}
+.uni-calendar__weeks-day-text {
+  font-size: 12px;
+  color: #B2B2B2;
+}
+.uni-calendar__box {
+  position: relative;
+  padding-bottom: 7px;
+}
+.uni-calendar__box-bg {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.uni-calendar__box-bg-text {
+  font-size: 200px;
+  font-weight: bold;
+  color: #999;
+  opacity: 0.1;
+  text-align: center;
+  line-height: 1;
+}
+.uni-date-changed {
+  padding: 0 10px;
+  text-align: center;
+  color: #333;
+  border-top-color: #DCDCDC;
+  border-top-style: solid;
+  border-top-width: 1px;
+  flex: 1;
+}
+.uni-date-btn--ok {
+  padding: 20px 15px;
+}
+.uni-date-changed--time-start {
+  display: flex;
+  align-items: center;
+}
+.uni-date-changed--time-end {
+  display: flex;
+  align-items: center;
+}
+.uni-date-changed--time-date {
+  color: #999;
+  line-height: 50px;
+  margin-right: 5px;
+}
+.time-picker-style {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.mr-10 {
+  margin-right: 10px;
+}
+.dialog-close {
+  position: absolute;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  padding: 0 25px;
+  margin-top: 10px;
+}
+.dialog-close-plus {
+  width: 16px;
+  height: 2px;
+  background-color: #737987;
+  border-radius: 2px;
+  transform: rotate(45deg);
+}
+.dialog-close-rotate {
+  position: absolute;
+  transform: rotate(-45deg);
+}
+.uni-datetime-picker--btn {
+  border-radius: 100px;
+  height: 40px;
+  line-height: 40px;
+  background-color: #2979ff;
+  color: #fff;
+  font-size: 16px;
+  letter-spacing: 2px;
+}
+.uni-datetime-picker--btn:active {
+  opacity: 0.7;
+}

+ 73 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js

@@ -0,0 +1,73 @@
+"use strict";
+const en = {
+  "uni-datetime-picker.selectDate": "select date",
+  "uni-datetime-picker.selectTime": "select time",
+  "uni-datetime-picker.selectDateTime": "select date and time",
+  "uni-datetime-picker.startDate": "start date",
+  "uni-datetime-picker.endDate": "end date",
+  "uni-datetime-picker.startTime": "start time",
+  "uni-datetime-picker.endTime": "end time",
+  "uni-datetime-picker.ok": "ok",
+  "uni-datetime-picker.clear": "clear",
+  "uni-datetime-picker.cancel": "cancel",
+  "uni-datetime-picker.year": "-",
+  "uni-datetime-picker.month": "",
+  "uni-calender.MON": "MON",
+  "uni-calender.TUE": "TUE",
+  "uni-calender.WED": "WED",
+  "uni-calender.THU": "THU",
+  "uni-calender.FRI": "FRI",
+  "uni-calender.SAT": "SAT",
+  "uni-calender.SUN": "SUN",
+  "uni-calender.confirm": "confirm"
+};
+const zhHans = {
+  "uni-datetime-picker.selectDate": "选择日期",
+  "uni-datetime-picker.selectTime": "选择时间",
+  "uni-datetime-picker.selectDateTime": "选择日期时间",
+  "uni-datetime-picker.startDate": "开始日期",
+  "uni-datetime-picker.endDate": "结束日期",
+  "uni-datetime-picker.startTime": "开始时间",
+  "uni-datetime-picker.endTime": "结束时间",
+  "uni-datetime-picker.ok": "确定",
+  "uni-datetime-picker.clear": "清除",
+  "uni-datetime-picker.cancel": "取消",
+  "uni-datetime-picker.year": "年",
+  "uni-datetime-picker.month": "月",
+  "uni-calender.SUN": "日",
+  "uni-calender.MON": "一",
+  "uni-calender.TUE": "二",
+  "uni-calender.WED": "三",
+  "uni-calender.THU": "四",
+  "uni-calender.FRI": "五",
+  "uni-calender.SAT": "六",
+  "uni-calender.confirm": "确认"
+};
+const zhHant = {
+  "uni-datetime-picker.selectDate": "選擇日期",
+  "uni-datetime-picker.selectTime": "選擇時間",
+  "uni-datetime-picker.selectDateTime": "選擇日期時間",
+  "uni-datetime-picker.startDate": "開始日期",
+  "uni-datetime-picker.endDate": "結束日期",
+  "uni-datetime-picker.startTime": "開始时间",
+  "uni-datetime-picker.endTime": "結束时间",
+  "uni-datetime-picker.ok": "確定",
+  "uni-datetime-picker.clear": "清除",
+  "uni-datetime-picker.cancel": "取消",
+  "uni-datetime-picker.year": "年",
+  "uni-datetime-picker.month": "月",
+  "uni-calender.SUN": "日",
+  "uni-calender.MON": "一",
+  "uni-calender.TUE": "二",
+  "uni-calender.WED": "三",
+  "uni-calender.THU": "四",
+  "uni-calender.FRI": "五",
+  "uni-calender.SAT": "六",
+  "uni-calender.confirm": "確認"
+};
+const i18nMessages = {
+  en,
+  "zh-Hans": zhHans,
+  "zh-Hant": zhHant
+};
+exports.i18nMessages = i18nMessages;

+ 696 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.js

@@ -0,0 +1,696 @@
+"use strict";
+const common_vendor = require("../../../../common/vendor.js");
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index = require("./i18n/index.js");
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_util = require("./util.js");
+const { t } = common_vendor.initVueI18n(uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index.i18nMessages);
+const _sfc_main = {
+  name: "UniDatetimePicker",
+  data() {
+    return {
+      indicatorStyle: `height: 50px;`,
+      visible: false,
+      fixNvueBug: {},
+      dateShow: true,
+      timeShow: true,
+      title: "日期和时间",
+      // 输入框当前时间
+      time: "",
+      // 当前的年月日时分秒
+      year: 1920,
+      month: 0,
+      day: 0,
+      hour: 0,
+      minute: 0,
+      second: 0,
+      // 起始时间
+      startYear: 1920,
+      startMonth: 1,
+      startDay: 1,
+      startHour: 0,
+      startMinute: 0,
+      startSecond: 0,
+      // 结束时间
+      endYear: 2120,
+      endMonth: 12,
+      endDay: 31,
+      endHour: 23,
+      endMinute: 59,
+      endSecond: 59
+    };
+  },
+  props: {
+    type: {
+      type: String,
+      default: "datetime"
+    },
+    value: {
+      type: [String, Number],
+      default: ""
+    },
+    modelValue: {
+      type: [String, Number],
+      default: ""
+    },
+    start: {
+      type: [Number, String],
+      default: ""
+    },
+    end: {
+      type: [Number, String],
+      default: ""
+    },
+    returnType: {
+      type: String,
+      default: "string"
+    },
+    disabled: {
+      type: [Boolean, String],
+      default: false
+    },
+    border: {
+      type: [Boolean, String],
+      default: true
+    },
+    hideSecond: {
+      type: [Boolean, String],
+      default: false
+    }
+  },
+  watch: {
+    modelValue: {
+      handler(newVal) {
+        if (newVal) {
+          this.parseValue(uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.fixIosDateFormat(newVal));
+          this.initTime(false);
+        } else {
+          this.time = "";
+          this.parseValue(Date.now());
+        }
+      },
+      immediate: true
+    },
+    type: {
+      handler(newValue) {
+        if (newValue === "date") {
+          this.dateShow = true;
+          this.timeShow = false;
+          this.title = "日期";
+        } else if (newValue === "time") {
+          this.dateShow = false;
+          this.timeShow = true;
+          this.title = "时间";
+        } else {
+          this.dateShow = true;
+          this.timeShow = true;
+          this.title = "日期和时间";
+        }
+      },
+      immediate: true
+    },
+    start: {
+      handler(newVal) {
+        this.parseDatetimeRange(uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.fixIosDateFormat(newVal), "start");
+      },
+      immediate: true
+    },
+    end: {
+      handler(newVal) {
+        this.parseDatetimeRange(uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.fixIosDateFormat(newVal), "end");
+      },
+      immediate: true
+    },
+    // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
+    months(newVal) {
+      this.checkValue("month", this.month, newVal);
+    },
+    days(newVal) {
+      this.checkValue("day", this.day, newVal);
+    },
+    hours(newVal) {
+      this.checkValue("hour", this.hour, newVal);
+    },
+    minutes(newVal) {
+      this.checkValue("minute", this.minute, newVal);
+    },
+    seconds(newVal) {
+      this.checkValue("second", this.second, newVal);
+    }
+  },
+  computed: {
+    // 当前年、月、日、时、分、秒选择范围
+    years() {
+      return this.getCurrentRange("year");
+    },
+    months() {
+      return this.getCurrentRange("month");
+    },
+    days() {
+      return this.getCurrentRange("day");
+    },
+    hours() {
+      return this.getCurrentRange("hour");
+    },
+    minutes() {
+      return this.getCurrentRange("minute");
+    },
+    seconds() {
+      return this.getCurrentRange("second");
+    },
+    // picker 当前值数组
+    ymd() {
+      return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
+    },
+    hms() {
+      return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
+    },
+    // 当前 date 是 start
+    currentDateIsStart() {
+      return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
+    },
+    // 当前 date 是 end
+    currentDateIsEnd() {
+      return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
+    },
+    // 当前年、月、日、时、分、秒的最小值和最大值
+    minYear() {
+      return this.startYear;
+    },
+    maxYear() {
+      return this.endYear;
+    },
+    minMonth() {
+      if (this.year === this.startYear) {
+        return this.startMonth;
+      } else {
+        return 1;
+      }
+    },
+    maxMonth() {
+      if (this.year === this.endYear) {
+        return this.endMonth;
+      } else {
+        return 12;
+      }
+    },
+    minDay() {
+      if (this.year === this.startYear && this.month === this.startMonth) {
+        return this.startDay;
+      } else {
+        return 1;
+      }
+    },
+    maxDay() {
+      if (this.year === this.endYear && this.month === this.endMonth) {
+        return this.endDay;
+      } else {
+        return this.daysInMonth(this.year, this.month);
+      }
+    },
+    minHour() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsStart) {
+          return this.startHour;
+        } else {
+          return 0;
+        }
+      }
+      if (this.type === "time") {
+        return this.startHour;
+      }
+    },
+    maxHour() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsEnd) {
+          return this.endHour;
+        } else {
+          return 23;
+        }
+      }
+      if (this.type === "time") {
+        return this.endHour;
+      }
+    },
+    minMinute() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsStart && this.hour === this.startHour) {
+          return this.startMinute;
+        } else {
+          return 0;
+        }
+      }
+      if (this.type === "time") {
+        if (this.hour === this.startHour) {
+          return this.startMinute;
+        } else {
+          return 0;
+        }
+      }
+    },
+    maxMinute() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsEnd && this.hour === this.endHour) {
+          return this.endMinute;
+        } else {
+          return 59;
+        }
+      }
+      if (this.type === "time") {
+        if (this.hour === this.endHour) {
+          return this.endMinute;
+        } else {
+          return 59;
+        }
+      }
+    },
+    minSecond() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
+          return this.startSecond;
+        } else {
+          return 0;
+        }
+      }
+      if (this.type === "time") {
+        if (this.hour === this.startHour && this.minute === this.startMinute) {
+          return this.startSecond;
+        } else {
+          return 0;
+        }
+      }
+    },
+    maxSecond() {
+      if (this.type === "datetime") {
+        if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
+          return this.endSecond;
+        } else {
+          return 59;
+        }
+      }
+      if (this.type === "time") {
+        if (this.hour === this.endHour && this.minute === this.endMinute) {
+          return this.endSecond;
+        } else {
+          return 59;
+        }
+      }
+    },
+    /**
+     * for i18n
+     */
+    selectTimeText() {
+      return t("uni-datetime-picker.selectTime");
+    },
+    okText() {
+      return t("uni-datetime-picker.ok");
+    },
+    clearText() {
+      return t("uni-datetime-picker.clear");
+    },
+    cancelText() {
+      return t("uni-datetime-picker.cancel");
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    /**
+     * @param {Object} item
+     * 小于 10 在前面加个 0
+     */
+    lessThanTen(item) {
+      return item < 10 ? "0" + item : item;
+    },
+    /**
+     * 解析时分秒字符串,例如:00:00:00
+     * @param {String} timeString
+     */
+    parseTimeType(timeString) {
+      if (timeString) {
+        let timeArr = timeString.split(":");
+        this.hour = Number(timeArr[0]);
+        this.minute = Number(timeArr[1]);
+        this.second = Number(timeArr[2]);
+      }
+    },
+    /**
+     * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
+     * @param {String | Number} datetime
+     */
+    initPickerValue(datetime) {
+      let defaultValue = null;
+      if (datetime) {
+        defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
+      } else {
+        defaultValue = Date.now();
+        defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
+      }
+      this.parseValue(defaultValue);
+    },
+    /**
+     * 初始值规则:
+     * - 用户设置初始值 value
+     * 	- 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
+     * 	- 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
+     * 	- 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
+     * 	- 无起始终止时间,则初始值为 value
+     * - 无初始值 value,则初始值为当前本地时间 Date.now()
+     * @param {Object} value
+     * @param {Object} dateBase
+     */
+    compareValueWithStartAndEnd(value, start, end) {
+      let winner = null;
+      value = this.superTimeStamp(value);
+      start = this.superTimeStamp(start);
+      end = this.superTimeStamp(end);
+      if (start && end) {
+        if (value < start) {
+          winner = new Date(start);
+        } else if (value > end) {
+          winner = new Date(end);
+        } else {
+          winner = new Date(value);
+        }
+      } else if (start && !end) {
+        winner = start <= value ? new Date(value) : new Date(start);
+      } else if (!start && end) {
+        winner = value <= end ? new Date(value) : new Date(end);
+      } else {
+        winner = new Date(value);
+      }
+      return winner;
+    },
+    /**
+     * 转换为可比较的时间戳,接受日期、时分秒、时间戳
+     * @param {Object} value
+     */
+    superTimeStamp(value) {
+      let dateBase = "";
+      if (this.type === "time" && value && typeof value === "string") {
+        const now = /* @__PURE__ */ new Date();
+        const year = now.getFullYear();
+        const month = now.getMonth() + 1;
+        const day = now.getDate();
+        dateBase = year + "/" + month + "/" + day + " ";
+      }
+      if (Number(value)) {
+        value = parseInt(value);
+        dateBase = 0;
+      }
+      return this.createTimeStamp(dateBase + value);
+    },
+    /**
+     * 解析默认值 value,字符串、时间戳
+     * @param {Object} defaultTime
+     */
+    parseValue(value) {
+      if (!value) {
+        return;
+      }
+      if (this.type === "time" && typeof value === "string") {
+        this.parseTimeType(value);
+      } else {
+        let defaultDate = null;
+        defaultDate = new Date(value);
+        if (this.type !== "time") {
+          this.year = defaultDate.getFullYear();
+          this.month = defaultDate.getMonth() + 1;
+          this.day = defaultDate.getDate();
+        }
+        if (this.type !== "date") {
+          this.hour = defaultDate.getHours();
+          this.minute = defaultDate.getMinutes();
+          this.second = defaultDate.getSeconds();
+        }
+      }
+      if (this.hideSecond) {
+        this.second = 0;
+      }
+    },
+    /**
+     * 解析可选择时间范围 start、end,年月日字符串、时间戳
+     * @param {Object} defaultTime
+     */
+    parseDatetimeRange(point, pointType) {
+      if (!point) {
+        if (pointType === "start") {
+          this.startYear = 1920;
+          this.startMonth = 1;
+          this.startDay = 1;
+          this.startHour = 0;
+          this.startMinute = 0;
+          this.startSecond = 0;
+        }
+        if (pointType === "end") {
+          this.endYear = 2120;
+          this.endMonth = 12;
+          this.endDay = 31;
+          this.endHour = 23;
+          this.endMinute = 59;
+          this.endSecond = 59;
+        }
+        return;
+      }
+      if (this.type === "time") {
+        const pointArr = point.split(":");
+        this[pointType + "Hour"] = Number(pointArr[0]);
+        this[pointType + "Minute"] = Number(pointArr[1]);
+        this[pointType + "Second"] = Number(pointArr[2]);
+      } else {
+        if (!point) {
+          pointType === "start" ? this.startYear = this.year - 60 : this.endYear = this.year + 60;
+          return;
+        }
+        if (Number(point)) {
+          point = parseInt(point);
+        }
+        const hasTime = /[0-9]:[0-9]/;
+        if (this.type === "datetime" && pointType === "end" && typeof point === "string" && !hasTime.test(
+          point
+        )) {
+          point = point + " 23:59:59";
+        }
+        const pointDate = new Date(point);
+        this[pointType + "Year"] = pointDate.getFullYear();
+        this[pointType + "Month"] = pointDate.getMonth() + 1;
+        this[pointType + "Day"] = pointDate.getDate();
+        if (this.type === "datetime") {
+          this[pointType + "Hour"] = pointDate.getHours();
+          this[pointType + "Minute"] = pointDate.getMinutes();
+          this[pointType + "Second"] = pointDate.getSeconds();
+        }
+      }
+    },
+    // 获取 年、月、日、时、分、秒 当前可选范围
+    getCurrentRange(value) {
+      const range = [];
+      for (let i = this["min" + this.capitalize(value)]; i <= this["max" + this.capitalize(value)]; i++) {
+        range.push(i);
+      }
+      return range;
+    },
+    // 字符串首字母大写
+    capitalize(str) {
+      return str.charAt(0).toUpperCase() + str.slice(1);
+    },
+    // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
+    checkValue(name, value, values) {
+      if (values.indexOf(value) === -1) {
+        this[name] = values[0];
+      }
+    },
+    // 每个月的实际天数
+    daysInMonth(year, month) {
+      return new Date(year, month, 0).getDate();
+    },
+    //兼容 iOS、safari 日期格式
+    fixIosDateFormat(value) {
+      if (typeof value === "string") {
+        value = value.replace(/-/g, "/");
+      }
+      return value;
+    },
+    /**
+     * 生成时间戳
+     * @param {Object} time
+     */
+    createTimeStamp(time) {
+      if (!time)
+        return;
+      if (typeof time === "number") {
+        return time;
+      } else {
+        time = time.replace(/-/g, "/");
+        if (this.type === "date") {
+          time = time + " 00:00:00";
+        }
+        return Date.parse(time);
+      }
+    },
+    /**
+     * 生成日期或时间的字符串
+     */
+    createDomSting() {
+      const yymmdd = this.year + "-" + this.lessThanTen(this.month) + "-" + this.lessThanTen(this.day);
+      let hhmmss = this.lessThanTen(this.hour) + ":" + this.lessThanTen(this.minute);
+      if (!this.hideSecond) {
+        hhmmss = hhmmss + ":" + this.lessThanTen(this.second);
+      }
+      if (this.type === "date") {
+        return yymmdd;
+      } else if (this.type === "time") {
+        return hhmmss;
+      } else {
+        return yymmdd + " " + hhmmss;
+      }
+    },
+    /**
+     * 初始化返回值,并抛出 change 事件
+     */
+    initTime(emit = true) {
+      this.time = this.createDomSting();
+      if (!emit)
+        return;
+      if (this.returnType === "timestamp" && this.type !== "time") {
+        this.$emit("change", this.createTimeStamp(this.time));
+        this.$emit("input", this.createTimeStamp(this.time));
+        this.$emit("update:modelValue", this.createTimeStamp(this.time));
+      } else {
+        this.$emit("change", this.time);
+        this.$emit("input", this.time);
+        this.$emit("update:modelValue", this.time);
+      }
+    },
+    /**
+     * 用户选择日期或时间更新 data
+     * @param {Object} e
+     */
+    bindDateChange(e) {
+      const val = e.detail.value;
+      this.year = this.years[val[0]];
+      this.month = this.months[val[1]];
+      this.day = this.days[val[2]];
+    },
+    bindTimeChange(e) {
+      const val = e.detail.value;
+      this.hour = this.hours[val[0]];
+      this.minute = this.minutes[val[1]];
+      this.second = this.seconds[val[2]];
+    },
+    /**
+     * 初始化弹出层
+     */
+    initTimePicker() {
+      if (this.disabled)
+        return;
+      const value = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.fixIosDateFormat(this.time);
+      this.initPickerValue(value);
+      this.visible = !this.visible;
+    },
+    /**
+     * 触发或关闭弹框
+     */
+    tiggerTimePicker(e) {
+      this.visible = !this.visible;
+    },
+    /**
+     * 用户点击“清空”按钮,清空当前值
+     */
+    clearTime() {
+      this.time = "";
+      this.$emit("change", this.time);
+      this.$emit("input", this.time);
+      this.$emit("update:modelValue", this.time);
+      this.tiggerTimePicker();
+    },
+    /**
+     * 用户点击“确定”按钮
+     */
+    setTime() {
+      this.initTime();
+      this.tiggerTimePicker();
+    }
+  }
+};
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return common_vendor.e({
+    a: common_vendor.t($data.time),
+    b: !$data.time
+  }, !$data.time ? {
+    c: common_vendor.t($options.selectTimeText)
+  } : {}, {
+    d: $props.disabled ? 1 : "",
+    e: $props.border ? 1 : "",
+    f: common_vendor.o((...args) => $options.initTimePicker && $options.initTimePicker(...args)),
+    g: $data.visible
+  }, $data.visible ? {
+    h: common_vendor.o((...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args))
+  } : {}, {
+    i: $data.visible
+  }, $data.visible ? common_vendor.e({
+    j: common_vendor.t($options.selectTimeText),
+    k: $data.dateShow
+  }, $data.dateShow ? {
+    l: common_vendor.f($options.years, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    }),
+    m: common_vendor.f($options.months, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    }),
+    n: common_vendor.f($options.days, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    }),
+    o: $data.indicatorStyle,
+    p: $options.ymd,
+    q: common_vendor.o((...args) => $options.bindDateChange && $options.bindDateChange(...args))
+  } : {}, {
+    r: $data.timeShow
+  }, $data.timeShow ? common_vendor.e({
+    s: common_vendor.f($options.hours, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    }),
+    t: common_vendor.f($options.minutes, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    }),
+    v: !$props.hideSecond
+  }, !$props.hideSecond ? {
+    w: common_vendor.f($options.seconds, (item, index, i0) => {
+      return {
+        a: common_vendor.t($options.lessThanTen(item)),
+        b: index
+      };
+    })
+  } : {}, {
+    x: common_vendor.n($props.hideSecond ? "time-hide-second" : ""),
+    y: $data.indicatorStyle,
+    z: $options.hms,
+    A: common_vendor.o((...args) => $options.bindTimeChange && $options.bindTimeChange(...args)),
+    B: common_vendor.n($props.hideSecond ? "sign-center" : "sign-left"),
+    C: !$props.hideSecond
+  }, !$props.hideSecond ? {} : {}) : {}, {
+    D: common_vendor.t($options.clearText),
+    E: common_vendor.o((...args) => $options.clearTime && $options.clearTime(...args)),
+    F: common_vendor.t($options.cancelText),
+    G: common_vendor.o((...args) => $options.tiggerTimePicker && $options.tiggerTimePicker(...args)),
+    H: common_vendor.t($options.okText),
+    I: common_vendor.o((...args) => $options.setTime && $options.setTime(...args)),
+    J: common_vendor.n($data.dateShow && $data.timeShow ? "" : "fix-nvue-height"),
+    K: common_vendor.s($data.fixNvueBug)
+  }) : {});
+}
+const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/project/足球比赛/match_applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue"]]);
+wx.createComponent(Component);

+ 4 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.wxml


+ 104 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.wxss

@@ -0,0 +1,104 @@
+/* 水平间距 */
+/* 水平间距 */
+.uni-datetime-picker {
+  /* width: 100%; */
+}
+.uni-datetime-picker-view {
+  height: 130px;
+  width: 270px;
+  cursor: pointer;
+}
+.uni-datetime-picker-item {
+  height: 50px;
+  line-height: 50px;
+  text-align: center;
+  font-size: 14px;
+}
+.uni-datetime-picker-btn {
+  margin-top: 60px;
+  display: flex;
+  cursor: pointer;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.uni-datetime-picker-btn-text {
+  font-size: 14px;
+  color: #2979ff;
+}
+.uni-datetime-picker-btn-group {
+  display: flex;
+  flex-direction: row;
+}
+.uni-datetime-picker-cancel {
+  margin-right: 30px;
+}
+.uni-datetime-picker-mask {
+  position: fixed;
+  bottom: 0px;
+  top: 0px;
+  left: 0px;
+  right: 0px;
+  background-color: rgba(0, 0, 0, 0.4);
+  transition-duration: 0.3s;
+  z-index: 998;
+}
+.uni-datetime-picker-popup {
+  border-radius: 8px;
+  padding: 30px;
+  width: 270px;
+  background-color: #fff;
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  transition-duration: 0.3s;
+  z-index: 999;
+}
+.uni-datetime-picker-time {
+  color: grey;
+}
+.uni-datetime-picker-column {
+  height: 50px;
+}
+.uni-datetime-picker-timebox {
+  border: 1px solid #E5E5E5;
+  border-radius: 5px;
+  padding: 7px 10px;
+  box-sizing: border-box;
+  cursor: pointer;
+}
+.uni-datetime-picker-timebox-pointer {
+  cursor: pointer;
+}
+.uni-datetime-picker-disabled {
+  opacity: 0.4;
+}
+.uni-datetime-picker-text {
+  font-size: 14px;
+  line-height: 50px;
+}
+.uni-datetime-picker-sign {
+  position: absolute;
+  top: 53px;
+  /* 减掉 10px 的元素高度,兼容nvue */
+  color: #999;
+}
+.sign-left {
+  left: 86px;
+}
+.sign-right {
+  right: 86px;
+}
+.sign-center {
+  left: 135px;
+}
+.uni-datetime-picker__container-box {
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-top: 40px;
+}
+.time-hide-second {
+  width: 180px;
+}

+ 822 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js

@@ -0,0 +1,822 @@
+"use strict";
+const common_vendor = require("../../../../common/vendor.js");
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index = require("./i18n/index.js");
+const uni_modules_uniDatetimePicker_components_uniDatetimePicker_util = require("./util.js");
+const Calendar = () => "./calendar.js";
+const TimePicker = () => "./time-picker.js";
+const _sfc_main = {
+  name: "UniDatetimePicker",
+  options: {
+    virtualHost: true
+  },
+  components: {
+    Calendar,
+    TimePicker
+  },
+  data() {
+    return {
+      isRange: false,
+      hasTime: false,
+      displayValue: "",
+      inputDate: "",
+      calendarDate: "",
+      pickerTime: "",
+      calendarRange: {
+        startDate: "",
+        startTime: "",
+        endDate: "",
+        endTime: ""
+      },
+      displayRangeValue: {
+        startDate: "",
+        endDate: ""
+      },
+      tempRange: {
+        startDate: "",
+        startTime: "",
+        endDate: "",
+        endTime: ""
+      },
+      // 左右日历同步数据
+      startMultipleStatus: {
+        before: "",
+        after: "",
+        data: [],
+        fulldate: ""
+      },
+      endMultipleStatus: {
+        before: "",
+        after: "",
+        data: [],
+        fulldate: ""
+      },
+      pickerVisible: false,
+      pickerPositionStyle: null,
+      isEmitValue: false,
+      isPhone: false,
+      isFirstShow: true,
+      i18nT: () => {
+      }
+    };
+  },
+  props: {
+    type: {
+      type: String,
+      default: "datetime"
+    },
+    value: {
+      type: [String, Number, Array, Date],
+      default: ""
+    },
+    modelValue: {
+      type: [String, Number, Array, Date],
+      default: ""
+    },
+    start: {
+      type: [Number, String],
+      default: ""
+    },
+    end: {
+      type: [Number, String],
+      default: ""
+    },
+    returnType: {
+      type: String,
+      default: "string"
+    },
+    placeholder: {
+      type: String,
+      default: ""
+    },
+    startPlaceholder: {
+      type: String,
+      default: ""
+    },
+    endPlaceholder: {
+      type: String,
+      default: ""
+    },
+    rangeSeparator: {
+      type: String,
+      default: "-"
+    },
+    border: {
+      type: [Boolean],
+      default: true
+    },
+    disabled: {
+      type: [Boolean],
+      default: false
+    },
+    clearIcon: {
+      type: [Boolean],
+      default: true
+    },
+    hideSecond: {
+      type: [Boolean],
+      default: false
+    },
+    defaultValue: {
+      type: [String, Object, Array],
+      default: ""
+    }
+  },
+  watch: {
+    type: {
+      immediate: true,
+      handler(newVal) {
+        this.hasTime = newVal.indexOf("time") !== -1;
+        this.isRange = newVal.indexOf("range") !== -1;
+      }
+    },
+    modelValue: {
+      immediate: true,
+      handler(newVal) {
+        if (this.isEmitValue) {
+          this.isEmitValue = false;
+          return;
+        }
+        this.initPicker(newVal);
+      }
+    },
+    start: {
+      immediate: true,
+      handler(newVal) {
+        if (!newVal)
+          return;
+        this.calendarRange.startDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(newVal);
+        if (this.hasTime) {
+          this.calendarRange.startTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(newVal);
+        }
+      }
+    },
+    end: {
+      immediate: true,
+      handler(newVal) {
+        if (!newVal)
+          return;
+        this.calendarRange.endDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(newVal);
+        if (this.hasTime) {
+          this.calendarRange.endTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(newVal, this.hideSecond);
+        }
+      }
+    }
+  },
+  computed: {
+    timepickerStartTime() {
+      const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate;
+      return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : "";
+    },
+    timepickerEndTime() {
+      const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate;
+      return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : "";
+    },
+    mobileCalendarTime() {
+      const timeRange = {
+        start: this.tempRange.startTime,
+        end: this.tempRange.endTime
+      };
+      return this.isRange ? timeRange : this.pickerTime;
+    },
+    mobSelectableTime() {
+      return {
+        start: this.calendarRange.startTime,
+        end: this.calendarRange.endTime
+      };
+    },
+    datePopupWidth() {
+      return this.isRange ? 653 : 301;
+    },
+    /**
+     * for i18n
+     */
+    singlePlaceholderText() {
+      return this.placeholder || (this.type === "date" ? this.selectDateText : this.selectDateTimeText);
+    },
+    startPlaceholderText() {
+      return this.startPlaceholder || this.startDateText;
+    },
+    endPlaceholderText() {
+      return this.endPlaceholder || this.endDateText;
+    },
+    selectDateText() {
+      return this.i18nT("uni-datetime-picker.selectDate");
+    },
+    selectDateTimeText() {
+      return this.i18nT("uni-datetime-picker.selectDateTime");
+    },
+    selectTimeText() {
+      return this.i18nT("uni-datetime-picker.selectTime");
+    },
+    startDateText() {
+      return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate");
+    },
+    startTimeText() {
+      return this.i18nT("uni-datetime-picker.startTime");
+    },
+    endDateText() {
+      return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate");
+    },
+    endTimeText() {
+      return this.i18nT("uni-datetime-picker.endTime");
+    },
+    okText() {
+      return this.i18nT("uni-datetime-picker.ok");
+    },
+    clearText() {
+      return this.i18nT("uni-datetime-picker.clear");
+    },
+    showClearIcon() {
+      return this.clearIcon && !this.disabled && (this.displayValue || this.displayRangeValue.startDate && this.displayRangeValue.endDate);
+    }
+  },
+  created() {
+    this.initI18nT();
+    this.platform();
+  },
+  methods: {
+    initI18nT() {
+      const vueI18n = common_vendor.initVueI18n(uni_modules_uniDatetimePicker_components_uniDatetimePicker_i18n_index.i18nMessages);
+      this.i18nT = vueI18n.t;
+    },
+    initPicker(newVal) {
+      if (!newVal && !this.defaultValue || Array.isArray(newVal) && !newVal.length) {
+        this.$nextTick(() => {
+          this.clear(false);
+        });
+        return;
+      }
+      if (!Array.isArray(newVal) && !this.isRange) {
+        if (newVal) {
+          this.displayValue = this.inputDate = this.calendarDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(newVal);
+          if (this.hasTime) {
+            this.pickerTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(newVal, this.hideSecond);
+            this.displayValue = `${this.displayValue} ${this.pickerTime}`;
+          }
+        } else if (this.defaultValue) {
+          this.inputDate = this.calendarDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(this.defaultValue);
+          if (this.hasTime) {
+            this.pickerTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(this.defaultValue, this.hideSecond);
+          }
+        }
+      } else {
+        const [before, after] = newVal;
+        if (!before && !after)
+          return;
+        const beforeDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(before);
+        const beforeTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(before, this.hideSecond);
+        const afterDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(after);
+        const afterTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(after, this.hideSecond);
+        const startDate = beforeDate;
+        const endDate = afterDate;
+        this.displayRangeValue.startDate = this.tempRange.startDate = startDate;
+        this.displayRangeValue.endDate = this.tempRange.endDate = endDate;
+        if (this.hasTime) {
+          this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`;
+          this.displayRangeValue.endDate = `${afterDate} ${afterTime}`;
+          this.tempRange.startTime = beforeTime;
+          this.tempRange.endTime = afterTime;
+        }
+        const defaultRange = {
+          before: beforeDate,
+          after: afterDate
+        };
+        this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
+          which: "right"
+        });
+        this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
+          which: "left"
+        });
+      }
+    },
+    updateLeftCale(e) {
+      const left = this.$refs.left;
+      left.cale.setHoverMultiple(e.after);
+      left.setDate(this.$refs.left.nowDate.fullDate);
+    },
+    updateRightCale(e) {
+      const right = this.$refs.right;
+      right.cale.setHoverMultiple(e.after);
+      right.setDate(this.$refs.right.nowDate.fullDate);
+    },
+    platform() {
+      const { windowWidth } = common_vendor.index.getSystemInfoSync();
+      this.isPhone = windowWidth <= 500;
+      this.windowWidth = windowWidth;
+    },
+    show() {
+      if (this.disabled) {
+        return;
+      }
+      this.platform();
+      if (this.isPhone) {
+        this.$refs.mobile.open();
+        return;
+      }
+      this.pickerPositionStyle = {
+        top: "10px"
+      };
+      const dateEditor = common_vendor.index.createSelectorQuery().in(this).select(".uni-date-editor");
+      dateEditor.boundingClientRect((rect) => {
+        if (this.windowWidth - rect.left < this.datePopupWidth) {
+          this.pickerPositionStyle.right = 0;
+        }
+      }).exec();
+      setTimeout(() => {
+        this.pickerVisible = !this.pickerVisible;
+        if (!this.isPhone && this.isRange && this.isFirstShow) {
+          this.isFirstShow = false;
+          const {
+            startDate,
+            endDate
+          } = this.calendarRange;
+          if (startDate && endDate) {
+            if (this.diffDate(startDate, endDate) < 30) {
+              this.$refs.right.changeMonth("pre");
+            }
+          } else {
+            this.$refs.right.changeMonth("next");
+            this.$refs.right.cale.lastHover = false;
+          }
+        }
+      }, 50);
+    },
+    close() {
+      setTimeout(() => {
+        this.pickerVisible = false;
+        this.$emit("maskClick", this.value);
+        this.$refs.mobile && this.$refs.mobile.close();
+      }, 20);
+    },
+    setEmit(value) {
+      if (this.returnType === "timestamp" || this.returnType === "date") {
+        if (!Array.isArray(value)) {
+          if (!this.hasTime) {
+            value = value + " 00:00:00";
+          }
+          value = this.createTimestamp(value);
+          if (this.returnType === "date") {
+            value = new Date(value);
+          }
+        } else {
+          if (!this.hasTime) {
+            value[0] = value[0] + " 00:00:00";
+            value[1] = value[1] + " 00:00:00";
+          }
+          value[0] = this.createTimestamp(value[0]);
+          value[1] = this.createTimestamp(value[1]);
+          if (this.returnType === "date") {
+            value[0] = new Date(value[0]);
+            value[1] = new Date(value[1]);
+          }
+        }
+      }
+      this.$emit("update:modelValue", value);
+      this.$emit("input", value);
+      this.$emit("change", value);
+      this.isEmitValue = true;
+    },
+    createTimestamp(date) {
+      date = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.fixIosDateFormat(date);
+      return Date.parse(new Date(date));
+    },
+    singleChange(e) {
+      this.calendarDate = this.inputDate = e.fulldate;
+      if (this.hasTime)
+        return;
+      this.confirmSingleChange();
+    },
+    confirmSingleChange() {
+      if (!uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.checkDate(this.inputDate)) {
+        const now = /* @__PURE__ */ new Date();
+        this.calendarDate = this.inputDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(now);
+        this.pickerTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(now, this.hideSecond);
+      }
+      let startLaterInputDate = false;
+      let startDate, startTime;
+      if (this.start) {
+        let startString = this.start;
+        if (typeof this.start === "number") {
+          startString = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDateTime(this.start, this.hideSecond);
+        }
+        [startDate, startTime] = startString.split(" ");
+        if (this.start && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(startDate, this.inputDate)) {
+          startLaterInputDate = true;
+          this.inputDate = startDate;
+        }
+      }
+      let endEarlierInputDate = false;
+      let endDate, endTime;
+      if (this.end) {
+        let endString = this.end;
+        if (typeof this.end === "number") {
+          endString = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDateTime(this.end, this.hideSecond);
+        }
+        [endDate, endTime] = endString.split(" ");
+        if (this.end && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(this.inputDate, endDate)) {
+          endEarlierInputDate = true;
+          this.inputDate = endDate;
+        }
+      }
+      if (this.hasTime) {
+        if (startLaterInputDate) {
+          this.pickerTime = startTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        }
+        if (endEarlierInputDate) {
+          this.pickerTime = endTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        }
+        if (!this.pickerTime) {
+          this.pickerTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(Date.now(), this.hideSecond);
+        }
+        this.displayValue = `${this.inputDate} ${this.pickerTime}`;
+      } else {
+        this.displayValue = this.inputDate;
+      }
+      this.setEmit(this.displayValue);
+      this.pickerVisible = false;
+    },
+    leftChange(e) {
+      const {
+        before,
+        after
+      } = e.range;
+      this.rangeChange(before, after);
+      const obj = {
+        before: e.range.before,
+        after: e.range.after,
+        data: e.range.data,
+        fulldate: e.fulldate
+      };
+      this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj);
+    },
+    rightChange(e) {
+      const {
+        before,
+        after
+      } = e.range;
+      this.rangeChange(before, after);
+      const obj = {
+        before: e.range.before,
+        after: e.range.after,
+        data: e.range.data,
+        fulldate: e.fulldate
+      };
+      this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj);
+    },
+    mobileChange(e) {
+      if (this.isRange) {
+        const { before, after } = e.range;
+        if (!before || !after) {
+          return;
+        }
+        this.handleStartAndEnd(before, after, true);
+        if (this.hasTime) {
+          const {
+            startTime,
+            endTime
+          } = e.timeRange;
+          this.tempRange.startTime = startTime;
+          this.tempRange.endTime = endTime;
+        }
+        this.confirmRangeChange();
+      } else {
+        if (this.hasTime) {
+          this.displayValue = e.fulldate + " " + e.time;
+        } else {
+          this.displayValue = e.fulldate;
+        }
+        this.setEmit(this.displayValue);
+      }
+      this.$refs.mobile.close();
+    },
+    rangeChange(before, after) {
+      if (!(before && after))
+        return;
+      this.handleStartAndEnd(before, after, true);
+      if (this.hasTime)
+        return;
+      this.confirmRangeChange();
+    },
+    confirmRangeChange() {
+      if (!this.tempRange.startDate || !this.tempRange.endDate) {
+        this.pickerVisible = false;
+        return;
+      }
+      if (!uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.checkDate(this.tempRange.startDate)) {
+        this.tempRange.startDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(Date.now());
+      }
+      if (!uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.checkDate(this.tempRange.endDate)) {
+        this.tempRange.endDate = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDate(Date.now());
+      }
+      let start, end;
+      let startDateLaterRangeStartDate = false;
+      let startDateLaterRangeEndDate = false;
+      let startDate, startTime;
+      if (this.start) {
+        let startString = this.start;
+        if (typeof this.start === "number") {
+          startString = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDateTime(this.start, this.hideSecond);
+        }
+        [startDate, startTime] = startString.split(" ");
+        if (this.start && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(this.start, this.tempRange.startDate)) {
+          startDateLaterRangeStartDate = true;
+          this.tempRange.startDate = startDate;
+        }
+        if (this.start && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(this.start, this.tempRange.endDate)) {
+          startDateLaterRangeEndDate = true;
+          this.tempRange.endDate = startDate;
+        }
+      }
+      let endDateEarlierRangeStartDate = false;
+      let endDateEarlierRangeEndDate = false;
+      let endDate, endTime;
+      if (this.end) {
+        let endString = this.end;
+        if (typeof this.end === "number") {
+          endString = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDateTime(this.end, this.hideSecond);
+        }
+        [endDate, endTime] = endString.split(" ");
+        if (this.end && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(this.tempRange.startDate, this.end)) {
+          endDateEarlierRangeStartDate = true;
+          this.tempRange.startDate = endDate;
+        }
+        if (this.end && !uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(this.tempRange.endDate, this.end)) {
+          endDateEarlierRangeEndDate = true;
+          this.tempRange.endDate = endDate;
+        }
+      }
+      if (!this.hasTime) {
+        start = this.displayRangeValue.startDate = this.tempRange.startDate;
+        end = this.displayRangeValue.endDate = this.tempRange.endDate;
+      } else {
+        if (startDateLaterRangeStartDate) {
+          this.tempRange.startTime = startTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        } else if (endDateEarlierRangeStartDate) {
+          this.tempRange.startTime = endTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        }
+        if (!this.tempRange.startTime) {
+          this.tempRange.startTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(Date.now(), this.hideSecond);
+        }
+        if (startDateLaterRangeEndDate) {
+          this.tempRange.endTime = startTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        } else if (endDateEarlierRangeEndDate) {
+          this.tempRange.endTime = endTime || uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getDefaultSecond(this.hideSecond);
+        }
+        if (!this.tempRange.endTime) {
+          this.tempRange.endTime = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.getTime(Date.now(), this.hideSecond);
+        }
+        start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`;
+        end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`;
+      }
+      if (!uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(start, end)) {
+        [start, end] = [end, start];
+      }
+      this.displayRangeValue.startDate = start;
+      this.displayRangeValue.endDate = end;
+      const displayRange = [start, end];
+      this.setEmit(displayRange);
+      this.pickerVisible = false;
+    },
+    handleStartAndEnd(before, after, temp = false) {
+      if (!(before && after))
+        return;
+      const type = temp ? "tempRange" : "range";
+      const isStartEarlierEnd = uni_modules_uniDatetimePicker_components_uniDatetimePicker_util.dateCompare(before, after);
+      this[type].startDate = isStartEarlierEnd ? before : after;
+      this[type].endDate = isStartEarlierEnd ? after : before;
+    },
+    /**
+     * 比较时间大小
+     */
+    dateCompare(startDate, endDate) {
+      startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
+      endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
+      return startDate <= endDate;
+    },
+    /**
+     * 比较时间差
+     */
+    diffDate(startDate, endDate) {
+      startDate = new Date(startDate.replace("-", "/").replace("-", "/"));
+      endDate = new Date(endDate.replace("-", "/").replace("-", "/"));
+      const diff = (endDate - startDate) / (24 * 60 * 60 * 1e3);
+      return Math.abs(diff);
+    },
+    clear(needEmit = true) {
+      if (!this.isRange) {
+        this.displayValue = "";
+        this.inputDate = "";
+        this.pickerTime = "";
+        if (this.isPhone) {
+          this.$refs.mobile && this.$refs.mobile.clearCalender();
+        } else {
+          this.$refs.pcSingle && this.$refs.pcSingle.clearCalender();
+        }
+        if (needEmit) {
+          this.$emit("change", "");
+          this.$emit("input", "");
+          this.$emit("update:modelValue", "");
+        }
+      } else {
+        this.displayRangeValue.startDate = "";
+        this.displayRangeValue.endDate = "";
+        this.tempRange.startDate = "";
+        this.tempRange.startTime = "";
+        this.tempRange.endDate = "";
+        this.tempRange.endTime = "";
+        if (this.isPhone) {
+          this.$refs.mobile && this.$refs.mobile.clearCalender();
+        } else {
+          this.$refs.left && this.$refs.left.clearCalender();
+          this.$refs.right && this.$refs.right.clearCalender();
+          this.$refs.right && this.$refs.right.changeMonth("next");
+        }
+        if (needEmit) {
+          this.$emit("change", []);
+          this.$emit("input", []);
+          this.$emit("update:modelValue", []);
+        }
+      }
+    }
+  }
+};
+if (!Array) {
+  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
+  const _component_time_picker = common_vendor.resolveComponent("time-picker");
+  const _component_Calendar = common_vendor.resolveComponent("Calendar");
+  (_easycom_uni_icons2 + _component_time_picker + _component_Calendar)();
+}
+const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
+if (!Math) {
+  _easycom_uni_icons();
+}
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return common_vendor.e({
+    a: !$data.isRange
+  }, !$data.isRange ? {
+    b: common_vendor.p({
+      type: "calendar",
+      color: "#c0c4cc",
+      size: "22"
+    }),
+    c: common_vendor.t($data.displayValue || $options.singlePlaceholderText)
+  } : {
+    d: common_vendor.p({
+      type: "calendar",
+      color: "#c0c4cc",
+      size: "22"
+    }),
+    e: common_vendor.t($data.displayRangeValue.startDate || $options.startPlaceholderText),
+    f: common_vendor.t($props.rangeSeparator),
+    g: common_vendor.t($data.displayRangeValue.endDate || $options.endPlaceholderText)
+  }, {
+    h: $options.showClearIcon
+  }, $options.showClearIcon ? {
+    i: common_vendor.p({
+      type: "clear",
+      color: "#c0c4cc",
+      size: "22"
+    }),
+    j: common_vendor.o((...args) => $options.clear && $options.clear(...args))
+  } : {}, {
+    k: $props.disabled ? 1 : "",
+    l: $props.border ? 1 : "",
+    m: common_vendor.o((...args) => $options.show && $options.show(...args)),
+    n: $data.pickerVisible,
+    o: common_vendor.o((...args) => $options.close && $options.close(...args)),
+    p: !$data.isPhone
+  }, !$data.isPhone ? common_vendor.e({
+    q: !$data.isRange
+  }, !$data.isRange ? common_vendor.e({
+    r: $data.hasTime
+  }, $data.hasTime ? {
+    s: $options.selectDateText,
+    t: $data.inputDate,
+    v: common_vendor.o(($event) => $data.inputDate = $event.detail.value),
+    w: $options.selectTimeText,
+    x: !$data.inputDate,
+    y: $data.pickerTime,
+    z: common_vendor.o(($event) => $data.pickerTime = $event.detail.value),
+    A: common_vendor.o(($event) => $data.pickerTime = $event),
+    B: common_vendor.p({
+      type: "time",
+      border: false,
+      disabled: !$data.inputDate,
+      start: $options.timepickerStartTime,
+      end: $options.timepickerEndTime,
+      hideSecond: $props.hideSecond,
+      modelValue: $data.pickerTime
+    })
+  } : {}, {
+    C: common_vendor.sr("pcSingle", "21e1ea95-4"),
+    D: common_vendor.o($options.singleChange),
+    E: common_vendor.p({
+      showMonth: false,
+      ["start-date"]: $data.calendarRange.startDate,
+      ["end-date"]: $data.calendarRange.endDate,
+      date: $data.calendarDate,
+      ["default-value"]: $props.defaultValue
+    }),
+    F: $data.hasTime
+  }, $data.hasTime ? {
+    G: common_vendor.t($options.okText),
+    H: common_vendor.o((...args) => $options.confirmSingleChange && $options.confirmSingleChange(...args))
+  } : {}, {
+    I: common_vendor.s($data.pickerPositionStyle)
+  }) : common_vendor.e({
+    J: $data.hasTime
+  }, $data.hasTime ? {
+    K: $options.startDateText,
+    L: $data.tempRange.startDate,
+    M: common_vendor.o(($event) => $data.tempRange.startDate = $event.detail.value),
+    N: $options.startTimeText,
+    O: !$data.tempRange.startDate,
+    P: $data.tempRange.startTime,
+    Q: common_vendor.o(($event) => $data.tempRange.startTime = $event.detail.value),
+    R: common_vendor.o(($event) => $data.tempRange.startTime = $event),
+    S: common_vendor.p({
+      type: "time",
+      start: $options.timepickerStartTime,
+      border: false,
+      disabled: !$data.tempRange.startDate,
+      hideSecond: $props.hideSecond,
+      modelValue: $data.tempRange.startTime
+    }),
+    T: common_vendor.p({
+      type: "arrowthinright",
+      color: "#999"
+    }),
+    U: $options.endDateText,
+    V: $data.tempRange.endDate,
+    W: common_vendor.o(($event) => $data.tempRange.endDate = $event.detail.value),
+    X: $options.endTimeText,
+    Y: !$data.tempRange.endDate,
+    Z: $data.tempRange.endTime,
+    aa: common_vendor.o(($event) => $data.tempRange.endTime = $event.detail.value),
+    ab: common_vendor.o(($event) => $data.tempRange.endTime = $event),
+    ac: common_vendor.p({
+      type: "time",
+      end: $options.timepickerEndTime,
+      border: false,
+      disabled: !$data.tempRange.endDate,
+      hideSecond: $props.hideSecond,
+      modelValue: $data.tempRange.endTime
+    })
+  } : {}, {
+    ad: common_vendor.sr("left", "21e1ea95-8"),
+    ae: common_vendor.o($options.leftChange),
+    af: common_vendor.o($options.updateRightCale),
+    ag: common_vendor.p({
+      showMonth: false,
+      ["start-date"]: $data.calendarRange.startDate,
+      ["end-date"]: $data.calendarRange.endDate,
+      range: true,
+      pleStatus: $data.endMultipleStatus
+    }),
+    ah: common_vendor.sr("right", "21e1ea95-9"),
+    ai: common_vendor.o($options.rightChange),
+    aj: common_vendor.o($options.updateLeftCale),
+    ak: common_vendor.p({
+      showMonth: false,
+      ["start-date"]: $data.calendarRange.startDate,
+      ["end-date"]: $data.calendarRange.endDate,
+      range: true,
+      pleStatus: $data.startMultipleStatus
+    }),
+    al: $data.hasTime
+  }, $data.hasTime ? {
+    am: common_vendor.t($options.clearText),
+    an: common_vendor.o((...args) => $options.clear && $options.clear(...args)),
+    ao: common_vendor.t($options.okText),
+    ap: common_vendor.o((...args) => $options.confirmRangeChange && $options.confirmRangeChange(...args))
+  } : {}, {
+    aq: common_vendor.s($data.pickerPositionStyle)
+  }), {
+    ar: $data.pickerVisible
+  }) : {}, {
+    as: $data.isPhone
+  }, $data.isPhone ? {
+    at: common_vendor.sr("mobile", "21e1ea95-10"),
+    av: common_vendor.o($options.mobileChange),
+    aw: common_vendor.o($options.close),
+    ax: common_vendor.p({
+      clearDate: false,
+      date: $data.calendarDate,
+      defTime: $options.mobileCalendarTime,
+      ["start-date"]: $data.calendarRange.startDate,
+      ["end-date"]: $data.calendarRange.endDate,
+      selectableTimes: $options.mobSelectableTime,
+      startPlaceholder: $props.startPlaceholder,
+      endPlaceholder: $props.endPlaceholder,
+      ["default-value"]: $props.defaultValue,
+      pleStatus: $data.endMultipleStatus,
+      showMonth: false,
+      range: $data.isRange,
+      hasTime: $data.hasTime,
+      insert: false,
+      hideSecond: $props.hideSecond
+    })
+  } : {});
+}
+const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/project/足球比赛/match_applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"]]);
+wx.createComponent(Component);

+ 8 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.json

@@ -0,0 +1,8 @@
+{
+  "component": true,
+  "usingComponents": {
+    "calendar": "./calendar",
+    "time-picker": "./time-picker",
+    "uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
+  }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.wxml


+ 178 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.wxss

@@ -0,0 +1,178 @@
+/* 水平间距 */
+/* 水平间距 */
+.uni-date {
+  width: 100%;
+  flex: 1;
+}
+.uni-date-x {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
+  border-radius: 4px;
+  background-color: #fff;
+  color: #666;
+  font-size: 14px;
+  flex: 1;
+}
+.uni-date-x .icon-calendar {
+  padding-left: 3px;
+}
+.uni-date-x .range-separator {
+  height: 35px;
+  line-height: 35px;
+}
+.uni-date-x--border {
+  box-sizing: border-box;
+  border-radius: 4px;
+  border: 1px solid #e5e5e5;
+}
+.uni-date-editor--x {
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+.uni-date-editor--x .uni-date__icon-clear {
+  padding-right: 3px;
+  display: flex;
+  align-items: center;
+}
+.uni-date__x-input {
+  width: auto;
+  height: 35px;
+  position: relative;
+  flex: 1;
+  line-height: 35px;
+  font-size: 14px;
+  overflow: hidden;
+}
+.text-center {
+  text-align: center;
+}
+.uni-date__input {
+  height: 40px;
+  width: 100%;
+  line-height: 40px;
+  font-size: 14px;
+}
+.uni-date-range__input {
+  text-align: center;
+  max-width: 142px;
+}
+.uni-date-picker__container {
+  position: relative;
+}
+.uni-date-mask--pc {
+  position: fixed;
+  bottom: 0px;
+  top: 0px;
+  left: 0px;
+  right: 0px;
+  background-color: rgba(0, 0, 0, 0);
+  transition-duration: 0.3s;
+  z-index: 996;
+}
+.uni-date-single--x {
+  background-color: #fff;
+  position: absolute;
+  top: 0;
+  z-index: 999;
+  border: 1px solid #EBEEF5;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  border-radius: 4px;
+}
+.uni-date-range--x {
+  background-color: #fff;
+  position: absolute;
+  top: 0;
+  z-index: 999;
+  border: 1px solid #EBEEF5;
+  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+  border-radius: 4px;
+}
+.uni-date-editor--x__disabled {
+  opacity: 0.4;
+  cursor: default;
+}
+.uni-date-editor--logo {
+  width: 16px;
+  height: 16px;
+  vertical-align: middle;
+}
+
+/* 添加时间 */
+.popup-x-header {
+  display: flex;
+  flex-direction: row;
+}
+.popup-x-header--datetime {
+  display: flex;
+  flex-direction: row;
+  flex: 1;
+}
+.popup-x-body {
+  display: flex;
+}
+.popup-x-footer {
+  padding: 0 15px;
+  border-top-color: #F1F1F1;
+  border-top-style: solid;
+  border-top-width: 1px;
+  line-height: 40px;
+  text-align: right;
+  color: #666;
+}
+.popup-x-footer text:hover {
+  color: #2979ff;
+  cursor: pointer;
+  opacity: 0.8;
+}
+.popup-x-footer .confirm-text {
+  margin-left: 20px;
+  color: #2979ff;
+}
+.uni-date-changed {
+  text-align: center;
+  color: #333;
+  border-bottom-color: #F1F1F1;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+}
+.uni-date-changed--time text {
+  height: 50px;
+  line-height: 50px;
+}
+.uni-date-changed .uni-date-changed--time {
+  flex: 1;
+}
+.uni-date-changed--time-date {
+  color: #333;
+  opacity: 0.6;
+}
+.mr-50 {
+  margin-right: 50px;
+}
+
+/* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
+.uni-popper__arrow,
+.uni-popper__arrow::after {
+  position: absolute;
+  display: block;
+  width: 0;
+  height: 0;
+  border: 6px solid transparent;
+  border-top-width: 0;
+}
+.uni-popper__arrow {
+  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+  top: -6px;
+  left: 10%;
+  margin-right: 3px;
+  border-bottom-color: #EBEEF5;
+}
+.uni-popper__arrow::after {
+  content: " ";
+  top: 1px;
+  margin-left: -6px;
+  border-bottom-color: #fff;
+}

+ 358 - 0
unpackage/dist/dev/mp-weixin/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js

@@ -0,0 +1,358 @@
+"use strict";
+class Calendar {
+  constructor({
+    selected,
+    startDate,
+    endDate,
+    range
+  } = {}) {
+    this.date = this.getDateObj(/* @__PURE__ */ new Date());
+    this.selected = selected || [];
+    this.startDate = startDate;
+    this.endDate = endDate;
+    this.range = range;
+    this.cleanMultipleStatus();
+    this.weeks = {};
+    this.lastHover = false;
+  }
+  /**
+   * 设置日期
+   * @param {Object} date
+   */
+  setDate(date) {
+    const selectDate = this.getDateObj(date);
+    this.getWeeks(selectDate.fullDate);
+  }
+  /**
+   * 清理多选状态
+   */
+  cleanMultipleStatus() {
+    this.multipleStatus = {
+      before: "",
+      after: "",
+      data: []
+    };
+  }
+  setStartDate(startDate) {
+    this.startDate = startDate;
+  }
+  setEndDate(endDate) {
+    this.endDate = endDate;
+  }
+  getPreMonthObj(date) {
+    date = fixIosDateFormat(date);
+    date = new Date(date);
+    const oldMonth = date.getMonth();
+    date.setMonth(oldMonth - 1);
+    const newMonth = date.getMonth();
+    if (oldMonth !== 0 && newMonth - oldMonth === 0) {
+      date.setMonth(newMonth - 1);
+    }
+    return this.getDateObj(date);
+  }
+  getNextMonthObj(date) {
+    date = fixIosDateFormat(date);
+    date = new Date(date);
+    const oldMonth = date.getMonth();
+    date.setMonth(oldMonth + 1);
+    const newMonth = date.getMonth();
+    if (newMonth - oldMonth > 1) {
+      date.setMonth(newMonth - 1);
+    }
+    return this.getDateObj(date);
+  }
+  /**
+   * 获取指定格式Date对象
+   */
+  getDateObj(date) {
+    date = fixIosDateFormat(date);
+    date = new Date(date);
+    return {
+      fullDate: getDate(date),
+      year: date.getFullYear(),
+      month: addZero(date.getMonth() + 1),
+      date: addZero(date.getDate()),
+      day: date.getDay()
+    };
+  }
+  /**
+   * 获取上一个月日期集合
+   */
+  getPreMonthDays(amount, dateObj) {
+    const result = [];
+    for (let i = amount - 1; i >= 0; i--) {
+      const month = dateObj.month - 1;
+      result.push({
+        date: new Date(dateObj.year, month, -i).getDate(),
+        month,
+        disable: true
+      });
+    }
+    return result;
+  }
+  /**
+   * 获取本月日期集合
+   */
+  getCurrentMonthDays(amount, dateObj) {
+    const result = [];
+    const fullDate = this.date.fullDate;
+    for (let i = 1; i <= amount; i++) {
+      const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`;
+      const isToday = fullDate === currentDate;
+      const info = this.selected && this.selected.find((item) => {
+        if (this.dateEqual(currentDate, item.date)) {
+          return item;
+        }
+      });
+      if (this.startDate) {
+        dateCompare(this.startDate, currentDate);
+      }
+      if (this.endDate) {
+        dateCompare(currentDate, this.endDate);
+      }
+      let multiples = this.multipleStatus.data;
+      let multiplesStatus = -1;
+      if (this.range && multiples) {
+        multiplesStatus = multiples.findIndex((item) => {
+          return this.dateEqual(item, currentDate);
+        });
+      }
+      const checked = multiplesStatus !== -1;
+      result.push({
+        fullDate: currentDate,
+        year: dateObj.year,
+        date: i,
+        multiple: this.range ? checked : false,
+        beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
+        afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
+        month: dateObj.month,
+        disable: this.startDate && !dateCompare(this.startDate, currentDate) || this.endDate && !dateCompare(currentDate, this.endDate),
+        isToday,
+        userChecked: false,
+        extraInfo: info
+      });
+    }
+    return result;
+  }
+  /**
+   * 获取下一个月日期集合
+   */
+  _getNextMonthDays(amount, dateObj) {
+    const result = [];
+    const month = dateObj.month + 1;
+    for (let i = 1; i <= amount; i++) {
+      result.push({
+        date: i,
+        month,
+        disable: true
+      });
+    }
+    return result;
+  }
+  /**
+   * 获取当前日期详情
+   * @param {Object} date
+   */
+  getInfo(date) {
+    if (!date) {
+      date = /* @__PURE__ */ new Date();
+    }
+    return this.calendar.find((item) => item.fullDate === this.getDateObj(date).fullDate);
+  }
+  /**
+   * 比较时间是否相等
+   */
+  dateEqual(before, after) {
+    before = new Date(fixIosDateFormat(before));
+    after = new Date(fixIosDateFormat(after));
+    return before.valueOf() === after.valueOf();
+  }
+  /**
+   *  比较真实起始日期
+   */
+  isLogicBefore(currentDate, before, after) {
+    let logicBefore = before;
+    if (before && after) {
+      logicBefore = dateCompare(before, after) ? before : after;
+    }
+    return this.dateEqual(logicBefore, currentDate);
+  }
+  isLogicAfter(currentDate, before, after) {
+    let logicAfter = after;
+    if (before && after) {
+      logicAfter = dateCompare(before, after) ? after : before;
+    }
+    return this.dateEqual(logicAfter, currentDate);
+  }
+  /**
+   * 获取日期范围内所有日期
+   * @param {Object} begin
+   * @param {Object} end
+   */
+  geDateAll(begin, end) {
+    var arr = [];
+    var ab = begin.split("-");
+    var ae = end.split("-");
+    var db = /* @__PURE__ */ new Date();
+    db.setFullYear(ab[0], ab[1] - 1, ab[2]);
+    var de = /* @__PURE__ */ new Date();
+    de.setFullYear(ae[0], ae[1] - 1, ae[2]);
+    var unixDb = db.getTime() - 24 * 60 * 60 * 1e3;
+    var unixDe = de.getTime() - 24 * 60 * 60 * 1e3;
+    for (var k = unixDb; k <= unixDe; ) {
+      k = k + 24 * 60 * 60 * 1e3;
+      arr.push(this.getDateObj(new Date(parseInt(k))).fullDate);
+    }
+    return arr;
+  }
+  /**
+   *  获取多选状态
+   */
+  setMultiple(fullDate) {
+    if (!this.range)
+      return;
+    let {
+      before,
+      after
+    } = this.multipleStatus;
+    if (before && after) {
+      if (!this.lastHover) {
+        this.lastHover = true;
+        return;
+      }
+      this.multipleStatus.before = fullDate;
+      this.multipleStatus.after = "";
+      this.multipleStatus.data = [];
+      this.multipleStatus.fulldate = "";
+      this.lastHover = false;
+    } else {
+      if (!before) {
+        this.multipleStatus.before = fullDate;
+        this.lastHover = false;
+      } else {
+        this.multipleStatus.after = fullDate;
+        if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+          this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
+        } else {
+          this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
+        }
+        this.lastHover = true;
+      }
+    }
+    this.getWeeks(fullDate);
+  }
+  /**
+   *  鼠标 hover 更新多选状态
+   */
+  setHoverMultiple(fullDate) {
+    if (!this.range || this.lastHover)
+      return;
+    const { before } = this.multipleStatus;
+    if (!before) {
+      this.multipleStatus.before = fullDate;
+    } else {
+      this.multipleStatus.after = fullDate;
+      if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+        this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
+      } else {
+        this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
+      }
+    }
+    this.getWeeks(fullDate);
+  }
+  /**
+   * 更新默认值多选状态
+   */
+  setDefaultMultiple(before, after) {
+    this.multipleStatus.before = before;
+    this.multipleStatus.after = after;
+    if (before && after) {
+      if (dateCompare(before, after)) {
+        this.multipleStatus.data = this.geDateAll(before, after);
+        this.getWeeks(after);
+      } else {
+        this.multipleStatus.data = this.geDateAll(after, before);
+        this.getWeeks(before);
+      }
+    }
+  }
+  /**
+   * 获取每周数据
+   * @param {Object} dateData
+   */
+  getWeeks(dateData) {
+    const {
+      year,
+      month
+    } = this.getDateObj(dateData);
+    const preMonthDayAmount = new Date(year, month - 1, 1).getDay();
+    const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData));
+    const currentMonthDayAmount = new Date(year, month, 0).getDate();
+    const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData));
+    const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount;
+    const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData));
+    const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays];
+    const weeks = new Array(6);
+    for (let i = 0; i < calendarDays.length; i++) {
+      const index = Math.floor(i / 7);
+      if (!weeks[index]) {
+        weeks[index] = new Array(7);
+      }
+      weeks[index][i % 7] = calendarDays[i];
+    }
+    this.calendar = calendarDays;
+    this.weeks = weeks;
+  }
+}
+function getDateTime(date, hideSecond) {
+  return `${getDate(date)} ${getTime(date, hideSecond)}`;
+}
+function getDate(date) {
+  date = fixIosDateFormat(date);
+  date = new Date(date);
+  const year = date.getFullYear();
+  const month = date.getMonth() + 1;
+  const day = date.getDate();
+  return `${year}-${addZero(month)}-${addZero(day)}`;
+}
+function getTime(date, hideSecond) {
+  date = fixIosDateFormat(date);
+  date = new Date(date);
+  const hour = date.getHours();
+  const minute = date.getMinutes();
+  const second = date.getSeconds();
+  return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`;
+}
+function addZero(num) {
+  if (num < 10) {
+    num = `0${num}`;
+  }
+  return num;
+}
+function getDefaultSecond(hideSecond) {
+  return hideSecond ? "00:00" : "00:00:00";
+}
+function dateCompare(startDate, endDate) {
+  startDate = new Date(fixIosDateFormat(startDate));
+  endDate = new Date(fixIosDateFormat(endDate));
+  return startDate <= endDate;
+}
+function checkDate(date) {
+  const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g;
+  return date.match(dateReg);
+}
+const dateTimeReg = /^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])( [0-5][0-9]:[0-5][0-9]:[0-5][0-9])?$/;
+function fixIosDateFormat(value) {
+  if (typeof value === "string" && dateTimeReg.test(value)) {
+    value = value.replace(/-/g, "/");
+  }
+  return value;
+}
+exports.Calendar = Calendar;
+exports.checkDate = checkDate;
+exports.dateCompare = dateCompare;
+exports.fixIosDateFormat = fixIosDateFormat;
+exports.getDate = getDate;
+exports.getDateTime = getDateTime;
+exports.getDefaultSecond = getDefaultSecond;
+exports.getTime = getTime;