<template>
	<view class="main-between income" style="margin-top: 29rpx;">
		<view class="item" @click="goPage('/pages/sale/mySaleOrder')">
			<view class="title">订单总额(元)</view>
			<view class="main-between cross-center">
				<view class="num">{{(userInfo.salesperson_info.order_total_amount).toFixed(2)}}</view>
				<image style="width: 12rpx;height: 21rpx;" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png"
					mode=""></image>
			</view>
		</view>
		<view class="line"></view>
		<view class="item" @click="$jump({'open_type':'navigate','url':'/pages/sale/myCommission'})">
			<view class="title">我的提成(元)</view>
			<view class="main-between cross-center">
				<view class="num">{{(userInfo.salesperson_info.order_total_commission).toFixed(2)}}</view>
				<image style="width: 12rpx;height: 21rpx;" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png"
					mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapGetters
	} from 'vuex';
	export default{
		computed:{
			...mapGetters({
				userInfo: 'user/info',
			}),
		},
		methods:{
			goPage(url){
				uni.navigateTo({
					url:url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.income {
		width: 100%;
		height: 200rpx;
		padding: 38rpx 45rpx;
		background-color: #fff;

		.item {
			width: 284rpx;
			.title {
				font-size: 26rpx;
				font-weight: 500;
				color: #666666;
			}

			.num {
				font-size: 50rpx;
				font-family: JDZhengHT;
				font-weight: 400;
				color: #222222;
			}
		}

		.line {
			width: 1px;
			height: 98rpx;
			background-color: #C8C8C8;
			opacity: 0.5;
		}
	}
</style>
