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