Record of problems encountered in Apple iOS development (compatibility issues) [bug fix]

Mobile terminal development often encounters some compatibility issues. My Android machine is compatible with everything, and the business Mac machine is more rebellious.

Therefore, various rebellious problems and solutions will be recorded later. (*^▽^*)

1. The iOS page does not display images.

Description of the problem: The picture is uploaded on the first page, but the business feedback on the second page cannot echo the picture. It can be echoed with the browser and my Android phone! Business Macs cannot echo.

Reason: The elements of this page are generated according to the configuration of the backend. When the page is rendered, I first assign the data from the cache, and then generate the form display. It may be that the order of the two methods causes ios to fail to echo.

Solution: Modify the method calling order, let the page form element render first, and then call the assignment of the element. After the change, the Macintosh reported that there was no problem.

2. IOS cannot jump to the next page

Description of the problem: Can't jump when clicking Next

Reason: After using vconsole, it is found that the page has an error, which is the error of setItem. In the method of clicking the next step, there is a cache setting session storage.setItem. The main reason for this is that sessionstorage can't plug too many things.

Solution: Check whether there is any unnecessary cache, and don't stuff too much content into sessionStorage.

缓存的清理:

页面初始化前,或者整个页面流程结束后,可以清理一下会话缓存,避免缓存累积过多,后续无法使用出现异常。

1、sessionStorage.removeItem('key');//清理具体值

2、sessionStorage.clear();//慎用,确认都是不要的就可以清

         188、to be continued

Guess you like

Origin blog.csdn.net/ss_Tina/article/details/130560874