11 2019 档案

摘要:在网上看到的 觉得还不错的文章,做个记录。 配置文件 app.json的配置(全局) { // 用来配置页面的路径 "pages":[ "pages/index/index", // 首页 "pages/Test/Test" // 跳转的页面 ], "window":{ "enablePullDow 阅读全文
posted @ 2019-11-27 15:51 酷爱。 阅读(268) 评论(0) 推荐(0)
摘要:在app.json处设置“tabBar”,例子如下: { "pages": [ "pages/index/index", "pages/pages1/pages1", "pages/pages2/pages2" ], "window": { "backgroundTextStyle": "light 阅读全文
posted @ 2019-11-26 23:29 酷爱。 阅读(550) 评论(0) 推荐(0)
摘要:1,首先vue跨域我知道两种 ,一种在config文件下,index.js里面配置跨域: module.exports = { dev: { // Paths assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { '/a 阅读全文
posted @ 2019-11-25 22:48 酷爱。 阅读(846) 评论(0) 推荐(0)
摘要:简单的代码逻辑 views.py # 批量删除class Pdels(APIView): def post(self,request): id = request.data.get('piliang') #获取前端传过来的值 ss=Stu.objects.filter(id__in=id).dele 阅读全文
posted @ 2019-11-13 13:21 酷爱。 阅读(512) 评论(0) 推荐(0)
摘要:# 模糊搜索views.pyclass Sousou(APIView): def post(self, request): sou = request.data.get('sou') #从前端接收的值 if not sou: return Response({'code': 10020, 'mess 阅读全文
posted @ 2019-11-12 17:10 酷爱。 阅读(588) 评论(0) 推荐(0)
摘要:父组件<template> <div> <h1>展示学生</h1> <table border="2"> <tr> <td>学生姓名</td> </tr> <tr v-for="i in aa"> <td>{{i.name}}</td> </tr> </table> <!--父组件传值 到子组件 : 阅读全文
posted @ 2019-11-12 16:27 酷爱。 阅读(912) 评论(0) 推荐(0)
摘要:# 添加学生class Addstu1(APIView): def post(self, request): name = request.data.get('name') #前端的传过来的name image = request.FILES.get('file') cid = request.da 阅读全文
posted @ 2019-11-11 16:54 酷爱。 阅读(403) 评论(1) 推荐(0)
摘要:# 主表class Base(models.Model): create_time = models.DateTimeField(auto_now_add=True) #创建时间 update_time = models.DateTimeField(auto_now=True) #更新时间 clas 阅读全文
posted @ 2019-11-10 00:21 酷爱。 阅读(199) 评论(0) 推荐(0)
摘要:# 添加学生class Addstu1(APIView): def post(self,request): data = request.data data['img'] = '123456' # img直接写成了死的数据 print(data) ss=Stuerializers1(data=dat 阅读全文
posted @ 2019-11-10 00:15 酷爱。 阅读(490) 评论(0) 推荐(0)
摘要:拦截器 1.拦截路由 // 拦截器// 路由拦截// to去哪个路由,from 从哪里来,next下一步router.beforeEach((to,from,next)=>{ // 如果是去login1 if (to.path == '/login1'){ //进行下一步 next(); } els 阅读全文
posted @ 2019-11-10 00:09 酷爱。 阅读(351) 评论(0) 推荐(0)