diff --git a/lib/models/base/skip_model.dart b/lib/models/base/skip_model.dart index e60e8d2..fae56bb 100644 --- a/lib/models/base/skip_model.dart +++ b/lib/models/base/skip_model.dart @@ -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 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 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; } } diff --git a/lib/util/router_util.dart b/lib/util/router_util.dart index 5e124ce..5d8fcc2 100644 --- a/lib/util/router_util.dart +++ b/lib/util/router_util.dart @@ -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') {