优化会员充值

This commit is contained in:
gyq
2024-05-29 10:04:37 +08:00
parent 69482f81a7
commit bf0614e10b
8 changed files with 116 additions and 20 deletions

View File

@@ -0,0 +1,55 @@
<template>
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
<div class="drawer_wrap">
<div class="pay_wrap">
<fastPayCard ref="fastPayCardRef" type="2" :userInfo="userInfo" @paySuccess="paySuccess"
@close="dialogVisible = false" />
</div>
</div>
</el-drawer>
</template>
<script setup>
import { ref } from "vue";
import fastPayCard from "@/components/fastPayCard.vue";
const props = defineProps({
userInfo: {
type: Object,
default: {}
}
})
const emit = defineEmits(["paySuccess"]);
const dialogVisible = ref(false);
const fastPayCardRef = ref(null);
// 订单已支付
function paySuccess() {
dialogVisible.value = false;
emit("paySuccess");
}
function show() {
dialogVisible.value = true;
fastPayCardRef.value.reset();
}
defineExpose({
show,
});
</script>
<style scoped lang="scss">
.drawer_wrap {
width: 100%;
height: 100%;
display: flex;
padding: var(--el-font-size-base) 0;
.pay_wrap {
flex: 1;
}
}
</style>