mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
This commit is contained in:
parent
a1a7b5b99d
commit
9047153349
1 changed files with 9 additions and 0 deletions
|
|
@ -1,8 +1,13 @@
|
|||
import {showMessage} from "../dialog/message";
|
||||
import {fetchPost} from "./fetch";
|
||||
import {genUUID} from "./genID";
|
||||
import {progressLoading} from "../dialog/processSystem";
|
||||
|
||||
export const processIOSPurchaseResponse = (code: number) => {
|
||||
progressLoading({
|
||||
code: 2,
|
||||
msg: ""
|
||||
});
|
||||
if (code === 0) {
|
||||
/// #if MOBILE
|
||||
document.querySelector("#modelMain").dispatchEvent(new CustomEvent("click", {
|
||||
|
|
@ -72,6 +77,10 @@ export const iOSPurchase = (productType: string) => {
|
|||
productID = productType === "function" ? "00" : "02";
|
||||
}
|
||||
window.webkit.messageHandlers.purchase.postMessage(`${productID} ${genUUID().substring(0, 19)}${window.siyuan.config.cloudRegion}00${window.siyuan.user.userId.substring(0, 1)}-${window.siyuan.user.userId.substring(1)}`);
|
||||
progressLoading({
|
||||
code: 1,
|
||||
msg: ""
|
||||
});
|
||||
});
|
||||
} else {
|
||||
showMessage(window.siyuan.languages.needLogin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue