已修复
ios真机调用wxs 失误?ios真机调用wxs 失误,还没有报错,Android手机可以正常显示,模拟器上ios也是正常的,这个怎么解决
2020-12-01var timeChn = function (val) { if (!val) { return " " } var reg = getRegExp("-", "g"); var _time = val.replace(reg, "/") var realTime = getDate(val).getTime() var nowTime = getDate().getTime() // console.log("-#--time----realTime---",realTime) // console.log("-#--time----nowTime---",nowTime) // console.log("-#--time----_time---",_time) var time_fm = getDate(realTime); var fmYear = time_fm.getFullYear() var fmMonth = time_fm.getMonth()+ 1; var fmDay = time_fm.getDate() var fmHours = time_fm.getHours() var fmMinutes = time_fm.getMinutes() var fmSeconds = time_fm.getSeconds() var minute = 1000 * 60; var hour = minute * 60; var day = hour * 24; var halfamonth = day * 15; var month = day * 30; var diffValue = nowTime - realTime var _min = diffValue / (60 * 1000) if(diffValue < day){ return fmHours + ':' + fmMinutes } else if (day*2>diffValue>day){ return "一天前" } else if (day*3>diffValue>day*2){ return "两天前" } else if (day*4>diffValue>day*3){ return "三天前" } else if (month*12>diffValue>day*3){ return fmMonth + '-' + fmDay } else if (diffValue>month*12){ return fmYear + '-' + fmMonth + '-' + fmDay } } module.exports = { timeChn:timeChn } <wxs src="../../../utils/dateUtil.wxs" module="dateUtil" /> <view class="time-view">{{dateUtil.timeFormatYMD(item.plan_pub_time)}}</view>
ios 真机调用wxs文件失效?ios真机调用wxs文件,无效,这是什么问题,怎么解决
2020-12-01