<template>
	<view>
		<!-- 信息中心 -->
		<view v-if="mine_code == 'ningdongyunying'">
			<t-p-ningdongyunying></t-p-ningdongyunying>
		</view>
		<!-- 洗选 -->
		<view v-if="mine_code == 'xixuan'">
			<t-p-xixuan></t-p-xixuan>
		</view>
		<!-- 石槽村 -->
		<view v-if="mine_code == 'shicaocun'">
			<t-p-shicaocun></t-p-shicaocun>
		</view>
		<!-- 枣泉 -->
		<view v-if="mine_code == 'zaoquan'">
			<t-p-zaoquan></t-p-zaoquan>
		</view>
		<!-- 梅花井 -->
		<view v-if="mine_code == 'meihuajing'">
			<t-p-meihuajing></t-p-meihuajing>
		</view>
		<!-- 红柳 -->
		<view v-if="mine_code == 'hongliu'">
			<t-p-hongliu></t-p-hongliu>
		</view>
		<!-- 麦垛山 -->
		<view v-if="mine_code == 'maiduoshan'">
			<t-p-maiduoshan></t-p-maiduoshan>
		</view>
		<!-- 金凤 -->
		<view v-if="mine_code == 'jinfeng' || mine_code == 'jinfeng_neiwang'">
			<t-p-jinfeng></t-p-jinfeng>
		</view>
		<!-- 双马 -->
		<view v-if="mine_code == 'shuangma'">
			<t-p-shuangma></t-p-shuangma>
		</view>
		<!-- 灵新 -->
		<view v-if="mine_code == 'lingxin'">
			<t-p-lingxin></t-p-lingxin>
		</view>
		<!-- 任家庄 -->
		<view v-if="mine_code == 'renjiazhuang'">
			<t-p-renjiazhuang></t-p-renjiazhuang>
		</view>
		<!-- 红石湾 -->
		<view v-if="mine_code == 'hongshiwan'">
			<t-p-hongshiwan></t-p-hongshiwan>
		</view>
		<!-- 白芨沟 -->
		<view v-if="mine_code == 'ruqigou'">
			<t-p-baijigou></t-p-baijigou>
		</view>
		<!-- 金家渠 -->
		<view v-if="mine_code == 'jinjiaqu' || mine_code == 'jinjiaqu_neiwang'">
			<t-p-jinjiaqu></t-p-jinjiaqu>
		</view>
		<!-- 清水营 -->
		<view v-if="mine_code == 'qingshuiying'">
			<t-p-qingshuiying></t-p-qingshuiying>
		</view>
		<!-- 羊场湾-1 -->
		<view v-if="mine_code == 'yangchangwanyifenqu'">
			<t-p-yangchangwanyifenqu></t-p-yangchangwanyifenqu>
		</view>
		<!-- 羊场湾-2 -->
		<view v-if="mine_code == 'yangchanwanerfenqu'">
			<t-p-yangchanwanerfenqu></t-p-yangchanwanerfenqu>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mine_code: "",
				title:""
			};
		},
		onLoad(option) {
			this.mine_code = option.mine_code

			// 根据矿编码切换首页接口不同的请求基础路径
			switch (this.mine_code) {
				case 'ningdongyunying':
					this.title = "宁东运营部"
					break;
				case 'meihuajing':
					this.title = "梅花井"
					break;
				case 'zaoquan':
					this.title = "枣泉"
					break;
				case 'yangchangwan':
					this.title = "羊场湾"
					break;
				case 'jinfeng':
					this.title = "金凤"
					break;
				case 'lingxin':
					this.title = "灵新"
					break;
				case 'hongliu':
					this.title = "红柳"
					break;
				case 'qingshuiying':
					this.title = "清水营"
					break;
				case 'shicaocun':
					this.title = "石槽村"
					break;
				case 'renjiazhuang':
					this.title = "任家庄"
					break;
				case 'shuangma':
					this.title = "双马"
					break;
				case 'maiduoshan':
					this.title = "麦垛山"
					break;
				case 'ruqigou':
					this.title = "白芨沟"
					break;
				case 'hongshiwan':
					this.title = "红石湾"
					break;
				case 'jinjiaqu':
					this.title = "金家渠"
					break;
				case 'yangchangwanyifenqu':
					this.title = "羊场湾一分区"
					break;
				case 'yangchanwanerfenqu':
					this.title = "羊场湾二分区"
					break;
				case 'xixuan':
					this.title = "洗选中心"
					break;
				default:
					this.title = ""
			}

			uni.setNavigationBarTitle({
				title: this.title
			})
		}
	}
</script>

<style lang="scss">

</style>
