index.ts 348 B

123456789101112
  1. import { common } from '../../../utils';
  2. import { CacheGetValue } from '../../../service/base';
  3. export const useLoadViewMenu = async () => {
  4. const resp = await CacheGetValue({
  5. key: 'smallproViewMenu',
  6. });
  7. if (resp && resp.length) {
  8. const menu = JSON.parse(resp[0].Value || '[]');
  9. menu.length && wx.setStorageSync('menuList', menu);
  10. }
  11. };