<template>
	<view class="testMain">
		<web-view :src="webviewSrc"></web-view>
	</view>
</template>

<script>
	import { rsaEncrypt } from '../../utils/rsa.js'
export default {
	data() {
		return {
			webviewSrc: ''
		};
	},
	onLoad({phone}) {
		let rsa = rsaEncrypt(phone)
		// let path = `https://brokennews.sxtvs.com.cn/#/clue?phone=${this.urlencode(rsa)}`
		let path = `https://brokennews.sxtvs.net/#/clue?phone=${this.urlencode(rsa)}`
		console.log(path);
		this.webviewSrc = path
	},
	methods: {
		urlencode (str) {  
		    str = (str + '').toString();   
		
		    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').  
		    replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');  
		}
	}
	
};
</script>

<style scoped lang="scss">
	
</style>
