Browse Source

个人中心头像添加点击事件

master
杜叶春 2 years ago
parent
commit
83d5fc70d7
  1. 4
      pages/index/index.wxml
  2. 5
      pages/index/index.wxss
  3. 3
      pages/user/user.wxml

4
pages/index/index.wxml

@ -59,10 +59,10 @@
</view> --> </view> -->
<!-- 顶部导航栏 --> <!-- 顶部导航栏 -->
<view class="container_top_item" style="padding-top:{{barHeight + 40}}rpx; padding-bottom:10rpx;"> <view class="container_top_item" style="padding-top:{{barHeight + 40}}rpx; padding-bottom:10rpx;">
<view class="container_top_item_left" bindtap="navToArea"> <!-- <view class="container_top_item_left" bindtap="navToArea">
{{region.city?region.city:'常州市'}} {{region.city?region.city:'常州市'}}
<image src="/images/icon_xiahua.png" lazy-load="true"></image> <image src="/images/icon_xiahua.png" lazy-load="true"></image>
</view> </view> -->
<view class="container_top_item_center" bindtap="navToSearch"> <view class="container_top_item_center" bindtap="navToSearch">
<image src="/images/syss.png" lazy-load="true"></image> <image src="/images/syss.png" lazy-load="true"></image>

5
pages/index/index.wxss

@ -113,11 +113,12 @@ page {
/* search */ /* search */
display: flex; display: flex;
align-items: center; align-items: center;
width: 350rpx; /* width: 350rpx; */
width:500rpx;
height: 66rpx; height: 66rpx;
padding: 0 20rpx; padding: 0 20rpx;
border-radius: 33rpx; border-radius: 33rpx;
margin-left: 20rpx; /* margin-left: 20rpx; */
box-sizing: border-box; box-sizing: border-box;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;

3
pages/user/user.wxml

@ -39,8 +39,8 @@
<!-- 用户基本信息 --> <!-- 用户基本信息 -->
<view class='user_top' style="background-color:{{bgcolor}}"> <view class='user_top' style="background-color:{{bgcolor}}">
<view class='user_top_two'> <view class='user_top_two'>
<image class='user_top_image' src="{{user.headimgurl ? user.headimgurl:'/images/heads.png'}}" />
<block wx:if="{{user}}"> <block wx:if="{{user}}">
<image class='user_top_image' src="{{user.headimgurl ? user.headimgurl:'/images/heads.png'}}" />
<view class='user_mc' bindtap="copyText" data-text="{{user.user_id}}" style='display:block;'> <view class='user_mc' bindtap="copyText" data-text="{{user.user_id}}" style='display:block;'>
<view class='user_name'>{{user.user_name}}</view> <view class='user_name'>{{user.user_name}}</view>
<image class="level" wx:if="{{user.level==1}}" src="/images/member/lv_1.png" mode="aspectFill" bindtap="navToMemberCenter"></image> <image class="level" wx:if="{{user.level==1}}" src="/images/member/lv_1.png" mode="aspectFill" bindtap="navToMemberCenter"></image>
@ -52,6 +52,7 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<image class='user_top_image' src="/images/heads.png" bindtap="login"/>
<view class='login' bindtap="login">点击登录/注册</view> <view class='login' bindtap="login">点击登录/注册</view>
</block> </block>
<view class="top-message"> <view class="top-message">

Loading…
Cancel
Save