LOADING...

加载过慢请开启缓存(浏览器默认开启)

loading

时间戳转化为日期格式&长按复制功能

  • 时间戳转化为日期:

    toTime(timestamp){
      var date = new Date(timestamp);
      let year = date.getFullYear();
      let month = date.getMonth() + 1;
      let day = date.getDate();
      let hour = date.getHours();
      let minute = date.getMinutes();
      let second = date.getSeconds();
      let str = `${year} 年 ${month} 月 ${day} 日 ${hour} 时 ${minute} 分 ${second} 秒`;
      return str;
    },
    
  • 长按复制:

<view class="list-item" bind:longtap="copyKey" id="{{key}}">
    <view class="name">密钥</view>
    <view class="value">{{key}}</view>
</view>
copyKey(e){
    wx.pro.setClipboardData({
        data:e.currentTarget.id
    }).then((res)=>{
    }).catch((e)=>{
        console.log(e);
    })
},