<template>
	<view :class="[AppTheme]" class="all_box container">

		<view class="user-section bg-primary">
			<view class="user-info-box">
				<!-- <view class="portrait-box">
					<image class="portrait" :src="user.farm_logo">
					</image>
				</view>
				<view class="info-box">
					<view style="text-align: left;">
						<text class="username">{{ user.farm_name ?user.farm_name:'暂无昵称' }}</text>
					</view>
				</view> -->
			</view>
			<view class="mass_a">
				<view class="mass_a_1">今日付款金额(元)</view>
				<view class="mass_a_2">{{user.todaypayprice||0}}</view>
			</view>
			<view class="fram_oper_1">
				<view class="fram_oper_2">
					<view class="views1">访客数</view>
					<view class="views11">1</view>
					<view class="views1">付款订单数</view>
					<view class="views11">1</view>
					<view class="views1">商品数</view>
				</view>
				<view class="fram_oper_2">
					<view class="views1">{{user.page_view||0}}</view>
					<view class="views1">{{user.paycount||0}}</view>
					<view class="views1">{{user.ordercount||0}}</view>
				</view>
			</view>

		</view>
		<!-- <view class="order-section2"> -->
		<view class="wrap">
			<view @click="scancode()" class="inner">
				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/shop.png'" mode="">
				</image>
				<text class="">店铺管理</text>
			</view>
			<view @click="inspection()" class="inner">
				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/goods.png'" mode="">
				</image>
				<text class="">商品管理</text>
			</view>
			<view @click="operators()" class="inner">

				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/order.png'" mode="">
				</image>
				<text class="">订单管理</text>
			</view>
			<view @click="financeoperator()" class="inner">

				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/statistics.png'" mode="">
				</image>
				<text class="">数据统计</text>
			</view>
			<view @click="zichang()" class="inner">

				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/money.png'" mode="">
				</image>
				<text class="">资产</text>
			</view>
			<view @click="baozhengjin()" class="inner">

				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/bond.png'" mode="">
				</image>
				<text class="">保证金</text>
			</view>
			<!-- #ifdef MP-WEIXIN -->
			<view @click="erweima()" class="inner">

				<image class="yticon" :src="settingFile.root_img+'/static/app/imgs/shop/qrcode.png'" mode="">
				</image>
				<text class="">店铺二维码</text>
			</view>
			<!-- #endif -->
		</view>
		<!-- </view> -->

		<view style="height: 120rpx;"></view>
	</view>
