Android Studio 4.0 及以上版本技巧及问题总结

Posted renhui

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio 4.0 及以上版本技巧及问题总结相关的知识,希望对你有一定的参考价值。

<wxs module="formatTime">
  var formatTimeCoupon = function(times){
    var date = getDate((times*1000));
    var year = date.getFullYear()
    var month = date.getMonth() + 1
    var day = date.getDate()
    month = month > 9 ? month : ‘0‘ + month
    day = day > 9 ? day : ‘0‘ + day
    return year + ‘.‘ + month + ‘.‘ + day
  }
  module.exports = {
    formatTimeCoupon:formatTimeCoupon
  }
</wxs>
<view>有效期至 {{formatTime.formatTimeCoupon(时间戳)}}</view>

注意:没有 new Date()   要用  getDate()

以上是关于Android Studio 4.0 及以上版本技巧及问题总结的主要内容,如果未能解决你的问题,请参考以下文章