Skip to content

Instantly share code, notes, and snippets.

@kevinma2010
kevinma2010 / cookie.js
Last active April 15, 2016 02:49
Javascript cookie操作工具
@kevinma2010
kevinma2010 / demo.js
Last active June 3, 2016 08:41
基于 jQuery Ajax 定制自己喜爱的 API
//附加公共参数
$http.global("token","abcd321");
$http.use("/api", function (res) {
if (res.success) {
return true;
}
var err = res.error;
if (err.code === 1001) {
location.href = "/login.html";
} else {