Merge branch 'newHost' of https://git.oa00.com/1281228557/aku_new_community into newHost
commit
25f3a85ef6
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.5 KiB |
File diff suppressed because it is too large
Load Diff
@ -1,21 +0,0 @@
|
||||
class ConvenientPhoneModel {
|
||||
int? id;
|
||||
String? name;
|
||||
String? tel;
|
||||
|
||||
ConvenientPhoneModel({this.id, this.name, this.tel});
|
||||
|
||||
ConvenientPhoneModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tel = json['tel'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tel'] = this.tel;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'convenience_phone_model.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class ConveniencePhoneModel extends Equatable {
|
||||
final int id;
|
||||
final String name;
|
||||
final String tel;
|
||||
final int type;
|
||||
|
||||
factory ConveniencePhoneModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ConveniencePhoneModelFromJson(json);
|
||||
|
||||
const ConveniencePhoneModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.tel,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [id, name, tel, type,];
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'convenience_phone_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ConveniencePhoneModel _$ConveniencePhoneModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ConveniencePhoneModel(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
tel: json['tel'] as String,
|
||||
type: json['type'] as int,
|
||||
);
|
@ -0,0 +1,33 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'integral_goods_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class IntegralGoodsListModel extends Equatable {
|
||||
final int id;
|
||||
final String skuName;
|
||||
final String mainPhoto;
|
||||
final int points;
|
||||
final int? saleNum;
|
||||
|
||||
factory IntegralGoodsListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$IntegralGoodsListModelFromJson(json);
|
||||
|
||||
const IntegralGoodsListModel({
|
||||
required this.id,
|
||||
required this.skuName,
|
||||
required this.mainPhoto,
|
||||
required this.points,
|
||||
this.saleNum,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
skuName,
|
||||
mainPhoto,
|
||||
points,
|
||||
saleNum,
|
||||
];
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'integral_goods_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
IntegralGoodsListModel _$IntegralGoodsListModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
IntegralGoodsListModel(
|
||||
id: json['id'] as int,
|
||||
skuName: json['skuName'] as String,
|
||||
mainPhoto: json['mainPhoto'] as String,
|
||||
points: json['points'] as int,
|
||||
saleNum: json['saleNum'] as int?,
|
||||
);
|
@ -0,0 +1,37 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'trade_record_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class TradeRecordListModel extends Equatable {
|
||||
final int id;
|
||||
final int type;
|
||||
final String content;
|
||||
final double payAmount;
|
||||
final String createName;
|
||||
final String createDate;
|
||||
|
||||
factory TradeRecordListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$TradeRecordListModelFromJson(json);
|
||||
|
||||
|
||||
const TradeRecordListModel({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.content,
|
||||
required this.payAmount,
|
||||
required this.createName,
|
||||
required this.createDate,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
type,
|
||||
content,
|
||||
payAmount,
|
||||
createName,
|
||||
createDate,
|
||||
];
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'trade_record_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
TradeRecordListModel _$TradeRecordListModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
TradeRecordListModel(
|
||||
id: json['id'] as int,
|
||||
type: json['type'] as int,
|
||||
content: json['content'] as String,
|
||||
payAmount: (json['payAmount'] as num).toDouble(),
|
||||
createName: json['createName'] as String,
|
||||
createDate: json['createDate'] as String,
|
||||
);
|
@ -1,73 +0,0 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/const/resource.dart';
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart';
|
||||
import 'package:aku_new_community/utils/network/base_model.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
|
||||
class GeographicInformationPage extends StatefulWidget {
|
||||
GeographicInformationPage({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_GeographicInformationPageState createState() =>
|
||||
_GeographicInformationPageState();
|
||||
}
|
||||
|
||||
class _GeographicInformationPageState extends State<GeographicInformationPage> {
|
||||
GeographicInformationModel _model = GeographicInformationModel.init();
|
||||
bool _onload = true;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeScaffold(
|
||||
bodyColor: Colors.white,
|
||||
title: '地理信息',
|
||||
body: EasyRefresh(
|
||||
firstRefresh: true,
|
||||
header: MaterialHeader(),
|
||||
onRefresh: () async {
|
||||
BaseModel baseModel =
|
||||
await NetUtil().get(API.manager.geographyInformation);
|
||||
if (baseModel.success && baseModel.data != null) {
|
||||
_model = GeographicInformationModel.fromJson(baseModel.data);
|
||||
}
|
||||
_onload = false;
|
||||
setState(() {});
|
||||
},
|
||||
child: _onload
|
||||
? Container()
|
||||
: ListView(
|
||||
children: [
|
||||
SizedBox(
|
||||
child: FadeInImage.assetNetwork(
|
||||
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
fit: BoxFit.cover,
|
||||
image: SAASAPI.image(ImgModel.first(_model.imgUrls))),
|
||||
width: double.infinity,
|
||||
height: 424.w,
|
||||
),
|
||||
24.w.heightBox,
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w),
|
||||
child: Text(
|
||||
_model.content ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: (ktextSubColor),
|
||||
fontWeight: FontWeight.bold),
|
||||
)),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
@ -1,73 +1,70 @@
|
||||
import 'package:aku_new_community/base/base_style.dart';
|
||||
import 'package:aku_new_community/const/resource.dart';
|
||||
import 'package:aku_new_community/constants/api.dart';
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:aku_new_community/models/geographic_information/geographic_information_model.dart';
|
||||
import 'package:aku_new_community/utils/network/base_model.dart';
|
||||
import 'package:aku_new_community/pages/one_alarm/alarm_detail_page.dart';
|
||||
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
|
||||
import 'package:aku_new_community/provider/app_provider.dart';
|
||||
import 'package:aku_new_community/utils/headers.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:amap_flutter_base/amap_flutter_base.dart';
|
||||
import 'package:amap_flutter_map/amap_flutter_map.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/velocity_x.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
||||
class GeographicInformationPage extends StatefulWidget {
|
||||
GeographicInformationPage({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
GeographicInformationPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_GeographicInformationPageState createState() =>
|
||||
_GeographicInformationPageState();
|
||||
_GeographicInformationPageState createState() => _GeographicInformationPageState();
|
||||
}
|
||||
|
||||
class _GeographicInformationPageState extends State<GeographicInformationPage> {
|
||||
GeographicInformationModel _model = GeographicInformationModel.init();
|
||||
bool _onload = false;
|
||||
AMapController? _mapController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
PermissionUtil.getLocationPermission();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_mapController?.disponse();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appProvider = Provider.of<AppProvider>(context);
|
||||
return BeeScaffold(
|
||||
bodyColor: Colors.white,
|
||||
title: '地理信息',
|
||||
body: EasyRefresh(
|
||||
firstRefresh: true,
|
||||
header: MaterialHeader(),
|
||||
onRefresh: () async {
|
||||
BaseModel baseModel =
|
||||
await NetUtil().get(API.manager.geographyInformation);
|
||||
if (baseModel.success && baseModel.data != null) {
|
||||
_model = GeographicInformationModel.fromJson(baseModel.data);
|
||||
}
|
||||
_onload = false;
|
||||
setState(() {});
|
||||
},
|
||||
child: _onload
|
||||
? Container()
|
||||
: ListView(
|
||||
children: [
|
||||
SizedBox(
|
||||
child: FadeInImage.assetNetwork(
|
||||
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
fit: BoxFit.cover,
|
||||
image: SAASAPI.image(ImgModel.first(_model.imgUrls))),
|
||||
width: double.infinity,
|
||||
height: 424.w,
|
||||
),
|
||||
24.w.heightBox,
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 32.w, right: 32.w, top: 40.w),
|
||||
child: Text(
|
||||
_model.content ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 26.sp,
|
||||
color: (ktextSubColor),
|
||||
fontWeight: FontWeight.bold),
|
||||
)),
|
||||
],
|
||||
),
|
||||
));
|
||||
title: '地理信息',
|
||||
body: AMapWidget(
|
||||
privacyStatement: AMapPrivacyStatement(
|
||||
hasContains: true, hasShow: true, hasAgree: true),
|
||||
onMapCreated: (controller) {
|
||||
final appProvider =
|
||||
Provider.of<AppProvider>(context, listen: false);
|
||||
LatLng _target = LatLng(
|
||||
(appProvider.location?['latitude'] ?? 0) as double,
|
||||
(appProvider.location?['longitude'] ?? 0) as double,
|
||||
);
|
||||
_mapController = controller;
|
||||
_mapController!.moveCamera(
|
||||
CameraUpdate.newCameraPosition(
|
||||
CameraPosition(target: _target, zoom: 18),
|
||||
),
|
||||
);
|
||||
},
|
||||
myLocationStyleOptions: MyLocationStyleOptions(
|
||||
true,
|
||||
circleFillColor: Theme.of(context).primaryColor.withOpacity(0.2),
|
||||
circleStrokeColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,213 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/models/wallet/trade_record_list_model.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
|
||||
import 'package:aku_new_community/widget/picker/bee_picker_box.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class BalanceRecordView extends StatefulWidget {
|
||||
const BalanceRecordView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BalanceRecordViewState createState() => _BalanceRecordViewState();
|
||||
}
|
||||
|
||||
class _BalanceRecordViewState extends State<BalanceRecordView> {
|
||||
EasyRefreshController _refreshController = EasyRefreshController();
|
||||
|
||||
List<TradeRecordListModel> _models = [];
|
||||
int _pageNum = 1;
|
||||
int _size = 10;
|
||||
DateTime _pickTime = DateTime.now();
|
||||
int _pickType = 0;
|
||||
|
||||
Map<int, String> _types = {
|
||||
1: '支付',
|
||||
2: '退还',
|
||||
3: '充值',
|
||||
4: '收入',
|
||||
5: '提现',
|
||||
6: '抵扣',
|
||||
};
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
var date = await BeeDatePicker.monthPicker(
|
||||
DateTime.now().subtract(Duration(days: 365)));
|
||||
if (date != null) {
|
||||
_pickTime = date;
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
'${_pickTime.year}年${_pickTime.month}月'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
Icon(
|
||||
CupertinoIcons.chevron_down,
|
||||
size: 32.w,
|
||||
color: Colors.black.withOpacity(0.45),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
MaterialButton(
|
||||
color: Colors.black.withOpacity(0.06),
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return BeePickerBox(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
setState(() {});
|
||||
},
|
||||
child: CupertinoPicker.builder(
|
||||
itemExtent: 60.w,
|
||||
childCount: _types.values.length,
|
||||
onSelectedItemChanged: (index) {
|
||||
_pickType = _types.keys.toList()[index];
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var str = _types.values.toList()[index];
|
||||
return Center(
|
||||
child: str.text.size(32.sp).isIntrinsic.make(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
shape: StadiumBorder(),
|
||||
elevation: 0,
|
||||
child: Row(
|
||||
children: [
|
||||
'${_pickType == 0 ? '全部类型' : _types[_pickType]}'
|
||||
.text
|
||||
.size(24.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
Icon(
|
||||
CupertinoIcons.chevron_down,
|
||||
size: 24.w,
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: EasyRefresh(
|
||||
header: MaterialHeader(),
|
||||
footer: MaterialFooter(),
|
||||
firstRefresh: true,
|
||||
controller: _refreshController,
|
||||
onRefresh: () async {
|
||||
_pageNum = 1;
|
||||
var baseList = await NetUtil()
|
||||
.getList(SAASAPI.balance.tradeRecordList, params: {
|
||||
'pageNum': _pageNum,
|
||||
'size': _size,
|
||||
'modelType': 0,
|
||||
'type': _pickType,
|
||||
'createDate': _pickTime,
|
||||
});
|
||||
|
||||
_models = baseList.rows
|
||||
.map((e) => TradeRecordListModel.fromJson(e))
|
||||
.toList();
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
onLoad: () async {
|
||||
_pageNum++;
|
||||
var baseList = await NetUtil()
|
||||
.getList(SAASAPI.balance.tradeRecordList, params: {
|
||||
'pageNum': _pageNum,
|
||||
'size': _size,
|
||||
'modelType': 0,
|
||||
'type': _pickType,
|
||||
'createDate': _pickTime,
|
||||
});
|
||||
if (baseList.total > _models.length) {
|
||||
_models.addAll(baseList.rows
|
||||
.map((e) => TradeRecordListModel.fromJson(e))
|
||||
.toList());
|
||||
} else {
|
||||
_refreshController.finishLoad(noMore: true);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
child: ListView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
|
||||
children: _models.map((e) => _buildCard(e)).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
bool incom(type) => [2, 3, 4].contains(type);
|
||||
|
||||
Widget _buildCard(TradeRecordListModel model) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
'${_types[model.type]}-${model.content}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
Spacer(),
|
||||
'${incom(model.type) ? '+' : '-'}¥${model.payAmount}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(incom(model.type)
|
||||
? Colors.red
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
],
|
||||
),
|
||||
8.hb,
|
||||
'${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:sms_autofill/sms_autofill.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class InputPayPasswordDialog extends StatefulWidget {
|
||||
const InputPayPasswordDialog({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_InputPayPasswordDialogState createState() => _InputPayPasswordDialogState();
|
||||
}
|
||||
|
||||
class _InputPayPasswordDialogState extends State<InputPayPasswordDialog> {
|
||||
String? _currentCode;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 300.w),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(24.w),
|
||||
child: Container(
|
||||
width: 630.w,
|
||||
height: 480.w,
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)),
|
||||
child: Column(
|
||||
children: [
|
||||
96.hb,
|
||||
'请输入您的支付密码'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.bold
|
||||
.make(),
|
||||
40.hb,
|
||||
'支付密码仅用于对钱包余额支付时确认'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
PinFieldAutoFill(
|
||||
autoFocus: true,
|
||||
currentCode: _currentCode,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
||||
codeLength: 6,
|
||||
onCodeChanged: (code) async {
|
||||
if ((code?.length ?? 0) >= 6) {
|
||||
Get.back(result: code!);
|
||||
}
|
||||
_currentCode = code;
|
||||
},
|
||||
decoration: UnderlineDecoration(
|
||||
colorBuilder: FixedColorListBuilder([
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
])),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,247 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
|
||||
import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart';
|
||||
import 'package:aku_new_community/pages/personal/wallet/set_pay_password_dialog.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
|
||||
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
|
||||
import 'package:aku_new_community/widget/others/user_tool.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class PayWayDialog extends StatefulWidget {
|
||||
final bool isBalance;
|
||||
final int amount;
|
||||
final bool insufficientBalance;
|
||||
|
||||
const PayWayDialog(
|
||||
{Key? key,
|
||||
required this.isBalance,
|
||||
required this.amount,
|
||||
required this.insufficientBalance})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_PayWayDialogState createState() => _PayWayDialogState();
|
||||
}
|
||||
|
||||
class _PayWayDialogState extends State<PayWayDialog> {
|
||||
List<int> _payType = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
if (widget.isBalance) {
|
||||
_payType.add(1);
|
||||
} else {
|
||||
if (widget.insufficientBalance) {
|
||||
_payType.add(1);
|
||||
} else {
|
||||
_payType.add(0);
|
||||
}
|
||||
}
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var wallet = GestureDetector(
|
||||
onTap: () {
|
||||
if (widget.insufficientBalance) {
|
||||
return;
|
||||
}
|
||||
_payType.clear();
|
||||
_payType.add(0);
|
||||
setState(() {});
|
||||
},
|
||||
child: ClipRect(
|
||||
child: Stack(
|
||||
children: [
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
children: [
|
||||
Assets.newIcon.walletBalance.image(width: 48.w, height: 48.w),
|
||||
8.wb,
|
||||
'钱包余额'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
16.wb,
|
||||
Visibility(
|
||||
visible: widget.insufficientBalance,
|
||||
child:
|
||||
'钱包余额不足'.text.size(24.sp).color(Colors.red).make()),
|
||||
Spacer(),
|
||||
BeeCheckRadio(
|
||||
groupValue: _payType,
|
||||
value: 0,
|
||||
size: 36.w,
|
||||
indent: Icon(
|
||||
CupertinoIcons.checkmark_alt,
|
||||
color: Colors.black,
|
||||
size: 28.w,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
BackdropFilter(
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: widget.insufficientBalance ? 1 : 0,
|
||||
sigmaY: widget.insufficientBalance ? 1 : 0),
|
||||
child: Container(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
var alipay = GestureDetector(
|
||||
onTap: () {
|
||||
_payType.clear();
|
||||
_payType.add(1);
|
||||
setState(() {});
|
||||
},
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
children: [
|
||||
Assets.newIcon.alipay.image(width: 48.w, height: 48.w),
|
||||
8.wb,
|
||||
'支付宝'.text.size(28.sp).color(Colors.black.withOpacity(0.85)).make(),
|
||||
Spacer(),
|
||||
BeeCheckRadio(
|
||||
groupValue: _payType,
|
||||
value: 1,
|
||||
size: 36.w,
|
||||
indent: Icon(
|
||||
CupertinoIcons.checkmark_alt,
|
||||
color: Colors.black,
|
||||
size: 28.w,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
|
||||
width: double.infinity,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
'支付'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.bold
|
||||
.isIntrinsic
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
48.hb,
|
||||
Column(
|
||||
children: [
|
||||
'¥'
|
||||
.richText
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.size(26.sp)
|
||||
.withTextSpanChildren([
|
||||
widget.amount
|
||||
.toString()
|
||||
.textSpan
|
||||
.size(40.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
]).make(),
|
||||
Offstage(
|
||||
offstage: widget.isBalance,
|
||||
child: '总共购买${widget.amount * 10}积分'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
),
|
||||
60.hb,
|
||||
Offstage(
|
||||
offstage: widget.isBalance,
|
||||
child: Column(
|
||||
children: [
|
||||
wallet,
|
||||
40.hb,
|
||||
],
|
||||
),
|
||||
),
|
||||
alipay,
|
||||
80.hb,
|
||||
BeeLongButton(
|
||||
width: double.infinity,
|
||||
onPressed: () async {
|
||||
if (_payType.contains(0)) {
|
||||
if (!UserTool
|
||||
.userProvider.userInfoModel!.isBalancePayPwd) {
|
||||
Get.dialog(SetPayPasswordDialog());
|
||||
} else {
|
||||
Get.back();
|
||||
var psd = await Get.dialog(
|
||||
InputPayPasswordDialog());
|
||||
await NetUtil().post(
|
||||
SAASAPI.balance.buyPointsByBalance,
|
||||
params: {
|
||||
'balance': widget.amount,
|
||||
'balancePayPwd': psd
|
||||
},
|
||||
showMessage: true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (_payType.contains(1)) {
|
||||
var cancel = BotToast.showLoading();
|
||||
await _alipayFuc();
|
||||
cancel();
|
||||
Get.back();
|
||||
return;
|
||||
}
|
||||
},
|
||||
text: '确认支付${widget.amount}元'),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future _alipayFuc() async {
|
||||
if (widget.isBalance) {
|
||||
var base = await NetUtil().post(SAASAPI.pay.createBalanceOrder, params: {
|
||||
'balance': widget.amount,
|
||||
});
|
||||
if (base.success) {
|
||||
var re = await PayUtil()
|
||||
.callAliPay(base.data, SAASAPI.pay.balanceOrderCheckAlipay);
|
||||
} else {
|
||||
BotToast.showText(text: base.msg);
|
||||
}
|
||||
} else {
|
||||
var base = await NetUtil().post(SAASAPI.pay.createPointsOrder, params: {
|
||||
'payAmount': widget.amount,
|
||||
});
|
||||
if (base.success) {
|
||||
var re = await PayUtil()
|
||||
.callAliPay(base.data, SAASAPI.pay.pointsOrderCheckAlipay);
|
||||
} else {
|
||||
BotToast.showText(text: base.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/models/wallet/trade_record_list_model.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
|
||||
import 'package:aku_new_community/widget/picker/bee_picker_box.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class PointRecordView extends StatefulWidget {
|
||||
const PointRecordView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PointRecordViewState createState() => _PointRecordViewState();
|
||||
}
|
||||
|
||||
class _PointRecordViewState extends State<PointRecordView> {
|
||||
EasyRefreshController _refreshController = EasyRefreshController();
|
||||
|
||||
List<TradeRecordListModel> _models = [];
|
||||
int _pageNum = 1;
|
||||
int _size = 10;
|
||||
DateTime _pickTime = DateTime.now();
|
||||
int _pickType = 0;
|
||||
|
||||
Map<int, String> _types = {
|
||||
1: '支付',
|
||||
2: '退还',
|
||||
3: '充值',
|
||||
4: '收入',
|
||||
5: '提现',
|
||||
6: '抵扣',
|
||||
};
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_refreshController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
var date = await BeeDatePicker.monthPicker(
|
||||
DateTime.now().subtract(Duration(days: 365)));
|
||||
if (date != null) {
|
||||
_pickTime = date;
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
'${_pickTime.year}年${_pickTime.month}月'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
Icon(
|
||||
CupertinoIcons.chevron_down,
|
||||
size: 32.w,
|
||||
color: Colors.black.withOpacity(0.45),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
MaterialButton(
|
||||
color: Colors.black.withOpacity(0.06),
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return BeePickerBox(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
setState(() {});
|
||||
},
|
||||
child: CupertinoPicker.builder(
|
||||
itemExtent: 60.w,
|
||||
childCount: _types.values.length,
|
||||
onSelectedItemChanged: (index) {
|
||||
_pickType = _types.keys.toList()[index];
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var str = _types.values.toList()[index];
|
||||
return Center(
|
||||
child: str.text.size(32.sp).isIntrinsic.make(),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
shape: StadiumBorder(),
|
||||
elevation: 0,
|
||||
child: Row(
|
||||
children: [
|
||||
'${_pickType == 0 ? '全部类型' : _types[_pickType]}'
|
||||
.text
|
||||
.size(24.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
Icon(
|
||||
CupertinoIcons.chevron_down,
|
||||
size: 24.w,
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: EasyRefresh(
|
||||
header: MaterialHeader(),
|
||||
footer: MaterialFooter(),
|
||||
firstRefresh: true,
|
||||
controller: _refreshController,
|
||||
onRefresh: () async {
|
||||
_pageNum = 1;
|
||||
var baseList = await NetUtil()
|
||||
.getList(SAASAPI.balance.tradeRecordList, params: {
|
||||
'pageNum': _pageNum,
|
||||
'size': _size,
|
||||
'modelType': 1,
|
||||
'type': _pickType,
|
||||
'createDate': _pickTime,
|
||||
});
|
||||
|
||||
_models = baseList.rows
|
||||
.map((e) => TradeRecordListModel.fromJson(e))
|
||||
.toList();
|
||||
setState(() {});
|
||||
},
|
||||
onLoad: () async {
|
||||
_pageNum++;
|
||||
var baseList = await NetUtil()
|
||||
.getList(SAASAPI.balance.tradeRecordList, params: {
|
||||
'pageNum': _pageNum,
|
||||
'size': _size,
|
||||
'modelType': 0,
|
||||
'type': _pickType,
|
||||
'createDate': _pickTime,
|
||||
});
|
||||
if (baseList.total > _models.length) {
|
||||
_models.addAll(baseList.rows
|
||||
.map((e) => TradeRecordListModel.fromJson(e))
|
||||
.toList());
|
||||
} else {
|
||||
_refreshController.finishLoad(noMore: true);
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
child: ListView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
|
||||
children: _models.map((e) => _buildCard(e)).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
bool incom(type) => [2, 3, 4].contains(type);
|
||||
|
||||
Widget _buildCard(TradeRecordListModel model) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
'${_types[model.type]}-${model.content}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
Spacer(),
|
||||
'${incom(model.type) ? '+' : '-'}¥${model.payAmount}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(incom(model.type)
|
||||
? Colors.red
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
],
|
||||
),
|
||||
8.hb,
|
||||
'${DateUtil.formatDateStr(model.createDate, format: 'MM/dd HH:mm')}'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/pages/personal/wallet/set_pay_password_verify_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:sms_autofill/sms_autofill.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class SetPayPasswordDialog extends StatefulWidget {
|
||||
const SetPayPasswordDialog({Key? key, }) : super(key: key);
|
||||
|
||||
@override
|
||||
_SetPayPasswordDialogState createState() => _SetPayPasswordDialogState();
|
||||
}
|
||||
|
||||
class _SetPayPasswordDialogState extends State<SetPayPasswordDialog> {
|
||||
String? _currentCode;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding:EdgeInsets.only(bottom: 300.w),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(24.w),
|
||||
child: Container(
|
||||
width: 630.w,
|
||||
height: 480.w,
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(24.w)),
|
||||
child: Column(
|
||||
children: [
|
||||
96.hb,
|
||||
'请先设置支付密码'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.bold
|
||||
.make(),
|
||||
40.hb,
|
||||
'支付密码仅用于对钱包余额支付时确认'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
PinFieldAutoFill(
|
||||
autoFocus: true,
|
||||
currentCode: _currentCode,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
||||
codeLength: 6,
|
||||
onCodeChanged: (code) async {
|
||||
if ((code?.length ?? 0) >= 6) {
|
||||
Get.back();
|
||||
Get.dialog(SetPayVerifyPasswordDialog(firstCode:code!,));
|
||||
}
|
||||
_currentCode = code;
|
||||
},
|
||||
decoration: UnderlineDecoration(
|
||||
colorBuilder: FixedColorListBuilder([
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
])),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart';
|
||||
import 'package:aku_new_community/pages/sign/login/psd_verify.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:aku_new_community/widget/others/user_tool.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:sms_autofill/sms_autofill.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class SetPayVerifyPasswordDialog extends StatefulWidget {
|
||||
final String firstCode;
|
||||
|
||||
const SetPayVerifyPasswordDialog({Key? key, required this.firstCode})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_SetPayVerifyPasswordDialogState createState() =>
|
||||
_SetPayVerifyPasswordDialogState();
|
||||
}
|
||||
|
||||
class _SetPayVerifyPasswordDialogState
|
||||
extends State<SetPayVerifyPasswordDialog> {
|
||||
String _currentCode = '';
|
||||
|
||||
bool get checkVerify => widget.firstCode == _currentCode;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(bottom: 300.w),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(24.w),
|
||||
child: Container(
|
||||
width: 630.w,
|
||||
height: 480.w,
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||
decoration:
|
||||
BoxDecoration(borderRadius: BorderRadius.circular(24.w)),
|
||||
child: Column(
|
||||
children: [
|
||||
96.hb,
|
||||
'请再次输入支付密码'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.bold
|
||||
.make(),
|
||||
40.hb,
|
||||
'支付密码仅用于对钱包余额支付时确认'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
PinFieldAutoFill(
|
||||
autoFocus: true,
|
||||
currentCode: _currentCode,
|
||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
||||
codeLength: 6,
|
||||
onCodeChanged: (code) async {
|
||||
_currentCode = code ?? '';
|
||||
if ((code?.length ?? 0) >= 6) {
|
||||
print(checkVerify);
|
||||
if (!checkVerify) {
|
||||
return;
|
||||
}
|
||||
var base = await NetUtil()
|
||||
.post(SAASAPI.balance.setBalancePayPsd, params: {
|
||||
'pwd': widget.firstCode,
|
||||
'rePwd': _currentCode,
|
||||
});
|
||||
if (base.success) {
|
||||
Get.back();
|
||||
UserTool.userProvider.updateUserInfo();
|
||||
} else {
|
||||
BotToast.showText(text: base.msg);
|
||||
Get.back();
|
||||
}
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
decoration: UnderlineDecoration(
|
||||
colorBuilder: FixedColorListBuilder([
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
Colors.black.withOpacity(0.3),
|
||||
])),
|
||||
),
|
||||
24.hb,
|
||||
Offstage(
|
||||
offstage: (_currentCode.isEmptyOrNull) || (checkVerify),
|
||||
child: Row(
|
||||
children: [
|
||||
'密码输入不一致'
|
||||
.text
|
||||
.size(24.sp)
|
||||
.isIntrinsic
|
||||
.color(Colors.red)
|
||||
.make(),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,496 @@
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/extensions/widget_list_ext.dart';
|
||||
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||
import 'package:aku_new_community/pages/personal/wallet/pay_way_dialog.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
|
||||
import 'package:aku_new_community/widget/others/user_tool.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:collection/src/iterable_extensions.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/src/size_extension.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:velocity_x/src/extensions/num_ext.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class WalletRechargePage extends StatefulWidget {
|
||||
final initIndex;
|
||||
|
||||
const WalletRechargePage({Key? key, this.initIndex = 0}) : super(key: key);
|
||||
|
||||
@override
|
||||
_WalletRechargePageState createState() => _WalletRechargePageState();
|
||||
}
|
||||
|
||||
class _WalletRechargePageState extends State<WalletRechargePage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
int _currentIndex = 0;
|
||||
int _currentSelect = 0;
|
||||
late TabController _tabController;
|
||||
List<String> _tabs = ['余额充值', '积分充值'];
|
||||
|
||||
List<int> _balanceValue = [10, 20, 30, 50, 00, 200, 300, 500];
|
||||
List<int> _pointValue = [10, 200, 300, 500, 1000, 2000, 5000, 10000];
|
||||
|
||||
int _rechargeValue = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController =
|
||||
TabController(length: 2, vsync: this, initialIndex: widget.initIndex);
|
||||
_currentIndex = widget.initIndex;
|
||||
_rechargeValue = widget.initIndex == 0 ? _balanceValue[0] : _pointValue[0];
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeScaffold(
|
||||
title: '钱包充值',
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {},
|
||||
child: '账单'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
),
|
||||
],
|
||||
body: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
|
||||
child: Row(
|
||||
children: [
|
||||
'余额:${UserTool.userProvider.userInfoModel!.balance ?? 0}'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
64.wb,
|
||||
'积分:'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
'${UserTool.userProvider.userInfoModel!.points ?? 0}'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
||||
decoration: BoxDecoration(color: Colors.white),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: _tabs
|
||||
.mapIndexed((index, element) => GestureDetector(
|
||||
onTap: () {
|
||||
_currentIndex = index;
|
||||
_tabController.animateTo(_currentIndex);
|
||||
setState(() {});
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
element.text
|
||||
.size(28.sp)
|
||||
.fontWeight(_currentIndex == index
|
||||
? FontWeight.bold
|
||||
: FontWeight.normal)
|
||||
.color(Colors.black.withOpacity(
|
||||
_currentIndex == index ? 0.85 : 0.65))
|
||||
.make(),
|
||||
8.hb,
|
||||
AnimatedOpacity(
|
||||
duration: Duration(microseconds: 500),
|
||||
opacity: _currentIndex == index ? 1 : 0,
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 8.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black,
|
||||
borderRadius:
|
||||
BorderRadius.circular(4.w),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
.toList()
|
||||
.sepWidget(separate: 48.wb),
|
||||
),
|
||||
48.hb,
|
||||
Expanded(
|
||||
child: TabBarView(controller: _tabController, children: [
|
||||
_balanceView(),
|
||||
_pointView(),
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
bottomNavi: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 32.w,
|
||||
right: 32.w,
|
||||
bottom: 32.w + MediaQuery.of(context).padding.bottom),
|
||||
child: BeeLongButton(
|
||||
onPressed: () async {
|
||||
if (_currentSelect == 9) {
|
||||
_rechargeValue = 0;
|
||||
Get.bottomSheet(_customValueDialog(_currentIndex == 0));
|
||||
} else {
|
||||
Get.bottomSheet(PayWayDialog(
|
||||
isBalance: _currentIndex == 0,
|
||||
amount: _rechargeValue,
|
||||
insufficientBalance: _rechargeValue >
|
||||
(UserTool.userProvider.userInfoModel!.balance ?? 0)));
|
||||
}
|
||||
},
|
||||
text: '下一步'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _balanceView() {
|
||||
return GridView.count(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
children: [
|
||||
..._balanceValue
|
||||
.mapIndexed((index, e) => _card(index, e, true))
|
||||
.toList(),
|
||||
_customValueCard(9, true)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _pointView() {
|
||||
return GridView.count(
|
||||
mainAxisSpacing: 20.w,
|
||||
crossAxisSpacing: 20.w,
|
||||
crossAxisCount: 3,
|
||||
children: [
|
||||
..._pointValue
|
||||
.mapIndexed((index, element) => _card(index, element, false))
|
||||
.toList(),
|
||||
_customValueCard(9, false)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _card(int index, int value, bool isBalance) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_currentSelect = index;
|
||||
_rechargeValue = isBalance ? _balanceValue[index] : (_pointValue[index]~/10);
|
||||
setState(() {});
|
||||
},
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(16.w),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
fit: StackFit.passthrough,
|
||||
children: [
|
||||
Container(
|
||||
width: 214.w,
|
||||
height: 202.w,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.w),
|
||||
color:
|
||||
_currentSelect != index ? Color(0xFFF9F9F9) : Colors.black,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Offstage(
|
||||
offstage: isBalance,
|
||||
child: Assets.icons.intergral
|
||||
.image(width: 48.w, height: 48.w)),
|
||||
8.hb,
|
||||
'$value '
|
||||
.richText
|
||||
.withTextSpanChildren([
|
||||
'${isBalance ? '元' : '积分'} '
|
||||
.textSpan
|
||||
.size(26.sp)
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
])
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.size(40.w)
|
||||
.make(),
|
||||
16.hb,
|
||||
Offstage(
|
||||
offstage: isBalance,
|
||||
child: '${value ~/ 10}元'
|
||||
.text
|
||||
.size(26.sp)
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
AnimatedPositioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Offstage(
|
||||
offstage: _currentSelect != index,
|
||||
child: ClipPath(
|
||||
clipper: _TriangleClipPath(),
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 48.w,
|
||||
color: Color(0xFFFBE541),
|
||||
child: Transform.translate(
|
||||
offset: Offset(10.w, 12.w),
|
||||
child: Icon(
|
||||
CupertinoIcons.checkmark_alt,
|
||||
size: 24.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
duration: Duration(microseconds: 500))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _customValueCard(int index, bool isBalance) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
_currentSelect = index;
|
||||
setState(() {});
|
||||
},
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(16.w),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
fit: StackFit.passthrough,
|
||||
children: [
|
||||
Container(
|
||||
width: 214.w,
|
||||
height: 202.w,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.w),
|
||||
color:
|
||||
_currentSelect != index ? Color(0xFFF9F9F9) : Colors.black,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Offstage(
|
||||
offstage: isBalance,
|
||||
child: Assets.icons.intergral
|
||||
.image(width: 48.w, height: 48.w)),
|
||||
8.hb,
|
||||
''
|
||||
.richText
|
||||
.withTextSpanChildren([
|
||||
'${isBalance ? '其他金额' : '其他积分'} '
|
||||
.textSpan
|
||||
.size(26.sp)
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
])
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.size(40.w)
|
||||
.make(),
|
||||
16.hb,
|
||||
Offstage(
|
||||
offstage: isBalance,
|
||||
child: '自定义'
|
||||
.text
|
||||
.size(26.sp)
|
||||
.color(_currentSelect == index
|
||||
? Color(0xFFFBE541)
|
||||
: Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
AnimatedPositioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: Offstage(
|
||||
offstage: _currentSelect != index,
|
||||
child: ClipPath(
|
||||
clipper: _TriangleClipPath(),
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 48.w,
|
||||
color: Color(0xFFFBE541),
|
||||
child: Transform.translate(
|
||||
offset: Offset(10.w, 12.w),
|
||||
child: Icon(
|
||||
CupertinoIcons.checkmark_alt,
|
||||
size: 24.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
duration: Duration(microseconds: 500))
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _customValueDialog(bool isBalance) {
|
||||
return StatefulBuilder(
|
||||
builder: (context, reSet) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
|
||||
width: double.infinity,
|
||||
color: Colors.white,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
'${isBalance ? '充值金额' : '充值积分'}'
|
||||
.text
|
||||
.size(32.sp)
|
||||
.bold
|
||||
.isIntrinsic
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
48.hb,
|
||||
Container(
|
||||
height: 88.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(16.w)),
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
child: Row(
|
||||
children: [
|
||||
24.wb,
|
||||
'¥'
|
||||
.text
|
||||
.size(24.sp)
|
||||
.color(Colors.black.withOpacity(0.45))
|
||||
.make(),
|
||||
12.wb,
|
||||
Expanded(
|
||||
child: TextField(
|
||||
autofocus: true,
|
||||
onChanged: (text) {
|
||||
if (text.trim().isNotEmpty) {
|
||||
_rechargeValue = int.parse(text);
|
||||
reSet(() {});
|
||||
}
|
||||
},
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly
|
||||
],
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(border: InputBorder.none),
|
||||
)),
|
||||
Offstage(
|
||||
offstage: isBalance,
|
||||
child: Row(
|
||||
children: [
|
||||
Assets.icons.intergral
|
||||
.image(width: 32.w, height: 32.w),
|
||||
16.wb,
|
||||
(_rechargeValue * 10)
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Colors.black.withOpacity(0.855))
|
||||
.make(),
|
||||
12.wb,
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (_rechargeValue == 0) {
|
||||
BotToast.showText(text: '金额不能为0');
|
||||
return;
|
||||
}
|
||||
Get.back();
|
||||
Get.bottomSheet(PayWayDialog(
|
||||
insufficientBalance: (UserTool.userProvider
|
||||
.userInfoModel!.balance ??
|
||||
0) <
|
||||
_rechargeValue,
|
||||
isBalance: isBalance,
|
||||
amount: _rechargeValue));
|
||||
},
|
||||
child: Material(
|
||||
child: Container(
|
||||
width: 132.w,
|
||||
color: Color(0xFFFBE541),
|
||||
child: Center(
|
||||
child: '去支付'
|
||||
.text
|
||||
.size(28.sp)
|
||||
.color(Colors.black.withOpacity(0.85))
|
||||
.make(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _TriangleClipPath extends CustomClipper<Path> {
|
||||
@override
|
||||
Path getClip(Size size) {
|
||||
Path path = Path();
|
||||
path.moveTo(0, size.height);
|
||||
path.lineTo(size.width, size.height);
|
||||
path.lineTo(size.width, 0 + 5.w);
|
||||
path.lineTo(0, size.height);
|
||||
path.close();
|
||||
return path;
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldReclip(covariant CustomClipper<Path> oldClipper) {
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import 'package:aku_new_community/pages/personal/wallet/point_record_view.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:aku_new_community/widget/tab_bar/bee_tab_bar.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'balance_record_view.dart';
|
||||
|
||||
class WalletTradeRecordPage extends StatefulWidget {
|
||||
const WalletTradeRecordPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_WalletTradeRecordPageState createState() => _WalletTradeRecordPageState();
|
||||
}
|
||||
|
||||
class _WalletTradeRecordPageState extends State<WalletTradeRecordPage>
|
||||
with SingleTickerProviderStateMixin {
|
||||
List<String> _tabs = ['余额账单', '积分账单'];
|
||||
late TabController _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController = TabController(length: _tabs.length, vsync: this);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeScaffold(
|
||||
title: BeeTabBar(
|
||||
controller: _tabController,
|
||||
tabs: _tabs,
|
||||
scrollable: true,
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
BalanceRecordView(),
|
||||
PointRecordView(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ClockTimerProvider extends ChangeNotifier{
|
||||
///登录页验证码计时器
|
||||
int second = 60;
|
||||
bool timerStart = false;
|
||||
Timer? timer;
|
||||
|
||||
void startTimer() {
|
||||
timerStart = true;
|
||||
timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
||||
if (second > 0) {
|
||||
second--;
|
||||
notifyListeners();
|
||||
} else {
|
||||
stopTimer();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void stopTimer() {
|
||||
second = 60;
|
||||
timerStart = false;
|
||||
timer?.cancel();
|
||||
timer = null;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -1,15 +1,81 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/saas_model/work_order/work_order_list_model.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:power_logger/power_logger.dart';
|
||||
import 'package:velocity_x/src/extensions/num_ext.dart';
|
||||
|
||||
import '../work_order_card.dart';
|
||||
|
||||
class AllOrderView extends StatefulWidget {
|
||||
const AllOrderView({Key? key}) : super(key: key);
|
||||
final EasyRefreshController refreshController;
|
||||
final int index;
|
||||
const AllOrderView(
|
||||
{Key? key, required this.refreshController, required this.index})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_AllOrderViewState createState() => _AllOrderViewState();
|
||||
}
|
||||
|
||||
class _AllOrderViewState extends State<AllOrderView> {
|
||||
class _AllOrderViewState extends State<AllOrderView>
|
||||
with SingleTickerProviderStateMixin {
|
||||
int _page = 1;
|
||||
int _size = 10;
|
||||
List<WorkOrderListModel> _models = [];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container();
|
||||
return EasyRefresh(
|
||||
firstRefresh: true,
|
||||
controller: widget.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: MaterialFooter(),
|
||||
onRefresh: () async {
|
||||
_page = 1;
|
||||
try {
|
||||
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
|
||||
'pageNum': _page,
|
||||
'size': _size,
|
||||
'status': widget.index == 0 ? null : widget.index,
|
||||
});
|
||||
_models =
|
||||
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList();
|
||||
} catch (e) {
|
||||
LoggerData.addData(e.toString());
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
onLoad: () async {
|
||||
_page++;
|
||||
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
|
||||
'pageNum': _page,
|
||||
'size': _size,
|
||||
'status': widget.index == 0 ? null : widget.index,
|
||||
});
|
||||
if (_models.length < base.total) {
|
||||
_models.addAll(
|
||||
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList());
|
||||
setState(() {});
|
||||
} else {
|
||||
widget.refreshController.finishLoad(noMore: true);
|
||||
}
|
||||
},
|
||||
child: _models.isEmpty
|
||||
? Container()
|
||||
: ListView.separated(
|
||||
padding: EdgeInsets.all(24.w),
|
||||
itemBuilder: (context, index) {
|
||||
return WorkOrderCard(
|
||||
model: _models[index],
|
||||
refresh: widget.refreshController.callRefresh,
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return 24.w.heightBox;
|
||||
},
|
||||
itemCount: _models.length));
|
||||
;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,79 @@
|
||||
import 'package:aku_new_community/constants/saas_api.dart';
|
||||
import 'package:aku_new_community/saas_model/work_order/work_order_list_model.dart';
|
||||
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_card.dart';
|
||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:power_logger/power_logger.dart';
|
||||
import 'package:velocity_x/src/extensions/num_ext.dart';
|
||||
|
||||
class WorkOrderView extends StatefulWidget {
|
||||
final EasyRefreshController refreshController;
|
||||
final int index;
|
||||
const WorkOrderView(
|
||||
{Key? key, required this.refreshController, required this.index})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_WorkOrderViewState createState() => _WorkOrderViewState();
|
||||
}
|
||||
|
||||
class _WorkOrderViewState extends State<WorkOrderView> {
|
||||
int _page = 1;
|
||||
int _size = 10;
|
||||
List<WorkOrderListModel> _models = [];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return EasyRefresh(
|
||||
firstRefresh: true,
|
||||
controller: widget.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: MaterialFooter(),
|
||||
onRefresh: () async {
|
||||
_page = 1;
|
||||
try {
|
||||
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
|
||||
'pageNum': _page,
|
||||
'size': _size,
|
||||
'status': widget.index == 0 ? null : widget.index,
|
||||
});
|
||||
_models =
|
||||
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList();
|
||||
} catch (e) {
|
||||
LoggerData.addData(e.toString());
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
onLoad: () async {
|
||||
_page++;
|
||||
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
|
||||
'pageNum': _page,
|
||||
'size': _size,
|
||||
'status': widget.index == 0 ? null : widget.index,
|
||||
});
|
||||
if (_models.length < base.total) {
|
||||
_models.addAll(
|
||||
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList());
|
||||
setState(() {});
|
||||
} else {
|
||||
widget.refreshController.finishLoad(noMore: true);
|
||||
}
|
||||
},
|
||||
child: _models.isEmpty
|
||||
? Container()
|
||||
: ListView.separated(
|
||||
padding: EdgeInsets.all(24.w),
|
||||
itemBuilder: (context, index) {
|
||||
return WorkOrderCard(
|
||||
model: _models[index],
|
||||
refresh: widget.refreshController.callRefresh,
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return 24.w.heightBox;
|
||||
},
|
||||
itemCount: _models.length));
|
||||
;
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
import 'package:aku_new_community/extensions/num_ext.dart';
|
||||
import 'package:aku_new_community/extensions/widget_list_ext.dart';
|
||||
import 'package:aku_new_community/utils/application_utils.dart';
|
||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:velocity_x/src/extensions/iterable_ext.dart';
|
||||
import 'package:velocity_x/src/extensions/string_ext.dart';
|
||||
|
||||
class AllApplicationNewPage extends StatefulWidget {
|
||||
const AllApplicationNewPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AllApplicationNewPageState createState() => _AllApplicationNewPageState();
|
||||
}
|
||||
|
||||
class _AllApplicationNewPageState extends State<AllApplicationNewPage> {
|
||||
List<String> rootTypes = ['物业服务', '出行安全', '居民生活', '关于社区', '智慧服务', '附近市场'];
|
||||
|
||||
List<String> getApplications(int index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return ['报事报修', '设施预约', '生活缴费', '装修管理'];
|
||||
case 1:
|
||||
return [
|
||||
'开门码',
|
||||
'物品出门',
|
||||
'地理信息',
|
||||
'小蜜蜂任务',
|
||||
];
|
||||
case 2:
|
||||
return ['便民电话', '问卷调查', '活动投票', '快递包裹', '投诉表扬', '业委会', '社区介绍', '借还管理'];
|
||||
case 3:
|
||||
return ['服务浏览', '周边企业', '住房说明', '电子商务'];
|
||||
case 4:
|
||||
return ['智慧养老', '任务发布', '周边服务', '共享投屏'];
|
||||
case 5:
|
||||
return ['自营商城', '邻家宠物', '共享停车', '二手市场'];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeeScaffold(
|
||||
title: '全部应用',
|
||||
body: ListView(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
|
||||
children: rootTypes
|
||||
.mapIndexed((e, index) => _applicationTile(index))
|
||||
.toList()
|
||||
.sepWidget(separate: 16.hb),
|
||||
));
|
||||
}
|
||||
|
||||
Container _applicationTile(int index) {
|
||||
return Container(
|
||||
width: 686.w,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 32.w,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white, borderRadius: BorderRadius.circular(16.w)),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 32.w, bottom: 24.w),
|
||||
child: rootTypes[index]
|
||||
.text
|
||||
.size(32.sp)
|
||||
.color(Color(0xFF2B2B2B))
|
||||
.bold
|
||||
.make(),
|
||||
),
|
||||
ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: getApplications(index).length ~/ 4 * 140.w +
|
||||
((getApplications(index).length - 4) ~/ 4 * 30.w)),
|
||||
child: GridView.count(
|
||||
shrinkWrap: true,
|
||||
crossAxisCount: 4,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
children: ApplicationUtil(getApplications(index))
|
||||
.elements
|
||||
.map((e) => applicationItem(e))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget applicationItem(AppElement appElement) {
|
||||
return GestureDetector(
|
||||
onTap: appElement.onTap,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Image.asset(
|
||||
appElement.imgPath,
|
||||
width: 96.w,
|
||||
height: 96.w,
|
||||
),
|
||||
8.hb,
|
||||
appElement.title.text.size(24.sp).color(Color(0xFF333333)).make(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,302 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||
import 'package:aku_new_community/pages/community_introduce/community_introduce_page.dart';
|
||||
import 'package:aku_new_community/pages/convenient_phone/convenient_phone_page.dart';
|
||||
import 'package:aku_new_community/pages/electronic_commerc/electronic_commerc_page.dart';
|
||||
import 'package:aku_new_community/pages/event_activity/event_voting_page.dart';
|
||||
import 'package:aku_new_community/pages/express_packages/express_package_page.dart';
|
||||
import 'package:aku_new_community/pages/geographic_information/geographic_information_page.dart';
|
||||
import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart';
|
||||
import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart';
|
||||
import 'package:aku_new_community/pages/house_introduce/house_introduce.dart';
|
||||
import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart';
|
||||
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
|
||||
import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart';
|
||||
import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_page.dart';
|
||||
import 'package:aku_new_community/pages/service_browse/service_browse_page.dart';
|
||||
import 'package:aku_new_community/pages/services/old_age/old_age_support_page_simple.dart';
|
||||
import 'package:aku_new_community/pages/surrounding_enterprises/surrounding_enterprises_page.dart';
|
||||
import 'package:aku_new_community/ui/community/facility/facility_appointment_page.dart';
|
||||
import 'package:aku_new_community/ui/function_and_service/task/task_page.dart';
|
||||
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_page.dart';
|
||||
import 'package:aku_new_community/ui/home/application/all_application.dart';
|
||||
import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
|
||||
import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class ApplicationUtil {
|
||||
ApplicationUtil(this.titles);
|
||||
|
||||
List<String> titles = [];
|
||||
|
||||
List<AppElement> get elements {
|
||||
var list = <AppElement>[];
|
||||
this.titles.forEach((element) {
|
||||
var re = _findByTitle(element);
|
||||
if (re != null) {
|
||||
list.add(re);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
AppElement? _findByTitle(String title) {
|
||||
for (var item in allApplications) {
|
||||
if (title == item.title) {
|
||||
return item;
|
||||
} else if (item.nickTitles.contains(title)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<AppElement> get allApplications => [
|
||||
AppElement(
|
||||
title: '开门码',
|
||||
imgPath: Assets.newIcon.icKmm.path,
|
||||
onTap: () => Get.to(() => OpeningCodePage())),
|
||||
// AppElement('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => Get.to(()=>VisitorAccessPage()),
|
||||
AppElement(
|
||||
title: '报事报修',
|
||||
imgPath: Assets.home.icBsbx.path,
|
||||
onTap: () => Get.to(() => WorkOrderPage())),
|
||||
AppElement(
|
||||
title: '生活缴费',
|
||||
imgPath: Assets.home.icShjf.path,
|
||||
onTap: () => Get.to(() => LifePayPageNew())),
|
||||
AppElement(
|
||||
title: '业委会',
|
||||
imgPath: Assets.newIcon.icYwh.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(() => IndustryCommitteePage());
|
||||
}),
|
||||
// AppElement('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
|
||||
// () => AdvicePage(type: AdviceType.SUGGESTION)),
|
||||
AppElement(
|
||||
title: '便民电话',
|
||||
imgPath: Assets.newIcon.imgBmdh.path,
|
||||
onTap: () {
|
||||
Get.to(() => ConvenientPhonePage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '活动投票',
|
||||
imgPath: Assets.newIcon.icHdtp.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(() => EventVotingPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '物品出门',
|
||||
imgPath: Assets.newIcon.imgWpcm.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(() => GoodsDetoPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '投诉表扬',
|
||||
imgPath: Assets.newIcon.icTsby.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(() => AdvicePage(type: AdviceType.COMPLAIN));
|
||||
}),
|
||||
AppElement(
|
||||
title: '问卷调查',
|
||||
imgPath: Assets.newIcon.icWjdc.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(() => QuestionnairePage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '装修管理',
|
||||
imgPath: Assets.newIcon.imgZxgl.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => NewRenovationPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '借还管理',
|
||||
imgPath: Assets.newIcon.icJhgl.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
Get.to(SelectBorrowReturnPage());
|
||||
}),
|
||||
// AppElement('一键报警', Assets.newIcon.yj, () => AlarmPage()),
|
||||
AppElement(
|
||||
title: '设施预约',
|
||||
imgPath: Assets.home.icSsyy.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => FacilityAppointmentPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '快递包裹',
|
||||
imgPath: Assets.newIcon.icKdbg.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => ExpressPackagePage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '电子商务',
|
||||
imgPath: Assets.newIcon.icDzsw.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => ElectronicCommercPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '服务浏览',
|
||||
imgPath: Assets.newIcon.icFwll.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => ServiceBrowsePage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '社区介绍',
|
||||
imgPath: Assets.newIcon.icSqjs.path,
|
||||
onTap: () {
|
||||
Get.to(() => CommunityIntroducePage());
|
||||
}),
|
||||
// AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),
|
||||
|
||||
AppElement(
|
||||
title: '地理信息',
|
||||
imgPath: Assets.newIcon.icDlxx.path,
|
||||
onTap: () {
|
||||
Get.to(() => GeographicInformationPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '周边企业',
|
||||
imgPath: Assets.newIcon.icZbqy.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => SurroundingEnterprisesPage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '住房说明',
|
||||
imgPath: Assets.newIcon.icRwsm.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能升级中,敬请期待');
|
||||
return;
|
||||
Get.to(() => HouseIntroducePage());
|
||||
}),
|
||||
AppElement(
|
||||
title: '智慧养老',
|
||||
imgPath: Assets.home.icZhyl.path,
|
||||
onTap: () {
|
||||
Get.to(() => OldAgeSupportPageSimple());
|
||||
}),
|
||||
AppElement(
|
||||
title: '周边服务',
|
||||
imgPath: Assets.home.icZbfw.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '任务发布',
|
||||
imgPath: Assets.home.icRwfb.path,
|
||||
onTap: () => Get.to(() => TaskPage()),
|
||||
nickTitles: ['小蜜蜂任务']),
|
||||
AppElement(
|
||||
title: '自营商城',
|
||||
imgPath: Assets.newIcon.icZysc.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '邻家宠物',
|
||||
imgPath: Assets.home.icLjcw.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '共享停车',
|
||||
imgPath: Assets.newIcon.icGxtc.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '二手市场',
|
||||
imgPath: Assets.newIcon.icEssc.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '共享投屏',
|
||||
imgPath: Assets.newIcon.icGxtp.path,
|
||||
onTap: () {
|
||||
BotToast.showText(text: '此功能暂未上线');
|
||||
return;
|
||||
}),
|
||||
AppElement(
|
||||
title: '全部应用',
|
||||
imgPath: Assets.home.icQbyy.path,
|
||||
onTap: () => Get.to(() => AllApplicationPage())),
|
||||
|
||||
// AppElement(
|
||||
// '小区教育',
|
||||
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
// () => BeeScaffold(title: '小区教育'),
|
||||
// ),
|
||||
// AppElement(
|
||||
// '健康运动',
|
||||
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
// () => BeeScaffold(title: '健康运动'),
|
||||
// ),
|
||||
// AppElement(
|
||||
// '家政服务',
|
||||
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
// () => BeeScaffold(title: '家政服务'),
|
||||
// ),
|
||||
// AppElement(
|
||||
// '居家养老',
|
||||
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
// () => BeeScaffold(title: '居家养老'),
|
||||
// ),
|
||||
// AppElement(
|
||||
// '物业租赁',
|
||||
// R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||
// () => BeeScaffold(title: '物业租赁'),
|
||||
// ),
|
||||
];
|
||||
}
|
||||
|
||||
class AppElement extends Equatable {
|
||||
final String title;
|
||||
final String imgPath;
|
||||
final VoidCallback onTap;
|
||||
final List<String> nickTitles;
|
||||
|
||||
const AppElement({
|
||||
required this.title,
|
||||
required this.imgPath,
|
||||
required this.onTap,
|
||||
this.nickTitles = const [],
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
title,
|
||||
imgPath,
|
||||
onTap,
|
||||
];
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
import 'package:aku_new_community/saas_model/login/china_region_model.dart';
|
||||
import 'package:aku_new_community/saas_model/login/picked_city_model.dart';
|
||||
import 'package:aku_new_community/utils/hive_store.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
import 'bee_picker_box.dart';
|
||||
|
||||
class BeeMonthPickBody extends StatefulWidget {
|
||||
final DateTime initTime;
|
||||
|
||||
BeeMonthPickBody({Key? key, required this.initTime}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BeeMonthPickBodyState createState() => _BeeMonthPickBodyState();
|
||||
}
|
||||
|
||||
class _BeeMonthPickBodyState extends State<BeeMonthPickBody> {
|
||||
final FixedExtentScrollController _yearController =
|
||||
FixedExtentScrollController();
|
||||
final FixedExtentScrollController _monthController =
|
||||
FixedExtentScrollController();
|
||||
DateTime get _pickedTime => DateTime(_pickYear,_pickMonth) ;
|
||||
|
||||
List<int> get _years => List.generate(
|
||||
DateTime.now().year - widget.initTime.year+1,
|
||||
(index) => widget.initTime.year + index);
|
||||
late int _pickYear;
|
||||
late int _pickMonth;
|
||||
|
||||
List<int> get _months => List.generate(
|
||||
_pickYear == DateTime.now().year ? DateTime.now().month : 12,
|
||||
(index) => index + 1);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_pickYear = widget.initTime.year;
|
||||
_pickMonth = 1;
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_yearController.dispose();
|
||||
_monthController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BeePickerBox(
|
||||
onPressed: () {
|
||||
Navigator.pop(context, _pickedTime);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
itemExtent: 80.w,
|
||||
magnification: 1.0,
|
||||
looping: false,
|
||||
scrollController: _yearController,
|
||||
onSelectedItemChanged: (index) {
|
||||
_pickYear = _years[index];
|
||||
_pickMonth = 1;
|
||||
setState(() {});
|
||||
},
|
||||
children: _years
|
||||
.map((e) => Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20.w),
|
||||
child:
|
||||
Text(e.toString()+'年', textAlign: TextAlign.center),
|
||||
),
|
||||
))
|
||||
.toList()),
|
||||
),
|
||||
Expanded(
|
||||
child: CupertinoPicker(
|
||||
itemExtent: 80.w,
|
||||
magnification: 1.0,
|
||||
// offAxisFraction: 0.6,
|
||||
looping: true,
|
||||
scrollController: _monthController,
|
||||
onSelectedItemChanged: (index) {
|
||||
_pickMonth = _months[index];
|
||||
setState(() {});
|
||||
},
|
||||
children: _months.isEmpty
|
||||
? [Container()]
|
||||
: _months
|
||||
.map((e) => Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20.w,
|
||||
right: 20.w,
|
||||
top: 10.w,
|
||||
bottom: 10.w),
|
||||
child: Text(e.toString()+'月',
|
||||
textAlign: TextAlign.center),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
class Config {
|
||||
///用户根目录
|
||||
static const String homeDir = '/users/zhangmeng';
|
||||
|
||||
///包名
|
||||
static const String packageName = 'aku_new_community';
|
||||
|
||||
///打包目录
|
||||
static String get buildPath =>
|
||||
'./build/app/outputs/flutter-apk/app-release.apk';
|
||||
|
||||
///测试包文件夹
|
||||
static String get apkDevDir =>
|
||||
'/users/zhangmeng/team/bee/app/aku_new_community/dev';
|
||||
|
||||
///正式包文件夹
|
||||
static String get apkDir =>
|
||||
'/users/zhangmeng/team/bee/app/aku_new_community/release';
|
||||
}
|
Loading…
Reference in new issue