特定情况下,localStorage在移动端无效,使用plus.storage。plus.storage有时PC无效,所以:
const user_info
= (window
.plus
&& JSON.parse(plus
.storage
.getItem('user_info'))) || JSON.parse(localStorage
.getItem('user_info'))
转载请注明原文地址:https://blackberry.8miu.com/read-32253.html