logo和名称替换
This commit is contained in:
@@ -3,13 +3,13 @@ import 'dart:convert' as convert;
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/app_colors.dart';
|
||||
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:wydj/assets_tool/app_colors.dart';
|
||||
import 'package:wydj/hj_utils/api_service/mine_service.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import 'package:hgmj/tools_base/toast.dart';
|
||||
import 'package:hgmj/tools_base/widget/common_alert.dart';
|
||||
import 'package:wydj/tools_base/toast.dart';
|
||||
import 'package:wydj/tools_base/widget/common_alert.dart';
|
||||
import '../../../../hj_utils/light_model.dart';
|
||||
import '../../../../hj_utils/store_keys.dart';
|
||||
import '../../../../tools_base/refresh/pull_refresh.dart';
|
||||
@@ -58,7 +58,8 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
if (result) {
|
||||
var result = await lightKV.getString(StoreKeys.LAST_A_ACCOUNT);
|
||||
if (result != null) {
|
||||
AccountInfoModel listBean = AccountInfoModel.fromMap(convert.jsonDecode(result));
|
||||
AccountInfoModel listBean =
|
||||
AccountInfoModel.fromMap(convert.jsonDecode(result));
|
||||
if (model.id == listBean.id) {
|
||||
lightKV.setString(StoreKeys.LAST_A_ACCOUNT, "");
|
||||
}
|
||||
@@ -96,12 +97,14 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
title: Text('选择银行卡', style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
|
||||
title: Text('选择银行卡',
|
||||
style: textStyle(18, Color(0xE5FFFFFF), FontWeight.w600)),
|
||||
leading: BackButton(
|
||||
onPressed: () => Get.back(result: selectItem),
|
||||
),
|
||||
actions: [
|
||||
InkWell(enableFeedback: false,
|
||||
InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () {
|
||||
isEdit = !isEdit;
|
||||
if (isEdit) {
|
||||
@@ -193,7 +196,8 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
} else {
|
||||
isSelected = selectItem?.id == item?.id;
|
||||
}
|
||||
return InkWell(enableFeedback: false,
|
||||
return InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () {
|
||||
if (isEdit) {
|
||||
if (deleteList.contains(item) == true) {
|
||||
@@ -209,7 +213,9 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 12),
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 18),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(9)), color: const Color(0x0DFFFFFF)),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(9)),
|
||||
color: const Color(0x0DFFFFFF)),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@@ -223,18 +229,27 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
children: [
|
||||
Text(
|
||||
item?.getBankName() ?? "",
|
||||
style: const TextStyle(color: const Color(0xE5ffffff), fontWeight: FontWeight.w500, fontSize: 16.0),
|
||||
style: const TextStyle(
|
||||
color: const Color(0xE5ffffff),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16.0),
|
||||
),
|
||||
9.sizeBoxW,
|
||||
Text(
|
||||
item?.actName ?? "",
|
||||
style: const TextStyle(color: const Color(0xE5ffffff), fontWeight: FontWeight.w400, fontSize: 12.0),
|
||||
style: const TextStyle(
|
||||
color: const Color(0xE5ffffff),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.0),
|
||||
)
|
||||
],
|
||||
),
|
||||
6.sizeBoxH,
|
||||
Text("卡号:${item?.act}",
|
||||
style: const TextStyle(color: const Color(0xffffffff), fontWeight: FontWeight.w400, fontSize: 12.0))
|
||||
style: const TextStyle(
|
||||
color: const Color(0xffffffff),
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.0))
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -250,7 +265,9 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
isSelected ? CupertinoIcons.checkmark_circle_fill : CupertinoIcons.circle,
|
||||
isSelected
|
||||
? CupertinoIcons.checkmark_circle_fill
|
||||
: CupertinoIcons.circle,
|
||||
color: isSelected ? Color(0xFFFFC000) : Color(0x99000000),
|
||||
),
|
||||
],
|
||||
@@ -263,9 +280,11 @@ class _BankCardHomePageState extends State<BankCardHomePage> {
|
||||
|
||||
//添加银行卡
|
||||
_buildCardAddView() {
|
||||
return InkWell(enableFeedback: false,
|
||||
return InkWell(
|
||||
enableFeedback: false,
|
||||
onTap: () async {
|
||||
final res = await Get.dialog(AddBankDialog(), barrierColor: Colors.black.withValues(alpha: .7));
|
||||
final res = await Get.dialog(AddBankDialog(),
|
||||
barrierColor: Colors.black.withValues(alpha: .7));
|
||||
if (res != null) {
|
||||
_getAliListData();
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/app_colors.dart';
|
||||
import 'package:hgmj/config/address.dart';
|
||||
import 'package:hgmj/hj_utils/api_service/mine_service.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/tools_base/debug_log.dart';
|
||||
import 'package:hgmj/tools_base/loading/loading_helper.dart';
|
||||
import 'package:hgmj/tools_base/net/http_manager.dart';
|
||||
import 'package:hgmj/tools_base/toast.dart';
|
||||
import 'package:hgmj/tools_base/widget/common_dialog.dart';
|
||||
import 'package:wydj/assets_tool/app_colors.dart';
|
||||
import 'package:wydj/config/address.dart';
|
||||
import 'package:wydj/hj_utils/api_service/mine_service.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/tools_base/debug_log.dart';
|
||||
import 'package:wydj/tools_base/loading/loading_helper.dart';
|
||||
import 'package:wydj/tools_base/net/http_manager.dart';
|
||||
import 'package:wydj/tools_base/toast.dart';
|
||||
import 'package:wydj/tools_base/widget/common_dialog.dart';
|
||||
|
||||
import '../../make_money/alipay_ccdcapi_model.dart';
|
||||
|
||||
@@ -33,7 +33,8 @@ class _AddBankDialogState extends State<AddBankDialog> {
|
||||
children: [
|
||||
Text(
|
||||
'添加银行卡',
|
||||
style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 20, fontWeight: FontWeight.w500),
|
||||
),
|
||||
12.sizeBoxH,
|
||||
Divider(height: .5, color: Colors.white.withValues(alpha: .1)),
|
||||
@@ -50,7 +51,10 @@ class _AddBankDialogState extends State<AddBankDialog> {
|
||||
maxLength: 20,
|
||||
controller: bankNameCtr,
|
||||
style: TextStyle(color: Colors.white),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'[a-zA-Z\u4E00-\u9F5a]'))],
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp(r'[a-zA-Z\u4E00-\u9F5a]'))
|
||||
],
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
counterText: '',
|
||||
@@ -77,8 +81,11 @@ class _AddBankDialogState extends State<AddBankDialog> {
|
||||
child: TextField(
|
||||
maxLength: 20,
|
||||
controller: bankNoCtr,
|
||||
style: TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'[0-9]'))],
|
||||
style:
|
||||
TextStyle(color: Colors.white, fontWeight: FontWeight.w400),
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(RegExp(r'[0-9]'))
|
||||
],
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
@@ -117,7 +124,10 @@ class _AddBankDialogState extends State<AddBankDialog> {
|
||||
),
|
||||
child: Text(
|
||||
"立即提交",
|
||||
style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -158,7 +168,8 @@ class _AddBankDialogState extends State<AddBankDialog> {
|
||||
}
|
||||
|
||||
_addBankCard(ApcApiModel model) async {
|
||||
final res = await MineService.addBankCard(model.key, bankNameCtr.text, model.bank, model.cardType);
|
||||
final res = await MineService.addBankCard(
|
||||
model.key, bankNameCtr.text, model.bank, model.cardType);
|
||||
if (res) {
|
||||
Get.back(result: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user