let mac: string[] = wifiManager.getDeviceMacAddress();
2.
import wifiManager from '@ohos.wifiManager';
在@ohos.wifiManager中有getDeviceMacAddress不?需要full's'd'k
/**
* Obtain the MAC address of a Wi-Fi device. Wi-Fi must be enabled.
* The MAC address is unique and cannot be changed.
* @permission ohos.permission.GET_WIFI_LOCAL_MAC and ohos.permission.GET_WIFI_INFO
* @returns { string[] } Returns the MAC address of the Wi-Fi device.
* @throws {BusinessError} 201 - Permission denied.
* @throws {BusinessError} 202 - System API is not allowed called by Non-system application.
* @throws {BusinessError} 801 - Capability not supported.
* @throws {BusinessError} 2501000 - Operation failed.
* @throws {BusinessError} 2501001 - Wifi is closed.
* @syscap SystemCapability.Communication.WiFi.STA
* @systemapi Hide this for inner system use.
* @since 9
*/
function getDeviceMacAddress(): string[];