diff --git a/lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart b/lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart index 1434118..bd0632f 100644 --- a/lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart +++ b/lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart @@ -362,6 +362,7 @@ class _IntellectSearchGoodsDialogState void openUrl() async { ///跳转购买 UserInfoModel userInfo = UserInfoNotifier.staitcUserInfo; + /// 登录 if (userInfo?.token == null || userInfo.token == '') { print('need login...'); RouterUtil.goLogin(context); @@ -378,6 +379,15 @@ class _IntellectSearchGoodsDialogState if (Navigator.canPop(context)) { Navigator.pop(context); } + + String tempProvider = widget?.model?.provider ?? 'taobao'; + + /// 判断淘宝渠道是否授权 + if(tempProvider == GlobalConfig.PROVIDER_TB || tempProvider == GlobalConfig.PROVIDER_TM ) { + bool isAuth = await TaobaoAuth.auth(context); + if (!isAuth) return; + } + /// 改成统一跳转 await TurnChainUtil.jumpNative( context, diff --git a/lib/widgets/goods_details/evaluate/goods_details_evaluate_widget.dart b/lib/widgets/goods_details/evaluate/goods_details_evaluate_widget.dart index 130bbfc..ca050a9 100644 --- a/lib/widgets/goods_details/evaluate/goods_details_evaluate_widget.dart +++ b/lib/widgets/goods_details/evaluate/goods_details_evaluate_widget.dart @@ -34,11 +34,14 @@ class GoodsDetailsEvaluateWidget extends StatelessWidget { return; } - // bool isAuth = await TaobaoAuth.isAuth(); - if (!_user.isTBAuth) { - TaobaoAuth.auth(context); - return; - } + // if (!_user.isTBAuth) { + // TaobaoAuth.auth(context); + // return; + // } + bool isAuth = await TaobaoAuth.auth(context); + if(!isAuth) return; + + TradeResult result; if (!EmptyUtil.isEmpty(_model?.comment_url)) { if (Platform.isAndroid) { diff --git a/lib/widgets/home/home_auth/home_auth.dart b/lib/widgets/home/home_auth/home_auth.dart index 04b7107..6a8e842 100644 --- a/lib/widgets/home/home_auth/home_auth.dart +++ b/lib/widgets/home/home_auth/home_auth.dart @@ -27,10 +27,6 @@ class _HomeAuthState extends State { @override void initState() { - // TaobaoAuth.isAuth().then((isAuth) { - // setState(() => this._isAuth = isAuth); - // }); - super.initState(); }