微信小程序酒店选择日期和入住人数(有效果图)

news2025/1/15 23:38:44

效果图

请添加图片描述

请添加图片描述
在这里插入图片描述

app.vue

	onLaunch:function(options){
		this.defaultcache()
	}
	defaultcache(){
		// 入住信息缓存
		var arr = this.getDateTime();
		var ReserVation = {
			reservType:0,//1  人数  2日期
			InCheckin:{},//入离日期
			peopleArr:[
				{title:'成人',num:2},
				{title:'儿童',num:0},
				{title:'宝子',num:1},
				{title:'房间数',num:1},
			],//入住人数
			IntimeCur:[
				{len:0,str:0},
				{len:0,str:0}
			],//选择日期
			timeDataArr:[],//日期数组
		}
		ReserVation.timeDataArr = arr[0]
		ReserVation.IntimeCur = arr[1]
		ReserVation.InCheckin = arr[2][0]
		uni.setStorageSync('ReserVation',ReserVation)
	},
	// 获取日期
	getDateTime(){
		var that = this
		var showY = 3;//显示几个月
		var timeData = [];//日期数组
		var timestamp = Date.parse(new Date());
		var date = new Date(timestamp);
		//年
		var Y = date.getFullYear();
		//月  
		var M = date.getMonth() + 1;
		//日
		var D = date.getDate();
		// 周几和月份天数
		var time = {};
		var Yday = 0,Mday = 0,data = {},param = {},toDays = 2;//toDays	默认住几天
		for(let i = 0;i < showY;i++){
			if(12 < (M + i)){
				Yday = Y + 1
				Mday = (M + i) - 12
			}else{
				Yday = Y
				Mday = M + i
			}
			time = that.getDaysInMonth(Yday,Mday)
			data = {year:Yday,moon:Mday,arr:[],days:time.days,Z:time.Z}
			for(let k = 0;k < time.Z;k++){
				data.arr.push({date:''});
			}
			for(let j = 0;j < time.days;j++){
				param = {};
				param.date = j + 1;
				param.Z = that.getDaysInMonth(Yday,Mday,param.date)
				param.price = 0;
				if(i == 0 && (j + 1) < D){
					param.status = 1
				}else if(i == 0 && (j + 1) == D){
					param.status = 2
				}
				data.arr.push(param)
			}
			timeData.push(data)
		}
		var start = {
			len:0,str:D
		};
		// if(that.timeData[start.len].days < (D + 1)){
		// 	start.len = 1
		// 	start.str = 0
		// }
		var end = {
			len:0,str:D + toDays - 1
		}
		if(timeData[end.len].days < end.str){
			end.str = end.str - timeData[end.len].days
			end.len = 1
		}
		start.str = start.str + parseInt(timeData[start.len].Z) - 1
		end.str = end.str + parseInt(timeData[end.len].Z) - 1
		var timeCur = [
			start,
			end
		]
		var Checkin = {
			start_Y:timeData[timeCur[0].len].year,
			start_M:timeData[timeCur[0].len].moon,
			start_D:timeData[timeCur[0].len].arr[timeCur[0].str].date,
			start_Z:timeData[timeCur[0].len].arr[timeCur[0].str].Z,
			end_Y:timeData[timeCur[1].len].year,
			end_M:timeData[timeCur[1].len].moon,
			end_D:timeData[timeCur[1].len].arr[timeCur[1].str].date,
			end_Z:timeData[timeCur[1].len].arr[timeCur[1].str].Z,
			days:toDays,
		}
		return [timeData,timeCur,[Checkin]];
	},
	// 获取周几和月份天数
	getDaysInMonth(Y,M,D){
		if(D){
			return this.getWeekByDate(`${Y}-${M}-${D}`,true)
		}
		//一号周几
		var Z = this.getWeekByDate(`${Y}-${M}-1`);
		// 月份天数
		var days = new Date(Y, M, 0).getDate();
		return {Z,days}
	},
	// 返回周几
	getWeekByDate(dates,status){
	  let show_day = status?['周日', '周一', '周二', '周三', '周四', '周五', '周六']:['0', '1', '2', '3', '4', '5', '6'];
	  let date = new Date(dates);
	  date.setDate(date.getDate());
	  let day = date.getDay();
	  return show_day[day];
	},

