张萌 4 years ago
commit b06ecb1487

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

@ -152,6 +152,9 @@ class R {
static const String ASSETS_ICONS_BORROW_SUCCESS_PNG = static const String ASSETS_ICONS_BORROW_SUCCESS_PNG =
'assets/icons/borrow_success.png'; 'assets/icons/borrow_success.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/category.png)
static const String ASSETS_ICONS_CATEGORY_PNG = 'assets/icons/category.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/comment_notice.png) /// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/comment_notice.png)
static const String ASSETS_ICONS_COMMENT_NOTICE_PNG = static const String ASSETS_ICONS_COMMENT_NOTICE_PNG =
'assets/icons/comment_notice.png'; 'assets/icons/comment_notice.png';
@ -231,6 +234,10 @@ class R {
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/report.png) /// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/report.png)
static const String ASSETS_ICONS_REPORT_PNG = 'assets/icons/report.png'; static const String ASSETS_ICONS_REPORT_PNG = 'assets/icons/report.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/second_hand.png)
static const String ASSETS_ICONS_SECOND_HAND_PNG =
'assets/icons/second_hand.png';
/// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/shield_content.png) /// ![preview](file:///Users/akufe/Documents/aku_community/assets/icons/shield_content.png)
static const String ASSETS_ICONS_SHIELD_CONTENT_PNG = static const String ASSETS_ICONS_SHIELD_CONTENT_PNG =
'assets/icons/shield_content.png'; 'assets/icons/shield_content.png';

@ -279,6 +279,9 @@ class _Market {
///appid ///appid
String get goodsDetail => '/user/shop/findDetailByGoodsId'; String get goodsDetail => '/user/shop/findDetailByGoodsId';
///app
String get appointment => '/user/shop/goodsAppointment';
} }
class _Upload { class _Upload {

@ -351,15 +351,15 @@ class _LifePayPageState extends State<LifePayPage> {
], ],
), ),
24.w.widthBox, 24.w.widthBox,
MaterialButton( // MaterialButton(
elevation: 0, // elevation: 0,
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(37.w)), // borderRadius: BorderRadius.circular(37.w)),
color: kPrimaryColor, // color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w), // padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () {}, // onPressed: () {},
child: '去缴费'.text.black.size(32.sp).bold.make(), // child: '去缴费'.text.black.size(32.sp).bold.make(),
), // ),
], ],
), ),
), ),

