Skip to content

Commit aa18a40

Browse files
committed
demo优化
1 parent 6abd00a commit aa18a40

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

example/ios/Runner/Info.plist

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string></string>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>en</string>
79
<key>CFBundleExecutable</key>
@@ -45,6 +47,6 @@
4547
<string>UIInterfaceOrientationLandscapeRight</string>
4648
</array>
4749
<key>UIViewControllerBasedStatusBarAppearance</key>
48-
<false/>
50+
<true/>
4951
</dict>
5052
</plist>

example/lib/main.dart

+8-12
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,18 @@ class _MyAppState extends State<MyApp> {
212212
});
213213
}
214214
/// 获取短信验证码
215-
void getSMSCode(String phoneNum,{String signId,String tempId}){
215+
void getSMSCode(){
216216
setState(() {
217217
_loading = true;
218218
});
219-
219+
String phoneNum = controllerPHone.text;
220+
if(phoneNum == null){
221+
//TODO: 提示
222+
}
220223
jverify.checkVerifyEnable().then((map) {
221224
bool result = map[f_result_key];
222225
if (result) {
223-
jverify.getSMSCode(phoneNum,signId,tempId).then((map) {
226+
jverify.getSMSCode(phoneNum: phoneNum).then((map) {
224227
print("获取短信验证码:${map.toString()}");
225228
int code = map[f_code_key];
226229
String message = map[f_msg_key];
@@ -243,8 +246,6 @@ class _MyAppState extends State<MyApp> {
243246
setState(() {
244247
_loading = true;
245248
});
246-
getSMSCode();
247-
248249
jverify.checkVerifyEnable().then((map) {
249250
bool result = map[f_result_key];
250251
if (result) {
@@ -266,12 +267,6 @@ class _MyAppState extends State<MyApp> {
266267
});
267268
}
268269

269-
void getSMSCode(){
270-
jverify.getSMSCode(phoneNumber: "18565775329").then((map){
271-
print("预取号接口回调:${map.toString()}");
272-
});
273-
}
274-
275270
/// SDK 请求授权一键登录
276271
void loginAuth() {
277272
setState(() {
@@ -355,7 +350,8 @@ class _MyAppState extends State<MyApp> {
355350
uiConfig.privacyTextSize = 13;
356351
//uiConfig.privacyWithBookTitleMark = true;
357352
//uiConfig.privacyTextCenterGravity = false;
358-
353+
uiConfig.authStatusBarStyle = JVIOSBarStyle.StatusBarStyleDarkContent;
354+
uiConfig.privacyStatusBarStyle = JVIOSBarStyle.StatusBarStyleDefault;
359355

360356
uiConfig.statusBarColorWithNav = true;
361357
uiConfig.virtualButtonTransparent = true;

0 commit comments

Comments
 (0)