<template>
	<view>
		<web-view :src="src"></web-view>
	</view>
</template>

<script>
	import {mapGetters} from 'vuex'
	export default {
		data() {
			return {
				src: '' //页面路由
			}
		},
		computed:{
			...mapGetters({
				'user':'getUser' ,
				
			})
		},
		onUnload() {
			this.$util.addUserBehavior()
		},
		onLoad(option) {
			if(option.name) {
				switch(option.name) {
					case 'questionnaire':
						let mode = {} // this.userModules.find(u=>{return u.MODULE_GUID==='5733dfdd-29f6-4233-9ff0-6f077d80d778'})
						mode.SERVERPART_IDS = ''
						this.src = 'https://eshangtech.com/questionnarie/testType?mid=' + this.user.Membership_Id + '&sid='+(mode?mode.SERVERPART_IDS:'')+'&pcode='+this.user.ProvinceCode+'&phone=' + this.user.Membership_Phone+'&name='+encodeURIComponent(this.user.Membership_Name)
						console.log(this.src )
						break
				}
				
			}else if(option.src.indexOf('https')>-1){
				this.src = option.src
			}
			else if(option.src.indexOf('?')>-1){
				this.src = option.src + "&uid=" + this.user.Membership_Id
			}else{
				this.src = option.src
			}
			console.log(this.src)
		}
	}
</script>

<style>	

</style>
