<template>
	<view class="toExamine">
		<navbar ref="navbar" :config="config" backColor="#666"></navbar>
		<view  v-if="state==1">
		<view class="top">
			<view class="iconfont" style="color: green;">
				&#xe646;
			</view>
			<view class="item">
				审核通过
			</view>
		</view>
		</view>
		<view v-if="state==0">
			<view class="top">
				<view class="iconfont" style="color: red;">
					&#xe616;
				</view>
				<view class="item">
					等待审核中
				</view>
<!-- 				<view class="remarks">
					辅助文字说明
				</view> -->
			</view>
		</view>
		<view v-if="state==2">
			<view class="top">
				<view class="iconfont" style="color: red;">
					&#xe7fa;
				</view>
				<view class="item">
					审核不通过
				</view>
			<view class="remarks">
				<view >
					{{msgList.audit_remark}}
				</view>
	<!-- 			<view v-else>
					{{msgList.remarks}}
				</view> -->
			</view>
			</view>
		</view>
		<view class="content">
			<view style="text-align: center;font-size: 30rpx;font-weight: 700;">
				企业信息
			</view>
			<view class="middle">
				<view class="left">
					企业名称
				</view>
				<view class="right">
					{{msgList.company_name}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					统一信用代码
				</view>
				<view class="right">
					{{msgList.credit_code}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					经营范围
				</view>
				<view class="right">
					{{msgList.business_scope}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					所属地区
				</view>
				<view class="right" >
					{{msgList.province}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					详细地址
				</view>
				<view class="right" >
					{{msgList.company_address}}
				</view>
			</view>
			<!-- <view class="middle">
				<view class="left flexShrink">
					定位地址
				</view>
				<view class="right" >
					{{msgList.map_punctuation}}
				</view>
			</view> -->
			<view style="text-align: center; font-size: 30rpx;font-weight: 700;">
				法人信息
			</view>
			<view class="middle">
				<view class="left">
					法人姓名
				</view>
				<view class="right">
					{{msgList.legal_representative}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					法人证件类型
				</view>
				<view class="right">
					<view v-if="msgList.id_type==0">
						身份证
					</view>
					<view v-if="msgList.id_type==1">
						护照
					</view>
				</view>
			</view>
			<view class="middle">
				<view class="left">
					法人证件号码
				</view>
				<view class="right">
					{{msgList.id_number}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					法人手机号
				</view>
				<view class="right">
					{{msgList.lr_mobile}}
				</view>
			</view>
			<view class="middle">
				<view class="left">
					法人邮箱
				</view>
				<view class="right">
					{{msgList.lr_email}}
				</view>
			</view>
			<view style="font-size: 30rpx; font-weight: 700; text-align: center;">
				附件
			</view>
		</view>
		<view class="bottom">
			<view class="name-two">
				商家营业执照
			</view>
			<view class="image">
				<image class="left" :src="leftShopimg" mode="widthFix"></image>
				<image class="left" :src="rightShopimg" mode="widthFix"></image>
			</view>
			<view class="name">
				身份证正反面照片
			</view>
			<view class="image">
				<image class="left" :src="identityJust" mode="widthFix"></image>
				<image class="right" :src="identityBack" mode="widthFix"></image>
			</view>
		</view>
		<view v-if="msgList.shop">
			<view class="content">
				<view style="text-align: center; font-weight: 700;font-size: 30rpx;">
					店铺信息
				</view>
				<view class="middle">
				<view class="left">
					店铺名称
				</view>
					<view class="right">
						{{msgList.shop.shop_name}}
					</view>
				</view>
				<view class="middle">
				<view class="left">
					所属地区
				</view>
				<view class="right">
					{{msgList.shop.map_punctuation}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					详细地址
				</view>
				<view class="right">
					{{msgList.shop.address}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					店铺地图选址
				</view>
				<view class="right">
					{{msgList.shop.map_punctuation}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					客服电话
				</view>
				<view class="right">
					{{msgList.shop.mobile}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					营业时间
				</view>
				<view class="right">
					{{msgList.shop.business_hours}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					营业时间段
				</view>
				<view class="right">
					{{msgList.shop.time_quantum}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					商业主体名称
				</view>
				<view class="right">
					{{msgList.shop.main_name}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					运营名称
				</view>
				<view class="right">
					{{msgList.shop.loser}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					运营人手机号
				</view>
				<view class="right">
					{{msgList.shop.mobile}}
				</view>
				</view>
				<view class="middle">
				<view class="left">
					店铺介绍
				</view>
	
				</view>
				<view style="color: #D9D9D9;font-size: 14rpx;">
				{{msgList.shop.remark}}
				</view>
				<view class="middle">
				<view class="left">
					场地说明
				</view>
				</view>
				<view style="color: #D9D9D9;font-size: 14rpx;">
				{{msgList.shop.place_remark}}
				</view>
				</view>
				<view class="bottom">
					<view class="name-two">
						logo
					</view>
					<view v-if="msgList.shop">
						<view class="image">
							<image class="left" :src="msgList.shop.logo" mode="widthFix"></image>
						</view>
					</view>
				</view> 
				<view class="bottom">
		<view class="name">
			店铺图片
		</view>
		<view class="image">
			<image class="left" :src="shopJust" mode="widthFix"></image>
			<image class="right" :src="shopBack" mode="widthFix"></image>
		</view>
				</view> 
		</view>
		<view class="u-plr30 mt104" style="margin-bottom: 20rpx;">
			<!-- <button class="u-btn-two u-bg-00321E u-FFF" @click="getWxAddress">一键获取微信地址</button> -->
			<button  v-if="state==2" type="default" class="u-btn-two" style="margin-top: 20rpx;color: #FFFFFF; background-color: #01321D;" @click="goToBercome">重新申请</button>
		</view>

	</view>
</template>

<script>
	export default{
		data(){
			return{
				config: {
					back: true, //false是tolbar页面 是则不写
					font:"back",
					title: '商家审核',
					color: '#1A1A1A',
					//背景颜色;参数一：透明度（0-1）;参数二：背景颜色（array则为线性渐变，string为单色背景）
					backgroundColor: [1, '#fff'],
					statusBarFontColor: '#1A1A1A',
	
					
				},
				msgList:[],
				myMsg:{},
				state:0,
				identity:'',
				identityJust:'',
				identityBack:'',
				shopList:'',
				shopJust:'',
				shopBack:'',
				leftShopimg: '',
				rightShopimg: ''
			}
		},
		methods:{
			//重新申请
			goToBercome(){
				uni.navigateTo({
					url:"../../user/merchant/registerAndAudit"
				})
			},
			//获取数据
			getMsg(){
				this.$http.get("/yxt/shopapply/shopApplyInfo").then(res=>{
					if(res&&res.code==200){
						this.msgList = res.data
						this.identity = res.data.identty_images
						this.identityJust = this.identity.split(",")[0]
						this.identityBack = this.identity.split(",")[1]
						this.state = res.data.audit_status
						this.shopList = res.data.store_images
						this.shopJust = this.shopList.split(",")[0]
						this.shopBack = this.shopList.split(",")[1]
						this.leftShopimg = res.data.business_license_images.split(",")[0]
						this.rightShopimg = res.data.business_license_images.split(",")[1]
						console.log(this.shopList)
					}
				})
			}
		},
		onLoad() {
			this.getMsg()
			this.myMsg = uni.getStorageSync("personal")
		}
	}
</script>

<style scoped lang="scss">
	.bottom{
		padding: 0 30rpx;
		margin-top: 28rpx;
		font-size: 28rpx;
		.name-two{
			margin-top: 15rpx;
		}
		.image{
			margin-top: 18rpx;
			display: flex;
			justify-content: space-between;
			.left{
				width: 300rpx;
				height: 200rpx;
			}
			.right{
				width: 300rpx;
				height: 200rpx;
				
			}
		}
	}
	.content{
		margin-top: 68rpx;
		padding: 0 30rpx;
		.middle{
			margin: 20rpx 0;
			display: flex;
			justify-content: space-between;
			.left{
				font-size: 28rpx;
				margin-right: 20rpx;
				
			}
			.right{
				color: #D9D9D9;
			}
		}
	}
	.top{
		background-color: #FFFFFF;
		.iconfont{
			font-size: 200rpx;
			text-align: center;
			margin-top: 36rpx;
		}
		.item{
			text-align: center;
			font-size: 40rpx;
			color: rgba(16, 16, 16, 100);
		}
		.remarks{
			text-align: center;
			font-size: 28rpx;
			margin-top: 12rpx;
			
		}
	}
	.flexShrink{
		flex-shrink: 0;
	}
</style>
