mirror of
https://github.com/openharmony/third_party_jsframework.git
synced 2026-07-19 14:33:33 -04:00
@@ -169,6 +169,18 @@ export function mockOsAccount() {
|
||||
})
|
||||
}
|
||||
},
|
||||
getOsAccountLocalIdFromDomain: function (...args) {
|
||||
console.warn("AccountManager.getOsAccountLocalIdFromDomain interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (len > 0 && typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock, paramMock.paramNumberMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(paramMock.paramNumberMock);
|
||||
})
|
||||
}
|
||||
},
|
||||
queryMaxOsAccountNumber: function (...args) {
|
||||
console.warn("AccountManager.queryMaxOsAccountNumber interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
@@ -219,6 +231,18 @@ export function mockOsAccount() {
|
||||
})
|
||||
}
|
||||
},
|
||||
createOsAccountForDomain: function (...args) {
|
||||
console.warn("AccountManager.createOsAccountForDomain interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (len > 0 && typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock, osAccountInfoMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(osAccountInfoMock);
|
||||
})
|
||||
}
|
||||
},
|
||||
queryCurrentOsAccount: function (...args) {
|
||||
console.warn("AccountManager.queryCurrentOsAccount interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
@@ -291,6 +315,30 @@ export function mockOsAccount() {
|
||||
})
|
||||
}
|
||||
},
|
||||
getOsAccountLocalIdBySerialNumber: function (...args) {
|
||||
console.warn("AccountManager.getOsAccountLocalIdBySerialNumber interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (len > 0 && typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
},
|
||||
getSerialNumberByOsAccountLocalId: function (...args) {
|
||||
console.warn("AccountManager.getSerialNumberByOsAccountLocalId interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
const len = args.length
|
||||
if (len > 0 && typeof args[len - 1] === 'function') {
|
||||
args[len - 1].call(this, paramMock.businessErrorMock);
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve();
|
||||
})
|
||||
}
|
||||
},
|
||||
on: function (...args) {
|
||||
console.warn("AccountManager.on interface mocked in the Previewer. " +
|
||||
"How this interface works on the Previewer may be different from that on a real device.")
|
||||
|
||||
Reference in New Issue
Block a user