fix bug
parent
82ca8b7b3d
commit
99cdc25e80
|
|
@ -1,74 +1,84 @@
|
|||
<template>
|
||||
<view class="px-44rpx">
|
||||
<view class="flex items-center pt-80rpx pl-16rpx" @click="handleLogin">
|
||||
<view class="overflow-hidden rounded-full w-20 h-20">
|
||||
<image
|
||||
:src="userInfo.avatar ? userInfo.avatar : defaultAvatar"
|
||||
alt=""
|
||||
class="w-full h-full"
|
||||
/>
|
||||
</view>
|
||||
<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">
|
||||
<image
|
||||
:class="loading ? 'overflow-hidden' : ' '"
|
||||
:src="userInfo.avatar ? userInfo.avatar : defaultAvatar"
|
||||
alt=""
|
||||
class="w-full h-full"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="ml-4">
|
||||
<block v-if="isLogin">
|
||||
<view class="text-34rpx"> {{ userInfo.nickName }}</view>
|
||||
<view class="text-24rpx text-primary-500 mt-20rpx flex items-center">
|
||||
<image
|
||||
class="w-28rpx mr-4rpx"
|
||||
:src="$assets('/personal/edit.jpg')"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<text>编辑资料</text></view
|
||||
>
|
||||
</block>
|
||||
<view v-else claas="text-34rpx text-primary">登录</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex items-center pl-16rpx my-40rpx"
|
||||
v-if="userInfo.roleName === 'common'"
|
||||
>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{ orderTodayIncome.count || 0 }}</text>
|
||||
<text class="text-28rpx text-#999">累计接单</text>
|
||||
</view>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{ orderTodayIncome.doctorPrice || 0 }}</text>
|
||||
<text class="text-28rpx text-#999">累计收入</text>
|
||||
</view>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{ orderTodayIncome.cashPrice || 0 }}</text>
|
||||
<text class="text-28rpx text-#999">可提现</text>
|
||||
</view>
|
||||
<view
|
||||
@click="showWithdraw = true"
|
||||
class="w-120rpx text-primary-500 text-30rpx"
|
||||
>
|
||||
立即提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative mt-40rpx">
|
||||
<view
|
||||
v-for="(item, index) of menuList"
|
||||
:key="index"
|
||||
class="flex items-center py-4"
|
||||
@click="handleInfo(item)"
|
||||
>
|
||||
<!-- <view class="w-10 flex-none truncate text-primary-500 text-2xl">
|
||||
<via-icon :name="item.icon"></via-icon>
|
||||
</view> -->
|
||||
<view class="flex-1 flex items-center">
|
||||
<image :src="$assets(item.icon)" alt="" class="w-42rpx h-42rpx" />
|
||||
<text class="ml-40rpx">{{ item.text }}</text>
|
||||
</view>
|
||||
<view class="flex-none w-10 text-right text-gray-500">
|
||||
<via-icon name="arrow-right-bold"></via-icon>
|
||||
<view class="ml-4">
|
||||
<block v-if="isLogin">
|
||||
<view class="text-34rpx"> {{ userInfo.nickName }}</view>
|
||||
<view
|
||||
class="text-24rpx text-primary-500 mt-20rpx flex items-center h-30rpx overflow-hidden"
|
||||
>
|
||||
<image
|
||||
class="w-28rpx mr-4rpx"
|
||||
:src="$assets('/personal/edit.jpg')"
|
||||
mode="widthFix"
|
||||
></image>
|
||||
<text>编辑资料</text></view
|
||||
>
|
||||
</block>
|
||||
<view v-else claas="text-34rpx text-primary">登录</view>
|
||||
</view>
|
||||
</view>
|
||||
<button
|
||||
class="absolute bottom-224rpx bg-transparent border-transparent z-2 w-660rpx h-90rpx"
|
||||
open-type="contact"
|
||||
></button>
|
||||
<view
|
||||
class="flex items-center pl-16rpx my-40rpx"
|
||||
v-if="userInfo.roleName === 'common'"
|
||||
>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{ orderTodayIncome.count || 0 }}</text>
|
||||
<text class="text-28rpx text-#999">累计接单</text>
|
||||
</view>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{
|
||||
orderTodayIncome.doctorPrice || 0
|
||||
}}</text>
|
||||
<text class="text-28rpx text-#999">累计收入</text>
|
||||
</view>
|
||||
<view class="flex flex-1 flex-col">
|
||||
<text class="text-34rpx">{{ orderTodayIncome.cashPrice || 0 }}</text>
|
||||
<text class="text-28rpx text-#999">可提现</text>
|
||||
</view>
|
||||
<view
|
||||
@click="showWithdraw = true"
|
||||
class="w-120rpx text-primary-500 text-30rpx"
|
||||
>
|
||||
立即提现
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative mt-40rpx min-h-[50vh]">
|
||||
<view
|
||||
v-for="(item, index) of menuList"
|
||||
:key="index"
|
||||
class="flex items-center py-4"
|
||||
@click="handleInfo(item)"
|
||||
>
|
||||
<!-- <view class="w-10 flex-none truncate text-primary-500 text-2xl">
|
||||
<via-icon :name="item.icon"></via-icon>
|
||||
</view> -->
|
||||
<view class="flex-1 flex items-center">
|
||||
<image :src="$assets(item.icon)" alt="" class="w-42rpx h-42rpx" />
|
||||
<text class="ml-40rpx">{{ item.text }}</text>
|
||||
</view>
|
||||
<view class="flex-none w-10 text-right text-gray-500">
|
||||
<via-icon name="arrow-right-bold"></via-icon>
|
||||
</view>
|
||||
</view>
|
||||
<button
|
||||
class="absolute bottom-224rpx bg-transparent border-transparent z-2 w-660rpx h-90rpx"
|
||||
open-type="contact"
|
||||
></button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-modal
|
||||
|
|
@ -309,7 +319,11 @@ const handleLogin = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const loading = ref(true)
|
||||
const getUserInfo = async () => {
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 250)
|
||||
if (isLogin.value) {
|
||||
const res = await $api.getUser()
|
||||
if (res?.success) {
|
||||
|
|
@ -324,6 +338,12 @@ const getUserInfo = async () => {
|
|||
onShow(() => {
|
||||
getUserInfo()
|
||||
})
|
||||
// const loading = ref(true)
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 250)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue