代码改变世界

随笔档案-2016年10月

react 调用 native 的callShareAllFunc()方法,实现分享

2016-10-27 21:03 by 路途遥远,Go~, 385 阅读, 收藏,
摘要: let shareName = { '0': '微信', '1': '朋友圈', '2': '新浪微博', '3': ' QQ', '4': 'QQ空间'};render(){ //分享YztApp.configureShare({ "title": encodeURIComponent(this. 阅读全文

input固定在底部

2016-10-27 20:59 by 路途遥远,Go~, 1232 阅读, 收藏,
摘要: // input固定在底部//isFocusing获取焦点:true 失去焦点:false _onTouchInput(isFocusing){ this.phone_width = screen.width; let Boxbottom = this.refs['InputBoxBottom']; 阅读全文

git tag — 标签相关操作

2016-10-27 20:56 by 路途遥远,Go~, 300 阅读, 收藏,
摘要: 标签可以针对某一时间点的版本做标记,常用于版本发布。 列出标签 $ Git tag # 在控制台打印出当前仓库的所有标签$ git tag -l ‘v0.1.*’ # 搜索符合模式的标签 打标签 git标签分为两种类型:轻量标签和附注标签。轻量标签是指向提交对象的引用,附注标签则是仓库中的一个独立对 阅读全文

App.domain http->https

2016-10-13 19:45 by 路途遥远,Go~, 364 阅读, 收藏,
摘要: App.domain = `${location.origin}/toa-mgw/rest/gateway`.replace(/http:\/\//, 'https://'); 阅读全文

js 点赞数 处理

2016-10-09 10:53 by 路途遥远,Go~, 1956 阅读, 收藏,
摘要: likeNum(num) { if (num 0) { num = ''; } else if (num > 9999 && num <= 9999999) { num = parseInt(num / 10000); num = parseInt(num) + "万"; } else if (nu 阅读全文

js插入拼接链接 --包含可变字段

2016-10-08 11:01 by 路途遥远,Go~, 793 阅读, 收藏,
摘要: // newsId: 传参过来的Id, pathIdlet newsDetailId = parseInt(this.props.newsId); goTo() { window.location.hash = '#/allcommentslist/' + newsDetailId ;} 阅读全文