Quellcode durchsuchen

Update payment method in useRecharge and clean up unused code in useTopupPopup

- Changed payment method from PayerMax to DukPay in useRecharge composable.
- Removed unused confirm callback and related code in useTopupPopup for improved clarity.
0es vor 2 Monaten
Ursprung
Commit
a8112a9f7c
3 geänderte Dateien mit 2 neuen und 11 gelöschten Zeilen
  1. 1 1
      app/composables/useRecharge.ts
  2. 1 10
      app/composables/useTopupPopup.ts
  3. BIN
      public/vendor/dukpay-logo.png

+ 1 - 1
app/composables/useRecharge.ts

@@ -76,7 +76,7 @@ export const useRecharge = () => {
 
     // 支付方式目前前端写死;如果后端后续下发支付方式,可以从接口映射
     const methods = [
-      { id: 'payermax', name: 'PayerMax', icon: '/vendor/payermax-logo.png' },
+      { id: 'dukpay', name: 'DukPay', icon: '/vendor/dukpay-logo.png' },
     ]
 
     openTopupPopup({

+ 1 - 10
app/composables/useTopupPopup.ts

@@ -1,4 +1,4 @@
-import { computed, reactive, readonly, ref } from 'vue'
+import { computed, reactive, readonly } from 'vue'
 
 export interface TopupPackage {
   id: string | number
@@ -27,11 +27,6 @@ export interface TopupPopupOptions {
   defaultPackageId?: TopupPackage['id']
   /** Default selected method id */
   defaultMethodId?: TopupPaymentMethod['id']
-  /**
-   * Confirm callback
-   * Will be called when user clicks the confirm button.
-   */
-  onConfirm?: (payload: TopupPopupResult) => void
 }
 
 export interface TopupPopupState {
@@ -53,8 +48,6 @@ const state = reactive<TopupPopupState>({
   selectedMethodId: null,
 })
 
-const confirmHandler = ref<((payload: TopupPopupResult) => void) | null>(null)
-
 const selectedPackage = computed(() =>
   state.packages.find(item => item.id === state.selectedPackageId) ?? null,
 )
@@ -76,8 +69,6 @@ const open = (options?: TopupPopupOptions) => {
 
     state.selectedPackageId = defaultPackageId
     state.selectedMethodId = defaultMethodId
-
-    confirmHandler.value = options.onConfirm ?? null
   }
 
   state.visible = true

BIN
public/vendor/dukpay-logo.png