新增微信支付、Native支付

This commit is contained in:
gxwebsoft
2024-05-11 23:06:25 +08:00
parent 31d6517314
commit ec629c4540
18 changed files with 1121 additions and 63 deletions

View File

@@ -0,0 +1,56 @@
<!-- 选择下拉框 -->
<template>
<a-select
:allow-clear="true"
:show-search="true"
optionFilterProp="label"
:options="options"
:value="value"
:placeholder="placeholder"
@update:value="updateValue"
:style="`width: 200px`"
@blur="onBlur"
/>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { SelectProps } from 'ant-design-vue';
const emit = defineEmits<{
(e: 'update:value', value: string, item: any): void;
(e: 'blur'): void;
}>();
const props = withDefaults(
defineProps<{
value?: any;
type?: any;
placeholder?: string;
dictCode?: string;
}>(),
{
placeholder: '请选择服务器厂商'
}
);
// 字典数据
const options = ref<SelectProps['options']>([
{ value: 'wxPay', label: '微信支付', icon: 'WechatOutlined' },
{ value: 'aliPay', label: '支付宝支付', icon: 'AlipayCircleOutlined' },
{ value: 'balancePay', label: '余额支付', icon: 'PayCircleOutlined' },
{ value: 'yearCardPay', label: '年卡支付', icon: 'IdcardOutlined' },
{ value: 'icCardPay', label: 'IC卡支付', icon: 'IdcardOutlined' }
]);
/* 更新选中数据 */
const updateValue = (value: string) => {
const item = options.value?.find((d) => d.value == value);
console.log(item);
emit('update:value', value, item);
};
/* 失去焦点 */
const onBlur = () => {
emit('blur');
};
</script>