MainViewModel.ets 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import ItemData from './ItemData';
  2. export class MainViewModel{
  3. static readonly OO_MUSIC: number = 100;
  4. static readonly OO_VIDEO: number = 101;
  5. static readonly OO_SIMI: number = 102;
  6. static readonly OO_STREAM: number = 103;
  7. static readonly SAFE_TEST: number = 11;
  8. static readonly SEE_PWD: number = 22;
  9. static readonly SPEED_TEST: number = 33;
  10. static readonly JIAO_CHENG: number = 44;
  11. static readonly CAMERA_TEST: number = 55;
  12. static readonly POWER_TEST: number = 66;
  13. static readonly DELAY_SPEED: number = 66;
  14. static readonly DOWN_SPEED: number = 77;
  15. static readonly AVER_SPEED: number = 88;
  16. static readonly MENU_HOME: number = 66;
  17. static readonly MENU_MUSIC: number = 67;
  18. static readonly MENU_SETTING: number = 68;
  19. static readonly MENU_FIND: number = 69;
  20. static readonly MENU_ABOUT: number = 99;
  21. static readonly MENU_UPDATE: number = 111;
  22. static readonly MENU_USER: number = 112;
  23. static readonly MENU_YSZC: number = 222;
  24. static readonly MENU_DUTY: number = 221;
  25. static readonly MENU_NET_CONNECT: number = 223;
  26. static readonly MENU_SIMI: number = 224;
  27. static readonly MENU_LIKE: number = 225;
  28. static readonly MENU_HAOPING: number = 226;
  29. static readonly MENU_VIP: number = 227;
  30. static readonly MENU_MIEDIA_KU: number = 228;
  31. static readonly MENU_MIEDIA_ARTIST: number = 229;
  32. static readonly MENU_MIEDIA_ALBUM: number = 230;
  33. static readonly MENU_FILE_SCAN: number = 231;
  34. static readonly MENU_SHARE: number = 232;
  35. static readonly MENU_CHARTS: number = 233;
  36. //测滑菜单的数据
  37. getDrawerData(): Array<ItemData> {
  38. let drawerGridData: ItemData[] = [
  39. new ItemData($r('app.string.find_music'), { type: 'symbol', value: $r('sys.symbol.music_note_circle') }, MainViewModel.MENU_FIND, false),
  40. new ItemData($r('app.string.dir'), { type: 'symbol', value: $r('sys.symbol.music') }, MainViewModel.MENU_MUSIC, false),
  41. new ItemData($r('app.string.media_ku'), $r('app.media.hm_playlist'),MainViewModel.MENU_MIEDIA_KU,false),
  42. new ItemData($r('app.string.artist'), $r('app.media.kp_music'),MainViewModel.MENU_MIEDIA_ARTIST,false),
  43. new ItemData($r('app.string.album'), $r('app.media.llq'),MainViewModel.MENU_MIEDIA_ALBUM,false),
  44. // new ItemData($r('app.string.user_center'), { type: 'symbol', value: $r('sys.symbol.person') }, MainViewModel.MENU_USER, false),
  45. new ItemData($r('app.string.file_scan'), { type: 'symbol', value: $r('sys.symbol.doc_text_badge_magnifyingglass') },MainViewModel.MENU_FILE_SCAN,false),
  46. new ItemData($r('app.string.music_charts'), { type: 'symbol', value: $r('sys.symbol.doc_plaintext') },MainViewModel.MENU_CHARTS,false),
  47. // new ItemData($r('app.string.setting'), { type: 'symbol', value: $r('sys.symbol.gearshape') },MainViewModel.MENU_SETTING,false),
  48. new ItemData($r('app.string.about_me'), { type: 'symbol', value: $r('sys.symbol.info_shield') },MainViewModel.MENU_ABOUT,false),
  49. ];
  50. return drawerGridData;
  51. }
  52. //首页安全体检,查看密码,网络测速的模块数据
  53. getWiFiGridData(): Array<ItemData> {
  54. let firstGridData: ItemData[] = [
  55. // new ItemData($r('app.string.see_pwd'), $r('app.media.icon_cw'),MainViewModel.SEE_PWD,false),
  56. // new ItemData($r('app.string.safe_test'), $r('app.media.safe_icon2'),MainViewModel.SAFE_TEST,false),
  57. // new ItemData($r('app.string.power_test'), $r('app.media.icon_power'),MainViewModel.POWER_TEST,false),
  58. // // new ItemData($r('app.string.add_speed'), $r('app.media.safe_blue'),MainViewModel.CAMERA_TEST,false),
  59. // new ItemData($r('app.string.speed_test'), $r('app.media.find_icon'),MainViewModel.SPEED_TEST,false),
  60. // new ItemData($r('app.string.mac_search'), $r('app.media.icon_mac'),MainViewModel.JIAO_CHENG,false),
  61. ];
  62. return firstGridData;
  63. }
  64. }
  65. export default new MainViewModel();