摘要: // 将对象的键添加到数组 var arr = Object.keys(site); //英文 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys 中文 https: 阅读全文
posted @ 2017-11-04 18:04 ThisCall 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: // 商品详情页跳转函数 detailInto: function (e) { // console.log() var change = e.currentTarget.dataset.id; wx.navigateTo({ url: '../detail/detail?id=' + change 阅读全文
posted @ 2017-11-04 17:13 ThisCall 阅读(2148) 评论(0) 推荐(0) 编辑
摘要: // 购物车删除 deleteList(e) { const index = e.currentTarget.dataset.index; let carts = this.data.carts; carts.splice(index, 1); // 删除购物车列表里这个商品 this.setDat 阅读全文
posted @ 2017-11-04 15:28 ThisCall 阅读(5325) 评论(0) 推荐(0) 编辑
摘要: <view class="container"> <!-- menue --> <view class="aside flex"> <block wx:key="navList" wx:for="{{navList}}"> <view class="type-nav flexca" bindtap= 阅读全文
posted @ 2017-11-04 11:31 ThisCall 阅读(1014) 评论(0) 推荐(0) 编辑
摘要: // "2017/10/1 00:00" kaiShi: function (a) { var that = this; function nowTime() { var dateTime = new Date(); var timestamp = Date.parse(new Date()); v 阅读全文
posted @ 2017-11-04 10:26 ThisCall 阅读(2108) 评论(0) 推荐(1) 编辑
摘要: js中获取时间new date()的用法 获取时间: 1 var myDate = new Date();//获取系统当前时间 获取特定格式的时间: 1 myDate.getYear(); //获取当前年份(2位) 2 myDate.getFullYear(); //获取完整的年份(4位,1970- 阅读全文
posted @ 2017-11-04 10:24 ThisCall 阅读(32115) 评论(0) 推荐(0) 编辑
摘要: flex-align:默认是设置垂直方向的对齐方式,值: start、end、center、stretch、baseline。flex-pack:设置子元素之间如何分配多余空间,值:start、end、center、justify。flex-direction:设置子元素的排列方式, row、row 阅读全文
posted @ 2017-11-04 10:22 ThisCall 阅读(549) 评论(0) 推荐(0) 编辑