page-reservation.vue

<template>
<view>
	<view :class="modalName == 'reservation'?'cu-modal bottom-modal show':'cu-modal bottom-modal'" @touchmove.stop="() => false"
	 :style="'--CustomBar--:'+CustomBar+'px;z-index:10000;'">
		<view class="cu-dialog reservation-index">
			<view class="cu-custom">
				<view class="cu-bar fixed bg-white dialog-title" :style="'height:'+CustomBar+'px;padding-top:'+StatusBar+'px;'">
					<view class="action" @click="showModal('')">
						<text class="cuIcon-close" style="font-size: 42upx;"></text>
					</view>
					<view class="content" :style="'top:'+StatusBar+'px'">
						<view>选择入住条件</view>
					</view>
				</view>
			</view>
			<!-- 房住 -->
			<view class="reser-room">
				<view>房住</view>
				<view @click="tabreser(1)">
					<view v-for="(item,index) in peopleArrCur" :key="index" 
					:class="item.num > 0?'reser-room-cur':''">
						{{item.num + item.title}}
					</view>
					<view :class="type == 1?'cuIcon-unfold':'cuIcon-unfold reser-rotate'"></view>
				</view>
			</view>
			<!-- list -->
			<view class="reser-room-list reser-cur" :style="type != 1?'height:0;box-shadow:0;':''">
				<view v-for="(item,index) in peopleArrCur" :key="index">
					<view>{{item.title}}</view>
					<view class="room-list-count">
						<view class="room-list-icon" :class="item.num < 1 || (index == 0 && item.num < 2) || (index == 3 && item.num < 2) || (isType && index == 2)?'list-icon-cur':''"
						@click="item.num < 1 || (index == 0 && item.num < 2) || (index == 3 && item.num < 2) || (isType && index == 2)?'':countTap(index,1)">
							<view class="cuIcon-move"></view>
						</view>
						<view>{{item.num}}</view>
						<view class="room-list-icon" :class="item.num > 20 || (isType && index == 2)?'list-icon-cur':''"
						@click="item.num > 20 || (isType && index == 2)?'':countTap(index,2)">
							<view class="cuIcon-add"></view>
						</view>
					</view>
				</view>
			</view>
			<!-- 日期 -->
			<view class="reser-room reser-money">
				<view>入离日期</view>
				<view @click="tabreser(2)">
					<view>
						<span class="reser-room-cur">{{Checkin.start_M}}月{{Checkin.start_D}}日</span>
						{{Checkin.start_Z}}
					</view>
					<view class="reser-room-ing">{{Checkin.days}}晚</view>
					<view v-if="Checkin.days > 1">
						<span class="reser-room-cur">{{Checkin.end_M}}月{{Checkin.end_D}}日</span>
						{{Checkin.end_Z}}
					</view>
					<view :class="type == 2?'cuIcon-unfold':'cuIcon-unfold reser-rotate'"></view>
				</view>
			</view>
			<view class="reser-time" :style="type == 2?'':'height:0;'">
				<view>*以下价格为单晚入住参考价</view>
				<!-- list -->
				<view class="reser-data">
					<view v-for="(item,index) in timeTitle" :key="index">{{item}}</view>
				</view>
				<scroll-view scroll-y class="reser-list"
				@scroll="getScrollTop">
					<view v-for="(item,index) in timeData" :key="index" class="list-time"
					:id="'Time_'+index">
						<view>
							<view :class="index == scroll_index && type == 2 && modalName == 'reservation'?'reser-fixed':''">{{item.year}}年{{item.moon}}月</view>
						</view>
						<view>
							<view v-for="(cell,cell_index) in item.arr" :key="cell_index" class="list-date"
							:class="timeCur[1].str != -1 && timeCur[0].len != timeCur[1].len && (index == timeCur[0].len && timeCur[0].str < cell_index || index == timeCur[1].len && timeCur[1].str > cell_index) ? 
							'list-cur-one':timeCur[1].str != -1 && timeCur[0].len == timeCur[1].len && (index == timeCur[0].len && timeCur[0].str < cell_index && index == timeCur[1].len && timeCur[1].str > cell_index) ? 
							'list-cur-one':timeCur[1].len - timeCur[0].len > 1 && index == timeCur[1].len - 1?'list-cur-one':(index == timeCur[0].len && cell_index == timeCur[0].str) || 
							(index == timeCur[1].len && cell_index == timeCur[1].str)?'list-cur-two':''" 
							:style="cell.date?'':'visibility: hidden;'"
							@click="cell.status == 1?'':timetap(index,cell_index)">
								<view>
									<view :class="cell.status == 1?'reser-hui':cell.status == 2?'reser-chen':''">
										{{cell.status == 2?'今天':cell.date}}
									</view>
									<view class="reser-cur-font" v-if="cell.price > 0">
									<span v-if="((timeCur[1].str != -1 && timeCur[0].len != timeCur[1].len && (index == timeCur[0].len && timeCur[0].str < cell_index || index == timeCur[1].len && timeCur[1].str > cell_index)) ||
									(timeCur[1].str != -1 && timeCur[0].len == timeCur[1].len && (index == timeCur[0].len && timeCur[0].str < cell_index && index == timeCur[1].len && timeCur[1].str > cell_index)) ||
									(timeCur[1].len - timeCur[0].len > 1 && index == timeCur[1].len - 1) || ((index == timeCur[0].len && cell_index == timeCur[0].str) || 
									(index == timeCur[1].len && cell_index == timeCur[1].str)))">
									¥{{cell.price}}
									</span>
									</view>
									<view class="reser-cur-font" v-if="(index == timeCur[0].len && cell_index == timeCur[0].str) || 
									(index == timeCur[1].len && cell_index == timeCur[1].str)">{{(index == timeCur[0].len && cell_index == timeCur[0].str)?'入住':'离店'}}</view>
								</view>
							</view>
						</view>
					</view>
					<view class="wdh" style="height: 162px;"></view>
				</scroll-view>
				<view class="reser-button">
					<button class="cu-btn round" @click="btnConfirm">确定</button>
				</view>
			</view>
		</view>
	</view>
