Nhảy tới nội dung
Lưu ý

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

Đóng Zalo Mini App.

Parameters​

Object object​

PropertyTypeDefaultRequiredDescriptionMinimum Version
successfunctionCallback function khi gọi api thành công
failfunctionCallback function khi gọi api thất bại

Sample Code​

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

closeApp({
success: (res) => {
// xử lý khi gọi api thành công
},
fail: (error) => {
// xử lý khi gọi api thất bại
console.log(error);
}
});

Hoặc

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

const closeMiniApp = async () => {
try {
await closeApp({});
} catch (error) {
// xử lý khi gọi api thất bại
console.log(error);
}
};