From fe2f6fb25f04785c2f455932a0e00ce74193b3bb Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Wed, 13 Jan 2021 13:48:23 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E4=B8=8D=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/models/base/skip_model.dart | 15 ++++++++++----- lib/util/router_util.dart | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) 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') {