</view>
</template>
<script>
export default{
	data(){
		return{
			StatusBar:this.StatusBar,
			CustomBar: this.CustomBar,
			type:0,
			timeTitle:['周日','周一','周二','周三','周四','周五','周六'],
			timeData:[],
			timeCur:[
				{len:0,str:0},
				{len:0,str:0}
			],
			scroll_index:-1,//fiexd日期
			Checkin:{
				start_M:'',
				start_D:'',
				start_Z:'',
				end_M:'',
				end_D:'',
				end_Z:'',
				days:'',
			},//入离日期
			peopleArrCur:[],
		}
	},
	name: 'page-reservation',
	props: {
		modalName: {
			type: String,
			default: ''
		},
		ReserVation: {
			type: Object,
			default: {}
		},
		isType: {
			type: [Boolean, String],
			default: false
		},
	},
	created(){
		//默认显示日期或者人数
		this.type = this.ReserVation.reservType
		//房住
		this.peopleArrCur = this.ReserVation.peopleArr
		//选择的入住时间
		this.timeCur = this.ReserVation.IntimeCur
		//日期数组
		this.timeData = this.ReserVation.timeDataArr
		//入住时间信息
		this.Checkin = this.ReserVation.InCheckin
		this.list()
	},
	methods:{
		list(){
			var that = this
			setTimeout(() => {
				that.scroll_index = 0
			},500)
			setTimeout(() => {
				that.getDateHeight();
			},1000)
		},
		timetap(index,cell_index){
			var that = this
			if(that.timeCur[1].str != -1 || (cell_index < that.timeCur[0].str && index == that.timeCur[0].len) || (index < that.timeCur[0].len)){//选择开始
				that.timeCur[0].len = index
				that.timeCur[0].str = cell_index
				that.timeCur[1].len = index
				that.timeCur[1].str = -1
				that.Checkin = {
					start_M:that.timeData[that.timeCur[0].len].moon,
					start_D:that.timeData[that.timeCur[0].len].arr[that.timeCur[0].str].date,
					start_Z:that.timeData[that.timeCur[0].len].arr[that.timeCur[0].str].Z,
					end_M:'',
					end_D:'',
					end_Z:'',
					days:1,
				}
			}else{//选择结束
				var number = 0
				if(that.timeCur[0].len == index){
					number = cell_index - that.timeCur[0].str + 1
				}else{
					var time = index - that.timeCur[0].len;
					number += (that.timeData[that.timeCur[0].len].arr.length - that.timeCur[0].str)
					for(let i = that.timeCur[0].len + 1;i < index;i++){
						number += that.timeData[i].days
					}
					number += (cell_index - parseInt(that.timeData[index].Z)) + 1
				}
				if(number > 30){
					getApp().Tips('最多选择三十天')
				}else{
					that.timeCur[1].len = index
					that.timeCur[1].str = cell_index
					that.getCheckinDays(number)
				}
			}
		},
		// 入离日期
		getCheckinDays(D){
			var that = this
			that.Checkin = {
				start_Y:that.timeData[that.timeCur[0].len].year,
				start_M:that.timeData[that.timeCur[0].len].moon,
				start_D:that.timeData[that.timeCur[0].len].arr[that.timeCur[0].str].date,
				start_Z:that.timeData[that.timeCur[0].len].arr[that.timeCur[0].str].Z,
				end_Y:that.timeData[that.timeCur[1].len].year,
				end_M:that.timeData[that.timeCur[1].len].moon,
				end_D:that.timeData[that.timeCur[1].len].arr[that.timeCur[1].str].date,
				end_Z:that.timeData[that.timeCur[1].len].arr[that.timeCur[1].str].Z,
				days:D,
			}
		},
		btnConfirm(){
			if(this.Checkin.days < 2){
				return getApp().Tips('请选择离店时间~')
			}
			this.$emit('getHotelData', this.peopleArrCur,this.Checkin,this.timeCur);
		},
		getDateHeight(){
			var that = this
			var text = ''
			for(let i = 0;i < that.timeData.length;i++){
				text = '#Time_' + i
				uni.createSelectorQuery().in(that).select(text).boundingClientRect(function (res) {
					that.timeData[i].TimeHiehgt = res.height + (i == 0?0:that.timeData[i - 1].TimeHiehgt) - 5
				}).exec();
			}
		},
		getScrollTop(e){
			var i = this.scroll_index > 0?this.scroll_index - 1:0;
			for(i;i < this.timeData.length;i++){
				if(e.detail.scrollTop < this.timeData[i].TimeHiehgt){
					this.scroll_index = i;
					break;
				}
			}
		},
		showModal(target){
			this.$emit('showModal', target);
		},
		countTap(index,type){
			if(type == 1){
				this.peopleArrCur[index].num--
			}else{
				this.peopleArrCur[index].num++
			}
		},
		tabreser(type){
			var that = this
			if(that.type == type){
				that.type = 0
			}else{
				that.type = type
				if(type == 2){
					that.scroll_index = -1
					setTimeout(() => {
						that.scroll_index = 0
					},500)
				}
			}
		},
	},
}
</script>
<style>
/* 预定酒店 */
.reservation-index{height: 100vh;}
.dialog-title{position: relative !important;z-index: 0 !important;}
.reser-room{font-size: 26upx;display: flex;align-items: center;justify-content:space-between;color: #666;
height:53px;padding: 0 30upx;background: #fff;width: 100%;float: left;}
.reser-room>view:nth-child(2){display: flex;align-items:center;}
.reser-room>view:nth-child(2)>view{margin-left: 20upx;}
.reser-room>view:nth-child(2)>.cuIcon-unfold{color: #000;}
.reser-cur{box-shadow: inset 0rpx 3rpx 6rpx 1rpx rgba(0,0,0,0.16);}
.reser-room-cur{color: #FC9C39;}
.reser-room-list{width: 100%;float: left;padding: 0 30upx;transition: height 0.3s;background: #fff;height: 200px;overflow: hidden;}
.reser-room-list>view{width: 100%;float: left;height:50px;display:flex;align-items:center;
justify-content:space-between;font-size: 26upx;color: #666;}
.room-list-count{display: flex;align-items: center;}
.room-list-icon{display: flex;align-items: center;justify-content: center;width: 38upx;height: 38upx;border-radius: 50%;color: #fff;
background-color: #FF9800;}
.list-icon-cur{background-color: #939393 !important;}
.room-list-count>view:nth-child(2){margin: 0 10upx;min-width: 34upx;}
.cuIcon-unfold{transform:rotate(0deg);transition: all 0.3s;margin-left: 6upx !important;}
.reser-rotate{transform:rotate(-90deg);}
.reser-room-ing{background-color: #FAFAFA;border-radius: 20upx;padding: 0 20upx;height: 40upx;line-height: 40upx;font-size: 20upx;color: #666;}
/* 日期 */
.reser-money{margin-top: 10px;}
.reser-time{width: 100%;height:calc(100vh - 116px - var(--CustomBar--)) ;background-color: #fff;float: left;transition: height 0.3s;overflow: hidden;}
.reser-time>view{width: 100%;float: left;}
.reser-time>view:nth-child(1){background: #FFE3C6;color: #5F5F5F;height: 31px;display: flex;align-items: center;justify-content: center;}
.reser-data{width: calc(100% - 60upx) !important;float: left;height: 50px;display: flex;align-items: center;font-size: 24upx;
color: #5F5F5F;margin: 0 30upx;}
.reser-data>view{width: calc((100% - 60upx) / 7);margin-left: 10upx;}
.reser-data>view:nth-child(1){margin-left: 0;}
.reser-list{width: 100%;float: left;background: #fff;height:calc(100vh - 197px - var(--CustomBar--));}
.list-time{width: 100%;float: left;position: relative;}
.list-time>view:nth-child(1){padding-bottom:20upx;font-size: 30upx;color: #FC9C39;height: 31px;
width: calc(100% - 56upx);margin: 0 28upx;}
.list-time>view:nth-child(1)>view{height: 31px;border-bottom: 1px solid #F2F4F9;background: #fff;z-index: 1;}
.reser-fixed{position: fixed;top: calc(197px + var(--CustomBar--));width: calc(100% - 56upx);}
.list-time>view:nth-child(2){width: 100%;padding: 20upx 30upx 30upx;float: left;}
.list-date{width: calc((100% - 30px) / 7);height: 58px;border-radius: 10upx;float: left;display: flex;align-items: center;justify-content: center;
margin-left: 5px;margin-top: 5px;}
.list-date{font-size: 30upx;color: #252525;} 
.list-time>view:nth-child(2)>view:nth-child(7n+1){margin-left: 0 !important;}
.list-cur-one{background-color: #F8C691;}
.list-cur-two{background-color: #FC9C39;}
.list-cur-two>view>view:nth-child(1){color: #252525 !important;}
.reser-cur-font{font-size: 24upx;color: #FFFFFF;}
.reser-hui{color: #AAAAAA;}
.reser-chen{color: #FC9C39;}
</style>

需要引入的.vue

<template>
<view>
	<view @click="page_showModal('reservation',1)">打开房租</view>
	<view @click="page_showModal('reservation',2)">打开日历</view>
	<page-reservation v-if="page_modalName" :modalName="page_modalName" :ReserVation="ReserVation" @showModal="page_showModal"
	@getHotelData="getHotelData"></page-reservation>
</view>
</template>
<script>
import PageReservation from '@/colorui/components/page-reservation.vue'
export default {
	components:{ PageReservation },
	data() {
		return {
			page_modalName:'',
			ReserVation:uni.getStorageSync('ReserVation'),//入住人数日期
		}
	},
	methods: {
		// 修改入住信息
		getHotelData(peopleArr,InCheckin,IntimeCur){
			this.ReserVation.peopleArr = peopleArr
			this.ReserVation.InCheckin = InCheckin
			this.ReserVation.IntimeCur = IntimeCur
			uni.setStorage({key:"ReserVation",data:this.ReserVation})
			this.page_showModal('')
		},
		// 入住信息弹窗
		page_showModal(target,type){
			var that = this
			if(type){
				that.ReserVation.reservType = type
			}
			that.page_modalName = '1'
			setTimeout(() => {
				that.page_modalName = target
			},target?100:500)
		},
	},
</script>

默认选择当天和明天
入住一次性最多选择三十天
默认获取三个月日期数组

存储信息
InCheckin 选择的日期信息
IntimeCur 组件选择的日期
peopleArr 入住人数信息
timeDataArr 显示的日历

引入的组件库ColorUI组件库

用的是uni-app

遇到问题可以看我主页加我Q,很少看博客,对你有帮助别忘记点赞收藏。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1608945.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

外包干了6天,技术明显退步。。。

我是一名大专生&#xff0c;自19年通过校招进入湖南某软件公司以来&#xff0c;便扎根于功能测试岗位&#xff0c;一晃便是近四年的光阴。今年3月&#xff0c;我如梦初醒&#xff0c;意识到长时间待在舒适的环境中&#xff0c;已让我变得不思进取&#xff0c;技术停滞不前。更令…

Windows:web端UI自动化=python+selenium+pycharm框架

本篇写怎么写一个UI自动化代码。mac和Windows是一样的 都是这样写 不过&#xff0c;习惯用Windows了 如果python没有安装可以看我另一篇安装python的教程 先安装python先 下载完python 下载pip 1 安装pip $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 下载…

k8s配置configmap指定到容器的指定文件

我们需要将名称为walletkey.properties的文件做成configmap&#xff0c;然后将walletkey.properties文件单独挂载出来到/data/walletkey.properties&#xff0c;且不能覆盖/data目录&#xff0c;具体如下 1、创建configmap configmap文件内容 其中walletkey.properties: >-引…

统一SQL-支持CHAR和VARCHAR2 (size BYTE|CHAR)转换

统一SQL介绍 https://www.light-pg.com/docs/LTSQL/current/index.html 源和目标 源数据库&#xff1a;Oracle 目标数据库&#xff1a;Postgresql&#xff0c;TDSQL-MySQL&#xff0c;达梦8&#xff0c;LightDB-Oracle 操作目标 在Oracle中的CHAR和VARCHAR2数据类型&…

【STM32HAL库】外部中断

目录 一、中断简介 二、NVIC 1.寄存器 2.工作原理 3.优先级 4.使用NVIC 三、EXTI 1.简介 2.AFIO&#xff1a;复用功能IO&#xff0c;主要用于重映射和外部中断映射配置​编辑 3. 中断使用 4.HAL库配置使用 一、中断简介 中断的意义&#xff1a;高效处理紧急程序&#xff0c;不会…

小程序 前端如何用wx.request获取 access_token接口调用凭据

在微信小程序中&#xff0c;获取access_token通常是通过wx.request方法来实现的。以下是一个简单的示例代码&#xff1a; 1.获取小程序的appID 与 secret&#xff08;小程序密钥&#xff09; 登录之后,请点击左侧的"开发管理">点击"开发设置" 就可以找…

【AI开发:音频】一、GPT-SoVITS整合工具包的部署问题解决(GPU版)

前言 目前GPT-SoVITS的合成效果比较不错&#xff0c;相比较其他厂商的产品要规整的多。众多厂家中也是国内使用最多的一款了&#xff0c;并且这个整合包里携带了&#xff0c;除背景音、切割、训练、微调、合成、低成本合成等一些列完整的工具&#xff0c;也可以作为API进行使用…

C++ | Leetcode C++题解之第38题外观数列

题目&#xff1a; 题解&#xff1a; class Solution { public:string countAndSay(int n) {string prev "1";for (int i 2; i < n; i) {string curr "";int start 0;int pos 0;while (pos < prev.size()) {while (pos < prev.size() &&…

iOS -- 工厂设计模式

iOS -- 工厂设计模式 设计模式概念设计模式七大准则简单工厂模式优点缺点主要作用示例 工厂方法模式优点缺点主要作用&#xff1a; 抽象工厂方法缺点主要作用&#xff1a;文件分类 设计模式概念 所谓设计模式&#xff08;Design pattern&#xff09; 是解决软件开发某些特定问…

深入理解JAVA垃圾收集器CMS,G1工作流程原理 GC流程图 什么社会触发Minor GC?触发MinorGC过程。Full GC 过程。

java CMS&#xff0c;G1垃圾收集器工作流程原理浅析 JVM内存空间基础知识点&#xff08;基于JDk1.8&#xff09; 1.方法区&#xff1a;逻辑概念&#xff0c;元空间&#xff0c;方法区主要用于存储类的信息、常量池、方法数据、方法代码等。方法区逻辑上属于堆的一部分&#xf…

UE4_动画基础_根运动Root Motion

学习笔记&#xff0c;仅供参考&#xff01; 在游戏动画中&#xff0c;角色的碰撞胶囊体&#xff08;或其他形状&#xff09;通常由控制器驱动通过场景。然后来自该胶囊体的数据用于驱动动画。例如&#xff0c;如果胶囊体在向前移动&#xff0c;系统就会知道在角色上播放一个跑步…

C#语法知识之循环语句

5、循环语句 文章目录 1、while思考1 斐波那契数列思考2 判断一个数是否为质数思考3 找出100以内的质数 2、do...while3、for思考1 找水仙花数思考2 乘法表 1、while 1、作用 让代码重复去执行 2、语法相关 while(bool类型值){//当满足条件时&#xff0c;就会执行while语句…

深度学习每周学习总结P5(运动鞋识别)

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 | 接辅导、项目定制 –来自百度网盘超级会员V5的分享 目录 0. 总结1. 数据导入及处理部分2. 加载数据集3.模型构建部分3.1 模型构建3.2 公式推导 4. 设置超参…

深度强化学习开端——DQN算法求解车杆游戏

深度强化学习开端——DQN算法求解车杆游戏 DQN&#xff0c;即深度Q网络&#xff08;Deep Q-Network&#xff09;&#xff0c;是一种结合了深度学习和强化学习的算法&#xff0c;其主要用于解决序列决策问题&#xff0c;并且在许多复杂的决策任务中展现出了显著的效果。DQN算法…

C++:map和set的使用

一、关联式容器介绍 在学习map和set之前&#xff0c;我们接触到的容器有&#xff1a;vector、list、stack、queue、priority_queue、array&#xff0c;这些容器统称为序列式容器&#xff0c;因为其底层为线性序列的数据结构&#xff0c;里面存储的是元素本身。 关联式容器也是用…

【JavaEE多线程】线程中断 interrupt()

系列文章目录 &#x1f308;座右铭&#x1f308;&#xff1a;人的一生这么长、你凭什么用短短的几年去衡量自己的一生&#xff01; &#x1f495;个人主页:清灵白羽 漾情天殇_计算机底层原理,深度解析C,自顶向下看Java-CSDN博客 ❤️相关文章❤️&#xff1a;清灵白羽 漾情天…

用FRP配置toml文件搭建内网穿透

需求场景 1、一台外网可访问的有固定ip的云服务器&#xff0c;Ubuntu系统 2、一台外网无法访问的无固定ip的本地家用电脑&#xff0c;Ubuntu系统 需求&#xff1a;将云服务器搭建为一台内网穿透服务器&#xff0c;实现通过外网访问家用电脑&#xff08;网页&#xff09;的功能。…

Unity 中(提示框Tweet)

using UnityEngine; using UnityEngine.UI; using DG.Tweening; using System; public class Message : MonoBehaviour {public float dropDuration 0.5f; // 掉落持续时间public float persisterDuration 1f; // 持续显示时间public float dorpHeight;public static Message…

AWS账号注册以及Claude 3 模型使用教程!

哈喽哈喽大家好呀&#xff0c;伙伴们&#xff01;你听说了吗&#xff1f;最近AWS托管了大热模型&#xff1a;Claude 3 Opus&#xff01;想要一探究竟吗&#xff1f;那就赶紧来注册AWS账号吧&#xff01;别担心&#xff0c;现在注册还免费呢&#xff01;而且在AWS上还有更多的大…

macos知名的清理软件 cleanmymac和腾讯柠檬哪个好 cleanmymacx有必要买吗

MacOS是一款优秀的操作系统&#xff0c;但是随着使用时间的增加&#xff0c;它也会产生一些不必要的垃圾文件&#xff0c;占用磁盘空间和内存资源&#xff0c;影响系统的性能和稳定性。为了保持MacOS的清洁和高效&#xff0c;我们需要使用一些专业的清理软件来定期扫描和清除这…