这种错误就是跨域问题: 我百度了各种方法,最终下面这种方法解决了,直接上代码: 解决: 如果没安装axios: npm install axios -save //安装axios main.js //引入axios import axios from 'axios' Vue.prototype.ax ...
分类:
移动开发 时间:
2020-02-01 21:43:25
阅读次数:
155
如何建立连接: 1、客户端:申请协议升级 首先,客户端发起协议升级请求。可以看到,采用的是标准的HTTP报文格式,且只支持GET方法。 GET / HTTP/1.1 Host: localhost:8080 Origin: http://127.0.0.1:3000 Connection: Upgr ...
分类:
Web程序 时间:
2020-02-01 15:58:36
阅读次数:
98
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf #tensorboard --logdir="./" def linearregression(): with tf.variable_scope(" ...
分类:
其他好文 时间:
2020-01-31 20:34:28
阅读次数:
63
方便版本更新以后,给各个项目打tag并推送。设置分支、标签信息以后,可多次调用函数,给多个项目打标签。 函数名:createtag 参数|说明 | 参数1|仓库地址 参数2|分支。标签建在那个分支 参数3|tag名。标签名字 参数4|备注。标签的备注 ...
分类:
其他好文 时间:
2020-01-30 22:59:21
阅读次数:
97
初始化并跟踪远程分支: echo "# test" >> README.mdgit initgit add README.mdgit commit -m "first commit"git remote add origin https://github.com/jiujue/branchName. ...
分类:
其他好文 时间:
2020-01-30 21:06:47
阅读次数:
68
一.首先对HandlerInterceptor进行封装,封装为MappingInterceptor.封装的方法里添加拦截器起作用的路径addPathPatterns(),及需要排除路径的方法excludePathPatterns() 二.写拦截器,拦截器实现封装好的MappingIntercepto ...
分类:
编程语言 时间:
2020-01-30 19:21:55
阅读次数:
92
最近公司代码仓库由github转gitlab,需要更新一些仓库的远程地址: 一、查看远程仓库地址 git remote -v 二、更新远程仓库地址 git remote set-url origin https://git.xxxxxxxxx.git ...
分类:
其他好文 时间:
2020-01-30 17:15:36
阅读次数:
96
命令git tag <tagname>用于新建一个标签,默认为HEAD,也可以指定一个commit id; 命令git tag -a <tagname> -m "blablabla..."可以指定标签信息; 命令git tag可以查看所有标签。 命令git push origin <tagname> ...
分类:
其他好文 时间:
2020-01-29 12:39:53
阅读次数:
69
今天搞了一下午,各种百度。说什么配置apache。其实我把事情搞复杂了。 其实只需要在自己写的php文件里边加下边的代码即可 <?php // 制定允许其他域名访问 header("Access-Control-Allow-Origin:*"); // 响应类型 header('Access-Con ...
分类:
Web程序 时间:
2020-01-28 19:03:43
阅读次数:
95
错误截图 背景 码云上创建了空项目 本地项目绑定了远程仓库,尝试git push,然后报了错 解决办法 使用强制命令git pull origin master --allow-unrelated-historie 后面加上 --allow-unrelated-histories , 把两段不相干的 ...
分类:
其他好文 时间:
2020-01-28 19:00:59
阅读次数:
47