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