1、给地图设置光标
map.wxml
<view style='width:100%;height:100%'>
<map longitude="{{longitude}}" latitude="{{latitude}}" scale="13" style='width:100%;height:100%' show-location="true" ></map>
</view>
2、自动显示用户头像和用户名,手机信息
mine.wxml
<view style="background-image:url('https://images.unsplash.com/photo-1551446591-142875a901a1?w=640');width:100%;height:{{imgHeight}}px" class="userinfo" >
<view class="userinfo-avatar" >
<!-- <button wx:for{{}}</button> -->
<open-data type="userAvatarUrl"></open-data>
</view>
<open-data type="userNickName" ></open-data>
</view>
<view class="systemInfo">
<block>
<view>手机信息:</view>
<view>model:{{model}}</view>
<view>system:{{system}}</view>
<view>version:{{version}}</view>
<view>windowHeight:{{windowHeight}}</view>
<view>windowWidth:{{windowWidth}}</view>
<view>language:{{language}}</view>
</block>
</view>
mine.wxss
.userinfo{
position: relative;
width: 100%;
height: 50%;
display: flex;
flex-direction: column;
align-items: center;
background-repeat: no-repeat;
background-size: 100%,50%
}
.userinfo-avatar{
overflow: hidden;
display: block;
width: 50px;
height: 50px;
justify-content: center;
align-items: center;
border-radius: 100px;
margin-top: 50rpx;
}