效果图:
先上HTML:
<view class="list-menu">
<view class="navigator" bindtap='changeHead'>
<view class="navigator-text"><text>头像</text></view>
<view class="navigator-content-text" wx:if="{
{myHeadImg!=null}}">
<image mode="aspectFill" class="avatar" src="{
{myHeadImg}}"></image>
</view>
<view class="navigator-content-text" wx:else>
<image mode="aspectFill" class="avatar" src="{
{userInfo.avatarUrl}}"></image>
</view>
<image class='charge-img' src='https://img.cdn.zhaoshang800.com/img/2018/04/11/broker/703218f3-2b76-473d-86a3-1bd901cc57af.png'></image>
</view>
<view wx:for="{
{info_list}}" wx:key="{
{id}}">
<view class="navigator">
<view class="navigator-text">{
{item.title}}</view>
<view class="navigator-content-text">{
{