html 代码
<!-- https://github.com/yourtion/yourtion.github.io/blob/86c41eabae2c3b093c704fcfad9c05dfefc186d7/_posts/2017/02/2017-02-15-vue-require-remote-js.md -->
<script src="//g.alicdn.com/dingding/dinglogin/0.0.2/ddLogin.js"></script>
<div class="container intro text-center">
<h2 class="title">登录</h2>
<div class="login-form">
<div style="margin: 0 auto;" id="login_container"></div>
</div>
</div>
<script type="text/javascript">
var obj = DDLogin({
id: 'login_container',
goto: 'https%3a%2f%2foapi.dingtalk.com%2fconnect%2foauth2%2fsns_authorize%3fappid%3ddingoawoyq6g22mupzd6mu%26response_type%3dcode%26scope%3dsnsapi_login%26state%3drk%26redirect_uri%3dhttp%3a%2f%2fapp.mysada.com%2foauth%2fdingding%2fcallback',
style: "",
href: "",
width: "300px",
height: "300px"
});
var hanndleMessage = function(event) {
var loginTmpCode = event.data;
var origin = event.origin;
window.location.href = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoawoyq6g22mupzd6mu&response_type=code&scope=snsapi_login&state=rk&redirect_uri=http%3a%2f%2fapp.mysada.com%2foauth%2fdingding%2fcallback&loginTmpCode=' + loginTmpCode;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
</script>
怎么转到vue的模板中?
请教,找到了这个资料 然后就不知道怎么做了
https://github.com/yourtion/yourtion.github.io/blob/86c41eabae2c3b093c704fcfad9c05dfefc186d7/_posts/2017/02/2017-02-15-vue-require-remote-js.md