<template>
<div>
<iframe scrolling="no" width="300" height="400" frameBorder="0" allowTransparency="true" :src="setSrc"></iframe>
</div>
</template>
<script>
export default {
data() {
return {
src: 'https://open.weixin.qq.com/connect/qrconnect?appid=wxe1f5def243e0390b&scope=snsapi_login&redirect_uri=https://abstest.tenpay.com/abs/author/callBack.do&state=0001&login_type=jssdk&self_redirect=default&style=black&href=./wx.css'
};
},
computed: {
setSrc(){
var _url = 'https://open.weixin.qq.com/connect/qrconnect?appid='+this.appid
+ '&scope=' + this.scope
+ '&redirect_uri=' + this.redirect_uri
+ '&state=' + this.state
+ '&login_type=' + this.login_type
+ '&self_redirect=' + this.self_redirect
+ '&style=' + this.theme
+ '&href=' + this.href;
return _url;
}
},
props:{
appid: String,
scope: String,
redirect_uri: String,
state: {
type: String,
default: ''
},
theme: {
type: String,
default: 'black'
},
href: {
type: String,
default: ''
},
self_redirect : {
type: Boolean,
default: false
},
login_type: {
type: String,
default: 'jssdk'
}
}
};
</script>