<!-- 时间戳 -->
<wxs module="time">
function format(ts) {
var d = getDate(ts)
return [d.getFullYear(), d.getMonth() + 1, d.getDate()].join('-')
}
module.exports.format = format
</wxs>
<!-- 页面上运用 -->
<view class="td">{{ time.format(item.createtime)}}</view>
小程序页面中时间戳-获取当前年月日
最新推荐文章于 2023-12-14 19:29:45 发布