You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
260 B
10 lines
260 B
// 获取本地localStorage里的userId
|
|
export default function useGetUserIdFromLocal() {
|
|
try {
|
|
const userLocal = uni.$storage.getStorageSync('user');
|
|
const user = JSON.parse(userLocal);
|
|
return user.id;
|
|
} catch (error) {
|
|
return null;
|
|
}
|
|
}
|
|
|