摘要: 1.安装 或者 使用 bower: 或者直接使用 cdn: 2.引入axios 这时候如果在其它的组件中,是无法使用 axios 命令的。但如果将 axios 改写为 Vue 的原型属性,就能解决这个问题 通过 this.axios({})来访问 3.基本使用 然后报CORS错误 Access to 阅读全文
posted @ 2018-12-20 15:41 我若亦如风 阅读(6846) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-12-20 14:44 我若亦如风 阅读(360) 评论(0) 推荐(0) 编辑
摘要: vue-router 默认 hash 模式 —— 使用 URL 的 hash 来模拟一个完整的 URL,于是当 URL 改变时,页面不会重新加载。 如果不想要很丑的 hash,我们可以用路由的 history 模式,这种模式充分利用 history.pushState API 来完成 URL 跳转而 阅读全文
posted @ 2018-12-20 14:02 我若亦如风 阅读(1128) 评论(0) 推荐(0) 编辑
摘要: 1.首先保证你的config/auth.php 中 guards 的 api 的 driver 选项改为 passport 2.注册中间件,在 app/Http/Kernel.php 文件中的 $routeMiddleware 数组中添加如下中间件 然后在需要认证接口路由文件 routes/api. 阅读全文
posted @ 2018-12-20 10:25 我若亦如风 阅读(6287) 评论(0) 推荐(0) 编辑
摘要: 1.首先通过 Composer 包管理器安装 Passport: 注:如果安装过程中提示需要更高版本的 Laravel:laravel/passport v5.0.0 requires illuminate/http ~5.6,可以通过指定版本来安装 composer require laravel 阅读全文
posted @ 2018-12-19 19:51 我若亦如风 阅读(1215) 评论(0) 推荐(0) 编辑
摘要: 在项目routes/web.php文件中添加了自定义的路由后,访问localhost/index.php/aaa,可以正常访问,但是去掉index.php后,提示404 Not Found1. 按照Laravel 5.6 文档,修改了public/.htaccess , 增加两行后,重启Apache 阅读全文
posted @ 2018-12-18 18:56 我若亦如风 阅读(948) 评论(0) 推荐(0) 编辑
摘要: 1.在项目根目录下运行如下命令 会生成一个dist目录, 2.然后将dist目录上传至服务器就可以访问页面了,不需要配置vue环境了。 阅读全文
posted @ 2018-12-16 20:30 我若亦如风 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 一、安装ftp服务器vsftpd $sudo apt-get update $sudo apt-get install vsftpd ftp服务器使用21端口,安装成功之后查看是否打开21端口 $ sudo netstat -npltu | grep 21 tcp 0 0 0.0.0.0:21 0. 阅读全文
posted @ 2018-12-16 14:06 我若亦如风 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 在本地登录ftp的时候吧报了530错误,看了好多资料,这里做一下总结 1.如果你是想通过root用户访问的话,可以执行一下操作 把root去掉(注释掉) 要点总结 第一步:安装vsftpdsudo apt-get install vsftpd 第二步:配置sudo vi /etc/vsftpd.co 阅读全文
posted @ 2018-12-16 14:03 我若亦如风 阅读(13820) 评论(0) 推荐(0) 编辑
摘要: ➜ ~ vue init webpack frontend ⠋ downloading template /usr/local/lib/node_modules/vue-cli/node_modules/rimraf/rimraf.js:313 throw er ^ Error: EACCES: p 阅读全文
posted @ 2018-12-11 20:24 我若亦如风 阅读(3069) 评论(0) 推荐(0) 编辑