上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: 先创建一父组件 redact.vue再创建一个 子组件 userRedact.vue在 父组件里 引入 子组件 , 并且给 子组件传 值: 子组件 渲染 父组件 传来的 solot = "right" 只要 父组件中 使用 slot = "right", 所有的内容都被 渲染到 子组件的 slot 阅读全文
posted @ 2020-06-26 11:46 飞鸟和蝉- 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 创建一个叫 LoginText.vue的子组件(父传子)在父组件中引入 LoginText.vue子组件, 并且给子组件 传递 labe, rule, placeholder...值 子组件接受父组件 传递过来的值 labe, rule, placeholder... 使用父组件, 传递过来的数据: 阅读全文
posted @ 2020-06-25 16:01 飞鸟和蝉- 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 建模:sequelize model:generate --name Cart --attributes productId:integer,userId:integer,number:integer推模: sequelize db:migrate 创建一个 cart.js, 然后在app.js中引 阅读全文
posted @ 2020-06-20 21:57 飞鸟和蝉- 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 通过wx.login 获取微信返回token: 安装异步请求request包(和axios是同类)cnpm i request –S在小程序端通过wx.login获取code(在小程序端不要使用他,code是一次性的)在后端需要请求微信官方的接口,把code和appid秘钥等等传给微信官方,等待微信 阅读全文
posted @ 2020-06-19 22:22 飞鸟和蝉- 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 创建数据表(Users)sequelize model:generate --name User --attributes username:string,password:string,openid:string,admin:booleansequelize db:migrate #运行迁移创建一 阅读全文
posted @ 2020-06-18 19:40 飞鸟和蝉- 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 1.请求拦截器: 请求拦截器的作用是在请求发送前进行一些操作:// 后添加的拦截器,先执行!!! // 添加请求拦截器(回调函数) axios.interceptors.request.use( config=>{ console.log('request interceptor 请求拦截器1'); 阅读全文
posted @ 2020-06-13 17:25 飞鸟和蝉- 阅读(1339) 评论(0) 推荐(0) 编辑
摘要: axios.defaults.baseURL只能请求一个端口 如果同时也要访问4000的接口, 就要用到 instance这个可以使用自定义配置创建axios的新实例(可以创建过个) 同时可以访问两个端口 阅读全文
posted @ 2020-06-13 16:26 飞鸟和蝉- 阅读(4910) 评论(0) 推荐(0) 编辑
摘要: /* index.js */ /* GET请求 */ function testGet() { axios({ url:'http://localhost:3000/posts', method:'GET', params:{ id:2, xxx:"abc" } }).then(response=> 阅读全文
posted @ 2020-06-13 15:07 飞鸟和蝉- 阅读(333) 评论(0) 推荐(0) 编辑
摘要: <script> /* GET请求 */ function testGet() { axios({ url:'http://localhost:3000/posts', method:'GET', params:{ id:2, xxx:"abc" } }).then(response=>{ cons 阅读全文
posted @ 2020-06-13 15:01 飞鸟和蝉- 阅读(356) 评论(0) 推荐(0) 编辑
摘要: http请求 和 ajax请求: API: 阅读全文
posted @ 2020-06-13 11:23 飞鸟和蝉- 阅读(1175) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页