安卓和IOS时间解析时间格式不一致的问题
处理方案当后端接口返回的时间是:2021-03-02 按照显示正常,但是在IOS 识别的格式是2021/03/02解决方案:replace(/-/g,’/’)页面vue getNewDate({ date: this.orgVip.validEndDate }) getNewDate (obj = {}) { let setdata = obj.date && (obj.date).replace(/-/g,'/') let newDate =
原创
2021-03-02 13:58:29 ·
951 阅读 ·
0 评论