Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xugenyuan
2024-04-29 11:15:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
110a2f6893b10e132c4d7012e2faf07367f6fd19
110a2f68
1 parent
8eb39349
ref |> 开启一键登录功能
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
sight_harmony/features/wdLogin/src/main/ets/utils/HuaweiAuth.ets
sight_harmony/features/wdLogin/src/main/ets/pages/login/OneKeyLoginPage.ets
View file @
110a2f6
...
...
@@ -3,6 +3,7 @@ import { Params } from 'wdBean/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import HuaweiAuth from '../../utils/HuaweiAuth'
import { BusinessError } from '@kit.BasicServicesKit'
import { ToastUtils } from 'wdKit/Index'
@Entry
@Component
...
...
@@ -44,8 +45,13 @@ struct OneKeyLoginPage {
return
}
HuaweiAuth.sharedInstance().oneKeyLogin().then((authorizeCode) => {
//TODO: 调用服务端接口登录
ToastUtils.shortToast("获取到授权code: " + authorizeCode + ",由于需要后台接口支持,暂时先跳转其他登录方式")
setTimeout(() => {
router.replaceUrl({url: WDRouterPage.loginPage.url()})
}, 3000)
}).catch((error: BusinessError) => {
})
...
...
sight_harmony/features/wdLogin/src/main/ets/utils/HuaweiAuth.ets
View file @
110a2f6
...
...
@@ -9,7 +9,7 @@ const TAG = "HuaweiOneKeyAuth"
export default class HuaweiAuth {
// 是否开启
static enable =
fals
e
static enable =
tru
e
// 匿名手机号
private _anonymousPhone?: string
get anonymousPhone() {
...
...
Please
register
or
login
to post a comment