Created
October 31, 2018 07:24
-
-
Save 1c7/7169f21b09c767f6a39472cc3496c0b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang='pug'> | |
// 社交媒体账号 | |
.box-icon-line | |
.icon.wechat(@click='wechat_click') | |
img(src='/static/app-image/icon-wechat-color.png', alt='wechat icon') | |
</template> | |
<script> | |
export default { | |
data: function() { | |
return {} | |
} | |
methods: { | |
// 微信登录 | |
wechat_click(){ | |
var APPID = config.wechat_app_id; | |
// var redirect_uri = 'https://www.wittcism.com/wechat-login2' | |
var redirect_uri = 'https://www.wittcism.com/wechat-login' | |
redirect_uri = encodeURIComponent(redirect_uri) | |
var url = `https://open.weixin.qq.com/connect/qrconnect?appid=${APPID}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_login` | |
window.location.href = url; | |
}, | |
} | |
} | |
</script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment