diff --git a/lib/common/core/app_consts.dart b/lib/common/core/app_consts.dart index 39c8fb2..e5902c4 100644 --- a/lib/common/core/app_consts.dart +++ b/lib/common/core/app_consts.dart @@ -2,16 +2,26 @@ import '../request/basic_config.dart'; class AppConsts { /// 隐私协议 - static const String userPrivacyPolicyUrl = 'http://page.kouyuxingqiu.com/wowenglishuserregister.html'; + static const String userPrivacyPolicyUrl = + 'http://page.kouyuxingqiu.com/wowenglishuserregister.html'; /// 儿童隐私协议 - static const String childrenPrivacyPolicyUrl = 'http://page.kouyuxingqiu.com/wowenglishchildprotect.html'; + static const String childrenPrivacyPolicyUrl = + 'http://page.kouyuxingqiu.com/wowenglishchildprotect.html'; + + /// 小鵝通 + static const String xiaoeShopUrl = 'https://appo61s7g678876.h5.xiaoeknow.com'; /// 与第三方共享协议 - static const String userTermSdkUrl = 'http://page.kouyuxingqiu.com/term_sdk.html'; + static const String userTermSdkUrl = + 'http://page.kouyuxingqiu.com/term_sdk.html'; /// 先声SDK - static String xsAppKey = 'a418'; - static String xsAppSecretKey = BasicConfig.isTestDev?'1a16f31f2611bf32fb7b3fc38f5b2c81':'c11163aa6c834a028da4a4b30955be99'; - static String xsAppService = BasicConfig.isTestDev?'ws://trial.cloud.ssapi.cn:8080':'"wss://api.cloud.ssapi.cn'; + static String xsAppKey = 'a418'; + static String xsAppSecretKey = BasicConfig.isTestDev + ? '1a16f31f2611bf32fb7b3fc38f5b2c81' + : 'c11163aa6c834a028da4a4b30955be99'; + static String xsAppService = BasicConfig.isTestDev + ? 'ws://trial.cloud.ssapi.cn:8080' + : '"wss://api.cloud.ssapi.cn'; } diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index 09c344c..c869b56 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -4,6 +4,7 @@ import 'package:flutter_app_update/update_model.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:wow_english/common/core/app_config_helper.dart'; +import 'package:wow_english/common/core/app_consts.dart'; import 'package:wow_english/common/extension/string_extension.dart'; import 'package:wow_english/models/app_version_entity.dart'; import 'package:wow_english/pages/home/state.dart'; @@ -108,6 +109,40 @@ class _HomePageView extends StatelessWidget { return GestureDetector( onTap: () { _checkPermission(() { + Navigator.of(context).pushNamed( + AppRouteName.webView, + arguments: { + 'urlStr': AppConsts.xiaoeShopUrl, + 'webViewTitle': 'Wow精选' + }); + }, bloc); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Stack( + alignment: AlignmentDirectional.center, + children: [ + Image.asset( + 'bg_frame_module'.assetPng, + width: 162.5.w, + height: 203.5.h), + Image.asset('xe_shop'.assetPng, + width: 140.5.w, height: 172.h) + ]), + 44.verticalSpace, + // Image.asset('label_module_game'.assetPng, + // width: 124.w, height: 34.h), + ], + )); + }), + ), + Expanded( + child: BlocBuilder( + builder: (context, userState) { + return GestureDetector( + onTap: () { + _checkPermission(() { pushNamed(AppRouteName.games); }, bloc); },