Commit a04e399e8e9f475892a5d8c4774b73c1eeeab6bb
1 parent
1f5969b8
小鹅购买
Showing
2 changed files
with
51 additions
and
6 deletions
lib/common/core/app_consts.dart
@@ -2,16 +2,26 @@ import '../request/basic_config.dart'; | @@ -2,16 +2,26 @@ import '../request/basic_config.dart'; | ||
2 | 2 | ||
3 | class AppConsts { | 3 | class AppConsts { |
4 | /// 隐私协议 | 4 | /// 隐私协议 |
5 | - static const String userPrivacyPolicyUrl = 'http://page.kouyuxingqiu.com/wowenglishuserregister.html'; | 5 | + static const String userPrivacyPolicyUrl = |
6 | + 'http://page.kouyuxingqiu.com/wowenglishuserregister.html'; | ||
6 | 7 | ||
7 | /// 儿童隐私协议 | 8 | /// 儿童隐私协议 |
8 | - static const String childrenPrivacyPolicyUrl = 'http://page.kouyuxingqiu.com/wowenglishchildprotect.html'; | 9 | + static const String childrenPrivacyPolicyUrl = |
10 | + 'http://page.kouyuxingqiu.com/wowenglishchildprotect.html'; | ||
11 | + | ||
12 | + /// 小鵝通 | ||
13 | + static const String xiaoeShopUrl = 'https://appo61s7g678876.h5.xiaoeknow.com'; | ||
9 | 14 | ||
10 | /// 与第三方共享协议 | 15 | /// 与第三方共享协议 |
11 | - static const String userTermSdkUrl = 'http://page.kouyuxingqiu.com/term_sdk.html'; | 16 | + static const String userTermSdkUrl = |
17 | + 'http://page.kouyuxingqiu.com/term_sdk.html'; | ||
12 | 18 | ||
13 | /// 先声SDK | 19 | /// 先声SDK |
14 | - static String xsAppKey = 'a418'; | ||
15 | - static String xsAppSecretKey = BasicConfig.isTestDev?'1a16f31f2611bf32fb7b3fc38f5b2c81':'c11163aa6c834a028da4a4b30955be99'; | ||
16 | - static String xsAppService = BasicConfig.isTestDev?'ws://trial.cloud.ssapi.cn:8080':'"wss://api.cloud.ssapi.cn'; | 20 | + static String xsAppKey = 'a418'; |
21 | + static String xsAppSecretKey = BasicConfig.isTestDev | ||
22 | + ? '1a16f31f2611bf32fb7b3fc38f5b2c81' | ||
23 | + : 'c11163aa6c834a028da4a4b30955be99'; | ||
24 | + static String xsAppService = BasicConfig.isTestDev | ||
25 | + ? 'ws://trial.cloud.ssapi.cn:8080' | ||
26 | + : '"wss://api.cloud.ssapi.cn'; | ||
17 | } | 27 | } |
lib/pages/home/view.dart
@@ -4,6 +4,7 @@ import 'package:flutter_app_update/update_model.dart'; | @@ -4,6 +4,7 @@ import 'package:flutter_app_update/update_model.dart'; | ||
4 | import 'package:flutter_bloc/flutter_bloc.dart'; | 4 | import 'package:flutter_bloc/flutter_bloc.dart'; |
5 | import 'package:url_launcher/url_launcher.dart'; | 5 | import 'package:url_launcher/url_launcher.dart'; |
6 | import 'package:wow_english/common/core/app_config_helper.dart'; | 6 | import 'package:wow_english/common/core/app_config_helper.dart'; |
7 | +import 'package:wow_english/common/core/app_consts.dart'; | ||
7 | import 'package:wow_english/common/extension/string_extension.dart'; | 8 | import 'package:wow_english/common/extension/string_extension.dart'; |
8 | import 'package:wow_english/models/app_version_entity.dart'; | 9 | import 'package:wow_english/models/app_version_entity.dart'; |
9 | import 'package:wow_english/pages/home/state.dart'; | 10 | import 'package:wow_english/pages/home/state.dart'; |
@@ -108,6 +109,40 @@ class _HomePageView extends StatelessWidget { | @@ -108,6 +109,40 @@ class _HomePageView extends StatelessWidget { | ||
108 | return GestureDetector( | 109 | return GestureDetector( |
109 | onTap: () { | 110 | onTap: () { |
110 | _checkPermission(() { | 111 | _checkPermission(() { |
112 | + Navigator.of(context).pushNamed( | ||
113 | + AppRouteName.webView, | ||
114 | + arguments: { | ||
115 | + 'urlStr': AppConsts.xiaoeShopUrl, | ||
116 | + 'webViewTitle': 'Wow精选' | ||
117 | + }); | ||
118 | + }, bloc); | ||
119 | + }, | ||
120 | + child: Column( | ||
121 | + mainAxisAlignment: MainAxisAlignment.center, | ||
122 | + children: [ | ||
123 | + Stack( | ||
124 | + alignment: AlignmentDirectional.center, | ||
125 | + children: [ | ||
126 | + Image.asset( | ||
127 | + 'bg_frame_module'.assetPng, | ||
128 | + width: 162.5.w, | ||
129 | + height: 203.5.h), | ||
130 | + Image.asset('xe_shop'.assetPng, | ||
131 | + width: 140.5.w, height: 172.h) | ||
132 | + ]), | ||
133 | + 44.verticalSpace, | ||
134 | + // Image.asset('label_module_game'.assetPng, | ||
135 | + // width: 124.w, height: 34.h), | ||
136 | + ], | ||
137 | + )); | ||
138 | + }), | ||
139 | + ), | ||
140 | + Expanded( | ||
141 | + child: BlocBuilder<UserBloc, UserState>( | ||
142 | + builder: (context, userState) { | ||
143 | + return GestureDetector( | ||
144 | + onTap: () { | ||
145 | + _checkPermission(() { | ||
111 | pushNamed(AppRouteName.games); | 146 | pushNamed(AppRouteName.games); |
112 | }, bloc); | 147 | }, bloc); |
113 | }, | 148 | }, |