优化代码

This commit is contained in:
java110 2022-08-14 16:19:54 +08:00
parent dac28a88d1
commit 76dea4bc76
2 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="user-container bg-white my_user">
<view class="userinfo" :style="{background: 'url('+topImg+') no-repeat center center;'}">
<view class="userinfo" :style="{background: 'url('+topImg+') no-repeat center center'}" >
<view class="already" v-if="login">
<view class="cu-avatar header-img round " :style="{ backgroundImage: 'url(' + headerImg + ')' }">
</view>
@ -12,9 +12,15 @@
</view>
</view>
<view class="wait" v-else @tap="showLongModel">
<!-- #ifdef MP-WEIXIN -->
<view class="userinfo-avatar">
<open-data type="userAvatarUrl" lang="zh_CN" />
</view>
<!-- #endif -->
<!-- #ifdef H5 || APP-PLUS -->
<view class="cu-avatar header-img round " :style="{ backgroundImage: 'url(' + headerImg + ')' }">
</view>
<!-- #endif -->
<view class="userinfo-nickname margin-top">
<text>请登录</text>
</view>
@ -172,7 +178,7 @@
}
</script>
<style lang="less">
<style lang="scss" scoped>
.my_user {
padding: 0;
}

View File

@ -1,7 +1,7 @@
<template>
<view>
<view>
<image src="/static/images/openDoorTop.png" class="heard-location-icon"></image>
<image :src="topImg" class="heard-location-icon"></image>
</view>
<view class="cu-list grid" :class="'col-2'">
<view class="cu-item" @click="showOpenDoor(item);"
@ -43,7 +43,8 @@
communityId: '',
openDoorFlag:false,
curMachine:{},
memberId:''
memberId:'',
topImg:this.imgUrl+'/h5/images/openDoorTop.png'
};
},
components: {