优化代码

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

View File

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