摘要: 微博回调空页面 1.页面路径components/oauth.vue <template> <div> <div v-show="visiable"> 绑定用户 用户名: <input type="text" v-model="username" @blur="check_username" /> 阅读全文
posted @ 2020-10-10 17:59 Harry·F 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 微博绑定用户接口 1.oauth/urls.py中添加路由 urlpatterns = [ path('weibo/binduser/', views.OauthWeiboBindUser.as_view()), ] 2.oauth/views.py中添加视图函数 class OauthWeiboB 阅读全文
posted @ 2020-10-10 17:50 Harry·F 阅读(91) 评论(0) 推荐(0) 编辑
摘要: vue微博回调空页面 页面路径compons/pauth.vue <template> <div> <p>跳转中....</p> </div> </template> <script> import { oauth_callback_post } from "./axios_api/api"; ex 阅读全文
posted @ 2020-10-10 17:09 Harry·F 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 微博回调接口 1oauth/urls.py中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallBack.as_view()), ] 2oauth/views.py中添加视图函数 import requests from 阅读全文
posted @ 2020-10-10 17:00 Harry·F 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 在Vue页面加载时动态发送请求获取微博授权url 1.1在components\common\lad_header.vue中写oauth动态获取微博授权URL // 获取微博登录地址 oauth_post().then((resp) => { consloe.log(resp) // {"code" 阅读全文
posted @ 2020-10-10 16:26 Harry·F 阅读(319) 评论(0) 推荐(0) 编辑
摘要: django生成微博授权url接口 1.创建apps/oauth模块进行oauth认证 '''1.1在apps文件夹下新建应用:oauth''' cd syl/apps python manage.py startapp oauth # 切换到apps文件夹下执行创建命令 '''1.2添加子路由: 阅读全文
posted @ 2020-10-10 16:13 Harry·F 阅读(129) 评论(0) 推荐(0) 编辑