摘要: 1.表结构分析 1.1商品模块表结构分析 from django.db import models from utils.MyBaseModel import Base class Goods(Base): GOODS_TYPE = ( ('1', 'Vip'), ('2', 'Course') ) 阅读全文
posted @ 2020-10-14 21:16 小白很快乐 阅读(163) 评论(0) 推荐(0)
摘要: 0.路径表关系梳理 1.路径表 # 路径表 class Path(Base): title = models.CharField('路径名', max_length=16) img = models.ImageField('路径图片', upload_to='path', null=True) de 阅读全文
posted @ 2020-10-13 20:43 小白很快乐 阅读(112) 评论(0) 推荐(0)
摘要: 01.用户模块 1.1注册 1.1.1获取图片验证码 1.简要描述 获取图片验证码 2.请求URL http://192.168.56.100:8888/verify/image_codes/?uuid=a8c690ec-5590-49e2-8ae7-e00873ed8538 3.请求方式:get 阅读全文
posted @ 2020-10-12 21:10 小白很快乐 阅读(197) 评论(0) 推荐(0)
摘要: 1.Vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1页面路径components\oauth.vue <template> <div> <div v-show='visiable'> 绑定用户 用户名: <input t 阅读全文
posted @ 2020-10-09 16:47 小白很快乐 阅读(257) 评论(0) 推荐(0)
摘要: 1.微博绑定用户接口 1.1oauth/urls.py中添加路由 urlpatterns = [ path('weibo/binduser/', views.OauthWeiboBindUser.as_view()), # /oauth/weibo/callback/ ] 1.2oauth/view 阅读全文
posted @ 2020-10-09 16:44 小白很快乐 阅读(145) 评论(0) 推荐(0)
摘要: 1.Vue微博回调空页面 注:微博回调空页面为:http://127.0.0.1:8888/oauth/callback 1.1页面路径components\oauth.vue <template> <div> <p>跳转中....</p> </div> </template> <script> i 阅读全文
posted @ 2020-10-09 16:37 小白很快乐 阅读(107) 评论(0) 推荐(0)
摘要: 1.微博回调接口 1.1oauth/urls.py中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_view()), # /oauth/weibo/callback/ ] 1.2oauth/views. 阅读全文
posted @ 2020-10-09 16:26 小白很快乐 阅读(100) 评论(0) 推荐(0)
摘要: 1.在Vue页面加载时动态发送请求获取微博授权url 1.1在components\common\lab_header.vue中写oauth动态获取微博授权URL // 获取微博登录地址 oauth() { // 从后端获取 微博登录地址 oauth_post().then((resp) => { 阅读全文
posted @ 2020-10-09 16:20 小白很快乐 阅读(141) 评论(0) 推荐(0)
摘要: https://api.weibo.com/oauth2/authorize? client_id=4122644977 &response_type=code &state=study& forcelogin=true& redirect_uri=https%3A%2F%2Fstudy.163.c 阅读全文
posted @ 2020-10-09 16:14 小白很快乐 阅读(280) 评论(0) 推荐(0)
摘要: 1.创建apps/oauth模块进行oauth认证 '''2.1 在apps文件夹下新建应用: oauth''' cd syl/apps python ../manage.py startapp oauth # 切换到apps文件夹下执行创建命令 '''2.2 添加子路由: oauth/urls.p 阅读全文
posted @ 2020-10-09 11:24 小白很快乐 阅读(912) 评论(0) 推荐(0)