钱包 - 优化

支付应用 - 证书模式增加应用私钥
This commit is contained in:
jason 2023-10-21 15:33:31 +08:00
parent e187c55408
commit bb5945958b
4 changed files with 21 additions and 27 deletions

View File

@ -3,7 +3,6 @@ import request from '@/config/axios'
/** 用户钱包查询参数 */ /** 用户钱包查询参数 */
export interface PayWalletUserReqVO { export interface PayWalletUserReqVO {
userId: number userId: number
userType: number
} }
/** 钱包 VO */ /** 钱包 VO */
export interface WalletVO { export interface WalletVO {

View File

@ -65,7 +65,7 @@ const getUserWallet = async () => {
wallet.value = WALLET_INIT_DATA wallet.value = WALLET_INIT_DATA
return return
} }
const params = { userId: props.user.id, userType: UserTypeEnum.MEMBER } const params = { userId: props.user.id }
wallet.value = (await WalletApi.getWallet(params)) || WALLET_INIT_DATA wallet.value = (await WalletApi.getWallet(params)) || WALLET_INIT_DATA
} }

View File

@ -69,6 +69,16 @@
</el-form-item> </el-form-item>
</div> </div>
<div v-if="formData.config.mode === 2"> <div v-if="formData.config.mode === 2">
<el-form-item label-width="180px" label="应用私钥" prop="config.privateKey">
<el-input
type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }"
v-model="formData.config.privateKey"
placeholder="请输入应用私钥"
clearable
:style="{ width: '100%' }"
/>
</el-form-item>
<el-form-item label-width="180px" label="商户公钥应用证书" prop="config.appCertContent"> <el-form-item label-width="180px" label="商户公钥应用证书" prop="config.appCertContent">
<el-input <el-input
v-model="formData.config.appCertContent" v-model="formData.config.appCertContent"

View File

@ -8,30 +8,15 @@
:inline="true" :inline="true"
label-width="68px" label-width="68px"
> >
<el-form-item label="用户编号" prop="userId"> <el-form-item label="用户昵称" prop="nickname">
<el-input <el-input
v-model="queryParams.userId" v-model="queryParams.nickname"
placeholder="请输入用户编号" placeholder="请输入用户昵称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="用户类型" prop="userType">
<el-select
v-model="queryParams.userType"
placeholder="请选择用户类型"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.USER_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTime"
@ -54,7 +39,12 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编号" align="center" prop="id" /> <el-table-column label="编号" align="center" prop="id" />
<el-table-column label="用户编号" align="center" prop="userId" /> <el-table-column label="用户昵称" align="center" prop="nickname" />
<el-table-column label="头像" align="center" prop="avatar" width="80px">
<template #default="scope">
<img :src="scope.row.avatar" style="width: 40px" />
</template>
</el-table-column>
<el-table-column label="用户类型" align="center" prop="userType"> <el-table-column label="用户类型" align="center" prop="userType">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType" /> <dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType" />
@ -116,12 +106,7 @@ const list = ref([]) // 列表的数据
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
userId: null, nickname: null,
userType: null,
balance: null,
totalExpense: null,
totalRecharge: null,
freezePrice: null,
createTime: [] createTime: []
}) })
const queryFormRef = ref() // const queryFormRef = ref() //