The reason is that ios does not support the date in the format of 2018-04-26 passed in the database, and it must be converted to the format of 2018/04/26 to display properly;
Example: endtimes is the date returned
Small program implementation example:
Implementation steps:
Step 1: The request interface returns the date, usually in the format of 2018-04-26 09:41:55. If you use this date directly, call new Date(endtimes).getTime() to get the seconds or the year and month day, IOS will display NaN
At this point, the second step is required, the second step: use the replace function, call endtime.replace(/\-/g, "/") to replace all "-" with "/", and convert the date to 2018/04/26 09:41:55 This format, at this time, both ios and Android recognize the date in this format
Step 3: Finally, call new Date(endtimes).getTime() to get the seconds or the year, month, and day to display success.