商城优化

pull/1/head
张萌 3 years ago
parent 0f9cfd4cf4
commit cdf8fed472

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -30,6 +30,7 @@ import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.da
import 'package:aku_new_community/ui/profile/car/car_manage_page.dart';
import 'package:aku_new_community/ui/profile/car_parking/car_parking_page.dart';
import 'package:aku_new_community/ui/profile/house/house_owners_page.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -92,7 +93,11 @@ List<AO> appObjects = [
AO('借还管理', Assets.newIcon.icJhgl.path,
() => Get.to(SelectBorrowReturnPage())),
// AO('一键报警', Assets.newIcon.yj, () => AlarmPage()),
AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()),
AO('设施预约', Assets.home.icSsyy.path, () {
BotToast.showText(text: '此功能升级中,敬请期待');
return;
Get.to(() => FacilityAppointmentPage());
}),
AO('快递包裹', Assets.newIcon.icKdbg.path,
() => Get.to(() => ExpressPackagePage())),
AO('电子商务', Assets.newIcon.icDzsw.path,

@ -635,6 +635,8 @@ class $AssetsJsonGen {
class $AssetsNewIconGen {
const $AssetsNewIconGen();
AssetGenImage get allClasses =>
const AssetGenImage('assets/newIcon/all_classes.png');
AssetGenImage get avatarPlaceholder =>
const AssetGenImage('assets/newIcon/avatar_placeholder.png');
AssetGenImage get hyhd => const AssetGenImage('assets/newIcon/hyhd.png');
@ -642,10 +644,14 @@ class $AssetsNewIconGen {
const AssetGenImage('assets/newIcon/ic_daifuk.png');
AssetGenImage get icDaishouh =>
const AssetGenImage('assets/newIcon/ic_daishouh.png');
AssetGenImage get icDingdan =>
const AssetGenImage('assets/newIcon/ic_dingdan.png');
AssetGenImage get icDlxx => const AssetGenImage('assets/newIcon/ic_dlxx.png');
AssetGenImage get icDzsw => const AssetGenImage('assets/newIcon/ic_dzsw.png');
AssetGenImage get icEssc => const AssetGenImage('assets/newIcon/ic_essc.png');
AssetGenImage get icFwll => const AssetGenImage('assets/newIcon/ic_fwll.png');
AssetGenImage get icGouwuc =>
const AssetGenImage('assets/newIcon/ic_gouwuc.png');
AssetGenImage get icGxtc => const AssetGenImage('assets/newIcon/ic_gxtc.png');
AssetGenImage get icGxtp => const AssetGenImage('assets/newIcon/ic_gxtp.png');
AssetGenImage get icHdtp => const AssetGenImage('assets/newIcon/ic_hdtp.png');

@ -8,7 +8,6 @@ import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/models/home/home_swiper_model.dart';
import 'package:aku_new_community/pages/message_center_page/message_center_page.dart';
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/community/activity/activity_card.dart';
import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart';
@ -21,7 +20,6 @@ import 'package:aku_new_community/ui/home/public_infomation/public_information_d
import 'package:aku_new_community/ui/market/search/good_detail_page.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/utils/websocket/tips_dialog.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/others/rectIndicator.dart';
@ -239,7 +237,8 @@ class _HomePageState extends State<HomePage>
borderRadius: BorderRadius.circular(16.w),
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage( Assets.home.imgFkyq.path),
image: AssetImage(
Assets.home.imgFkyq.path),
)),
child: Column(
crossAxisAlignment:
@ -358,7 +357,7 @@ class _HomePageState extends State<HomePage>
),
onTap: () async {
BotToast.showText(
text: '本小区尚未配置门禁设备',
text: '此功能升级中,稍后上线',
align: Alignment(0, 0.5));
// Get.to(AdvicePage(
// type: AdviceType.SUGGESTION));
@ -405,7 +404,7 @@ class _HomePageState extends State<HomePage>
child: Builder(
builder: (context) {
return ActivityCard(
home: true,
home: true,
model:
_activityItemModels[index]);
},

@ -35,6 +35,8 @@ class PersonalIndex extends StatefulWidget {
class _PersonalIndexState extends State<PersonalIndex>
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
EasyRefreshController _refreshController = EasyRefreshController();
Widget _orderButton({
required String name,
required String path,
@ -66,6 +68,12 @@ class _PersonalIndexState extends State<PersonalIndex>
super.initState();
}
@override
void dispose() {
_refreshController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
super.build(context);
@ -77,6 +85,7 @@ class _PersonalIndexState extends State<PersonalIndex>
child: Scaffold(
body: EasyRefresh(
header: MaterialHeader(),
controller: _refreshController,
onRefresh: () async {
await userProvider.updateUserInfo();
await userProvider.updateMyHouseInfo();
@ -183,6 +192,7 @@ class _PersonalIndexState extends State<PersonalIndex>
tomorrowIntegral: 2));
await UserTool.userProvider
.changeTodayClocked();
_refreshController.callRefresh();
} else {
BotToast.showText(text: base.msg);
}

@ -78,7 +78,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
onPressed: () {
userProvider.logout();
Get.to(() => OtherLoginPage());
Get.offAll(() => OtherLoginPage());
},
),
],

@ -25,77 +25,84 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '',
bodyColor: Colors.white,
body: ListView(
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'请设置您的昵称'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'昵称不可设置侮辱性词汇、特殊符号、敏感字符'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
95.w.heightBox,
Container(
width: 686.w,
height: 94.w,
margin: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
return WillPopScope(
onWillPop: () async {
return false;
},
child: BeeScaffold(
title: '',
bodyColor: Colors.white,
body: ListView(
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'请设置您的昵称'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
child: TextField(
onChanged: (text) async {
_nickIsRepeat = !(await SignFunc.checkNickRepeat(text));
setState(() {});
},
maxLength: 20,
controller: _nickController,
decoration: InputDecoration(
isDense: false,
contentPadding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
border: InputBorder.none,
counterText: '',
hintText: '请输入您的昵称不超过20个字符',
hintStyle: TextStyle(
color: Colors.black.withOpacity(0.25), fontSize: 28.sp)),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'昵称不可设置侮辱性词汇、特殊符号、敏感字符'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
),
_nickIsRepeat ? _nickRepeat() : 100.w.heightBox,
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: LoginButtonWidget(
onTap: () async {
var result = await SignFunc.setNickName(_nickController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
await SignFunc.checkNameAndAccount();
}
95.w.heightBox,
Container(
width: 686.w,
height: 94.w,
margin: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60.w),
color: Colors.black.withOpacity(0.06),
),
child: TextField(
onChanged: (text) async {
_nickIsRepeat = !(await SignFunc.checkNickRepeat(text));
setState(() {});
},
text: '确定'),
),
],
maxLength: 20,
controller: _nickController,
decoration: InputDecoration(
isDense: false,
contentPadding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
border: InputBorder.none,
counterText: '',
hintText: '请输入您的昵称不超过20个字符',
hintStyle: TextStyle(
color: Colors.black.withOpacity(0.25),
fontSize: 28.sp)),
),
),
_nickIsRepeat ? _nickRepeat() : 100.w.heightBox,
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: LoginButtonWidget(
onTap: () async {
var result =
await SignFunc.setNickName(_nickController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
await SignFunc.checkNameAndAccount();
}
},
text: '确定'),
),
],
),
),
);
}

@ -56,12 +56,14 @@ class UserProvider extends ChangeNotifier {
if (!kIsWeb && !Platform.isMacOS) JPush().deleteAlias();
final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.setCurrentHouse(null);
_isLogin = false;
if (_isLogin) {
NetUtil().post(SAASAPI.login.logOut, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token');
_isLogin = false;
}
_token = null;
_userInfoModel = null;
_myHouses = [];
NetUtil().post(SAASAPI.login.logOut, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token');
HiveStore.appBox!.delete('token');
HiveStore.appBox!.delete('login');
WebSocketUtil().closeWebSocket();

@ -54,9 +54,10 @@ class _MarketPageState extends State<MarketPage>
int _size = 10;
int _pageCount = 0;
double MessageHeight = 76.w;
double bannerHeight = 354.w;
double bannerHeight = 260.w;
double buttonsHeight = 334.w;
double searchHeight = 74.w;
double hotGoodHeight = 288.w;
MarketStatisticsModel? _statistics;
double tabBarHeight = 40.w;
@ -114,8 +115,6 @@ class _MarketPageState extends State<MarketPage>
_pageCount = baseListModel.total;
}
bool _onLoadVisible = true;
@override
void initState() {
super.initState();
@ -153,37 +152,47 @@ class _MarketPageState extends State<MarketPage>
final mediaWidth = MediaQuery.of(context).size.width;
return Scaffold(
body: EasyRefresh.custom(
firstRefresh: false,
enableControlFinishLoad: false,
header: BallPulseHeader(
backgroundColor: Colors.red.withOpacity(0.8), color: Colors.white),
footer: MaterialFooter(),
topBouncing: false,
scrollController: _sliverListController,
controller: _refreshController,
onRefresh: _refresh,
onLoad: !_onLoadVisible
? null
: () async {
_pageNum++;
await loadMarketInfo();
print(_goodsHomeModelList.length);
if (_goodsHomeModelList.length >= _pageCount) {
_refreshController.finishLoad(noMore: true);
_onLoadVisible = false;
print(_onLoadVisible);
}
setState(() {});
},
slivers: _buildBody(context),
body: Stack(
children: [
Container(
height: 530.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFFFFFF),
Color(0xFFFFF9D1),
],
)),
),
EasyRefresh.custom(
firstRefresh: false,
enableControlFinishLoad: false,
header: MaterialHeader(),
footer: MaterialFooter(),
topBouncing: false,
scrollController: _sliverListController,
controller: _refreshController,
onRefresh: _refresh,
onLoad: () async {
_pageNum++;
await loadMarketInfo();
print(_goodsHomeModelList.length);
if (_goodsHomeModelList.length >= _pageCount) {
_refreshController.finishLoad(noMore: true);
}
setState(() {});
},
slivers: _buildBody(context),
)
],
),
);
}
Future _refresh() async {
await updateMarketInfo();
_onLoadVisible = true;
//_swiperModels = await CommunityFunc.swiper();
_marketSwiperModels = await CommunityFunc.marketSwiper();
_statistics = await CommunityFunc.getMarketStatistics();
@ -303,17 +312,16 @@ class _MarketPageState extends State<MarketPage>
return <Widget>[
HomeSliverAppBar(
key: _sliverAppBarGlobalKey,
actions: _actionsWidget(),
title: _buildTitle(),
backgroundColor: Colors.red,
title: geSearch(),
backgroundColor: Color(0xFFF9F9F9),
expandedHeight: MessageHeight +
bannerHeight +
buttonsHeight +
searchHeight +
// searchHeight +
tabBarHeight +
hotGoodHeight +
ScreenUtil().statusBarHeight +
kToolbarHeight +
280.w,
kToolbarHeight,
//
// 172 * 2.w,
flexibleSpace: _flexibleSpaceBar(context),
@ -361,14 +369,14 @@ class _MarketPageState extends State<MarketPage>
);
}
_actionsWidget() {
List<Widget> _actionsWidget() {
return <Widget>[
GestureDetector(
onTap: () {
Get.to(() => ShopCarPage()); //
},
child:
Image.asset(R.ASSETS_ICONS_SHOP_CAR_PNG, height: 40.w, width: 40.w),
child: Image.asset(Assets.newIcon.icGouwuc.path,
height: 48.w, width: 48.w),
),
Padding(
padding: EdgeInsets.only(left: 32.w, right: 32.w),
@ -378,8 +386,8 @@ class _MarketPageState extends State<MarketPage>
initIndex: 0,
));
},
child: Image.asset(R.ASSETS_ICONS_SHOP_ORDER_PNG,
height: 40.w, width: 40.w),
child: Image.asset(Assets.newIcon.icDingdan.path,
height: 48.w, width: 48.w),
),
),
];
@ -421,15 +429,10 @@ class _MarketPageState extends State<MarketPage>
fontSize: 28.sp,
color: Colors.white,
),
//textAlign: TextAlign.center,
),
]),
// Expanded(
// child: ges,
// )
],
),
// child: ges,
),
// 20.hb,
@ -449,20 +452,32 @@ class _MarketPageState extends State<MarketPage>
// color: Colors.white,
child: Stack(
children: <Widget>[
AnimatedHomeBackground(
key: _animatedBackgroundState,
height: 530.w,
backgroundColor: Colors.white,
// AnimatedHomeBackground(
// key: _animatedBackgroundState,
// height: 530.w,
// backgroundColor: Colors.white,
// ),
Container(
height: 265.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Color(0xFFFFFFFF),
Color(0xFFFFF9D1),
],
)),
),
Column(
children: <Widget>[
Container(
height: ScreenUtil().statusBarHeight + kToolbarHeight,
),
geSearch(),
20.hb,
getNum(),
// geSearch(),
20.hb,
// getNum(),
// 20.hb,
HomeSwiper(),
20.hb,
_buttonTitle(),
@ -582,30 +597,37 @@ class _MarketPageState extends State<MarketPage>
}
geSearch() {
return Container(
margin: EdgeInsets.symmetric(horizontal: 24.w),
child: MaterialButton(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 74.w,
shape: StadiumBorder(),
elevation: 0,
minWidth: double.infinity,
color: Color(0xFFF3F3F3),
onPressed: () {
Get.to(() => SearchGoodsPage());
},
child: Row(
children: [
Icon(
Icons.search,
size: 32.w,
color: Color(0xFF666666),
return Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: GestureDetector(
onTap: () async {
Get.to(() => SearchGoodsPage());
},
child: Container(
height: 72.w,
margin: EdgeInsets.only(left: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(36.w),
color: Colors.white),
child: Row(
children: [
32.wb,
Assets.home.icSearch.image(
width: 48.w,
height: 48.w,
),
10.wb,
'请输入关键字'.text.size(28.sp).color(ktextSubColor).make(),
],
),
),
10.wb,
'请输入关键字'.text.size(28.sp).color(ktextSubColor).make().expand(),
],
),
),
),
32.wb,
..._actionsWidget()
],
);
}
@ -710,11 +732,11 @@ class _MarketPageState extends State<MarketPage>
Widget HomeSwiper() {
return Container(
padding: EdgeInsets.symmetric(horizontal: 20.w),
margin: EdgeInsets.symmetric(horizontal: 20.w),
width: double.infinity,
height: bannerHeight,
child: AspectRatio(
aspectRatio: 355 / 177,
aspectRatio: 343 / 129,
child: Swiper(
key: UniqueKey(),
itemBuilder: (BuildContext context, int index) {
@ -850,7 +872,7 @@ class _MarketPageState extends State<MarketPage>
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
R.ASSETS_ICONS_TEST_KINGCION_PNG,
Assets.newIcon.allClasses.path,
height: 88.w,
width: 88.w,
),
@ -858,7 +880,7 @@ class _MarketPageState extends State<MarketPage>
Text(
'全部分类',
style: TextStyle(fontSize: 28.sp, color: ktextPrimary),
)
),
],
),
);
@ -909,13 +931,21 @@ class _MarketPageState extends State<MarketPage>
_recommend() {
return Container(
height: 184.w,
height: hotGoodHeight,
margin: EdgeInsets.only(left: 20.w, right: 20.w),
padding: EdgeInsets.only(top: 8.w, left: 16.w, right: 16.w),
padding: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12.w),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xFFFFF6F6), Color(0xFFFFFFFF)]),
borderRadius: BorderRadius.circular(16.w),
),
child: Column(
children: [
@ -926,7 +956,7 @@ class _MarketPageState extends State<MarketPage>
'爆款推荐',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 28.sp,
fontSize: 32.sp,
color: ktextPrimary),
),
],
@ -935,7 +965,7 @@ class _MarketPageState extends State<MarketPage>
padding: EdgeInsets.zero,
physics: NeverScrollableScrollPhysics(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
itemBuilder: (context, index) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -969,7 +999,7 @@ class _MarketPageState extends State<MarketPage>
],
);
},
itemCount: _goodsPopularModelList.length,
itemCount: 4,
shrinkWrap: true,
),
// Row(

@ -36,15 +36,14 @@ class AnimatedHomeBackgroundState extends State<AnimatedHomeBackground> {
decoration: BoxDecoration(
borderRadius: BorderRadius.vertical(bottom: Radius.circular(64)),
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
// displayColor,
// displayColor,
//Color(0xFFF8F7F8),
Color(0xFFC5483A),
Color(0xFFC24739),
Color(0xFFFFFFFF), Color(0xFFFFF9D1),
],
),
),

@ -123,7 +123,7 @@ class _MyHousePageState extends State<MyHousePage> {
8.w.heightBox,
Row(
children: [
'${model.buildingName}${model.unitName}${model.estateName}'
'${model.buildingName}${model.unitName}单元${model.estateName}'
.text
.size(36.sp)
.color(Colors.black.withOpacity(0.85))

Loading…
Cancel
Save