<template>
	<view class="container">
		<view class="example-section" v-if="type === 'license'">
			<view class="title">营业执照拍摄示例</view>
			<view class="example-img">
				<image :src="picUrl + '/static/example/license.jpg'" mode="widthFix"></image>
			</view>
			<view class="tips">
				<view class="tips-title">拍摄要求：</view>
				<view class="tips-item">1. 请确保营业执照在有效期内</view>
				<view class="tips-item">2. 照片需清晰完整，四角完整可见</view>
				<view class="tips-item">3. 不得有遮挡、涂改、反光</view>
				<view class="tips-item">4. 支持原件拍照或彩色扫描件</view>
			</view>
		</view>

		<view class="example-section" v-if="type === 'idcard'">
			<view class="title">身份证拍摄示例</view>
			<view class="sub-section">
				<view class="sub-title">身份证正面（人像面）</view>
				<view class="example-img">
					<image :src="picUrl + '/static/example/front.jpg'" mode="widthFix"></image>
				</view>
			</view>
			<view class="sub-section">
				<view class="sub-title">身份证反面（国徽面）</view>
				<view class="example-img">
					<image :src="picUrl + '/static/example/back.jpg'" mode="widthFix"></image>
				</view>
			</view>
			<view class="tips">
				<view class="tips-title">拍摄要求：</view>
				<view class="tips-item">1. 请确保身份证在有效期内</view>
				<view class="tips-item">2. 照片需清晰完整，四角完整可见</view>
				<view class="tips-item">3. 不得有遮挡、涂改、反光</view>
				<view class="tips-item">4. 仅支持二代身份证</view>
			</view>
		</view>
		<view class="example-section" v-if="type === 'industry'">
			<view class="title">行业资质示例</view>
			<view class="example-img">
				<image src="/static/example/license.jpg" mode="widthFix"></image>
			</view>
			<view class="tips">
				<view class="tips-title">拍摄要求：</view>
				<view class="tips-item">1. 请上传与经营品类对应的资质（如食品经营许可证）</view>
				<view class="tips-item">2. 照片需清晰完整，四角完整可见</view>
				<view class="tips-item">3. 不得有遮挡、涂改、反光</view>
				<view class="tips-item">4. 资质需在有效期内</view>
			</view>
		</view>
	</view>
</template>

<script>
import { picUrl } from '../../../utils/index';
export default {
	data() {
		return {
			picUrl,
			type: 'license'
		}
	},
	onLoad(options) {
		if (options.type) {
			this.type = options.type;
		}
		// 设置导航栏标题
		const titleMap = {
			license: '营业执照示例',
			idcard: '身份证示例',
			industry: '行业资质示例'
		}
		uni.setNavigationBarTitle({
			title: titleMap[this.type] || '资质示例'
		})
	}
}
</script>

<style>
@import url("./index.css");
</style>
