<template>
  <view class="page">
    <u-navbar class="u-navbar" title="电子合同" placeholder @leftClick="leftClick" leftIconColor="#fff"  bgColor="#00337A"  :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
	<view class="file-box">
		
	</view>
	
	<view class="bottom-box">
		<view class="btn1" @click="chooseVideo()">重新录制</view>
		<view class="btn2" @click="contractPdf">下一步</view>
	</view>
  </view>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  onLoad() {
    console.log('🚀 ~ mounted ~ mounted-index:')  
  },
  onShow() {
  },
  methods: {
	
	chooseVideo(){
		uni.chooseVideo({
			count: 1,
			sourceType: ['camera'],
			maxDuration: 60, // 最大视频录制时长（秒）
			success: function (res) {
				    console.log('选择视频成功，返回的参数：', res);
				    // 可以使用 res.tempFilePath 获取视频的本地路径
			},
			fail: function (err) {
				    console.error('选择视频失败：', err);
			}
		});
	},
	contractPdf(){
		uni.navigateTo({
			url: `/pages/realName/workbench/electronicContract/contractPdf`
		})
	},
    // 返回
    leftClick() {
      console.log('返回')
      uni.navigateBack({
      	delta: 1 // 返回
      });
    }
  },

}
</script>

<style lang="scss">
.page {
	width: 100vw;
	height: 100vh;
	background-color: #f8f8f8;
	box-sizing: border-box;
	position: relative;
	.file-box{
		width: 100%;
		height: 60vh;
		// overflow-y: auto;
	}
	.bottom-box{
		width: 90%;
		margin: 0 auto;
		height: 120rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.btn1{
			width: 40%;
			height: 80rpx;
			display: flex;
			align-items: center;justify-content: center;
			color: #FFF;
			background: #00337A;
			border-radius: 10rpx;
		}
		.btn2{
			width: 40%;
			height: 80rpx;
			display: flex;
			align-items: center;justify-content: center;
			color: #FFF;
			background: #00337A;
			border-radius: 10rpx;
		}
	}
}
</style>
