cocos-js 工具函数

https://www.cnblogs.com/kefeiGame/p/8335553.html

1、获取URL中的请求参数的值—-此方法接收参数名

function getQueryString(name) {
var reg = new RegExp(“(^|&)” + name + “=([^&]*)(&|$)”, “i”);
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURIComponent(r[2]);
return null;
};

3、远程图片加载
loadImgFromUrl: function (target, imgUrl, p, tag) {
if(!imgUrl)return;
var self = target;
var loadCb = function(err, img){
cc.textureCache.addImage(imgUrl);
var texture2d = new cc.Texture2D();
texture2d.initWithElement(img);
texture2d.handleLoadedTexture();
var sp = new cc.Sprite();
sp.initWithTexture(texture2d);
self.addChild(sp);
sp.x = p.x;
sp.y = p.y;
sp.tag = tag;
};
cc.loader.loadImg(imgUrl, {isCrossOrigin : false }, loadCb);
},

跨域

https://www.cnblogs.com/renjing/p/6394725.html
https://www.cnblogs.com/bninp/p/5694277.html
http://blog.51cto.com/ixdba/1928719
https://blog.csdn.net/G_eorge/article/details/69228400?locationNum=8&fps=1

配置nginx https://blog.csdn.net/kkgbn/article/details/52276866

server {
    listen       9001;
    server_name  localhost;

    location / {
        root   ../;
        index  index.html index.htm;
    }

  # 访问127.0.0.1:9001/api/testdir
  # 代理成 http://otherweb.com/testdir
      location /api/{
            proxy_pass http://otherweb.com/;
            proxy_cookie_path / /api;
        }

}

hello hexo

草 稿
hexo

themes/jane
http://hejx.space/2016/02/07/hexo-theme-jane/

gitment
oauth
https://imsun.net/posts/gitment-introduction/

hexo-admin
https://www.jianshu.com/p/68e727dda16d
http://yeshaoting.cn/article/hexo/hexo%E4%BD%BF%E7%94%A8%E8%BF%9B%E9%98%B6/
设置密码

git子模块操作
https://www.cnblogs.com/nicksheng/p/6201711.html

nohup和&后台运行
https://www.cnblogs.com/baby123/p/6477429.html
https://segmentfault.com/q/1010000004624987
$ nohup hexo server -p 80 &
$ logout

二级域名 nginx
https://www.cnblogs.com/huhuixin/p/7843161.html