增加env ready事件
This commit is contained in:
parent
edc3f97359
commit
5559ec1e43
@ -1,9 +1,5 @@
|
|||||||
import init, {
|
import init, {
|
||||||
wget_address,
|
wget_address,
|
||||||
wencrypt,
|
|
||||||
wdecrypt,
|
|
||||||
password_hash,
|
|
||||||
password_verify,
|
|
||||||
hash_pass_svr,
|
hash_pass_svr,
|
||||||
sign,
|
sign,
|
||||||
sign_for_tran,
|
sign_for_tran,
|
||||||
@ -18,10 +14,10 @@ let walletCache = [];
|
|||||||
|
|
||||||
async function initWasm() {
|
async function initWasm() {
|
||||||
if (jc.wallet.platform === 'web') {
|
if (jc.wallet.platform === 'web') {
|
||||||
console.log('init wasm');
|
|
||||||
await init();
|
|
||||||
googleClient = new GoogleClient();
|
googleClient = new GoogleClient();
|
||||||
|
await init();
|
||||||
await googleClient.initGoolgeClient();
|
await googleClient.initGoolgeClient();
|
||||||
|
window.dispatchEvent(new CustomEvent('envready'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,3 +200,6 @@ for (let key in pages) {
|
|||||||
button.addEventListener('click', pages[key]);
|
button.addEventListener('click', pages[key]);
|
||||||
app.appendChild(button);
|
app.appendChild(button);
|
||||||
}
|
}
|
||||||
|
window.addEventListener('envready', (e) => {
|
||||||
|
console.log('接受到环境初始化事件, 可以显示登录按钮了');
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user