Forráskód Böngészése

payment 切换支付方式设置主卡,添加银行卡

liukai 2 napja
szülő
commit
3db1dee2f2

+ 193 - 4
packages/cpt_payment/lib/modules/add_card/add_card_page.dart

@@ -1,9 +1,21 @@
+import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
+import 'package:cs_resources/generated/assets.dart';
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_load_image.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/my_text_field.dart';
+import 'package:widgets/widget_export.dart';
 
 import '../../router/page/payment_page_router.dart';
+import 'add_card_state.dart';
 import 'add_card_view_model.dart';
 
 @RoutePage()
@@ -21,12 +33,189 @@ class AddCardPage extends HookConsumerWidget {
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final viewModel = ref.watch(addCardViewModelProvider.notifier);
+    final viewModel = ref.read(addCardViewModelProvider.notifier);
+    final state = ref.watch(addCardViewModelProvider);
 
     return Scaffold(
-      appBar: AppBar(title: Text("Profile Edit Page")),
-      body: Center(
-        child: Text("Profile Edit Page"),
+      appBar: MyAppBar.appBar(context, S.current.add_new_card),
+      backgroundColor: context.appColors.whiteBG,
+      body: SizedBox(
+        width: double.infinity,
+        child: Column(
+          mainAxisSize: MainAxisSize.max,
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            SingleChildScrollView(
+                scrollDirection: Axis.vertical,
+                physics: const BouncingScrollPhysics(),
+                child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: [
+                    const Row(
+                      mainAxisAlignment: MainAxisAlignment.spaceAround,
+                      children: [
+                        MyAssetImage(Assets.paymentMasterCardIcon, width: 51, height: 30.5),
+                        MyAssetImage(Assets.paymentVisaIcon, width: 78.5, height: 25.5),
+                        MyAssetImage(Assets.paymentAmericanExpressIcon, width: 47, height: 29),
+                      ],
+                    ).marginOnly(left: 20, right: 20, top: 32, bottom: 32),
+
+                    //信用卡
+                    MyTextView(
+                      S.current.credit_debit_card,
+                      fontSize: 17,
+                      marginLeft: 15,
+                      marginRight: 15,
+                      textColor: context.appColors.textBlack,
+                      isFontMedium: true,
+                    ),
+
+                    //持卡人姓名
+                    _buildInputLayout(
+                      context,
+                      state,
+                      "card_name",
+                      margin: const EdgeInsets.only(left: 15, right: 15, top: 16),
+                      leftIcon: Assets.paymentCardName,
+                      textInputType: TextInputType.text,
+                      textInputAction: TextInputAction.next,
+                      onSubmit: (formKey, value) {
+                        state.formData[formKey]!['focusNode'].unfocus();
+                        FocusScope.of(context).requestFocus(state.formData['card_number']!['focusNode']);
+                      },
+                    ),
+
+                    //卡号
+                    _buildInputLayout(
+                      context,
+                      state,
+                      "card_number",
+                      margin: const EdgeInsets.only(left: 15, right: 15, top: 10, bottom: 21),
+                      leftIcon: Assets.paymentCardNumber,
+                      textInputType: TextInputType.number,
+                      textInputAction: TextInputAction.next,
+                      onSubmit: (formKey, value) {
+                        state.formData[formKey]!['focusNode'].unfocus();
+                        FocusScope.of(context).requestFocus(state.formData['month']!['focusNode']);
+                      },
+                    ),
+
+                    //月份,年份,验证码
+                    Row(
+                      children: [
+                        //月份
+                        _buildInputLayout(
+                          context,
+                          state,
+                          "month",
+                          margin: const EdgeInsets.only(left: 15),
+                          showLeftIcon: false,
+                          textInputType: TextInputType.number,
+                          textInputAction: TextInputAction.next,
+                          onSubmit: (formKey, value) {
+                            state.formData[formKey]!['focusNode'].unfocus();
+                            FocusScope.of(context).requestFocus(state.formData['year']!['focusNode']);
+                          },
+                        ).expanded(),
+
+                        //年份
+                        _buildInputLayout(
+                          context,
+                          state,
+                          "year",
+                          margin: const EdgeInsets.only(left: 8.5, right: 8.5),
+                          showLeftIcon: false,
+                          textInputType: TextInputType.number,
+                          textInputAction: TextInputAction.next,
+                          onSubmit: (formKey, value) {
+                            state.formData[formKey]!['focusNode'].unfocus();
+                            FocusScope.of(context).requestFocus(state.formData['cyc']!['focusNode']);
+                          },
+                        ).expanded(),
+
+                        //验证码
+                        _buildInputLayout(
+                          context,
+                          state,
+                          "cyc",
+                          margin: const EdgeInsets.only(right: 15),
+                          showLeftIcon: false,
+                          textInputType: TextInputType.number,
+                          textInputAction: TextInputAction.next,
+                          onSubmit: (formKey, value) {
+                            state.formData[formKey]!['focusNode'].unfocus();
+                          },
+                        ).expanded(),
+                      ],
+                    )
+                  ],
+                )).expanded(),
+
+            //底部按钮
+            MyButton(
+              onPressed: viewModel.addCard,
+              text: S.current.add_card,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 0,
+            ),
+          ],
+        ),
+      ),
+    );
+  }
+
+  Widget _buildInputLayout(
+    BuildContext context,
+    AddCardState state,
+    String key, {
+    EdgeInsetsGeometry? margin,
+    bool showRightIcon = false, //是否展示右侧的布局
+    bool showLeftIcon = true, //是否展示左侧侧的布局
+    Widget? rightWidget, //右侧的布局
+    TextInputType textInputType = TextInputType.text,
+    String? leftIcon,
+    String? errorText,
+    bool obscureText = false,
+    TextInputAction textInputAction = TextInputAction.done,
+    Function? onSubmit,
+  }) {
+    return IgnoreKeyboardDismiss(
+      child: MyTextField(
+        key,
+        fillBackgroundColor: context.appColors.authFiledBG,
+        state.formData[key]!['value'],
+        hintText: state.formData[key]!['hintText'],
+        hintStyle: TextStyle(
+          color: context.appColors.authFiledHintDark,
+          fontSize: 16.0,
+          fontWeight: FontWeight.w400,
+        ),
+        controller: state.formData[key]!['controller'],
+        focusNode: state.formData[key]!['focusNode'],
+        margin: margin ?? EdgeInsets.zero,
+        padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
+        showDivider: false,
+        height: 44,
+        style: TextStyle(
+          color: context.appColors.authFiledText,
+          fontSize: 16.0,
+          fontWeight: FontWeight.w400,
+        ),
+        inputType: textInputType,
+        textInputAction: textInputAction,
+        onSubmit: onSubmit,
+        cursorColor: context.appColors.authFiledText,
+        obscureText: obscureText,
+        errorText: errorText,
+        showLeftIcon: showLeftIcon,
+        leftWidget: showLeftIcon ? MyAssetImage(leftIcon ?? "", width: 27, height: 27) : const SizedBox(),
+        showRightIcon: showRightIcon,
+        rightWidget: rightWidget,
       ),
     );
   }

