Nhảy tới nội dung

Bắt đầu hỗ trợ ở phiên bản:

  • SDK: 2.5.3
Lưu ý

Cần xin cấp quyền tại trang Quản lý ứng dụng

Cho phép ứng dụng hiển thị QR code của OA.

Parameters​

Object object​

PropertyTypeDefaultRequiredDescriptionMinimum Version
idstringtrueId của OA
displayNamestringTên hiển thị của QR code
successfunctionCallback function khi gọi api thành công
failfunctionCallback function khi gọi api thất bại

Sample Code​

import { viewOAQr } from "zmp-sdk/apis";

viewOAQr({
id: "765465772305886642",
displayName: "Galaxy Cinema",
success: (data) => {
// xử lý khi gọi api thành công
console.log(data);
},
fail: (error) => {
// xử lý khi gọi api thất bại
console.log(error);
}
});

Hoặc

import { viewOAQr } from "zmp-sdk/apis";

const showQR = async () => {
try {
const data = await viewOAQr({
id: "765465772305886642",
displayName: "Galaxy Cinema"
});
} catch (error) {
// xử lý khi gọi api thất bại
console.log(error);
}
};