</template>
<script>
	import mineApi from '@/api/home/index.js';
	export default {
		data() {
			return {
				primary: this.$theme.primary,
				background: {
					backgroundColor: '#001f3f',
				},
				iflogin: '',
				coverTransform: 'translateY(0px)',
				coverTransition: '0s',
				moving: false,
				shuju: '',
				vipid: '',
				user: '',
				goodslikecount: 0,
				modular: [],
				headimgurl: '',
				settingFile: this.$siteinfo,
				sharedata: null,
				operator: []
			};
		},
		onLoad() {
			this.getInitInfo()
		},


		methods: {

			//数据统计
			financeoperator() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/count?id=` + this.user.farm_id
				});
			},

			//资产
			zichang() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/property?id=` + this.user.farm_id
				});
			},
			//订单管理
			operators() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/orderlist?id=` + this.user.farm_id
				});
			},
			//店铺管理
			scancode() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/storemanagement`
				});
			},
			//商品管理
			inspection() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/shoplist?id=` + this.user.farm_id
				});
			},
 
			//二维码
             erweima(){
				 uni.navigateTo({
				 	url: `/pagesC/pages/merchantdetails/qrcode?id=` + this.user.farm_id
				 });
				
			 },
 
			baozhengjin() {
				uni.navigateTo({
					url: `/pagesC/pages/merchantdetails/bond`
				});
			},


 

			getInitInfo() {
				mineApi.merchantindex({}).then(res => {
					if (res.status == 1) {
						this.user = res.data;
						console.log(this.user, 'this.user')
					}
				});
			},


		}
	};
</script>
<style lang="scss">
	.all_box {
		min-height: calc(100vh);
		background-color: #fff;
	}

	.btn1 {
		width: 200rpx;
		height: 140rpx;
		margin-top: 20rpx;
		background-color: #f5f5f5;
		color: #999999;
		border-radius: 10rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;
	}

	.btnImg {
		width: 60rpx;
		height: 50rpx;
	}

	.btn1::after {
		border: 0;
	}

	page {
		background-color: #fff;
	}

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

	%section {
		display: flex;
		justify-content: space-around;
		align-content: center;
		background: #fff;
		border-radius: 10upx;
	}

	%sectio {
		display: flex;
		justify-content: space-around;
		align-content: center;
		background: #fff;
		border-radius: 10upx 10upx 0 0;
	}

	.user-section {
		height: 350rpx;
		padding: 0upx 20rpx;

		.bg {
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			filter: blur(1px);
			opacity: 0.7;
		}
	}

	.user-info-box {
		display: flex;
		text-align: center;
		align-items: center;
		// position: relative;
		padding: 25rpx 0;
		// z-index: 1;



		.portrait {
			width: 90upx;
			height: 90upx;
			border-radius: 50%;
			display: inline-block;
		}

		.info-box {
			margin-left: 20rpx;
			justify-items: center;
			width: 250rpx;

			.username {
				display: inline-block;
				font-size: 30rpx;
				color: #ffffff;
				margin-top: 20upx;
			}

			.username2 {
				display: inline-block;
				font-size: 28rpx;
				color: #f1f1f1;
				margin-top: 20upx;
			}

			.user-mask {
				// margin-top: 15upx;
				justify-content: start;
				text-align: left;
				color: #ffffff;
				font-size: 28rpx;
			}
		}

	}

	.tj-sction {
		// @extend %section;
		background: #fff;
		width: 100%;
		// margin: 0 30upx;
		border-radius: 10rpx;
		// z-index: 99;
		margin: auto;
		// margin-top: -5rpx;
		// position: relative;

		.top_box {
			padding: 20rpx;
			color: #75787d;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.left {
				width: 70%;

				text {
					font-size: 32rpx;
					padding-left: 20rpx;
				}
			}

			.right {
				color: #fff;
				font-size: 26rpx;
				padding: 15rpx 20rpx;
				border-radius: 40rpx;
				margin-right: 20rpx;
				margin-top: 30rpx;
			}
		}

		.bottom_box {
			display: flex;
			justify-content: space-around;
			align-items: center;

			.tj-item {
				@extend %flex-center;
				flex-direction: column;
				height: 140upx;
				font-size: $font-sm;
				color: #75787d;
			}
		}

		.num {
			font-size: $font-lg;
			color: $font-color-dark;
			margin-bottom: 8upx;
		}
	}

	.vip-card-box {
		display: flex;
		flex-direction: column;
		color: #f7d680;
		height: 240upx;
		background: linear-gradient(left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
		border-radius: 16upx 16upx 0 0;
		overflow: hidden;
		position: relative;
		padding: 20upx 24upx;

		.card-bg {
			position: absolute;
			top: 20upx;
			right: 0;
			width: 380upx;
			height: 260upx;
		}

		.b-btn {
			position: absolute;
			right: 20upx;
			top: 16upx;
			width: 132upx;
			height: 40upx;
			text-align: center;
			line-height: 40upx;
			font-size: 22upx;
			color: #36343c;
			border-radius: 20px;
			background: linear-gradient(left, #f9e6af, #ffd465);
			z-index: 1;
		}

		.tit {
			font-size: $font-base + 2upx;
			color: #f7d680;
			margin-bottom: 28upx;

			.yticon {
				color: #f6e5a3;
				margin-right: 16upx;
			}
		}

		.e-b {
			font-size: $font-sm;
			color: #d8cba9;
			margin-top: 10upx;
		}
	}

	.cover-container {
		background: $page-color-base;
		/* #ifdef H5 */
		margin-top: 70rpx;
		/* #endif */
		/* #ifndef H5 */
		margin-top: 50rpx;
		/* #endif */
		padding: 20rpx;
		position: relative;
		background: #f5f5f5;
		padding-bottom: 20upx;

		.arc {
			width: 100%;
			height: 36upx;
		}
	}


	.order-section.order-section1 {
		margin-top: 0;
		border-radius: 0 0 10upx;
	}

	.order-section {
		@extend %sectio;
		padding: 28upx 0;
		// margin-top: 20upx;
		border-radius: 10rpx;

		.order-item {
			@extend %flex-center;
			width: 120upx;
			height: 120upx;
			border-radius: 10upx;
			font-size: $font-sm;
			color: $font-color-dark;
		}

		.yticon {
			// width: 52rpx;
			// height: 52rpx;
			/* font-size: 48upx; */
			margin-bottom: 18upx;
			color: #fa436a;
		}

		.icon-shouhoutuikuan {
			font-size: 44upx;
		}
	}

	.wrap {
		padding: 60rpx 0 0 0;
		width: 100%;

		.inner {
			display: inline-block;
			margin-bottom: 60rpx;
			width: 33%;
			text-align: center;

			text {
				display: block;
				text-align: center;
				font-size: 24rpx;
				color: $font-color-dark;
			}

			.yticon {
				width: 65rpx;
				height: 65rpx;
				margin-bottom: 18rpx;
			}

			.icon-shouhoutuikuan {
				font-size: 44upx;
			}
		}
	}

	.order-section2 {
		width: 100%;
		padding: 28upx 0 0 0;
		margin-top: 20upx;
		background-color: #fff;
		border-radius: 10rpx;
	}

	.history-section {
		padding: 30upx 0 0;
		margin-top: 20upx;
		background: #fff;
		border-radius: 10upx;
		border-radius: 10rpx;

		.sec-header {
			display: flex;
			align-items: center;
			font-size: $font-base;
			color: $font-color-dark;
			line-height: 40upx;
			margin-left: 30upx;

			.yticon {
				font-size: 44upx;
				color: #5eba8f;
				margin-right: 16upx;
				line-height: 40upx;
			}
		}

		.h-list {
			white-space: nowrap;
			padding: 30upx 30upx 0;

			image {
				display: inline-block;
				width: 160upx;
				height: 160upx;
				margin-right: 20upx;
				border-radius: 10upx;
			}
		}

		.itme {
			padding: 10rpx 30rpx 20rpx 30rpx;
			display: flex;
			justify-content: space-evenly;
			align-items: center;
			// justify-content: space-between;
		}
	}

	.fram_oper_1 {
		display: flex;
		flex-direction: column;
		color: #fff;
		margin-top: 10rpx;

		.fram_oper_2 {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 10rpx 0;

			.views1 {
				text-align: center;
				font-size: 24rpx;
				width: 30%;
				-webkit-line-clamp: 1;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				text-overflow: ellipsis;
			}

			.views11 {
				text-align: center;
				font-size: 24rpx;
				width: 1rpx;
				background-color: #dedede;
				-webkit-line-clamp: 1;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}
	}

	.mass_a {
		display: flex;
		align-items: center;
		color: #fff;
		flex-direction: column;

		.mass_a_1 {
			font-size: 26rpx;
		}

		.mass_a_2 {
			font-size: 70rpx;
			padding: 50rpx 0;
			font-weight: 600;
		}
	}
</style>
