This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###返回数据结构说明 | |
```` | |
{ | |
status: int //请求的状态码,0:成功;非0:失败 | |
msg: string //请求码简单描述(status=0时,msg=“success”, status!=0时为相应错误信息) | |
data: json|boolean|string //请求返回的数据 | |
//常规情况下get请求data为json类型,post|update|delete请求 data为boolean类型 | |
} | |
```` | |
###图片上传(上传到我们自己服务器) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rundata.setLayoutEnabled(false) | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>iframe跨域解决方案</title> | |
</head> | |
<body> | |
<script> | |
var json = top.KISSY.unparam(location.search.slice(1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
呦呦 = ng.module('呦呦', [], ['$httpProvider', ($httpProvider) -> | |
#修改Content-Type | |
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8' | |
serialize = (rawData) -> | |
tmpData = {} | |
queryString = '' | |
ng.forEach(rawData, (value, key) -> | |
if (ng.isArray(value) || ng.isArray(Object)) | |
ng.forEach(value, (v, i) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
#tab | |
$(".cards").on 'click', '.tab-title', (e)-> | |
$tab = $ e.currentTarget | |
$target = $ $tab.data 'target' | |
$(".tab-title.active").removeClass 'active' | |
$tab.addClass 'active' | |
$(".tab-body.active").removeClass 'active' | |
$target.addClass 'active' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --commit-filter 'export GIT_AUTHOR_NAME="Mickey-"; export GIT_AUTHOR_EMAIL="[email protected]";export GIT_COMMITTER_NAME="Mickey-"; export GIT_COMMITTER_EMAIL="[email protected]";git commit-tree "$@"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"自定义变量 | |
:let tab_width=2 | |
:execute 'set tabstop='.tab_width | |
:execute 'set shiftwidth='.tab_width | |
:execute 'set softtabstop='.tab_width | |
"set tabstop=tab_width "一个TAB字符占多少个空格的位置 | |
"set shiftwidth=tab_width "使用每层缩进的空格数 | |
"set softtabstop=tab_width "方便在开启了et后使用退格(backspace)键,每次退格将删除X个空格 |