<template>
	<view class="center">
		<view>
			<view class="title">粮商身份</view>
			<view class='cu-tag radius line-pink' @click="adddriver(1)">新增</view>
			<view class="company">****公司</view>
			<view class="guess-item" @click="navToDetailPage(1)">
				<view class="infos">

					<view class="info">张三
						<view class='cu-tag radius line-pink but'>审核中</view>
					</view>
					<view class="info">13333333333</view>
					<label>
						<checkbox :value="1" /><text>设置默认</text>
					</label>
					<view class='cu-tag radius line-pink '>删除</view>
					<view class='cu-tag radius line-pink but'>更换手机号</view>
				</view>

			</view>
		</view>

		<view class="margin-top">
			<view class="title">司机身份</view>
			<view class='cu-tag radius line-pink' @click="adddriver(2)">新增</view>
			<view class="guess-item" @click="navToDetailPage(2)">
				<view class="infos">
					<view class="info">张三
						<view class='cu-tag radius line-pink but'>审核中</view>
					</view>
					<view class="info">13333333333</view>

					<view class='cu-tag radius line-pink '>删除</view>
					<view class='cu-tag radius line-pink '>修改</view>
					<view class='cu-tag radius line-pink but'>更换手机号</view>
				</view>
			</view>
		</view>
	</view>

	</view>
	</view>
</template>

<script>
	import {
	    mapState 
	} from 'vuex';
	export default {
		name: "buy",
		data() {
			return {
				PageCur: "buy",
				buyInfo: [],
				pages: 1, //页数
				limit: 10, //每次取条目数
				loadStatus: 'loading', //加载样式：more-加载前样式，loading-加载中样式，nomore-没有数据样式
				isLoadMore: false, //是否加载中
				showTran: true,
				scrollTop: 0,
				TabCur: 0,
				current: 1,
				identityAuthenticationInfo:{
					pageSize:10,
					currentPage:1,
				},
			};
		},
		onLoad(){
			this.getList()
		},
		computed: {
			...mapState(['hasLogin','userInfo'])
		},
		methods: {
			getList(){
				this.identityAuthenticationInfo.commonId = this.userInfo.id
			this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', this.identityAuthenticationInfo).then(res => {
					console.log("添加成功")
					this.procurementPlanInfos = res.data.data
				})
				.catch(res => {
					uni.showToast({
						title: res.errmsg,
						icon: 'none',
						duration: 2000
					})
				});
				},
			adddriver(index) {
				if (index == 1) {
					uni.navigateTo({
						url: `/pageD/identity/companyIdentity`
					})
				} else {
					uni.navigateTo({
						url: `/pageD/identity/driverIdentity`
					})
				}
			},
			navToDetailPage(index) {
				if (index == 1) {
					uni.navigateTo({
						url: `/pageD/identity/companyIdentityLook`
					})
				} else {
					uni.navigateTo({
						url: `/pageD/identity/driverIdentityLook`
					})
				}

			}
		}
	}
</script>

<style>
	.center {
		padding: 10px 20px;
	}

	.title {
		font-size: 18px;
		font-weight: 900;
		margin-right: 20px;
		display: initial;
	}

	.company {
		font-size: 16px;
		margin-top: 10px;
	}

	.infos {
		/* margin: 10px 20px; */
		width: 100%;
		display: inline-table;
	}
	.info {
		line-height: 20px;
	}
	.but {
		right: 3px;
		float: right;
	}
</style>
