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
# clashx | |
glados.rock | |
# ===================== shell ========================== | |
# homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# [oh my zsh ](https://ohmyz.sh/#install) | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
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
// 以百度 api 为例 | |
const getBmapInstance = baseURL => ({ url, params }) => | |
new Promise((resolve, reject) => { | |
jsonp(baseURL + url + formatParams(params), null, (err, data) => { | |
if (err) { | |
reject(new Error('获取poi失败,请联系网站管理员')); | |
return; | |
} | |
if (data.status !== 0) { | |
reject(new Error('获取poi失败,请联系网站管理员')); |