payType.vue 2.6 KB
<template>
	<view class="payWrap">
		<view class="pay">
			<view class="payTitle">
				付款
				<image @click="closePayAlert" src="../static/image/close.png" mode=""></image>
			</view>
			<view class="payNum">
				¥{{price}}
			</view>
			<view class="payTypeList">
				<radio-group @change="radioChange">
					<view class="payTypeItem">
						<view class="payTypeLeft">
							<image src="../static/image/wxpay.png" mode=""></image>
							微信支付
						</view>
						<radio color="#35655f" value="wechat" checked/>
					</view>
					<view class="payTypeItem">
						<view class="payTypeLeft">
							<image src="../static/image/zfbpay.png" mode=""></image>
							支付宝支付
						</view>
						<radio color="#35655f"  value="alipay"/>
					</view>
				</radio-group>
			</view>
		</view>
		<view class="bottomBtnWrap">
			<view class="bottomBtn" @click="pay">
				付款
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			price:{
				type:Number
			}
		},
		methods:{
			radioChange(e){
				this.$emit('changePayType',e.target.value)
			},
			closePayAlert(){
				this.$emit('closePayAlert')
			},
			pay(){
				this.$emit('pay')
			}
		}
	}
</script>

<style lang="scss" scoped>
	// 游侠付款弹框
	.payWrap{
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		background: rgba(0,0,0,0.5);
		z-index: 1;
		display: flex;
		align-items: flex-end;
		.pay{
			width: 750rpx;
			height: 800rpx;
			background: #fff;
			border-radius: 40rpx 40rpx 0 0;
			.payTitle{
				position: relative;
				height: 100rpx;
				text-align: center;
				line-height: 100rpx;
				font-size: 32rpx;
				image{width: 44rpx;height: 44rpx;position: absolute;top: 24rpx;right: 32rpx;}
			}
			.payNum{
				padding-top: 60rpx;
				font-size: 48rpx;
				text-align: center;
			}
			.payTypeList{
				padding: 0 32rpx;
				.payTypeItem{
					display: flex;
					justify-content: space-between;
					align-items: center;
					height: 88rpx;
					.payTypeLeft{
						display: flex;
						align-items: center;
						font-size: 28rpx;
						image{width: 48rpx;height: 48rpx;margin-right: 20rpx;}
					}
					radio{transform: scale(0.7);}
				}
			}
		}
		// 底部按钮区域
		.bottomBtnWrap{
			position: fixed;
			bottom: 0;
			width: 750rpx;
			height: 100rpx;
			background: #fff;
			display: flex;
			justify-content: center;
			align-items: center;
			box-shadow: 0rpx -14rpx 44rpx 0rpx rgba(85,123,218,0.08); 
			.bottomBtn{
				width: 696rpx;
				height: 80rpx;
				background: #35655f;
				border-radius: 40rpx;
				text-align: center;
				line-height: 80rpx;
				font-size: 28rpx;
				color: #fff;
			}
		}
	}
</style>