@ -85,7 +85,7 @@ class _FixedSubmitPageState extends State<FixedSubmitPage> {
curve: Curves.easeInOutCubic, curve: Curves.easeInOutCubic,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Get.to(() => FixedDetailPage(model.id)); Get.to(() => FixedDetailPage(model.id ?? 0));
}, },
child: Container( child: Container(
width: 686.w, width: 686.w,

@ -21,7 +21,7 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/views/horizontal_image_view.dart'; import 'package:aku_community/widget/views/horizontal_image_view.dart';
class FixedDetailPage extends StatefulWidget { class FixedDetailPage extends StatefulWidget {
final int? id; final int id;
FixedDetailPage( FixedDetailPage(
this.id, { this.id, {
Key? key, Key? key,
@ -220,7 +220,8 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
...model.appProcessRecordVo! ...model.appProcessRecordVo!
.map((e) => Row( .map((e) => Row(
children: [ children: [
BeeMap.processClass[e.operationType!]!.text (BeeMap.processClass[e.operationType ?? 0] ?? '')
.text
.color(ktextSubColor) .color(ktextSubColor)
.size(28.sp) .size(28.sp)
.make(), .make(),

@ -1,3 +1,6 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart'; import 'package:flustars/flustars.dart';
@ -32,7 +35,7 @@ class UserProvider extends ChangeNotifier {
} }
logout() { logout() {
JPush().deleteAlias(); if (!kIsWeb && !Platform.isMacOS) JPush().deleteAlias();
final appProvider = Provider.of<AppProvider>(Get.context!, listen: false); final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
appProvider.setCurrentHouse(null); appProvider.setCurrentHouse(null);
_isLogin = false; _isLogin = false;
@ -48,7 +51,7 @@ class UserProvider extends ChangeNotifier {
Future updateProfile() async { Future updateProfile() async {
_userInfoModel = await SignFunc.getUserInfo(); _userInfoModel = await SignFunc.getUserInfo();
if (_userInfoModel != null) { if (_userInfoModel != null && !kIsWeb && !Platform.isMacOS) {
await JPush().setAlias(_userInfoModel!.id.toString()); await JPush().setAlias(_userInfoModel!.id.toString());
} }
notifyListeners(); notifyListeners();

@ -17,7 +17,10 @@ class GoodsCard extends StatelessWidget {
color: Colors.white, color: Colors.white,
elevation: 0, elevation: 0,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () => Get.to(() => GoodsDetailPage(id: item.id)), onPressed: () => Get.to(
() => GoodsDetailPage(id: item.id),
preventDuplicates: false,
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

@ -1,3 +1,4 @@
import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -22,6 +23,7 @@ import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart'; import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_back_button.dart'; import 'package:aku_community/widget/bee_back_button.dart';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/utils/headers.dart';
/// ///
class GoodsDetailPage extends StatefulWidget { class GoodsDetailPage extends StatefulWidget {
@ -41,11 +43,17 @@ class _GoodsDetailPageState extends State<GoodsDetailPage> {
List<GoodsItem> _topGoods = []; List<GoodsItem> _topGoods = [];
late PageController _pageController; late PageController _pageController;
int _currentIndex = 0; int _currentIndex = 0;
TextEditingController _nameController = TextEditingController();
TextEditingController _phoneController = TextEditingController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
final userProvider = Provider.of<UserProvider>(context, listen: false);
_refreshController = EasyRefreshController(); _refreshController = EasyRefreshController();
_pageController = PageController(); _pageController = PageController();
_nameController.text = userProvider.userInfoModel?.name ?? '';
_phoneController.text = userProvider.userInfoModel?.tel ?? '';
} }
@override @override
@ -57,7 +65,6 @@ class _GoodsDetailPageState extends State<GoodsDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context);
return BeeScaffold( return BeeScaffold(
leading: BeeBackButton(), leading: BeeBackButton(),
title: '商品详情', title: '商品详情',
@ -143,6 +150,84 @@ class _GoodsDetailPageState extends State<GoodsDetailPage> {
), ),
controller: _refreshController, controller: _refreshController,
), ),
bottomNavi: BottomButton(
onPressed: () {
Get.bottomSheet(Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(24.w),
),
),
child: Container(
padding: EdgeInsets.all(32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
'预约后商户将通过电话联系您',
style: TextStyle(
fontSize: 28.sp,
),
),
40.hb,
TextField(
controller: _nameController,
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(48),
borderSide: BorderSide.none,
),
fillColor: Color(0xFFEEEEEE),
filled: true,
),
),
32.hb,
TextField(
controller: _phoneController,
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(48),
borderSide: BorderSide.none,
),
fillColor: Color(0xFFEEEEEE),
filled: true,
),
),
80.hb,
MaterialButton(
elevation: 0,
minWidth: double.infinity,
shape: StadiumBorder(),
color: kPrimaryColor,
height: 80.w,
onPressed: () async {
final cancel = BotToast.showLoading();
BaseModel baseModel = await NetUtil().post(
API.market.appointment,
params: {
'goodsId': widget.id,
'userName': _nameController.text,
'userTel': _phoneController.text,
'num': 1,
},
showMessage: true,
);
cancel();
if (baseModel.status == true) {
Get.back();
Get.back();
}
},
child: Text('确认报名'),
),
],
),
),
));
},
child: Text('立即报名'),
),
); );
} }

@ -1,5 +1,6 @@
// import 'package:aku_community/base/base_style.dart'; // import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/ui/market/second_hand/second_hand_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -67,6 +68,26 @@ class _MarketPageState extends State<MarketPage>
), ),
title: '商城', title: '商城',
actions: [ actions: [
MaterialButton(
minWidth: 108.w,
padding: EdgeInsets.zero,
onPressed: () async {
Get.to(() => SecondHandPage());
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Image.asset(
R.ASSETS_ICONS_SECOND_HAND_PNG,
width: 48.w,
height: 48.w,
),
4.hb,
'二手'.text.size(20.sp).black.make(),
],
),
),
MaterialButton( MaterialButton(
minWidth: 108.w, minWidth: 108.w,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
@ -81,10 +102,10 @@ class _MarketPageState extends State<MarketPage>
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Icon( Image.asset(
Icons.grid_view, R.ASSETS_ICONS_CATEGORY_PNG,
color: Color(0xFF333333), width: 48.w,
size: 48.w, height: 48.w,
), ),
4.hb, 4.hb,
'分类'.text.size(20.sp).black.make(), '分类'.text.size(20.sp).black.make(),

@ -0,0 +1,27 @@
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class SecondHandPage extends StatefulWidget {
SecondHandPage({Key? key}) : super(key: key);
@override
_SecondHandPageState createState() => _SecondHandPageState();
}
class _SecondHandPageState extends State<SecondHandPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '二手市场',
actions: [
IconButton(
icon: Icon(
CupertinoIcons.add_circled,
),
onPressed: () {},
),
],
);
}
}

@ -16,6 +16,7 @@ class BeeMap {
}; };
static Map<int, String> processClass = { static Map<int, String> processClass = {
0: '未知',
1: '报修时间', 1: '报修时间',
2: '管家分派', 2: '管家分派',
3: '师傅接单', 3: '师傅接单',

@ -6,10 +6,10 @@ PODS:
- Firebase/Crashlytics (7.11.0): - Firebase/Crashlytics (7.11.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseCrashlytics (~> 7.11.0) - FirebaseCrashlytics (~> 7.11.0)
- firebase_core (1.1.0): - firebase_core (1.1.1):
- Firebase/CoreOnly (~> 7.11.0) - Firebase/CoreOnly (~> 7.11.0)
- FlutterMacOS - FlutterMacOS
- firebase_crashlytics (2.0.2): - firebase_crashlytics (2.0.3):
- Firebase/CoreOnly (~> 7.11.0) - Firebase/CoreOnly (~> 7.11.0)
- Firebase/Crashlytics (~> 7.11.0) - Firebase/Crashlytics (~> 7.11.0)
- firebase_core - firebase_core
@ -108,8 +108,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7 device_info_plus_macos: 1ad388a1ef433505c4038e7dd9605aadd1e2e9c7
Firebase: c121feb35e4126c0b355e3313fa9b487d47319fd Firebase: c121feb35e4126c0b355e3313fa9b487d47319fd
firebase_core: 9e45a9c5ba9dbcb8973b3a68e6ff43ecf2dcf206 firebase_core: 6db6207b18525075f0d6b639045f6752722836e9
firebase_crashlytics: 4ab08e6b22a4f6ec909cc1f0a046eac2d1b2925c firebase_crashlytics: 82416d5f310a4c1576e71797f653520af2da26a7
FirebaseCore: 907447d8917a4d3eb0cce2829c5a0ad21d90b432 FirebaseCore: 907447d8917a4d3eb0cce2829c5a0ad21d90b432
FirebaseCoreDiagnostics: 68ad972f99206cef818230f3f3179d52ccfb7f8c FirebaseCoreDiagnostics: 68ad972f99206cef818230f3f3179d52ccfb7f8c
FirebaseCrashlytics: 272b675aa9d1e9bae1f9e1449fcc1f2cf6042806 FirebaseCrashlytics: 272b675aa9d1e9bae1f9e1449fcc1f2cf6042806

Loading…
Cancel
Save