<template>
<view class="groupContent">
	<view class="section">
		<view class="group">
			<text class="guishu">归属商家</text>
			<text class="order" v-if="isGroup=='true'" @click="goGroupList">查看团队排行</text>
		</view>
		<view class="shop">
			{{info.name}}
		</view>
	</view>
	<view style="margin-top:40rpx;" class="section">
		<text class="guishu" >营业执照</text>
		<view class="">
			<image :src="info.image" @click="previewImage(info.image)" style="width:100%;margin-top:20rpx;" mode="widthFix"></image>
			<!-- <image src="/static/1.png" style="width:100%;" mode="widthFix"></image> -->
		</view>
	</view>
</view>
</template>

<script>
export default{
	data(){
		return{
			isGroup:'false',
			info:{}
		}
	},
	methods:{
		previewImage(urls) {
			// let res_urls = [];
			// urls = this.$util.deepCopy(urls);
			
			uni.previewImage({
				urls: [urls],
			})
		},
		// async getCompanyMonth() {
		// 	let res = await this.$api.mine.companyMonth()
		// 	console.log(res,"mm")
		// },
		async getInfo(id){
			let res = await this.$api.technician.getShopInfo({compay_id:id})
			console.log(res,"mmyyyyy")
			this.info = res
		},
		goGroupList(){
			this.$util.goUrl({
				url: '/user/pages/myGroup/myGroupOrder'
			})
		}
	},
	onLoad(option) {
		
		if(option.company_id){
			this.getInfo(option.company_id)
		}
		this.isGroup = option.isGroup
		if(this.isGroup=='true'){
			uni.setNavigationBarTitle({
			  title: '我的团队'
			})
		}else{
			uni.setNavigationBarTitle({
			  title: '商家信息'
			})
		}
		// this.getCompanyMonth()
	}
}
</script>

<style lang="scss" scoped>
.groupContent{
	margin: 0 24upx;
	.group{
		// padding-top:40upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		
		.order{
			font-size: 30rpx;
			font-family: Alibaba PuHuiTi;
			font-weight: 400;
			color: #08BF77;
		}
	}
	.guishu{
		font-size: 40rpx;
		font-family: Alibaba PuHuiTi;
		font-weight: 600;
		color: #333333;
	}
	.shop{
		font-size: 30rpx;
		font-family: Alibaba PuHuiTi;
		font-weight: 400;
		color: #333333;
		margin-top:34rpx;
	}
}
.section{
	background-color: #ffffff;
	border-radius:20rpx;
	margin:0 24rpx;
	padding:24rpx;
	margin-top:20rpx;
}
</style>