24 lines
428 B
JavaScript
24 lines
428 B
JavaScript
export default {
|
|
enterInfo(id) {
|
|
uni.navigateTo({
|
|
url: `/pages/bookinfo/bookinfo?id=${id}`
|
|
});
|
|
},
|
|
|
|
checkLogin () {
|
|
if (localStorage.getItem("LoginStatus") == null) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
},
|
|
|
|
// 写本地
|
|
setLocalStorage(name,value) {
|
|
localStorage.setItem(name, JSON.stringify(value))
|
|
},
|
|
// 读本地
|
|
getLocalStorage(name) {
|
|
return JSON.parse(localStorage.getItem(name))
|
|
},
|
|
} |