Nhảy tới nội dung

my.getAppSecret

getAppSecret

my.getAppSecret là API dùng để lấy thông tin secret của Tini App hiện tại. Thông tin này được thiết lập ở trên Tini Console. Xem thêm App Key / Value

Quét mã để trải nghiệm

Xem code mẫu trên Tini Studio

Demo

Trải nghiệm thử với trình giả lập bên dưới

Khả dụng: Hỗ trợ từ version 1.87.5 trở lên.

API Params

Thuộc tínhKiểu dữ liệuMô tả
successFunctionCallback function khi thực hiện thành công.
failFunctionCallback function khi thực hiện thất bại.
completeFunctionCallback function khi thực hiện hoàn tất bất kể thành công hay thất bại.

Sample Code

<view>
<view class="block-content">
<text class="title text-full">my.getAppSecret</text>
<text class="description text-full">Get app secret, which is set via tini console</text>
<button class="button-full" onTap="onGetAppSecret">Get App Secret</button>
</view>
</view>
Page({
onGetAppSecret() {
my.getAppSecret({
success: (res) => {
my.alert({
title: 'Success',
content: JSON.stringify(res)
});
},
fail: (e) => {
my.alert({ title: 'Fail', content: JSON.stringify(e) });
}
});
}
});