<template>
	<view class="content">
		<view class="container">
			<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
			<view class="huang-title" v-if="obj.merchantReportCheckDesc">
				<view class="">{{obj.merchantReportCheckDesc}}</view>
			</view>
			<view class="title_">
				基本信息
			</view>
			<view class="h_box">
				<view class="box-title">商户名称:</view>
				<view class="box-hui">{{obj.merchantName}}</view>
			</view>
			<view class="h_box">
				<view class="box-title">联系人:</view>
				<view class="box-hui">{{obj.merchantContactName}}</view>
			</view>
			<view class="h_box">
				<view class="box-title">电话:</view>
				<view class="box-hui">{{obj.phone}}</view>
			</view>
			<view class="h_box">
				<view class="box-title">费率:</view>
				<view class="box-hui">
					微信:0.220,支付宝:0.220,云闪付:0.220
					<u-icon name="arrow-right" color="#d5d5d5" size="16"></u-icon>
				</view>
			</view>
			<view class="title_">
				经营信息
			</view>
			<view class="h_box">
				<view class="box-title">商户类型:</view>
				<view class="box-hui">
					{{obj.areaType}}
				</view>
			</view>
			<view class="h_box">
				<view class="box-title">经营地址:</view>
				<view class="box-hui">
					{{obj.baddr || ""}}
				</view>
			</view>
			<view class="title_">
				结算信息
			</view>

			<view class="h_box">
				<view class="box-title">账户名:</view>
				<view class="box-hui">
					{{obj.areaType}}
				</view>
			</view>
			<view class="h_box">
				<view class="box-title">卡号:</view>
				<view class="box-hui">
					{{obj.bankAccount}}
				</view>
			</view>
			<view class="title_">
				设备信息
			</view>
			<view class="h_box" @click="goAdd()">
				<view class="box-title">设备列表:</view>
				<view class="box-hui">
					<u-icon name="arrow-right" color="#d5d5d5" size="16"></u-icon>
				</view>
			</view>
			<view class="title_">
				收款信息
			</view>
			<view class="h_box" @click="goList()">
				<view class="box-title">收款记录:</view>
				<view class="box-hui">
					<u-icon name="arrow-right" color="#d5d5d5" size="16"></u-icon>
				</view>
			</view>
			<view class="title_">
				套餐信息
			</view>
			<view class="h_box" @click="goPackageList()">
				<view class="box-title">套餐查询:</view>
				<view class="box-hui">
					<u-icon name="arrow-right" color="#d5d5d5" size="16"></u-icon>
				</view>
			</view>

			<view @click="updateMerInfo()" class="lv-anniu">
				修改信息
			</view>
		</view>

	</view>
</template>

<script>
	import request from '../../utils/request.js'
	import headers from '../../components/header/headers.vue'

	export default {
		data() {
			return {
				obj: '',
				id: '',
				titles: "店铺信息",
				dataList: [],
			}
		},
		onShow() {
			// this.actList = ["1", "1", "1", "1", "1", ]
			// this.status = "nomore" 底部刷新结束
		},

		onLoad(option) {
			this.id = option.id
			this.getMerDetail()
		},
		components: {
			headers

		},
		methods: {
			updateMerInfo() {
				uni.navigateTo({
					url: '/homePages/merchantsMerchant/merchantsMerchant?merchantId=' + this.id
				})
			},
			goPackageList() {
				uni.navigateTo({
					url: '/homePages/Manage/PackageList?merId=' + this.id
				})
			},
			goAdd() {
				uni.navigateTo({
					url: '/homePages/Manage/addDevice?merId=' + this.id
				})
			},
			goList() {
				uni.navigateTo({
					url: '/homePages/Manage/merTradeList?merId=' + this.id
				})
			},
			//根据id查询商户详情
			getMerDetail() {
				request({
					url: 'app/uaAgent/merDetail/' + this.id,
					//url: 'app/uaAgent/merDetail/1000022001',
					method: 'post',
				}).then(res => {
					if (res.data) {
						this.obj = res.data
					}
				})
			},
			goback() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		background: #fff;
		// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
		height: 100vh;
	}

	.huang-title {
		width: 100%;
		box-sizing: border-box;
		padding: 5px 0px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #7d4711;
		background: rgb(255, 222, 173);
		font-size: 12px;
	}

	.container {
		width: 100%;
		background: #fff;
		box-sizing: border-box;
		padding-top: 88px;
	}

	.title_ {
		width: 110px;
		height: 35px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: white;
		background: #E4612E;
		margin: 15px 0px;
	}

	.h_box {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #f0f0f0;
		box-sizing: border-box;
		padding: 15px;
	}

	.box-title {
		font-weight: bold;
		width: 130px;
	}

	.box-hui {
		color: rgba(0, 0, 0, 0.4);
		display: flex;
		align-items: center;

	}

	.lv-anniu {
		width: 90%;
		height: 40px;
		border-radius: 50px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		background: #E4612E;
		margin: 10px auto;
	}
</style>
