Pre Merge pull request !52 from blue2999/N/A

pull/52/MERGE
blue2999 2024-07-24 11:36:56 +00:00 committed by Gitee
commit 1832199791
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 16 additions and 10 deletions

View File

@ -17,22 +17,28 @@
const event = options.event;
const code = options.code;
const state = options.state;
let time = 10;
if (event === 'login') { //
const res = await sheep.$platform.useProvider().login(code, state);
} else if (event === 'bind') { //
sheep.$platform.useProvider().bind(code, state);
time = 1000;
}
// H5
let returnUrl = uni.getStorageSync('returnUrl');
if (returnUrl) {
uni.removeStorage({key:'returnUrl'});
location.replace(returnUrl);
} else {
uni.switchTab({
url: '/',
});
}
// openId
setTimeout(function(){
// H5
let returnUrl = uni.getStorageSync('returnUrl');
if (returnUrl) {
uni.removeStorage({key:'returnUrl'});
location.replace(returnUrl);
} else {
uni.switchTab({
url: '/',
});
}
},time);
// #endif
});
</script>