zoukankan      html  css  js  c++  java
  • vue 获取微博授权URL

    1.在vue页面加载时到动态发送请求获取微博授权URL

    1.1在e 中写oauth动态获取微 博授权中写oauth动态获取微博授权URL

    // 获取微博登录地址 
    oauth() { 
          // 从后端获取 微博登录地址 
          oauth_post().then((resp) => { console.log(resp) //{'code': '0', 'msg': '成功', 'data': {'url': url}} 
          let url = resp.data.url; 
          this.weibo_url = url; 
          }) 
    },
    

    1.2在Vue的mounted函数中调用获取微博授权URL函数

    mounted() { 
          this.oauth() 
    },
    

    1.3点击"登录"弹出的form表单中加入url

    <form 
          action="/login" 
          method="post" 
    > 
          <div class="form-group widget-signin"> 
          <a :href="weibo_url"><i class="fa fa-weibo"></i></a> 
          </div> 
    </form>
    
  • 相关阅读:
    Linux 相关scsi命令
    存储
    Multipath多路径冗余全解析
    Oracle中alter system命令参数之scope
    scipy安装失败
    font
    查看端口占用
    oracle参数优化
    组播
    sql给整数补零
  • 原文地址:https://www.cnblogs.com/yimeng123/p/13798725.html
Copyright © 2011-2022 走看看