摘要: internals.applyRoutes = function(server, next) { server.state('user', { isSecure: false, path: '/', encoding: 'base64json' }); server.route([ { method: ['post'], path: '/account/login',... 阅读全文
posted @ 2018-04-09 11:01 沫沫w 阅读(224) 评论(0) 推荐(0) 编辑
摘要: let url = request.headers.referer; console.log(url) (输出值为:http://xx.com/phone/) 2、查看输出中是否有‘/phone/’ url.indexOf("/phone/") 如果不存在则返回-1,如果存在则返回该字符串在url中 阅读全文
posted @ 2018-04-09 11:00 沫沫w 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 不管是checkbox(多选)还是radio(单选) 添加checked属性时候建议用prop而不用attr 单选用attr点击一次添加checked="checked"属性,点击第二次页面上才显示选中状态 多选用attr只有第一次点击有效,其余的不会标识为选中状态 ////1、单选示例 ///2、 阅读全文
posted @ 2018-02-23 16:06 沫沫w 阅读(4126) 评论(0) 推荐(0) 编辑
摘要: //支付宝 根据官网接口参数传即可 //微信 特别注意:微信退款时需要证书,微信公众平台下载证书并点击安装到相应的服务器或者本地计算机上即可 服务器和本地测试的证书引入有差别 //未引入证书或引入错误会提示连接被关闭 1 X509Certificate2 cer = new X509Certific 阅读全文
posted @ 2018-02-23 13:53 沫沫w 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 1 public class 自定义类 { 2 public int Age { get;set;} 3 public string Name { get; set; } 4 public 自定义类(int age,string name) 5 { 6 Age= age; 7 Name = name 阅读全文
posted @ 2018-02-23 13:41 沫沫w 阅读(348) 评论(0) 推荐(0) 编辑
摘要: decimal result=decimal.Round(Convert.ToDecimal(5)/Convert.ToDecimal(2),2); 此处result输出值为2.5,总共2位 方法:先把除数被除数都转换为decimal类型,然后计算 阅读全文
posted @ 2018-02-23 13:30 沫沫w 阅读(863) 评论(0) 推荐(0) 编辑
摘要: var programmeSame = from p in data.ManagerProgramme where p.Type==1 orderby p.Date group p by new { pmmid=p.ManagerId, pmtime=p.time, pmdate=p.Date } 阅读全文
posted @ 2018-01-22 14:40 沫沫w 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 一、查询 find方法 db.collection_name.find(); 查询所有的结果: select * from users; db.users.find(); 指定返回那些列(键): select name, skills from users; db.users.find({}, {' 阅读全文
posted @ 2017-12-21 19:03 沫沫w 阅读(36189) 评论(0) 推荐(0) 编辑