index.vue 3.1 KB
<template>
	<view class="PaymentMethodPop">
		<u-popup :show="show" bgColor="transparent" mode="bottom">
			<view class="PaymentMethodPop-c">
				<view class="PaymentMethodPop-c-1">选择支付方式</view>
				<view class="PaymentMethodPop-c-2">
					<u-radio-group v-model="value" placement="column">
						<view class="PaymentMethodPop-c-2-i">
							<view class="PaymentMethodPop-c-2-i-l">
								<image class="PaymentMethodPop-c-2-i-l-i" src="@/static/imagesV2/icon53.png" mode="widthFix"></image>
								<text class="PaymentMethodPop-c-2-i-l-r">微信支付</text>
							</view>
							<view class="PaymentMethodPop-c-2-i-r">
								<u-radio :name="PAYMENTTYPE.WECHAT"></u-radio>
							</view>
						</view>
						<view class="PaymentMethodPop-c-2-i">
							<view class="PaymentMethodPop-c-2-i-l">
								<image class="PaymentMethodPop-c-2-i-l-i" src="@/static/imagesV2/icon54.png" mode="widthFix"></image>
								<text class="PaymentMethodPop-c-2-i-l-r">支付宝支付</text>
							</view>
							<view class="PaymentMethodPop-c-2-i-r">
								<u-radio :name="PAYMENTTYPE.ALIPAY"></u-radio>
							</view>
						</view>
					</u-radio-group>
				</view>
				<view class="PaymentMethodPop-c-3">
					<view class="PaymentMethodPop-c-3-l" @click="cancel">
						取消
					</view>
					<view class="PaymentMethodPop-c-3-r" @click="confirm">
						确定
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	import { PAYMENTTYPE } from "@/emit/index.js"
	export default {
		name: 'PaymentMethodPop',
		data() {
			return {
				PAYMENTTYPE,
				value: PAYMENTTYPE.WECHAT,
				show: false
			}
		},
		methods: {
			open() {
				this.show = true
			},
			cancel() {
				this.show = false
				this.$emit('cancel')
			},
			confirm() {
				this.show = false
				this.$emit('confirm')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.PaymentMethodPop-c{
		padding-bottom: calc(env(safe-area-inset-bottom));
		border-radius: 20rpx 20rpx 0 0;
		background-color: #fff;
		.PaymentMethodPop-c-1{
			padding-top: 60rpx;
			font-size: 34rpx;
			color: #0A0A0A;
			text-align: center;
			font-weight: bold;
		}
		.PaymentMethodPop-c-2{
			margin-top: 100rpx;
			padding: 0 40rpx;
			&:last-child{
				border-bottom: none;
			}
			.PaymentMethodPop-c-2-i{
				display: flex;
				justify-content: space-between;
				align-items: center;
				border-bottom: 1rpx #E6E6E6 solid;
				height: 110rpx;
				.PaymentMethodPop-c-2-i-l{
					display: flex;
					align-items: center;
					.PaymentMethodPop-c-2-i-l-i{
						height: 50rpx;
						width: 50rpx;
					}
					.PaymentMethodPop-c-2-i-l-r{
						font-size: 28rpx;
						color: #151E31;
						margin-left: 17rpx;
					}
				}
			}
		}
		.PaymentMethodPop-c-3{
			display: flex;
			justify-content: space-between;
			padding: 0 45rpx;
			margin-top: 80rpx;
			.PaymentMethodPop-c-3-l{
				height: 78rpx;
				border-radius: 200rpx;
				width: 312rpx;
				text-align: center;
				line-height: 78rpx;
				background-color: #EBEBEB;
			}
			.PaymentMethodPop-c-3-r{
				height: 78rpx;
				border-radius: 200rpx;
				width: 312rpx;
				text-align: center;
				line-height: 78rpx;
				background-color: #2D81FF;
				color: #FFFFFF;
			}
		}
	}
</style>