瀏覽代碼

1、淘宝弹窗授权方法更改

tags/0.0.15+4
PH2 3 年之前
父節點
當前提交
30319dcb03
共有 3 個文件被更改,包括 18 次插入9 次删除
  1. +10
    -0
      lib/dialog/global_dialog/intellect_search_goods_dialog/intellect_search_goods_dialog.dart
  2. +8
    -5
      lib/widgets/goods_details/evaluate/goods_details_evaluate_widget.dart
  3. +0
    -4
      lib/widgets/home/home_auth/home_auth.dart

+ 10
- 0
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,


+ 8
- 5
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) {


+ 0
- 4
lib/widgets/home/home_auth/home_auth.dart 查看文件

@@ -27,10 +27,6 @@ class _HomeAuthState extends State<HomeAuth> {

@override
void initState() {
// TaobaoAuth.isAuth().then((isAuth) {
// setState(() => this._isAuth = isAuth);
// });

super.initState();
}



Loading…
取消
儲存