2016年6月9日

摘要: when里参数必须是Promise对象,when(xxx) 返回的也是一个Promise。 阅读全文
posted @ 2016-06-09 22:42 shenggen 阅读(462) 评论(0) 推荐(0) 编辑

2016年5月25日

摘要: NEJ.define([ './global.js', '{platform}util.js' ],function(NEJ,_h,_p,_o,_f,_r){ /* * 查看数据是否指定类型 * @param {Variable} 数据 * @param {String} 类型 * @return {Boolean} 是否... 阅读全文
posted @ 2016-05-25 17:31 shenggen 阅读(632) 评论(0) 推荐(0) 编辑

2016年5月15日

摘要: 比如我一套代码数据库代码分为中文站和英文站,每个表中我都有一个site_code字段来区分, 两个站点部署在不同的人服务器,这个时候我们就用系统环境变量来区分, 下面直接在mac下设置环境变量 加入一行代码 export site_code='cn' 如果的unix下,在终端直接运行 export 阅读全文
posted @ 2016-05-15 23:01 shenggen 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 1、Schema的扩展 更多regex可以查看官方资料 https://docs.mongodb.com/manual/reference/operator/query/regex/ 阅读全文
posted @ 2016-05-15 22:37 shenggen 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1、Schema : 一种以文件形式存储的数据库模型骨架,不具备数据库的操作能力 Model : 由Schema发布生成的模型,具有抽象属性和行为的数据库操作对 Entity : 由Model创建的实体,他的操作也会影响数据库 2、Schema、Model、Entity的关系请牢记,Schema生成 阅读全文
posted @ 2016-05-15 22:11 shenggen 阅读(148) 评论(0) 推荐(0) 编辑

2016年5月13日

摘要: 不知道做了什么,有两天没有跑vue项目啦,今天突然出现加载脚本的时候出现 ERR_CONTENT_LENGTH_MISMATCH这个错误, 所以我去搜索了一下 找到如下答案 http://stackoverflow.com/questions/22183859/javascript-err-cont 阅读全文
posted @ 2016-05-13 13:37 shenggen 阅读(921) 评论(0) 推荐(0) 编辑

2016年5月12日

摘要: 1、 如果是一个列表页面,当要触发编辑页面是如何做的呢?其实我测试只要点击第一条数据去编辑就好啦!如果页面结构如下 我可以这样写,这里我们用到了elementByPartialLinkText ,elementByLinkText是全文字匹配的,很显然这里不适用,直接上代码 阅读全文
posted @ 2016-05-12 17:37 shenggen 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 接一下来讲一讲api的使用 http://macacajs.github.io/macaca-wd/api/ get(initialURL) 就可以用chrome打开一个页面, elementByClassName('search-article')--获了一个class名叫search-artic 阅读全文
posted @ 2016-05-12 13:54 shenggen 阅读(297) 评论(0) 推荐(0) 编辑

2016年5月11日

摘要: 1、map在浏览器的兼容性相对来说是比较好的,这是我在项目中的一个处理方法 推荐到下面网站去画map http://imagemap-generator.dariodomi.de/ 2、画完去github上拉一下代码 https://github.com/stowball/jQuery-rwdIma 阅读全文
posted @ 2016-05-11 20:39 shenggen 阅读(2524) 评论(0) 推荐(1) 编辑
摘要: 1、 切图真的是就件很费力的事情,接下有给大家提供一个工具,本人觉得还不错 http://www.cutterman.cn/ 请参考这个网站,安装方法也有,很简单,我就不说了,赶紧点连接去注册帐号吧 阅读全文
posted @ 2016-05-11 17:52 shenggen 阅读(327) 评论(0) 推荐(0) 编辑

导航