“yanghuaxuan” há 3 anos
ascendente
cometimento
8808ca92c3
2 ficheiros alterados com 14 adições e 5 eliminações
  1. +10
    -5
      lib/models/base/skip_model.dart
  2. +4
    -0
      lib/util/router_util.dart

+ 10
- 5
lib/models/base/skip_model.dart Ver ficheiro

@@ -3,12 +3,15 @@ class SkipModel {
String requiredLogin;
String requiredTaobaoAuth;
String skipIdentifier;
String isJump;

SkipModel(
{this.url,
this.requiredLogin,
this.requiredTaobaoAuth,
this.skipIdentifier});
SkipModel({
this.url,
this.requiredLogin,
this.requiredTaobaoAuth,
this.skipIdentifier,
this.isJump
});

SkipModel.fromJson(Map<String, dynamic> json) {
fromJson(json);
@@ -19,6 +22,7 @@ class SkipModel {
requiredLogin = json['required_login']?.toString();
requiredTaobaoAuth = json['required_taobao_auth']?.toString();
skipIdentifier = json['skip_identifier'];
isJump = json['is_jump']?.toString();
}

Map<String, dynamic> toJson() {
@@ -27,6 +31,7 @@ class SkipModel {
data['required_login'] = this.requiredLogin;
data['required_taobao_auth'] = this.requiredTaobaoAuth;
data['skip_identifier'] = this.skipIdentifier;
data['is_jump'] = this.isJump;
return data;
}
}

+ 4
- 0
lib/util/router_util.dart Ver ficheiro

@@ -21,6 +21,10 @@ class RouterUtil {
print('skipIdentifier 参数不存在,无法跳转页面');
return Future.error('skipIdentifier 参数不存在,无法跳转页面');
}
// is_jump等于0不跳转
if(!EmptyUtil.isEmpty(skipModel.isJump) && skipModel.isJump == '0') {
return;
}
print('skipIdentifier: ${skipModel.skipIdentifier}');
hideKeyboard(context);
if (skipModel?.requiredLogin == '1') {


Carregando…
Cancelar
Guardar