<template>
	<view class="content">
		<view class="container">
			<headers :titles="titles"><uni-icons type="arrow-left" color="#fff" size="22px"></uni-icons></headers>
			<view class="hang-box">
				<view class="">设备类型</view>
				<view class="">{{formData.terminalType}}</view>
			</view>
			<view class="hang-box">
				<view class="">设备型号</view>
				<view class="">{{formData.machineModel}}</view>
			</view>
			<view class="hang-box">
				<view class="">厂商名称</view>
				<view class="">{{formData.manufacturerName}}</view>
			</view>
			<view class="hang-box">
				<view class="">SN</view>
				<view class="">{{formData.sn}}</view>
			</view>
			<view class="hang-box">
				<view class="">绑定时间</view>
				<view class="">{{formData.merchantBindTime}}</view>
			</view>
			<view class="hang-box">
				<view class="">使用状态</view>
				<view class="">{{'绑定'}}</view>
			</view>
			<view class="hang-box">
				<view class="">设备奖励</view>
				<view class="">{{formData.remarks}}</view>
			</view>
			<view class="hang-box">
				<view class="">代理联系人</view>
				<view class="">{{formData.agentName}}</view>
			</view>
			<view class="hang-box" @click="goList">
				<view class="">交易记录</view>
				<u-icon name="arrow-right" size="18"></u-icon>
			</view>
			<view class="anniu">
				解除绑定
			</view>

		</view>

	</view>
</template>

<script>
	import headers from '../../components/header/headers.vue'
	import tabbar from '../../components/tabbar/tabbar.vue'
	import request from '../../utils/request.js'
	export default {
		data() {
			return {
				titles: "设备信息",
				sn: null,
				formData: {}

			}
		},
		onLoad(option) {
			this.sn = option.sn
		},
		onShow() {
			this.getDetail()
		},
		components: {
			headers
		},
		methods: {
			getDetail() {
				request({
					url: 'app/uaMer/terminalDetail',
					method: 'post',
					data: {
						sn: this.sn

					},
				}).then(res => {
					this.formData = res.data
				})
			},
			goList() {
				uni.navigateTo({
					url: '/homePages/Manage/CollectionList?sn=' + this.sn
				})
			},
			goback() {
				uni.navigateBack()
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		background: #f4f5f6;
		height: 100vh;
	}

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

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

	.anniu {
		width: 100%;
		background: #E4612E;
		height: 50px;
		position: fixed;
		bottom: 0px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;

	}
</style>
