時間:2022-08-06 21:03:01 | 來源:網(wǎng)站運(yùn)營
時間:2022-08-06 21:03:01 來源:網(wǎng)站運(yùn)營
所有文章的源碼將會被上傳到github 倉庫https://github.com/kurryluo/LearningByMyself,不用經(jīng)過授權(quán),即可轉(zhuǎn)載所有文章和代碼。https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
需要注意的幾點(diǎn):- appid:wxbdc5610cc59c1631- redirect_uri: https%3A%2F%2Fpassport.yhd.com%2Fwechat%2Fcallback.do (已經(jīng)編碼過的)- response_type:code- scope:snsapi_login- state:3d6be0a4035d839573b04816624a415e
完整的登錄地址:https://open.weixin.qq.com/connect/qrconnect?appid=wxbdc5610cc59c1631&redirect_uri=https%3A%2F%2Fpassport.yhd.com%2Fwechat%2Fcallback.do&response_type=code&scope=snsapi_login&state=3d6be0a4035d839573b04816624a415e#wechat_redirect
上面這個地址可以放在 a 標(biāo)簽里,用戶點(diǎn)擊即跳轉(zhuǎn)到微信提供的登錄頁面。以下代碼就可以實(shí)現(xiàn)。<a href = 'https://open.weixin.qq.com/connect/qrconnect?appid=wxbdc5610cc59c1631&redirect_uri=https%3A%2F%2Fpassport.yhd.com%2Fwechat%2Fcallback.do&response_type=code&scope=snsapi_login&state=3d6be0a4035d839573b04816624a415e#wechat_redirect'>直接跳轉(zhuǎn)到微信提供的網(wǎng)頁</a>
<Modal visible={open} onCancel={this.props.handleClose} footer={null} closable > <div className={styles.wechatLoginSec}> <div className={classnames(styles.imageSec, styles[toggleClass])}></div> <div className={styles.inputSec}> <iframe className={styles.nlogin_iframe} frameBorder="0" sandbox="allow-scripts allow-same-origin allow-top-navigation" scrolling="no" src="微信登錄"></iframe> </div> </div> </Modal>
最終效果如動圖:關(guān)鍵詞:實(shí)現(xiàn),自學(xué)
客戶&案例
營銷資訊
關(guān)于我們
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。