feat(主播中心): 调整接口对接数据
This commit is contained in:
parent
78883d8d5d
commit
8b172cbe7f
@ -55,7 +55,7 @@
|
|||||||
<div class="salary-grid">
|
<div class="salary-grid">
|
||||||
<div class="salary-item">
|
<div class="salary-item">
|
||||||
<div class="salary-label">{{ t('history_salary') }}</div>
|
<div class="salary-label">{{ t('history_salary') }}</div>
|
||||||
<div class="salary-value">${{ salaryInfo.hostSalary }}</div>
|
<div class="salary-value">${{ historySalary.toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="salary-item">
|
<div class="salary-item">
|
||||||
<div class="salary-label">{{ t('current_salary') }}</div>
|
<div class="salary-label">{{ t('current_salary') }}</div>
|
||||||
@ -113,7 +113,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, reactive } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { setDocumentDirection } from '@/locales/i18n'
|
import { setDocumentDirection } from '@/locales/i18n'
|
||||||
@ -146,6 +146,8 @@ const progressInfo = reactive({
|
|||||||
})
|
})
|
||||||
const loadingProgressInfo = reactive({ value: false })
|
const loadingProgressInfo = reactive({ value: false })
|
||||||
|
|
||||||
|
const historySalary = ref(0)
|
||||||
|
|
||||||
// 获取成员工作数据
|
// 获取成员工作数据
|
||||||
const fetchMemberWorkData = async () => {
|
const fetchMemberWorkData = async () => {
|
||||||
try {
|
try {
|
||||||
@ -161,6 +163,8 @@ const fetchMemberWorkData = async () => {
|
|||||||
if (response && response.status && response.body) {
|
if (response && response.status && response.body) {
|
||||||
const data = response.body
|
const data = response.body
|
||||||
|
|
||||||
|
historySalary.value = data.historySalary
|
||||||
|
|
||||||
// 取第一条target数据(最新的工作数据)
|
// 取第一条target数据(最新的工作数据)
|
||||||
if (data.targets && data.targets.length > 0) {
|
if (data.targets && data.targets.length > 0) {
|
||||||
const latestTarget = data.targets[0]
|
const latestTarget = data.targets[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user