+ 47 - 2
packages/cpt_payment/lib/modules/add_card/add_card_state.dart

@@ -1,3 +1,48 @@
-class AddCardState{
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:flutter/material.dart';
 
-}
+class AddCardState {
+  //表单的校验与数据
+  final Map<String, Map<String, dynamic>> formData;
+
+  AddCardState({
+    Map<String, Map<String, dynamic>>? formData,
+  }) : formData = formData ??
+            {
+              'card_name': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.name_on_card,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'card_number': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': S.current.card_number,
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'month': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': 'MM',
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'year': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': 'YY',
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+              'cyc': {
+                'value': '',
+                'controller': TextEditingController(),
+                'hintText': 'CYC',
+                'focusNode': FocusNode(),
+                'obsecure': false,
+              },
+            };
+}

+ 63 - 0
packages/cpt_payment/lib/modules/add_card/add_card_view_model.dart

@@ -1,4 +1,8 @@
+import 'package:flutter/material.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:shared/utils/log_utils.dart';
+import 'package:shared/utils/util.dart';
 
 import 'add_card_state.dart';
 
@@ -10,4 +14,63 @@ class AddCardViewModel extends _$AddCardViewModel {
   AddCardState build() {
     return AddCardState();
   }
+
+  //添加银行卡
+  void addCard() {
+
+    final FocusNode cardNameFocusNode = state.formData['card_name']!['focusNode'];
+    final FocusNode cardNumFocusNode = state.formData['card_number']!['focusNode'];
+    final FocusNode monthFocusNode = state.formData['month']!['focusNode'];
+    final FocusNode yearFocusNode = state.formData['year']!['focusNode'];
+    final FocusNode cycFocusNode = state.formData['cyc']!['focusNode'];
+
+    final TextEditingController cardNameController = state.formData['card_name']!['controller'];
+    final TextEditingController cardNumController = state.formData['card_number']!['controller'];
+    final TextEditingController monthController = state.formData['month']!['controller'];
+    final TextEditingController yearController = state.formData['year']!['controller'];
+    final TextEditingController cycController = state.formData['cyc']!['controller'];
+
+    cardNameFocusNode.unfocus();
+    cardNumFocusNode.unfocus();
+    monthFocusNode.unfocus();
+    yearFocusNode.unfocus();
+    cycFocusNode.unfocus();
+
+    final cardName = cardNameController.text;
+    final cardNum = cardNumController.text;
+    final month = monthController.text;
+    final year = yearController.text;
+    final cyc = cycController.text;
+
+    Log.d('当前待提交的 cardName:${cardName} cardNum:${cardNum} month:${month} year:${year} cyc:${cyc}');
+
+    if (Utils.isEmpty(cardName)) {
+      ToastEngine.show('Enter Name on Card');
+      return;
+    }
+
+    if (Utils.isEmpty(cardNum)) {
+      ToastEngine.show('Enter Card Number');
+      return;
+    }
+
+    if (Utils.isEmpty(month)) {
+      ToastEngine.show('Enter Month on Card');
+      return;
+    }
+
+    if (Utils.isEmpty(year)) {
+      ToastEngine.show('Enter Year on Card');
+      return;
+    }
+
+    if (Utils.isEmpty(cyc)) {
+      ToastEngine.show('Enter CYC on Card');
+      return;
+    }
+
+    //执行密码登录
+    ToastEngine.show('准备执行请求 cardName:${cardName} cardNum:${cardNum} month:${month} year:${year} cyc:${cyc}');
+
+  }
 }

