diff --git a/components.d.ts b/components.d.ts index 6f9edf5..d135725 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,18 +9,11 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { Loading: typeof import('./src/components/Loading/Loading.vue')['default'] SvgIcon: typeof import('./src/components/SvgIcon/SvgIcon.vue')['default'] - VanActionBar: typeof import('vant/es')['ActionBar'] - VanActionBarButton: typeof import('vant/es')['ActionBarButton'] - VanActionSheet: typeof import('vant/es')['ActionSheet'] VanButton: typeof import('vant/es')['Button'] - VanCellGroup: typeof import('vant/es')['CellGroup'] VanConfigProvider: typeof import('vant/es')['ConfigProvider'] - VanField: typeof import('vant/es')['Field'] - VanForm: typeof import('vant/es')['Form'] VanLoading: typeof import('vant/es')['Loading'] VanNavBar: typeof import('vant/es')['NavBar'] VanOverlay: typeof import('vant/es')['Overlay'] - VanSwitch: typeof import('vant/es')['Switch'] VanTabbar: typeof import('vant/es')['Tabbar'] VanTabbarItem: typeof import('vant/es')['TabbarItem'] } diff --git a/src/views/demo/aggregate/AliPayAggregate.vue b/src/views/demo/aggregate/AliPayAggregate.vue index 02aab25..3fef346 100644 --- a/src/views/demo/aggregate/AliPayAggregate.vue +++ b/src/views/demo/aggregate/AliPayAggregate.vue @@ -34,9 +34,9 @@ /** * 根据code获取支付信息 */ - function init() { + async function init() { loading.value = true - getInfo(code.value) + await getInfo(code.value) .then(({ data }) => { info.value = data loading.value = false @@ -48,6 +48,8 @@ query: { msg: err.message }, }) }) + // 调起支付 + pay() } /** diff --git a/src/views/demo/aggregate/WechatPayAggregate.vue b/src/views/demo/aggregate/WechatPayAggregate.vue index 090055b..c658367 100644 --- a/src/views/demo/aggregate/WechatPayAggregate.vue +++ b/src/views/demo/aggregate/WechatPayAggregate.vue @@ -35,10 +35,10 @@ /** * 根据code获取支付信息 */ - function init() { + async function init() { loading.value = true // 获取支付信息 - getInfo(aggregateCode.value) + await getInfo(aggregateCode.value) .then(({ data }) => { loading.value = false info.value = data @@ -50,6 +50,8 @@ query: { msg: err.message }, }) }) + // 调起支付 + pay() } /**