摘要: djangorestframework 序列化 '''1. 选项参数''' name = serializers.CharField(min_length=3,max_length=20) max_length # 最大长度 min_lenght # 最小长度 allow_blank # 是否允许为 阅读全文
posted @ 2020-10-12 20:36 做你的猫231 阅读(201) 评论(0) 推荐(0)
摘要: 1.vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ <template> <div> <div v-show='visiable'> 绑定用户 用户名: <input type="text" v-model="username 阅读全文
posted @ 2020-10-12 07:23 做你的猫231 阅读(279) 评论(0) 推荐(0)
摘要: 1.微博绑定用户接口 1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/binduser/',views.OauthWeiboBindUser.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/vi 阅读全文
posted @ 2020-10-12 07:21 做你的猫231 阅读(94) 评论(0) 推荐(0)
摘要: 1.vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ <template> <div> <p>跳转中....</p> < /div> </template> <script> import { oauth_callback_po 阅读全文
posted @ 2020-10-12 07:19 做你的猫231 阅读(72) 评论(0) 推荐(0)
摘要: 1.微博回调接口 1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/vie 阅读全文
posted @ 2020-10-12 07:18 做你的猫231 阅读(81) 评论(0) 推荐(0)
摘要: 1.在Vue页面加载时动态发送请求获取微博授 权url 1.1 在 components\common\lab_header.vue 中写oauth动态获取微 博授权URL // 获取微博登录地址 oauth() { // 从后端获取 微博登录地址 oauth_post().then((resp) 阅读全文
posted @ 2020-10-12 07:16 做你的猫231 阅读(84) 评论(0) 推荐(0)
摘要: 创建apps/oauth模块进行oauth认证 '''2.1 在apps文件夹下新建应用: oauth''' cd syl/apps python ../manage.py startapp oauth # 切换到apps文件夹下执行创建命令 '''2.2 添加子路由: oauth/urls.py' 阅读全文
posted @ 2020-10-12 07:14 做你的猫231 阅读(97) 评论(0) 推荐(0)
摘要: 1.微博三方登录流程 https://api.weibo.com/oauth2/authorize? client_id=4122644977 &response_type=code &state=study& forcelogin=true& redirect_uri=https%3A%2F%2F 阅读全文
posted @ 2020-10-12 07:11 做你的猫231 阅读(151) 评论(0) 推荐(0)
摘要: 新浪微博开放平台:https://open.weibo.com/ 1.注册账号 1.注册新浪微博账号 2.进入首页。创建网站接入的应用: https://open.weibo.com/ 选择立即接入,进入到创建应用页面 创建应用 基本信息页面: https://open.weibo.com/apps 阅读全文
posted @ 2020-10-11 21:58 做你的猫231 阅读(429) 评论(0) 推荐(0)
摘要: vue发送短信 1.前端函数如下,js方法代码无需更改,前端代码逻辑在components\common\lab_header.vue 2.只需要修改components\axios_api\http.js中调用的后端地址 // axios.defaults.baseURL = "http://12 阅读全文
posted @ 2020-10-09 07:29 做你的猫231 阅读(654) 评论(0) 推荐(0)