+ 99 - 4
packages/cpt_payment/lib/modules/choose_card/choose_card_page.dart

@@ -1,9 +1,19 @@
+import 'package:cs_resources/generated/l10n.dart';
+import 'package:cs_resources/theme/app_colors_theme.dart';
 import 'package:flutter/material.dart';
 import 'package:auto_route/auto_route.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
 import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:router/ext/auto_router_extensions.dart';
+import 'package:widgets/ext/ex_widget.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/my_appbar.dart';
+import 'package:widgets/my_button.dart';
+import 'package:widgets/my_text_view.dart';
+import 'package:widgets/widget_export.dart';
 
 import '../../router/page/payment_page_router.dart';
+import '../payment/manage/item_manage.dart';
 import 'choose_card_view_model.dart';
 
 @RoutePage()
@@ -21,12 +31,97 @@ class ChooseCardPage extends HookConsumerWidget {
 
   @override
   Widget build(BuildContext context, WidgetRef ref) {
-    final _viewModel = ref.watch(chooseCardViewModelProvider.notifier);
+    final viewModel = ref.watch(chooseCardViewModelProvider.notifier);
+    final state = ref.watch(chooseCardViewModelProvider);
+
+    useEffect(() {
+      // 组件挂载时执行 - 执行接口请求
+      Future.microtask(() => viewModel.fetchList());
+      return () {
+        // 组件卸载时执行
+      };
+    }, []);
 
     return Scaffold(
-      appBar: AppBar(title: Text("Profile Edit Page")),
-      body: Center(
-        child: Text("Profile Edit Page"),
+      appBar: MyAppBar.appBar(
+        context,
+        S.current.payment,
+        backgroundColor: context.appColors.whiteBG,
+      ),
+      backgroundColor: context.appColors.backgroundDark,
+      body: SizedBox(
+        width: double.infinity,
+        height: double.infinity,
+        child: Column(
+          children: [
+            EasyRefresh(
+              controller: viewModel.refreshController,
+              onRefresh: viewModel.onRefresh,
+              onLoad: viewModel.loadMore,
+              child: LoadStateLayout(
+                state: state.loadingState,
+                errorMessage: state.errorMessage,
+                errorRetry: () {
+                  viewModel.retryRequest();
+                },
+                successSliverWidget: [
+                  //添加新卡
+                  SliverToBoxAdapter(
+                    child: MyTextView(
+                      S.current.add_new_card,
+                      fontSize: 16,
+                      textAlign: TextAlign.center,
+                      marginLeft: 22.5,
+                      marginTop: 14,
+                      marginBottom: 15,
+                      marginRight: 22.5,
+                      cornerRadius: 5,
+                      paddingTop: 12,
+                      paddingBottom: 12,
+                      onClick: viewModel.gotoAddCardPage,
+                      borderWidth: 1,
+                      borderColor: context.appColors.textPrimary,
+                      isFontMedium: true,
+                      textColor: context.appColors.textPrimary,
+                    ),
+                  ),
+
+                  //列表
+                  SliverList(
+                      delegate: SliverChildBuilderDelegate(
+                    (context, index) {
+                      return ManageItem(
+                        index: index,
+                        item: state.datas[index],
+                        deleteAction: () {
+                          viewModel.showDeleteDialog(index);
+                        },
+                      ).onTap(() {
+                        viewModel.setAsPrimary(index);
+                      });
+                    },
+                    childCount: state.datas.length,
+                  ))
+                ],
+              ),
+            ).marginOnly(top: 5, bottom: 5).expanded(),
+
+            //底部按钮(其实就是返回)
+            MyButton(
+              onPressed: () {
+                context.appRouter.maybePop();
+              },
+              text: S.current.next,
+              textColor: Colors.white,
+              backgroundColor: context.appColors.btnBgDefault,
+              fontWeight: FontWeight.w500,
+              type: ClickType.throttle,
+              fontSize: 16,
+              minHeight: 50,
+              radius: 0,
+            ),
+          ],
+        ),
       ),
     );
   }

+ 29 - 0
packages/cpt_payment/lib/modules/choose_card/choose_card_state.dart

@@ -1,3 +1,32 @@
+import 'package:widgets/load_state_layout.dart';
+
 class ChooseCardState{
 
+  //页面 LoadView 状态的展示
+  LoadState loadingState;
+  String? errorMessage;
+
+  List<bool> datas; //页面列表数据
+
+  // ===================================  Begin  ↓  ===================================
+
+  ChooseCardState({
+    this.loadingState = LoadState.State_Loading,
+    this.errorMessage,
+    required this.datas,
+  });
+
+  ChooseCardState copyWith({
+    LoadState? loadingState,
+    String? errorMessage,
+    bool? needShowPlaceholder,
+    List<bool>? datas,
+  }) {
+    return ChooseCardState(
+      errorMessage: errorMessage ?? this.errorMessage,
+      loadingState: loadingState ?? this.loadingState,
+      datas: datas ?? this.datas,
+    );
+  }
+
 }

+ 156 - 1
packages/cpt_payment/lib/modules/choose_card/choose_card_view_model.dart

@@ -1,4 +1,10 @@
+import 'package:cpt_payment/modules/add_card/add_card_page.dart';
+import 'package:plugin_platform/engine/dialog/dialog_engine.dart';
+import 'package:plugin_platform/engine/toast/toast_engine.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
+import 'package:widgets/dialog/app_default_dialog.dart';
+import 'package:widgets/load_state_layout.dart';
+import 'package:widgets/widget_export.dart';
 
 import 'choose_card_state.dart';
 
@@ -8,6 +14,155 @@ part 'choose_card_view_model.g.dart';
 class ChooseCardViewModel extends _$ChooseCardViewModel {
   @override
   ChooseCardState build() {
-    return ChooseCardState();
+    return ChooseCardState(datas: []);
+  }
+
+  var _curPage = 1; //请求参数当前的页面
+  var _needShowPlaceholder = true; //是否展示LoadingView
+
+  // Refresh 控制器
+  final EasyRefreshController refreshController = EasyRefreshController(
+    controlFinishRefresh: true, //允许刷新
+    controlFinishLoad: true, //允许加载
+  );
+
+  //刷新页面状态
+  void changeLoadingState(LoadState loadState, String? errorMsg) {
+    state = state.copyWith(loadingState: loadState, errorMessage: errorMsg);
+  }
+
+  // Refresh 刷新事件
+  Future onRefresh() async {
+    _curPage = 1;
+    fetchList();
+  }
+
+  // Refresh 加载事件
+  Future loadMore() async {
+    _curPage++;
+    fetchList();
+  }
+
+  // 重试请求
+  Future retryRequest() async {
+    _curPage = 1;
+    _needShowPlaceholder = true;
+    fetchList();
+  }
+
+  /// 获取服务器数据
+  Future fetchList() async {
+    if (_needShowPlaceholder) {
+      changeLoadingState(LoadState.State_Loading, null);
+    }
+
+    // 获取 Applied 列表
+    // var listResult = await _jobRepository.fetchJobAppliedList(
+    //   state.jobId,
+    //   state.selectedStatusId,
+    //   state.keyword,
+    //   curPage: _curPage,
+    //   cancelToken: cancelToken,
+    // );
+    //
+    // // 处理数据
+    // if (listResult.isSuccess) {
+    //   handleList(listResult.data?.rows);
+    // } else {
+    //   errorMessage = listResult.errorMsg;
+    //   changeLoadingState(LoadState.State_Error);
+    // }
+
+    await Future.delayed(const Duration(milliseconds: 1500));
+
+    final List<bool> list = [true, false, false, false];
+
+    if (_curPage == 1) {
+      //刷新的方式
+      state = state.copyWith(datas: list);
+      refreshController.finishRefresh();
+
+      //更新展示的状态
+      changeLoadingState(LoadState.State_Success, null);
+    } else {
+      //加载更多
+      final allList = state.datas;
+      allList.addAll(list);
+      state.datas.addAll(list);
+
+      refreshController.finishLoad();
+
+      state = state.copyWith(datas: allList);
+    }
+
+    // 最后赋值
+    _needShowPlaceholder = false;
+  }
+
+// 处理数据与展示的逻辑
+// void handleList(List<JobAppliedListSGRows>? list) {
+//   if (list != null && list.isNotEmpty) {
+//     //有数据,判断是刷新还是加载更多的数据
+//     if (_curPage == 1) {
+//       //刷新的方式
+//       state.datas.clear();
+//       state.datas.addAll(list);
+//       refreshController.finishRefresh();
+//
+//       //更新展示的状态
+//       changeLoadingState(LoadState.State_Success);
+//     } else {
+//       //加载更多
+//       state.datas.addAll(list);
+//       refreshController.finishLoad();
+//       update();
+//     }
+//   } else {
+//     if (_curPage == 1) {
+//       //展示无数据的布局
+//       state.datas.clear();
+//       changeLoadingState(LoadState.State_Empty);
+//       refreshController.finishRefresh();
+//     } else {
+//       //展示加载完成,没有更多数据了
+//       refreshController.finishLoad(IndicatorResult.noMore);
+//     }
+//   }
+// }
+
+  //设置为主卡
+  void setAsPrimary(int index) {
+    bool isPrimary = state.datas[index];
+
+    if (!isPrimary) {
+      // 创建数据列表的副本
+      List<bool> newDataList = List.from(state.datas);
+
+      //先全部设置为 false
+      for (int i = 0; i < newDataList.length; i++) {
+        newDataList[i] = false;
+      }
+
+      //再把当前索引设置为 true
+      newDataList[index] = true;
+
+      state = state.copyWith(datas: newDataList);
+    }
+  }
+
+  // 删除提示弹窗
+  void showDeleteDialog(int index) {
+    DialogEngine.show(
+        widget: AppDefaultDialog(
+      message: "Are you sure you want to delete this Card?",
+      confirmAction: () {
+        ToastEngine.show("点击了确定");
+      },
+    ));
+  }
+
+  //去添加新卡的页面
+  void gotoAddCardPage() {
+    AddCardPage.startInstance();
   }
 }

+ 2 - 1
packages/cpt_payment/lib/modules/payment/manage/manage_view_model.dart

@@ -6,6 +6,7 @@ import 'package:widgets/dialog/app_default_dialog.dart';
 import 'package:widgets/load_state_layout.dart';
 import 'package:widgets/widget_export.dart';
 
+import '../../add_card/add_card_page.dart';
 import 'manage_state.dart';
 
 part 'manage_view_model.g.dart';
@@ -163,7 +164,7 @@ class ManageViewModel extends _$ManageViewModel {
 
   //去添加新卡的页面
   void gotoAddCardPage() {
-
+    AddCardPage.startInstance();
   }
 
 }

+ 5 - 2
packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_page.dart

@@ -108,7 +108,7 @@ class PaymentConfirmPage extends HookConsumerWidget {
                   isFontRegular: true,
                 ),
 
-                _paymentInfo(context),
+                _paymentInfo(context,ref),
               ],
             ),
           ).expanded(),
