优化提现手续费动态配置
This commit is contained in:
@ -164,3 +164,17 @@ export const cancelSocialBind = (params: { type: number; openid: string }) => {
|
||||
export const userLogout = () => {
|
||||
return useDollarFetchRequest.del<IResponse<boolean>>('/prod-api/app-api/member/user/unregister-user', {})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取钱包配置
|
||||
*/
|
||||
export const getWalletConfig = () => {
|
||||
return useDollarFetchRequest.get<
|
||||
IResponse<{
|
||||
rechargeRate: number
|
||||
commissionRate: number
|
||||
withdrawRateOfRecharge: number
|
||||
withdrawRateOfEarn: number
|
||||
}>
|
||||
>('/prod-api/app-api/pay/wallet/get-config', {})
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="text-12px color-red">
|
||||
提示:收益金币提现正常收取平台手续费3%,如需将充值金币提现,选择“全部提现”选项,因涉及充值赠送金额,将收取155高额手续费,如果恶意套利提现,将提现审核不通过!
|
||||
提示:收益金币提现正常收取平台手续费{{ walletConfig?.withdrawRateOfEarn }}%,如需将充值金币提现,选择“全部提现”选项,因涉及充值赠送金额,将收取{{ walletConfig?.withdrawRateOfRecharge }}%高额手续费,如果恶意套利提现,将提现审核不通过!
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -33,6 +33,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getWalletConfig } from '~/api/personal-center/index'
|
||||
const dialogVisible = defineModel('modelValue', {
|
||||
default: false,
|
||||
})
|
||||
@ -44,6 +45,18 @@
|
||||
const handleClose = (done: () => void) => {
|
||||
done()
|
||||
}
|
||||
const walletConfig = ref<{
|
||||
rechargeRate: number
|
||||
commissionRate: number
|
||||
withdrawRateOfRecharge: number
|
||||
withdrawRateOfEarn: number
|
||||
}>()
|
||||
|
||||
onMounted(() => {
|
||||
getWalletConfig().then((res) => {
|
||||
walletConfig.value = res.data
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
import { useFetch } from '#app'
|
||||
import type { UseFetchOptions } from '#app'
|
||||
import { isArray } from '~/utils/utils'
|
||||
import useUserStore from '~/stores/user'
|
||||
|
||||
const useServerRequest = async <T>(url: string, opts?: UseFetchOptions<T, unknown>) => {
|
||||
const token = useToken()
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const defaultOptions: UseFetchOptions<unknown> = {
|
||||
baseURL: runtimeConfig.public.apiBase,
|
||||
onRequest({ options }) {
|
||||
options.headers = options.headers || {}
|
||||
|
||||
if (token.value) {
|
||||
options.headers.set('Authorization', `Bearer ${token.value}`)
|
||||
if (token.value || userStore.token) {
|
||||
options.headers.set('Authorization', `Bearer ${token.value || userStore.token}`)
|
||||
}
|
||||
},
|
||||
onResponse({ response }) {
|
||||
|
||||
@ -17,7 +17,14 @@
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="pagination mt-15px">
|
||||
<el-pagination v-model:current-page="query.pageNo" :page-size="10" :total="result.total" background layout="prev, pager, next, jumper" />
|
||||
<el-pagination
|
||||
v-model:current-page="query.pageNo"
|
||||
:page-size="10"
|
||||
:total="result.total"
|
||||
background
|
||||
layout="prev, pager, next, jumper"
|
||||
@current-change="handeClickCurrent"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -51,6 +58,12 @@
|
||||
}
|
||||
}
|
||||
getTradeRecords()
|
||||
|
||||
// 点击分页
|
||||
const handeClickCurrent = (pageNo: number) => {
|
||||
query.pageNo = pageNo
|
||||
getTradeRecords()
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-pagination) {
|
||||
|
||||
Reference in New Issue
Block a user