main
wwl 2024-03-28 16:56:23 +08:00
parent 82ca8b7b3d
commit 99cdc25e80
1 changed files with 86 additions and 66 deletions

View File

@ -1,8 +1,13 @@
<template> <template>
<view class="px-44rpx"> <view class="px-44rpx">
<view class="flex items-center pt-80rpx pl-16rpx" @click="handleLogin"> <view>
<view
class="flex items-center pt-80rpx pl-16rpx min-h-240rpx"
@click="handleLogin"
>
<view class="overflow-hidden rounded-full w-20 h-20"> <view class="overflow-hidden rounded-full w-20 h-20">
<image <image
:class="loading ? 'overflow-hidden' : ' '"
:src="userInfo.avatar ? userInfo.avatar : defaultAvatar" :src="userInfo.avatar ? userInfo.avatar : defaultAvatar"
alt="" alt=""
class="w-full h-full" class="w-full h-full"
@ -12,7 +17,9 @@
<view class="ml-4"> <view class="ml-4">
<block v-if="isLogin"> <block v-if="isLogin">
<view class="text-34rpx"> {{ userInfo.nickName }}</view> <view class="text-34rpx"> {{ userInfo.nickName }}</view>
<view class="text-24rpx text-primary-500 mt-20rpx flex items-center"> <view
class="text-24rpx text-primary-500 mt-20rpx flex items-center h-30rpx overflow-hidden"
>
<image <image
class="w-28rpx mr-4rpx" class="w-28rpx mr-4rpx"
:src="$assets('/personal/edit.jpg')" :src="$assets('/personal/edit.jpg')"
@ -33,7 +40,9 @@
<text class="text-28rpx text-#999">累计接单</text> <text class="text-28rpx text-#999">累计接单</text>
</view> </view>
<view class="flex flex-1 flex-col"> <view class="flex flex-1 flex-col">
<text class="text-34rpx">{{ orderTodayIncome.doctorPrice || 0 }}</text> <text class="text-34rpx">{{
orderTodayIncome.doctorPrice || 0
}}</text>
<text class="text-28rpx text-#999">累计收入</text> <text class="text-28rpx text-#999">累计收入</text>
</view> </view>
<view class="flex flex-1 flex-col"> <view class="flex flex-1 flex-col">
@ -47,7 +56,7 @@
立即提现 立即提现
</view> </view>
</view> </view>
<view class="relative mt-40rpx"> <view class="relative mt-40rpx min-h-[50vh]">
<view <view
v-for="(item, index) of menuList" v-for="(item, index) of menuList"
:key="index" :key="index"
@ -70,6 +79,7 @@
open-type="contact" open-type="contact"
></button> ></button>
</view> </view>
</view>
<u-modal <u-modal
v-model:show="showWithdraw" v-model:show="showWithdraw"
@ -309,7 +319,11 @@ const handleLogin = async () => {
}) })
} }
const loading = ref(true)
const getUserInfo = async () => { const getUserInfo = async () => {
setTimeout(() => {
loading.value = false
}, 250)
if (isLogin.value) { if (isLogin.value) {
const res = await $api.getUser() const res = await $api.getUser()
if (res?.success) { if (res?.success) {
@ -324,6 +338,12 @@ const getUserInfo = async () => {
onShow(() => { onShow(() => {
getUserInfo() getUserInfo()
}) })
// const loading = ref(true)
onMounted(() => {
setTimeout(() => {
loading.value = false
}, 250)
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>