@@ -131,7 +131,9 @@ class PaymentConfirmPage extends HookConsumerWidget {
   }
 
   //底部的支付信息
-  Widget _paymentInfo(BuildContext context) {
+  Widget _paymentInfo(BuildContext context,WidgetRef ref) {
+    final viewModel = ref.watch(paymentConfirmViewModelProvider.notifier);
+
     return Container(
         height: 75,
         padding: const EdgeInsets.symmetric(horizontal: 20),
@@ -158,6 +160,7 @@ class PaymentConfirmPage extends HookConsumerWidget {
               paddingRight: 16,
               paddingLeft: 16,
               paddingTop: 8,
+              onClick: viewModel.gotoChooseCardPage,
               paddingBottom: 8,
               cornerRadius: 7,
               fontSize: 15,

+ 6 - 2
packages/cpt_payment/lib/modules/payment_confirm/payment_confirm_view_model.dart

@@ -1,3 +1,4 @@
+import 'package:cpt_payment/modules/choose_card/choose_card_page.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
 import '../payment_success/payment_success_page.dart';
@@ -14,8 +15,11 @@ class PaymentConfirmViewModel extends _$PaymentConfirmViewModel {
 
   //执行支付
   void doPayment() {
-
-
     PaymentSuccessPage.startWithPop();
   }
+
+  //去设置银行卡页面
+  void gotoChooseCardPage() {
+    ChooseCardPage.startInstance();
+  }
 }

+ 6 - 0
packages/cs_resources/lib/theme/app_colors_theme.dart

@@ -32,6 +32,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   static const _colorB4C5FF = Color(0xFFB4C5FF);
   static const _colorFE4066 = Color(0xFFFE4066);
   static const _colorE9E9E9 = Color(0xFFE9E9E9);
+  static const _color99A8CA = Color(0xFF99A8CA);
 
   //暗色主题的一些自定义颜色值
   static const _darkBlackBg = Color(0xFF0F0F0F);
@@ -73,6 +74,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
   final Color deleteRed; //删除的红色
   final Color grayBgE9; //e9灰色背景
   final Color disEnableGray; //禁用的灰色
+  final Color authFiledHintDark; //文本Hint的深蓝色
 
   // 私有的构造函数
   const AppColorsTheme._internal({
@@ -107,6 +109,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
     required this.deleteRed,
     required this.grayBgE9,
     required this.disEnableGray,
+    required this.authFiledHintDark,
   });
 
   // 浅色主题工厂方法
@@ -143,6 +146,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       deleteRed: _colorFE4066,
       grayBgE9: _colorE9E9E9,
       disEnableGray: _colorBDBDBD,
+      authFiledHintDark: _color99A8CA,
     );
   }
 
@@ -180,6 +184,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       deleteRed: Colors.white,
       grayBgE9: _darkBlackItemLightMost,
       disEnableGray: _darkBlackItemLight,
+      authFiledHintDark: _color99A8CA,
     );
   }
 
@@ -226,6 +231,7 @@ class AppColorsTheme extends ThemeExtension<AppColorsTheme> {
       deleteRed: Color.lerp(deleteRed, other.deleteRed, t)!,
       grayBgE9: Color.lerp(grayBgE9, other.grayBgE9, t)!,
       disEnableGray: Color.lerp(disEnableGray, other.disEnableGray, t)!,
+      authFiledHintDark: Color.lerp(authFiledHintDark, other.authFiledHintDark, t)!,
     );
   }
 }