wechat.ts 288 B

12345678910111213
  1. /**
  2. * @description: 获取设备设置
  3. * @param {string} key
  4. * @return {*}
  5. */
  6. export const getSystemInfo = (key: string) => {
  7. const systemSetting = tt.getSystemInfoSync()
  8. if (key && key in systemSetting) {
  9. return systemSetting[key];
  10. } else {
  11. return systemSetting;
  12. }
  13. };