Fly 2 år sedan
förälder
incheckning
b043bd0799

+ 7 - 3
components/headModules/share.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="head-icon" @click.stop="openShare()">
 		<image  src="../../static/images/logo.png" mode="aspectFit"></image>
+		<sharePage ref="sharePageRef"/>
 	</view>
 </template>
 
@@ -13,9 +14,12 @@
 		},
 		methods:{
 			openShare(){
-				uni.navigateTo({
-					url: '/pages/content/share'
-				});
+				// uni.navigateTo({
+				// 	url: '/pages/content/share'
+				// });
+				this.$nextTick(() => {
+					this.$refs.sharePageRef.openShare()
+				})
 			}
 		}
 	}

+ 276 - 0
components/sharePage/sharePage.vue

@@ -0,0 +1,276 @@
+<template>
+	<uni-popup ref="popupRef">
+
+		<view class="share-box">
+			<view class="share-status-bar" :style="{'height': `${statusBarHeight}px`}"></view>
+			<!-- statusBarHeight -->
+			<view class="share-content">
+				<view class="content">
+					<view class="share-top">
+						<image class="share-logo" src="@/static/share/img_02.png" mode="aspectFit"></image>
+						<text class="share-title">注册会员</text>
+						<text class="share-title">获取高额奖励</text>
+						<view class="share-list">
+							<view class="share-list-item"><text class="item-icon"></text><text
+									class="item-text">安全的钱包技术</text></view>
+							<view class="share-list-item"><text class="item-icon"></text><text
+									class="item-text">交易流畅顶级风控</text></view>
+							<view class="share-list-item"><text class="item-icon"></text><text
+									class="item-text">丰富的加密资产业务</text></view>
+							<view class="share-list-item"><text class="item-icon"></text><text
+									class="item-text">分布在世界各地的客户</text></view>
+						</view>
+					</view>
+					<view class="footer">
+						<image class="share-code" src="@/static/share/img_03.png" mode="aspectFit"></image>
+						<view class="share-btns">
+							<view class="share-btn">
+								邀请您加入[币王]
+							</view>
+							<view class="share-btn-hint">
+								<<<长按识别二维码 </view>
+							</view>
+						</view>
+					</view>
+
+
+				</view>
+				<view class="share-footer">
+
+					<view class="share-list">
+						<view class="share-icons">
+							<text class="share-icon iconfont" style="color: #00b1ff;">&#xe754;</text>
+							<text class="share-text">复制链接</text>
+						</view>
+						<view class="share-icons">
+							<text class="share-icon iconfont" style="color: #029a73;">&#xe654;</text>
+							<text class="share-text">微信</text>
+						</view>
+						<view class="share-icons">
+							<text class="share-icon iconfont" style="color: #02d9a2;">&#xe602;</text>
+							<text class="share-text">朋友圈</text>
+						</view>
+						<view class="share-icons">
+							<text class="share-icon iconfont" style="color: #1890ff;">&#xe887;</text>
+							<text class="share-text">QQ</text>
+						</view>
+						<view class="share-icons">
+							<text class="share-icon iconfont" style="color: #83a0e5">&#xe6b4;</text>
+							<text class="share-text">保存图片</text>
+						</view>
+					</view>
+					<view class="share-cancel" @click.stop="cancelShare">
+						取消
+					</view>
+				</view>
+			</view>
+	</uni-popup>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	export default {
+		name: "sharePage",
+		data() {
+			return {
+
+			};
+		},
+		computed: {
+			...mapGetters([
+				'statusBarHeight'
+			])
+		},
+		mounted() {
+
+
+		},
+		methods: {
+			openShare() {
+				this.$nextTick(() => {
+					uni.hideTabBar();
+					this.$refs.popupRef.open()
+				})
+			},
+			cancelShare() {
+				this.$refs.popupRef.close()
+				uni.showTabBar()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.share-box {
+		width: 750rpx;
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+
+		.share-status-bar {
+			flex-shrink: 0;
+			width: 100%;
+			background-color: rgba(255, 255, 255, 0.5);
+		}
+
+		.share-content {
+			flex: 1;
+			padding: 30rpx 40rpx;
+
+			.content {
+				flex-shrink: 0;
+				width: 100%;
+				height: 100%;
+				background: url("@/static/share/img_01.png") no-repeat center center;
+				background-size: 100% 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				padding: 30rpx 30rpx 20rpx;
+
+				.share-top {
+					display: flex;
+					flex-direction: column;
+					align-items: flex-start;
+
+					.share-logo {
+						display: inline-block;
+						height: 80rpx;
+						// margin-bottom: 14rpx;
+					}
+
+					.share-title {
+
+						font-size: 56rpx;
+						font-family: PingFang SC, PingFang SC-Bold;
+						font-weight: 700;
+						color: #ffffff;
+						line-height: 1.1;
+						letter-spacing: 1.2px;
+					}
+
+					.share-list {
+						width: 100%;
+						padding-top: 20rpx;
+						display: flex;
+						flex-direction: column;
+
+						.share-list-item {
+							font-size: 20rpx;
+							font-family: PingFang SC, PingFang SC-Regular;
+							font-weight: 400;
+							color: #ffffff;
+							line-height: 1.5;
+							// transform: scale(0.8);
+							display: flex;
+							align-items: center;
+							justify-content: flex-start;
+
+							.item-icon {
+								display: inline-block;
+								width: 14rpx;
+								height: 14rpx;
+								border-radius: 50%;
+								background-color: #fff;
+							}
+
+							.item-text {
+								padding-left: 3px;
+							}
+						}
+					}
+
+				}
+
+				.footer {
+					width: 100%;
+					display: flex;
+					align-items: center;
+					padding: 0 20rpx;
+
+					.share-code {
+						width: 130rpx;
+						height: 130rpx;
+					}
+
+					.share-btns {
+						width: calc(100% - 130rpx);
+						padding-left: 45rpx;
+						color: #fff;
+
+						.share-btn {
+							width: 100%;
+							height: 50rpx;
+							background: linear-gradient(180deg, #faae3d, #f9d159);
+							border-radius: 29rpx;
+							text-align: center;
+							line-height: 50rpx;
+							font-size: 24rpx;
+							font-family: PingFang SC, PingFang SC-Regular;
+							font-weight: 400;
+						}
+
+						.share-btn-hint {
+							padding-top: 22rpx;
+							font-size: 24rpx;
+							font-family: PingFang SC, PingFang SC-Regular;
+							font-weight: 400;
+							color: #ffffff;
+							letter-spacing: 0.56rpx;
+						}
+					}
+				}
+			}
+		}
+
+		.share-footer {
+			flex-shrink: 0;
+
+
+
+			.share-list {
+				border-radius: 40rpx 40rpx 0 0;
+				width: 100%;
+				padding: 30rpx 30rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: stretch;
+				background-color: #f6f7fc;
+			}
+
+			.share-icons {
+				display: flex;
+				flex-direction: column;
+
+				justify-content: center;
+				align-items: center;
+
+
+				.share-icon {
+					font-size: 100rpx;
+					color: red;
+				}
+
+				.share-text {
+					font-size: 24rpx;
+					padding-top: 10rpx;
+				}
+			}
+
+			.share-cancel {
+				width: 100%;
+				height: 100rpx;
+				line-height: 100rpx;
+				background-color: #fff;
+				text-align: center;
+				font-size: 34rpx;
+				color: #c0c0c0;
+			}
+		}
+
+		// <view class="share-content"></view>
+		// <view class="share-share"></view>
+	}
+</style>

+ 165 - 0
components/times/times.vue

@@ -0,0 +1,165 @@
+<template>
+	<view class="picker-box">
+		<picker-view class="picker-view" :value="value" @change="bindChange">
+			<picker-view-column>
+				<view class="year-item picker-item" v-for="(item,index) in years" :key="`years_${index}`">{{item}}
+				</view>
+			</picker-view-column>
+			<picker-view-column>
+				<view class="month-item picker-item" v-for="(item,index) in months" :key="`months_${index}`">{{item}}
+				</view>
+			</picker-view-column>
+			<picker-view-column>
+				<view class="day-item picker-item" v-for="(item,index) in days" :key="`days_${index}`">{{item}}</view>
+			</picker-view-column>
+		</picker-view>
+	</view>
+</template>
+
+<script>
+	import {
+		dayNums
+	} from "@/utils/tool.js"
+	export default {
+		props: {
+			time: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				valueTime: [],
+				value: [0 , 0 , 0],
+				years: [2022, 2023],
+				months: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
+				days: []
+			};
+		},
+		watch: {
+			time: {
+				handler(newTime, oldTime) {
+					if (newTime) {
+						this.splitTime(newTime)
+					}
+				},
+				immediate: true,
+				deep: true
+			}
+		},
+
+		methods: {
+
+			// 拆分时间
+			splitTime(tims) {
+				this.valueTime = tims.split('-')
+				this.matchingYears()
+			},
+
+			// 匹配年
+			matchingYears() {
+				try {
+					this.years.forEach((el, index) => {
+						if (el == this.valueTime[0]) {
+							// this.value[0] = index;
+							this.$set(this.value , 0 , index)
+							throw new Error()
+						}
+					})
+				} catch {}
+				this.matchingMonths()
+			},
+			// 匹配月
+			matchingMonths() {
+				try {
+					this.months.forEach((el, index) => {
+						if (el == this.valueTime[1]) {
+							this.$set(this.value , 1 , index)
+							throw new Error()
+						}
+					})
+				} catch {};
+				this.matchingDays()
+			},
+			// 匹配日
+			matchingDays() {
+				// 根据当前时间获取当前月份天数
+				this.days = dayNums(this.valueTime)
+				try {
+					this.days.forEach((el, index) => {
+						if (el == this.valueTime[2]) {
+							this.$set(this.value , 2 , index)
+							throw new Error()
+						}
+					})
+				} catch {};
+			},
+
+			bindChange(e) {
+				const val = e.detail.value;
+				if (val[0] !== this.value[0]) {
+					// 滑动年
+					this.value = [val[0], 0, 0]
+				} else if (val[1] !== this.value[1]) {
+					// 滑动月
+					this.value = [val[0], val[1], 0]
+				} else if (val[2] !== this.value[2]) {
+					// 滑动日
+					this.value = val
+				}
+
+				
+				this.modificationTime()
+			},
+			// 根据时间索引,修改时间
+			modificationTime() {
+				let year = this.years[this.value[0]]
+				let month = this.months[this.value[1]]
+				let day = this.days[this.value[2]]
+				this.valueTime = [year, month, day]
+				this.$emit("update:time", `${year}-${month}-${day}`);
+			}
+
+			// getDays() {
+			// 	this.days = dayNums(this.valueTime)
+			// },
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.picker-box {
+		width: 100%;
+		height: 100%;
+	}
+
+	.picker-view {
+		width: 100%;
+		height: 100%;
+
+		.year-item {
+			padding-left: 80rpx;
+		}
+
+		.month-item {
+			text-align: center;
+		}
+
+		.day-item {
+			text-align: right;
+			padding-right: 80rpx;
+		}
+
+		::v-deep .uni-picker-view-indicator {
+			height: 56rpx;
+		}
+
+		.picker-item {
+			font-size: 28rpx;
+			font-weight: 700;
+			height: 56rpx;
+			line-height: 56rpx;
+			letter-spacing: 1.4px;
+		}
+	}
+</style>

+ 19 - 8
pages/content/charge-record.vue

@@ -13,34 +13,45 @@
 		</headContent>
 		<!-- &#xe636; -->
 		<view class="record-type">
-			<view class="type-info">
-				<text class="type-text">全部币种</text>
+			<view class="type-info" @click.stop="openSelectCurrency()">
+				<text class="type-text">{{ currencyVal || '全部币种'}}</text>
 				<text class="type-icon iconfont">&#xe60e;</text>
 			</view>
-			<view class="condition-icon iconfont">&#xe636;</view>
+			<view  @click.stop="openSelectTime()" class="condition-icon iconfont">&#xe636;</view>
 		</view>
 		
-		<selectCurrency ref="selectCurrency" />
+		<selectCurrency ref="selectCurrency" :currencyVal.sync="currencyVal"/>
+		<selectTime ref="selectTimeRef" />
 	</view>
 </template>
 
 <script>
 	import reverseBack from "@/components/headModules/reverse-back.vue"
 	import selectCurrency from "./components/select-currency.vue"
+	import selectTime from "./components/select-time.vue"
 	export default {
 		name: 'charge-record',
 		components: {
 			reverseBack,
-			selectCurrency
+			selectCurrency,
+			selectTime
 		},
 		data() {
 			return {
 				// share
+				currencyVal:undefined
 			}
 		},
 
 		methods: {
-
+			openSelectCurrency(){
+				this.$nextTick(() => {
+					this.$refs.selectCurrency.open();
+				})
+			},
+			openSelectTime(){
+				
+			}
 		}
 	}
 </script>
@@ -49,7 +60,7 @@
 	.record-type{
 		width: 100%;
 		height: 90rpx;
-		border: 1rpx solid #ccc;
+		border: 1rpx solid $border-color;
 		padding: 0 $pages-padding;
 		border-left: none;
 		border-right: none;
@@ -72,7 +83,7 @@
 			}
 		}
 		.condition-icon{
-				color: #ccc;
+				color: #666;
 			// font-size: rpx;
 		}
 	}

+ 46 - 19
pages/content/components/select-currency.vue

@@ -8,17 +8,19 @@
 				<text class="title-side iconfont">&#xe621;</text>
 			</view>
 			<view class="currency-content">
-				<view class="currency-item" @click.stop="activeCurrency = undefined">
+				<view :class="['currency-item' , activeCurrencyVal === undefined ? 'active-currency-item' : '']"
+					@click.stop="activeCurrency()">
 					<text class="currency-icon all-currency"></text>
 					<!-- <image class="currency-icon" :src="item.icon" mode="aspectFit"></image> -->
 					<text class="currency-text">全部币种</text>
-					<text v-show="activeCurrency === undefined" class="active-currency iconfont">&#xe627;</text>
+					<text v-show="activeCurrencyVal === undefined" class="active-currency iconfont">&#xe627;</text>
 				</view>
 				<block v-for="item in currencyList">
-					<view class="currency-item" @click.stop="activeCurrency = item.name">
+					<view :class="['currency-item' , activeCurrencyVal === item.name ? 'active-currency-item' : '']"
+						@click.stop="activeCurrency(item.name)">
 						<image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
 						<text class="currency-text">{{ item.name }}</text>
-						<text v-show="activeCurrency === item.name" class="active-currency iconfont">&#xe627;</text>
+						<text v-show="activeCurrencyVal === item.name" class="active-currency iconfont">&#xe627;</text>
 					</view>
 				</block>
 			</view>
@@ -28,9 +30,15 @@
 
 <script>
 	export default {
+		props: {
+			currencyVal: {
+				type: [String],
+				default: undefined
+			}
+		},
 		data() {
 			return {
-				activeCurrency: undefined,
+				activeCurrencyVal: undefined,
 				currencyList: [{
 						icon: require('@/static/images/bi/bi_01.png'),
 						name: 'BTC'
@@ -50,14 +58,29 @@
 				]
 			};
 		},
+		watch: {
+			currencyVal: {
+				handler(newVal) {
+					this.activeCurrencyVal = newVal || undefined
+				},
+				immediate: true,
+				deep: true
+			}
+
+		},
 		mounted() {
-			this.$refs.popupRef.open()
+			// this.$refs.popupRef.open()
 		},
 		methods: {
 			open() {
 				this.$nextTick(() => {
 					this.$refs.popupRef.open();
 				})
+			},
+			activeCurrency(name = undefined) {
+				this.activeCurrencyVal = name;
+				this.$refs.popupRef.close();
+				this.$emit("update:currencyVal", this.activeCurrencyVal);
 			}
 
 		}
@@ -79,10 +102,16 @@
 			justify-content: space-between;
 			align-items: center;
 			padding: 0 40rpx;
+			font-weight: 700;
 
 			.title-side {
 				flex-shrink: 0;
 				font-size: 28rpx;
+				width: 40rpx;
+				height: 100%;
+				line-height: 113rpx;
+				color: #666;
+				font-weight: 400;
 			}
 		}
 
@@ -95,15 +124,18 @@
 				align-items: center;
 				justify-content: space-between;
 				height: 80rpx;
-				.all-currency{
+				border-bottom: 1rpx solid $border-color;
+
+				.all-currency {
 					background-color: #ccc;
 					border-radius: 50%;
 				}
+
 				.currency-icon {
-					width: 40rpx;
-					height: 40rpx;
+					width: 36rpx;
+					height: 36rpx;
 					border-radius: 50%;
-					
+
 				}
 
 				.currency-text {
@@ -117,15 +149,10 @@
 					color: $Theme-Color;
 				}
 			}
-		}
 
-		// <view class="currency-content">
-		// 				<block v-for="item in currencyList">
-		// 					<view class="currency-item">
-		// <image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
-		// 						<text class="currency-text">{{ item.name }}</text>
-		// 					</view>
-		// 				</block>
-		// 			</view>
+			.active-currency-item {
+				color: $Theme-Color;
+			}
+		}
 	}
 </style>

+ 202 - 0
pages/content/components/select-time.vue

@@ -0,0 +1,202 @@
+<template>
+	<uni-popup ref="popupRef" type="bottom">
+		
+		<view class="popup-box">
+			<view class="popup-title">
+				<text class="title-side"></text>
+				<text class="title-name">时间筛选</text>
+				<text class="title-side iconfont">&#xe621;</text>
+			</view>
+			<view class="time-content">
+				<view class="time-vals">
+					<view :class="['time-val' , editTimeIndex === 0 ? 'active-time-val' : '']" @click.stop="selectTime(0)">
+						<text class="time-lable">开始</text>
+						<text class="time-str">{{ timeVal[0]  || '-' }}</text>
+					</view>
+					<text class="time-link">-</text>
+					<view :class="['time-val' , editTimeIndex === 1 ? 'active-time-val' : '']"  @click.stop="selectTime(1)">
+						<text class="time-lable">结束</text>
+						<text class="time-str">{{ timeVal[1] || '-' }}</text>
+					</view>
+				</view>
+				<view class="times-content">
+					<times :time.sync="editTime" />
+				</view>
+				<view class="time-btns">
+					<view class="time-btn ">
+						取消
+					</view>
+					<view class="time-btn active-time-btn">
+						确定
+					</view>
+				</view>
+
+			</view>
+
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import {
+		getCurrentTime,
+		beforeYear
+	} from "@/utils/tool.js"
+	export default {
+		data() {
+			return {
+				activeCurrencyVal: undefined,
+				timeVal: [],
+				editTimeIndex:0 , // 1: 结束 ,0:开始 
+				editTime:''
+			};
+		},
+		onLoad() {
+
+		},
+		watch:{
+			editTime(newTime , oldTime){
+				this.timeVal[this.editTimeIndex] = newTime
+			}
+		},
+		created() {
+			this.getTimes()
+		},
+		mounted() { 
+			// this.$refs.popupRef.open()
+			
+		},
+		methods: {
+			// 选择时间
+			selectTime(index){
+				this.editTimeIndex = index
+				this.editTime = this.timeVal[index]
+			},
+			getTimes() {
+				const current = getCurrentTime(); // 当前时间
+				const beforeYear = getCurrentTime(1); // 一年前的今天
+				this.timeVal = [beforeYear, current];
+				this.selectTime(0);
+			},
+			open() {
+				this.$nextTick(() => {
+					this.$refs.popupRef.open();
+				})
+			},
+ 
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup-box {
+		width: 100%;
+		background-color: #Fff;
+		border-radius: 50rpx 50rpx 0px 0px;
+
+		.popup-title {
+			width: 100%;
+			height: 106rpx;
+			border-radius: 50rpx 50rpx 0px 0px;
+			background-color: #F7F7F7 !important;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 40rpx;
+			font-weight: 700;
+
+			.title-side {
+				flex-shrink: 0;
+				font-size: 28rpx;
+				width: 40rpx;
+				height: 100%;
+				line-height: 106rpx;
+				color: #666;
+				font-weight: 400;
+			}
+		}
+
+		.time-content {
+			width: 100%;
+			padding: 20rpx 0;
+
+			.time-vals {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 0 $pages-padding;
+
+				.time-val {
+					flex: 1;
+					flex-shrink: 0;
+					height: 70rpx;
+					border: 1rpx solid $border-color;
+					display: flex;
+					align-items: center;
+					border-radius: 8rpx;
+					padding: 0 8rpx;
+
+					.time-lable {
+						font-size: 28rpx;
+						flex-shrink: 0;
+						color: #666;
+						padding-right: 30rpx;
+					}
+
+					.time-str {
+						flex: 1;
+						font-size: 24rpx;
+						color: #010101;
+						font-weight: 600;
+
+					}
+				}
+
+				.active-time-val {
+					border-color: $Theme-Color;
+				}
+
+				.time-link {
+					padding: 0 20rpx;
+					text-align: center;
+				}
+			}
+
+
+			.times-content {
+				width: 100%;
+				height: 380rpx;
+				padding: 30rpx 0;
+
+			}
+
+
+			.time-btns {
+				width: 100%;
+				padding: 0 $pages-padding;
+				display: flex;
+				justify-content: space-between;
+
+
+				.time-btn {
+					width: 100%;
+					width: 49%;
+					height: 78rpx;
+					border-radius: 8rpx;
+					text-align: center;
+					line-height: 78rpx;
+					font-size: 30rpx;
+					color: $Theme-Color;
+					border: 1rpx solid $Theme-Color;
+				}
+
+				.active-time-btn {
+					background-color: $Theme-Color;
+					color: #fff;
+				}
+			}
+
+		}
+
+	}
+</style>

+ 4 - 3
static/fontsize/iconfont.css

@@ -1,8 +1,9 @@
+
 @font-face {
   font-family: 'iconfont';  /* Project id 4023758 */
-  src: url('https://at.alicdn.com/t/c/font_4023758_o9syzed6a2.woff2?t=1681897932020') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_4023758_o9syzed6a2.woff?t=1681897932020') format('woff'),
-       url('https://at.alicdn.com/t/c/font_4023758_o9syzed6a2.ttf?t=1681897932020') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_4023758_ir57trmugjf.woff2?t=1681983300972') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_4023758_ir57trmugjf.woff?t=1681983300972') format('woff'),
+       url('https://at.alicdn.com/t/c/font_4023758_ir57trmugjf.ttf?t=1681983300972') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;

+ 2 - 0
uni.scss

@@ -16,6 +16,8 @@ $pages-padding: 30rpx;
 $page-bg:#F5F5F5;
 $modules-box-bg:#ffffff;
 $Theme-Color: #05C175;
+$border-color: rgba(204, 204, 204, 0.2);
+
 
 /* 颜色变量 */
 

+ 51 - 0
utils/tool.js

@@ -0,0 +1,51 @@
+const mendTime = (val) => {
+	if (val > 9) {
+		return val
+	} else {
+		return `0${val}`
+	}
+}
+
+/**
+ * yearNum : 正数 是 前一年 , 复数是后一年
+ */
+// years
+// months 
+// days 
+export const getCurrentTime = (yearNum = 0) => {
+	const time = new Date();
+	const years = time.getFullYear();
+	const months = time.getMonth() + 1;
+	const days = time.getDate();
+
+	return `${years - yearNum}-${mendTime(months)}-${mendTime(days)}`
+
+}
+
+
+//  时间拼接
+export const jointTime = (timeArr = []) => {
+	return timeArr.join('-')
+}
+
+
+
+/**
+ * time : 当前年月日,
+ * 根据当前年月日获取本月的天数
+ */
+export const dayNums = (time) => {
+	console.log('dayNums = ', time)
+	if (time) {
+		time = jointTime(time)
+	}
+	let date = new Date(time);
+	date.setMonth(date.getMonth() + 1); // 先设置为下个月
+	date.setDate(0); // 再置0,变成当前月最后一天
+	const nums = date.getDate() // 当前月最后一天即当前月拥有的天数
+	const dayArr = []
+	for (let i = 1; i <= nums; i++) {
+		dayArr.push(mendTime(i))
+	};
+	return dayArr
+}