feat(管理员中心): 对接管理员身份的钱包操作页面接口,并开放跳转页面接口
This commit is contained in:
parent
69339352bf
commit
e3af2d234d
@ -105,12 +105,6 @@ const router = createRouter({
|
|||||||
component: () => import('../views/BDCenter/index.vue'),
|
component: () => import('../views/BDCenter/index.vue'),
|
||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/available-income',
|
|
||||||
name: 'available-income',
|
|
||||||
component: () => import('../views/BDCenter/availableIncome.vue'),
|
|
||||||
meta: { requiresAuth: true },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/income-details',
|
path: '/income-details',
|
||||||
name: 'income-details',
|
name: 'income-details',
|
||||||
@ -203,6 +197,12 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 收支相关页面
|
// 收支相关页面
|
||||||
|
{
|
||||||
|
path: '/available-income',
|
||||||
|
name: 'available-income',
|
||||||
|
component: () => import('../views/Wallet/availableIncome.vue'),
|
||||||
|
meta: { requiresAuth: true },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/transfer',
|
path: '/transfer',
|
||||||
name: 'transfer',
|
name: 'transfer',
|
||||||
|
|||||||
@ -178,6 +178,7 @@
|
|||||||
alt=""
|
alt=""
|
||||||
style="display: block; width: 1.5em"
|
style="display: block; width: 1.5em"
|
||||||
class="flipImg"
|
class="flipImg"
|
||||||
|
@click="gotoIncome"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -402,6 +403,7 @@ import { gotoAppPage } from '@/utils/appBridge.js'
|
|||||||
import { getUserId } from '@/utils/userStore.js'
|
import { getUserId } from '@/utils/userStore.js'
|
||||||
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
||||||
import { handleAvatarImageError } from '@/utils/imageHandler.js'
|
import { handleAvatarImageError } from '@/utils/imageHandler.js'
|
||||||
|
import { useIdentityStore } from '@/stores/identity.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
apiTaskList, //获取任务列表
|
apiTaskList, //获取任务列表
|
||||||
@ -415,6 +417,7 @@ const imgUrl = new URL('/src/assets/icon/arrowBackBlack.png', import.meta.url).h
|
|||||||
|
|
||||||
const { t, locale } = useI18n()
|
const { t, locale } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const identityStore = useIdentityStore()
|
||||||
|
|
||||||
// 监听语言变化并设置文档方向
|
// 监听语言变化并设置文档方向
|
||||||
locale.value && setDocumentDirection(locale.value)
|
locale.value && setDocumentDirection(locale.value)
|
||||||
@ -512,6 +515,7 @@ const { userInfo } = usePageInitializationWithConfig('ADMIN_CENTER', {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
|
identityStore.setIdentity('ADMIN')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -910,7 +910,12 @@ const initializePayee = () => {
|
|||||||
const fetchBankBalance = async () => {
|
const fetchBankBalance = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
let salaryType = ['BD_LEADER', 'BD'].includes(identityStore.identity) ? 'BD_SALARY' : ''
|
let salaryType =
|
||||||
|
identityStore.identity == 'ADMIN'
|
||||||
|
? 'ADMIN_SALARY'
|
||||||
|
: ['BD_LEADER', 'BD'].includes(identityStore.identity)
|
||||||
|
? 'BD_SALARY'
|
||||||
|
: ''
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await apiGetBankBalance(salaryType)
|
const response = await apiGetBankBalance(salaryType)
|
||||||
@ -1012,7 +1017,12 @@ const transfer = async () => {
|
|||||||
const transferData = {
|
const transferData = {
|
||||||
amount: selectedCoinData.price,
|
amount: selectedCoinData.price,
|
||||||
acceptUserId: selectedPayee.id,
|
acceptUserId: selectedPayee.id,
|
||||||
salaryType: ['BD_LEADER', 'BD'].includes(identityStore.identity) ? 'BD_SALARY' : '',
|
salaryType:
|
||||||
|
identityStore.identity == 'ADMIN'
|
||||||
|
? 'ADMIN_SALARY'
|
||||||
|
: ['BD_LEADER', 'BD'].includes(identityStore.identity)
|
||||||
|
? 'BD_SALARY'
|
||||||
|
: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -1049,7 +1059,12 @@ const handleExchange = async () => {
|
|||||||
// 调用接口进行兑换
|
// 调用接口进行兑换
|
||||||
const response = await apiExchange({
|
const response = await apiExchange({
|
||||||
amount: selectedOption.cash,
|
amount: selectedOption.cash,
|
||||||
salaryType: ['BD_LEADER', 'BD'].includes(identityStore.identity) ? 'BD_SALARY' : '',
|
salaryType:
|
||||||
|
identityStore.identity == 'ADMIN'
|
||||||
|
? 'ADMIN_SALARY'
|
||||||
|
: ['BD_LEADER', 'BD'].includes(identityStore.identity)
|
||||||
|
? 'BD_SALARY'
|
||||||
|
: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
if (response.status === true || response.errorCode === 0) {
|
if (response.status === true || response.errorCode === 0) {
|
||||||
Loading…
x
Reference in New Issue
Block a user