diff --git a/lib/main_initialize.dart b/lib/main_initialize.dart index 6fa61ede..7b594268 100644 --- a/lib/main_initialize.dart +++ b/lib/main_initialize.dart @@ -44,10 +44,7 @@ class MainInitialize { Future Function(Map? message)? jPushLogger( String type) { return (Map? message) async { - LoggerData.addData({ - 'type': type, - 'message': message, - }); + LoggerData.addData(message, tag: type); }; } diff --git a/lib/pages/home/widget/home_search.dart b/lib/pages/home/widget/home_search.dart index e341a70e..9c6ad21d 100644 --- a/lib/pages/home/widget/home_search.dart +++ b/lib/pages/home/widget/home_search.dart @@ -49,7 +49,7 @@ class _HomeSearchState extends State { color: Color(0xFF666666), ), 10.wb, - '搜索商品、活动、帖子、应用' + '搜索应用' .text .size(28.sp) .color(ktextSubColor) diff --git a/lib/provider/app_provider.dart b/lib/provider/app_provider.dart index 6965bd40..e56cf032 100644 --- a/lib/provider/app_provider.dart +++ b/lib/provider/app_provider.dart @@ -224,7 +224,10 @@ class AppProvider extends ChangeNotifier { List _carModels = []; List get carModels => _carModels; Future updateCarModels() async { - BaseModel baseModel = await NetUtil().get(API.user.carList); + BaseModel baseModel = await NetUtil().get( + API.user.carList, + params: {'estateId': selectedHouse?.estateId ?? 0}, + ); if (baseModel.data == null) return []; _carModels = (baseModel.data as List) .map((e) => CarParkingModel.fromJson(e)) diff --git a/lib/ui/home/application/all_application.dart b/lib/ui/home/application/all_application.dart index a5becbd2..def02db5 100644 --- a/lib/ui/home/application/all_application.dart +++ b/lib/ui/home/application/all_application.dart @@ -250,7 +250,7 @@ class _AllApplicationPageState extends State { color: Color(0xFF666666), ), 10.wb, - '搜索商品、活动、帖子、应用' + '搜索应用' .text .size(28.sp) .color(ktextSubColor) diff --git a/lib/ui/market/category/category_page.dart b/lib/ui/market/category/category_page.dart new file mode 100644 index 00000000..6e98ee2e --- /dev/null +++ b/lib/ui/market/category/category_page.dart @@ -0,0 +1,61 @@ +import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:flutter/material.dart'; +import 'package:aku_community/utils/headers.dart'; + +class CategoryPage extends StatefulWidget { + CategoryPage({Key? key}) : super(key: key); + + @override + _CategoryPageState createState() => _CategoryPageState(); +} + +class _CategoryPageState extends State { + int _index = 0; + + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '', + bgColor: Colors.white, + appBarBottom: PreferredSize( + child: Divider(height: 1), + preferredSize: Size.fromHeight(1), + ), + body: Row( + children: [ + SizedBox( + width: 203.w, + child: ListView.builder( + itemBuilder: (context, index) { + bool sameIndex = index == _index; + return Stack( + children: [ + MaterialButton( + height: 100.w, + minWidth: double.infinity, + onPressed: () { + _index = index; + + setState(() {}); + }, + child: Text( + 'TEST', + style: TextStyle(), + ), + ), + ], + ); + }, + itemCount: 10, + ), + ), + VerticalDivider( + color: Color(0xFFE8E8E8), + width: 1, + thickness: 1, + ), + ], + ), + ); + } +} diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index 05826abf..841e6433 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -1,3 +1,4 @@ +import 'package:aku_community/ui/market/category/category_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -5,6 +6,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:aku_community/ui/market/_market_data.dart'; import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; +import 'package:aku_community/utils/headers.dart'; +import 'package:get/get.dart'; class MarketPage extends StatefulWidget { MarketPage({Key? key}) : super(key: key); @@ -28,6 +31,26 @@ class _MarketPageState extends State final mediaWidth = MediaQuery.of(context).size.width; return BeeScaffold( title: '商城', + actions: [ + MaterialButton( + minWidth: 108.w, + padding: EdgeInsets.zero, + onPressed: () => Get.to(() => CategoryPage()), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + children: [ + Icon( + Icons.grid_view, + color: Color(0xFF333333), + size: 48.w, + ), + 4.hb, + '分类'.text.size(20.sp).black.make(), + ], + ), + ), + ], body: NestedScrollView( headerSliverBuilder: (context, value) { return [ @@ -37,6 +60,7 @@ class _MarketPageState extends State // flexibleSpace的高为 (设备宽 - 边距)/4*2 + 外边距 + bottom高 expandedHeight: (mediaWidth - 32.w * 2) / 4 * 2 + 16.w * 2 + 48, backgroundColor: Colors.transparent, + elevation: 0, flexibleSpace: FlexibleSpaceBar( background: Container( color: Color(0xFFF9F9F9), diff --git a/lib/ui/search/bee_search.dart b/lib/ui/search/bee_search.dart index 328e0f7e..04a8caaa 100644 --- a/lib/ui/search/bee_search.dart +++ b/lib/ui/search/bee_search.dart @@ -83,7 +83,7 @@ class _BeeSearchState extends State { contentPadding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 10.w), border: InputBorder.none, - hintText: '搜索商品、活动、帖子、应用', + hintText: '搜索应用', hintStyle: TextStyle( color: Color(0xFF999999), fontSize: 28.sp,