UI优化,红包领取后缺少头像,名称字段
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { navigateTo } from '@/utils/router'
|
||||
import { useUI } from '@/utils/use-ui'
|
||||
import { formatNumberWithWan } from '../../utils'
|
||||
|
||||
const bottomList = [
|
||||
{
|
||||
@@ -40,7 +41,7 @@
|
||||
]
|
||||
|
||||
const { showDialog } = useUI()
|
||||
const { userInfo } = useAuthUser()
|
||||
const { userInfo, integralData } = useAuthUser()
|
||||
|
||||
onLoad(() => {
|
||||
// 获取用户信息
|
||||
@@ -78,7 +79,7 @@
|
||||
<view class="top-box">
|
||||
<view class="left-name">
|
||||
<text>账户积分</text>
|
||||
<text>{{ userInfo?.totalPoints }}</text>
|
||||
<text>{{ formatNumberWithWan(integralData) }}</text>
|
||||
</view>
|
||||
<view class="right-btn">
|
||||
<button
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
import { getUserPayPwd } from '@/api/my-index'
|
||||
import { useAuthUser } from '@/composables/useAuthUser'
|
||||
import { useUI } from '@/utils/use-ui'
|
||||
import { formatNumberWithWan } from '../../../utils'
|
||||
|
||||
const { userInfo } = useAuthUser()
|
||||
const { integralData } = useAuthUser()
|
||||
const { showDialog } = useUI()
|
||||
|
||||
const itemList = ref([])
|
||||
@@ -57,7 +58,7 @@
|
||||
<view class="top-card">
|
||||
<view class="left-box">
|
||||
<text>我的资产</text>
|
||||
<text>{{ userInfo?.totalPoints }}</text>
|
||||
<text>{{ formatNumberWithWan(integralData) }}</text>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<button
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
getUserThirdPayList,
|
||||
getUserBankList,
|
||||
getUserWithdrawConfig,
|
||||
getUserIntegral,
|
||||
addUserWithdraw,
|
||||
getUserPayPwd
|
||||
} from '@/api/my-index'
|
||||
import { useUI } from '@/utils/use-ui'
|
||||
import { useAuthUser } from '@/composables/useAuthUser'
|
||||
|
||||
const { showToast, showDialog } = useUI()
|
||||
const { integralData } = useAuthUser()
|
||||
|
||||
const tixian = ref(null)
|
||||
const popup = ref(null)
|
||||
@@ -43,12 +44,6 @@
|
||||
return Number(value.toFixed(2))
|
||||
})
|
||||
|
||||
/** 获取积分 */
|
||||
const getIntegral = async () => {
|
||||
const res = await getUserIntegral()
|
||||
withdrawData.availablePoints = res.data.availablePoints
|
||||
}
|
||||
|
||||
const getData = async () => {
|
||||
const res = await getUserWithdrawConfig(topData.value.withdrawalType)
|
||||
withdrawData.minAmount = res.data.minAmount
|
||||
@@ -134,7 +129,7 @@
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getIntegral()
|
||||
withdrawData.availablePoints = integralData.value
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user