@@ -109,19 +109,19 @@ android { | |||||
// 应用信息配置 | // 应用信息配置 | ||||
productFlavors { | |||||
// 智夜生活 | |||||
zhiying { | |||||
applicationId "cn.zhios.zhiying" | |||||
versionCode 53 | |||||
dimension "app" | |||||
versionName '1.3.13' | |||||
// 签名信息 | |||||
signingConfig signingConfigs.zhiying | |||||
} | |||||
} | |||||
// 打包脚本 | |||||
// productFlavors { | |||||
// // 智夜生活 | |||||
// zhiying { | |||||
// applicationId "cn.zhios.zhiying" | |||||
// versionCode 53 | |||||
// dimension "app" | |||||
// versionName '1.3.13' | |||||
// // 签名信息 | |||||
// signingConfig signingConfigs.zhiying | |||||
// } | |||||
// } | |||||
// | |||||
// // 打包脚本 | |||||
// android.applicationVariants.all { variant -> | // android.applicationVariants.all { variant -> | ||||
// if (variant.buildType.name != "debug") { | // if (variant.buildType.name != "debug") { | ||||
// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") | // variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") | ||||
@@ -136,18 +136,18 @@ android { | |||||
// } | // } | ||||
// } | // } | ||||
// } | // } | ||||
// | |||||
// configurations.all { | |||||
// resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |||||
// def requested = details.requested | |||||
// if (requested.group == 'com.android.support') { | |||||
// if (!requested.name.startsWith("multidex")) { | |||||
// details.useVersion '28.0.3' | |||||
// } | |||||
// } | |||||
// resolutionStrategy.force 'com.android.support:support-v4:28.0.0' | |||||
// } | |||||
// } | |||||
configurations.all { | |||||
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |||||
def requested = details.requested | |||||
if (requested.group == 'com.android.support') { | |||||
if (!requested.name.startsWith("multidex")) { | |||||
details.useVersion '28.0.3' | |||||
} | |||||
} | |||||
resolutionStrategy.force 'com.android.support:support-v4:28.0.0' | |||||
} | |||||
} | |||||
} | } | ||||
@@ -162,8 +162,13 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN | |||||
// map.put("secret_key", "123456"); | // map.put("secret_key", "123456"); | ||||
///正式 | ///正式 | ||||
map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689 | |||||
map.put("master_id", "99813608"); | |||||
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689 | |||||
// map.put("master_id", "99813608"); | |||||
// map.put("secret_key", "123456"); | |||||
//客户测试 | |||||
map.put("domain", "http://api.zhiyingos.com/");//45678910,api.zhios.cn84198689 | |||||
map.put("master_id", "80685217"); | |||||
map.put("secret_key", "123456"); | map.put("secret_key", "123456"); | ||||
// map.put("token", "123465"); | // map.put("token", "123465"); | ||||
@@ -166,6 +166,7 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit | |||||
header: RefreshGifHeader(), | header: RefreshGifHeader(), | ||||
// footer: RefreshFooter(), | // footer: RefreshFooter(), | ||||
child: CustomScrollView( | child: CustomScrollView( | ||||
physics: BouncingScrollPhysics(), | |||||
controller: _controller, | controller: _controller, | ||||
slivers: _buildContentWidgets(model), | slivers: _buildContentWidgets(model), | ||||
), | ), | ||||
@@ -59,15 +59,21 @@ class _GuidePageState extends State<GuidePage> { | |||||
height: double.infinity, | height: double.infinity, | ||||
decoration: BoxDecoration( | decoration: BoxDecoration( | ||||
image: DecorationImage( | image: DecorationImage( | ||||
image: Image.memory( | |||||
bgImage, | |||||
).image, | |||||
image: bgImage != null | |||||
? Image.memory( | |||||
bgImage, | |||||
).image | |||||
: CachedNetworkImageProvider(""), | |||||
fit: BoxFit.fill)), | fit: BoxFit.fill)), | ||||
child: Center( | child: Center( | ||||
child: Image.memory( | |||||
widget.imageDatas[index], | |||||
fit: BoxFit.fitWidth, | |||||
))), | |||||
child: widget.imageDatas[index] != null | |||||
? Image.memory( | |||||
widget.imageDatas[index], | |||||
fit: BoxFit.fitWidth, | |||||
) | |||||
: Container( | |||||
color: Colors.white, | |||||
))), | |||||
index == widget?.bgImageDatas?.length - 1 | index == widget?.bgImageDatas?.length - 1 | ||||
? Positioned( | ? Positioned( | ||||
left: 0, | left: 0, | ||||
@@ -59,7 +59,6 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin { | |||||
Logger.debug('ConnectivityResult.wifi'); | Logger.debug('ConnectivityResult.wifi'); | ||||
print('ConnectivityResult.wifi'); | print('ConnectivityResult.wifi'); | ||||
Application.init().then((_) async { | Application.init().then((_) async { | ||||
///引导页 | ///引导页 | ||||
PackageInfo packageInfo = await PackageInfo.fromPlatform(); | PackageInfo packageInfo = await PackageInfo.fromPlatform(); | ||||
String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber); | String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber); | ||||
@@ -76,7 +75,7 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin { | |||||
// CupertinoPageRoute(builder: (context) => HomePage())); | // CupertinoPageRoute(builder: (context) => HomePage())); | ||||
Navigator.of(context).pushReplacementNamed('/homePage'); | Navigator.of(context).pushReplacementNamed('/homePage'); | ||||
} | } | ||||
}).catchError((err,s) async { | |||||
}).catchError((err, s) async { | |||||
print(s); | print(s); | ||||
// if (err.toString().contains("BaseSettingModel")) { | // if (err.toString().contains("BaseSettingModel")) { | ||||
// await showDialog( | // await showDialog( | ||||
@@ -122,22 +121,30 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin { | |||||
Dio dio = Dio(); | Dio dio = Dio(); | ||||
print("加载图片"); | print("加载图片"); | ||||
List<Uint8List> guideImages = List(); | List<Uint8List> guideImages = List(); | ||||
List<Uint8List>bgImages = List(); | |||||
List<Uint8List> bgImages = List(); | |||||
for (int i = 0; i < guide.guideData.guideCss.length; i++) { | for (int i = 0; i < guide.guideData.guideCss.length; i++) { | ||||
Response response = await dio.get(guide.guideData.guideCss[i].contentImage, options: Options(responseType: ResponseType.bytes)); | |||||
if (response.statusCode == 200) { | |||||
Uint8List data = Uint8List.fromList(response.data); | |||||
guideImages.add(data); | |||||
try { | |||||
Response response = await dio.get(guide.guideData.guideCss[i].contentImage, options: Options(responseType: ResponseType.bytes)); | |||||
if (response.statusCode == 200) { | |||||
Uint8List data = Uint8List.fromList(response.data); | |||||
guideImages.add(data); | |||||
} | |||||
} catch (e, s) { | |||||
guideImages.add(null); | |||||
} | } | ||||
response = await dio.get(guide.guideData.guideCss[i].bgImage, options: Options(responseType: ResponseType.bytes)); | |||||
if (response.statusCode == 200) { | |||||
Uint8List data = Uint8List.fromList(response.data); | |||||
bgImages.add(data); | |||||
try { | |||||
Response response = await dio.get(guide.guideData.guideCss[i].bgImage, options: Options(responseType: ResponseType.bytes)); | |||||
if (response.statusCode == 200) { | |||||
Uint8List data = Uint8List.fromList(response.data); | |||||
bgImages.add(data); | |||||
} | |||||
} catch (e, s) { | |||||
bgImages.add(null); | |||||
} | } | ||||
} | } | ||||
NativeUtil.notifyInitSuccess(); | NativeUtil.notifyInitSuccess(); | ||||
await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide.guideData, guideImages,bgImages))); | |||||
await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide.guideData, guideImages, bgImages))); | |||||
} | } | ||||
} catch (e) { | } catch (e) { | ||||
throw "引导图加载失败"; | throw "引导图加载失败"; | ||||
@@ -59,6 +59,7 @@ dependencies: | |||||
flutter_user_agent: ^1.2.2 | flutter_user_agent: ^1.2.2 | ||||
dev_dependencies: | dev_dependencies: | ||||
flutter_test: | flutter_test: | ||||
sdk: flutter | sdk: flutter | ||||
@@ -66,7 +67,6 @@ dev_dependencies: | |||||
zhiying_comm: | zhiying_comm: | ||||
path: ../zhiying_comm | path: ../zhiying_comm | ||||
# For information on the generic Dart part of this file, see the | # For information on the generic Dart part of this file, see the | ||||
# following page: https://dart.dev/tools/pub/pubspec | # following page: https://dart.dev/tools/pub/pubspec | ||||