07 2021 档案

摘要:在utils目录下utils.py中自定义异常处理函数: from rest_framework.response import Response from rest_framework import status from rest_framework.views import exception 阅读全文
posted @ 2021-07-20 09:28 皮皮龙喔 阅读(99) 评论(0) 推荐(0)
摘要:在使用Django REST Framework框架过程中,简单的将返回接口进行封装,接口返回规范在最后面 # 可以放在utils或者common公共文件里面 class MyResponse(object): """api返回的信息的封装""" def __init__(self): self.s 阅读全文
posted @ 2021-07-20 09:20 皮皮龙喔 阅读(441) 评论(0) 推荐(0)
摘要:// params 传参 this.$router.push({ name: 'detail', params: { id: iid } }) // query传参 this.$router.push({ name: 'detail2', params: { id: iid,age:18 } }) 阅读全文
posted @ 2021-07-05 16:31 皮皮龙喔 阅读(70) 评论(0) 推荐(0)