diff --git a/circle_app/android/app/build.gradle b/circle_app/android/app/build.gradle index 307c659..27abffa 100644 --- a/circle_app/android/app/build.gradle +++ b/circle_app/android/app/build.gradle @@ -65,8 +65,8 @@ android { // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion - versionCode 2 - versionName "1.0.1" + versionCode 6 + versionName "1.0.5" manifestPlaceholders = [ vivo_APPID: "105669716", vivo_APPKEY:"84f750207787376b310ca5b0d5969122", diff --git a/circle_app/android/app/src/main/AndroidManifest.xml b/circle_app/android/app/src/main/AndroidManifest.xml index 43a67e9..8cda5a1 100644 --- a/circle_app/android/app/src/main/AndroidManifest.xml +++ b/circle_app/android/app/src/main/AndroidManifest.xml @@ -79,22 +79,23 @@ the Android process has started. This theme is visible to the user while the Flutter UI initializes. After that, this theme continues to determine the Window background behind the Flutter UI. --> - - - + + + + return Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, - decoration: BoxDecoration( + decoration: const BoxDecoration( color: const Color(0xFF423055), - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getBaseImage('home_back')))), + image: bgWidget), child: Scaffold( backgroundColor: Colors.transparent, body: SafeArea( @@ -123,7 +122,11 @@ class _CirclePageState extends State infoList = statistics.lastVisitUsers; if (infoList.isNotEmpty) { for (var element in infoList) { - urlList.add(element["avatar"]); + if(element["avatar"]!=null&&element["avatar"].contains("http")){ + urlList.add(element["avatar"]); + } + + // urlList.add(element["avatar"]); } } } diff --git a/circle_app/lib/app/home/view.dart b/circle_app/lib/app/home/view.dart index b9c936a..b76bc3b 100644 --- a/circle_app/lib/app/home/view.dart +++ b/circle_app/lib/app/home/view.dart @@ -1,4 +1,3 @@ - import 'package:circle_app/util/util.dart'; import 'package:circle_app/view/ExitAppConfirmation.dart'; import 'package:flutter/material.dart'; @@ -14,25 +13,28 @@ class HomePage extends StatefulWidget { State createState() => _HomePageState(); } -class _HomePageState extends State with AutomaticKeepAliveClientMixin { +class _HomePageState extends State + with AutomaticKeepAliveClientMixin { @override bool get wantKeepAlive => true; final logic = Get.lazyPut(() => HomeLogic()); final state = Get.find().state; -@override + @override Widget build(BuildContext context) { super.build(context); return GetBuilder(builder: (HomeLogic controller) { - return GestureDetector( - onTap: () { - controller.onReady(); - // Get.toNamed(AppRoutes.Complete_materialPage); - }, - child: ExitAppConfirmation(child: Stack(children: [ - Scaffold( + return ExitAppConfirmation( + child: Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(getBaseImage("home_back")), + fit: BoxFit.cover, + ), + ), + child: Scaffold( resizeToAvoidBottomInset: false, // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), bottomNavigationBar: Container( @@ -51,9 +53,12 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ - funcItem(0, 'msg', 0 == controller.currentIndex, controller), - funcItem(1, 'circle', 1 == controller.currentIndex, controller), - funcItem(2, 'mine', 2 == controller.currentIndex, controller), + funcItem( + 0, 'msg', 0 == controller.currentIndex, controller), + funcItem(1, 'circle', 1 == controller.currentIndex, + controller), + funcItem(2, 'mine', 2 == controller.currentIndex, + controller), ], ), ), @@ -61,13 +66,12 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin physics: const NeverScrollableScrollPhysics(), controller: controller.pageController, onPageChanged: (int index) { - // controller.updateIndex(index); + // controller.updateIndex(index); }, children: controller.tabs, ), ), - - ],),) + ), ); }); } @@ -84,51 +88,49 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin controller.updateIndex(index); } }, - child: Stack( - alignment: Alignment.center, - children:[ - Container( - - margin: EdgeInsets.only(top: 8.sp), - child: Center( - child: Image.asset( - isSelected - ? getTabbarImage('${image}_selected') - : getTabbarImage('${image}_normal'), - width: 34.sp, - height: 34.sp, - ), + child: Stack(alignment: Alignment.center, children: [ + Container( + margin: EdgeInsets.only(top: 8.sp), + child: Center( + child: Image.asset( + isSelected + ? getTabbarImage('${image}_selected') + : getTabbarImage('${image}_normal'), + width: 34.sp, + height: 34.sp, ), ), + ), // Obx(() => null) - Obx(() => Visibility( - visible: index == 0 &&controller.unreadSIze!="0", - child: Positioned( - // right: 4.sp, - top: 4.sp, - child: - Container( - margin: EdgeInsets.only(left: int.parse(controller.unreadSIze.value) > 99 ? 30.sp : 20.sp), - height: 18.sp, - padding: EdgeInsets.only(left: 5.sp,right: 5.sp), - alignment: Alignment.center, - decoration: BoxDecoration( + Obx(() => Visibility( + visible: index == 0 && controller.unreadSIze != "0", + child: Positioned( + // right: 4.sp, + top: 4.sp, + child: Container( + margin: EdgeInsets.only( + left: int.parse(controller.unreadSIze.value) > 99 + ? 30.sp + : 20.sp), + height: 18.sp, + padding: EdgeInsets.only(left: 5.sp, right: 5.sp), + alignment: Alignment.center, + decoration: BoxDecoration( color: Colors.red, - borderRadius: BorderRadius.circular(11.sp) - ), - child: Text( - int.parse(controller.unreadSIze.value) > 99 ? '99+' : controller.unreadSIze.value, // The number in the red dot - style: TextStyle( - color: Colors.white, - fontSize: 12.0.sp, // Font size of the text - ), + borderRadius: BorderRadius.circular(11.sp)), + child: Text( + int.parse(controller.unreadSIze.value) > 99 + ? '99+' + : controller.unreadSIze.value, + // The number in the red dot + style: TextStyle( + color: Colors.white, + fontSize: 12.0.sp, // Font size of the text ), ), - - ))) - - ] - ), + ), + ))) + ]), ), ); } diff --git a/circle_app/lib/app/minefragment/view.dart b/circle_app/lib/app/minefragment/view.dart index 9e03cf2..ec89183 100644 --- a/circle_app/lib/app/minefragment/view.dart +++ b/circle_app/lib/app/minefragment/view.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:circle_app/app/msg/view.dart'; import 'package:circle_app/router/app_routers.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -34,11 +35,8 @@ class MinefragmentPage extends StatelessWidget { body: Container( width: Get.width, height: Get.height, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage(getBaseImage("home_back")), - fit: BoxFit.cover, - ), + decoration: const BoxDecoration( + image: bgWidget, ), child: Padding( padding: EdgeInsets.only( diff --git a/circle_app/lib/app/msg/view.dart b/circle_app/lib/app/msg/view.dart index 1ab3b78..248a394 100644 --- a/circle_app/lib/app/msg/view.dart +++ b/circle_app/lib/app/msg/view.dart @@ -17,7 +17,9 @@ import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_conversation_co import '../../util/eventBus.dart'; import 'TIMUIKitConversation/tim_uikit_conversation.dart'; import 'logic.dart'; - +const bgWidget = DecorationImage( + fit: BoxFit.fill, + image: AssetImage('assets/images/base/home_back.png')); class MsgPage extends StatelessWidget { MsgPage({Key? key}) : super(key: key); @@ -63,10 +65,8 @@ class MsgPage extends StatelessWidget { Container( width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(getBaseImage('home_back')))), + decoration: const BoxDecoration( + image: bgWidget), ), SafeArea( child: GetBuilder(builder: (MsgLogic controller) { diff --git a/circle_app/lib/network/dio_manager.dart b/circle_app/lib/network/dio_manager.dart index e9e0227..22686a8 100644 --- a/circle_app/lib/network/dio_manager.dart +++ b/circle_app/lib/network/dio_manager.dart @@ -255,10 +255,10 @@ class DioManager { // String? errorMsg = isNetworkConnected // ? e.requestOptions.extra["errorMsg"] // : "网络连接断开,请检查网络设置"; - return {'code': 500, 'msg': '请求失败'}; + return {'code': 500, 'msg': '加载中'}; } catch (e) { // 其他一些意外的报错 - return {'code': 500, 'msg': '请求异常'}; + return {'code': 500, 'msg': '加载中...'}; } } //