<template>
	<view class="content">
		<view class="acountbox">
			<view class="inacount">
				<text class="acoutitle">承兑人名称</text>
				<input type="text" v-model="form.name" class="checkword" placeholder="请输入承兑人名称"
					placeholder-style="font-size:30rpx;color:#68625B" />
			</view>
			<view class="inacount">
				<text class="acoutitle">账号</text>
				<input type="text" v-model="form.bankAccount" class="checkword" placeholder="请输入承兑账号"
					placeholder-style="font-size:30rpx;color:#68625B" />
			</view>
			<view class="inacount">
				<text class="acoutitle">服务费率	</text>
				<input type="digit" v-model="form.serviceRate" class="checkword" placeholder="请输入服务费率"
					placeholder-style="font-size:30rpx;color:#68625B" />
			</view>
			<view class="inacount">
				<text class="acoutitle">利率</text>
				<input type="digit" v-model="form.interest"  class="checkword" placeholder="请输入利率"
					placeholder-style="font-size:30rpx;color:#68625B" />
			</view>
			<view class="inacount">
				<text class="acoutitle">开户行名称</text>
				<input type="text" v-model="form.bankName"  class="checkword" placeholder="请输入承兑人开户行名称"
					placeholder-style="font-size:30rpx;color:#68625B" />
			</view>
		</view>
		<view class="logininbtn" @click="makeNewAcept">
			<text>确认</text>
		</view>
	</view>
</template>

<script>
	let that
	export default {
		data() {
			return {
				form: {
					name: '',
					bankAccount:'',
					serviceRate:'',
					interest:'',
					bankName:''
				},
				
			}
		},
		onLoad() {
			that=this
		},
		methods: {
			makeNewAcept(){
				
				if(that.form.name.length==0){
					that.$toast("请输入承兑人名称")
					return
				}
				if(that.form.bankAccount.length==0){
					that.$toast("请输入账号")
					return
				}
				if(that.form.serviceRate.length==0){
					that.$toast("请输入服务费率")
					return
				}
				if(that.form.interest.length==0){
					that.$toast("请输入利率")
					return
				}
				if(that.form.bankName.length==0){
					that.$toast("请输入开户行名称")
					return
				}
				uni.showLoading()
				uni.$u.http.post('/api/Acceptor',that.form,{
					custom: {
						auth: true
					}
				}).then((res) => {
					uni.hideLoading()
					that.$toast("提交成功")
					
				}).catch((err) => {
					uni.hideLoading()
					that.$toast(err.msg)
				})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	/* uni.scss */
	@import 'uview-ui/theme.scss';

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

	}

	.loginbg {
		background-image: url("https://t39.9026.com/web/uploads/thumbs/mall10000/20220629/e01b927c95ee1f05364f5e456f281388.png");
		height: 559rpx;
		width: 750rpx;
		background-size: 100% 100%;

		// display: flex;
		// align-items: center;
		// justify-content: center;
	}

	.logo {
		margin: 0 auto;
		height: 200rpx;
		width: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.logobox {
		margin: 0 auto;
		margin-top: 212rpx;
		width: 269rpx;
		height: 191rpx;
		// background-color: #F1F1F1;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.checkbox {}

	.business {
		width: 305rpx;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		// background-color: #D8AB5A;
		border-raotherdius: 20rpx;
		color: #FFFFFF;
		margin-top: 57rpx;
	}

	.bnesper {
		background-size: 100%;
		background-image: url("@/static/img/loginbtn4.png");
		padding-top: 10rpx;
		color: #FFF1D8;
		line-height: 90rpx;
	}

	.applyper {
		background-image: url("@/static/img/loginbt1.png");
		background-size: 100%;
		padding-top: 10rpx;
		color: #FFF1D8;
	}

	.actapp {
		background-image: url("@/static/img/loginbtn3.png");
		background-size: 100%;
		color: #D05C39;
	}

	.actbnes {
		background-image: url("@/static/img/loginbt2.png");
		background-size: 100%;
		color: #D05C39;
	}

	.acountbox {
		.inacount {
			display: flex;
			padding: 35rpx 20rpx;
			box-sizing: border-box;
			width: 690rpx;
			margin-top: 40rpx;
			background-color: #F6F6F6;
			border-radius: 20rpx;
			font-size: 30rpx;
			color: #1F242A;

			input {
				width: 360rpx;
			}
		}

		.acoutitle {
			font-weight: 600;
		}

		.checkword {
			padding-left: 20rpx;
			color: #1F242A;
			font-size: 30rpx;
		}
	}

	.otherbt {
		width: 606rpx;
		display: flex;
		justify-content: space-between;
		font-size: 24rpx;
		padding-top: 30rpx;
	}

	.regbt {
		color: $uni-all-theme;
	}

	.logininbtn {
		margin-top: 80rpx;
		width:690rpx;
		border-radius: 43rpx;
		background: linear-gradient(to right, #FFE1AD,#D8AB5A);
		height: 100rpx;
		text-align: center;
		color: #fff;
		line-height: 100rpx;
	}


	
</style>
