<template>
	<view class="">
		<view class="submit_opar">
			<view class="price">
				<text>￥</text>
				<text>{{ heji }}</text>
			</view>
			<view class="right">
				<!-- <u-button type="primary" @click="goPayResult">提交订单</u-button> -->
				<view class="buyBtn" @click="goPayResult">
					提交订单
				</view>
			</view>
		</view>
		<view class="siteBar"></view>
	</view>
</template>

<script>
export default {
	props: {
		data: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	computed:{
		heji(){
			let a = Number(this.data.countPrice) + Number(this.data.freight) - Number(this.data.discount);
			return parseFloat(a).toFixed(2)
		}
	},
	methods: {
		goPayResult() {
			this.$emit('submitOrder')
		}
	}
};
</script>

<style lang="scss" scoped>
	.siteBar{
		height: 100rpx;
		// padding-bottom: constant(safe-area-inset-bottom);
		// padding-bottom: env(safe-area-inset-bottom);
		// box-sizing: content-box;
		@extend .safeAreaPad;
	}
.submit_opar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: $app-theme-bg-color;
	height: 100rpx;
	box-shadow: $app-theme-shadow;
	// padding-bottom: constant(safe-area-inset-bottom);
	// padding-bottom: env(safe-area-inset-bottom);
	// box-sizing: content-box;
	
	@extend .safeAreaPad;
	z-index: $app-zIndex-fixed;
	
	display: flex;
	justify-content: space-between;
	align-items: center;
	
	.price {
		padding-left: 30rpx;
		text:nth-child(1) {
			font-size: 24rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: $app-theme-text-money-color;
		}
		text:nth-child(2) {
			font-size: 36rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: $app-theme-text-money-color;
		}
	}
	.right {
		display: flex;
		align-items: center;
		
	}
	
}
</style>
