<template>
	<view class="inspage-content" :style="{'--status-bar-': statusBarHeight}">
		<view class="inspage-content-info">
			<!-- 头部主要内容 开始 -->
			<view class="inspage-content-header">	
				<customNavbar 
				title="银联支付入网签约认证" 
				bgColor="#fff"
				:contentStyle="{color: '#000'}"
				></customNavbar>
			</view>
			<!-- 头部主要内容 结束 -->
			
			<!-- userInfo内容 开始 -->
			
			<view class="inspage-content-userinfo">
				<iframe :src="jumpUrl" frameborder="0"></iframe>
				<!-- <web-view :src="jumpUrl"></web-view> -->
			</view>
			<!-- userInfo内容 结束 -->
		</view>
	</view>
</template>

<script>
	import { navigateTo } from "@/utils/util.js"
	export default {
		data() {
			return {
				title: '统计分销',
				statusBarHeight: 0, // 状态栏安全距离
				jumpUrl: null
			}
		},
		onLoad() {
			this.getUnionAccessUrlFun()
		},
		onShow() {
			this.statusBarHeight = getApp().globalData.statusBarHeight
		},
		methods: {
			/** 银联签约入网地址  */
			async getUnionAccessUrlFun(){
				try{
					let res = await this.$u.api.getUnionAccessUrl({
						userid: this.distribution_user_info.userId
					})
					
					if(res && res.code ===200) {
						//this.show = false
						this.jumpUrl = res.data.jumpUrl
						//location.href = res.data.jumpUrl
					} 
				}catch(e){
					//TODO handle the exception
					console.error("e===",e)
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.inspage-content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		--header-h: 90rpx;
		.inspage-content-info {
			width: 100%;
			box-sizing: border-box;
		}
	}
	/** 头部主要内容 开始 */
	.inspage-content-header {
		width: 100%;
		height: var(--header-h);
		box-sizing: border-box;
		::v-deep .u-search {
			padding: 0 30rpx !important;
		}
		::v-deep .u-search__action {
			color: #fff !important;
		}
	}
	/** 头部主要内容 结束  **/
	
	/** userInfo内容 开始 */
	.inspage-content-userinfo {
		width: 100%;
		height: calc( 100vh - var(--header-h) );
		box-sizing: border-box;
		>iframe {
			width: 100%;
			height: 100%;
		}
	}
	/** userInfo内容 结束  **/
</style>