userInfo.wxml
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<wxs module="strSubstr">
var getString = function(str,len=8){
if(!str)return ''
if(str.length<len+1)return str
var newStr = str.substring(0,len)+'...'
return newStr
}
module.exports.getString = getString
</wxs>
<view style="{{boxStyle}}" class="userInfo_widget">
<view class="wrap flex_sc">
<image wx:if="{{user.headImgUrl}}" mode="aspectFill" class="header_icon" src="{{user.headImgUrl}}" />
<image wx:else mode="aspectFill" class="header_icon" src="{{IMGURL}}default_avatar.png" />
<view class="info_text">
<view class="label flex_sc">
<text>{{strSubstr.getString(user.nickName)}}</text>
<image bind:tap="toEditPage" mode="aspectFill" class="edit_icon" src="{{IMGURL}}center_edit_icon.png" />
</view>
<view class="contact_widget flex_sc">
<view class="text">{{user.phone}}</view>
<view bind:tap="toShowBind" class="wecat_wrap flex_cc">
<block wx:if="{{user.bindStatus}}">
<image class="icon" src="{{IMGURL}}wechat_active_icon.png" />
<text>{{strSubstr.getString(user.brandName)}}</text>
</block>
<block wx:else>
<image class="icon" src="{{IMGURL}}wechat_icon.png" />
<text>未绑定</text>
</block>
</view>
</view>
</view>
<view class="logout flex_cc" bind:tap="toLogout">退出登录</view>
</view>
<view class="store_widget {{user.seriseName?'flex_cc':'flex_sc marleft158'}}">
<block wx:if="{{user.seriseName}}">
<view class="flex_sc label">
<image class="icon" src="{{IMGURL}}merchant_icon.png" />
<view class="tip">{{user.seriseName}}</view>
</view>
<view class="line"></view>
</block>
<view class="flex_sc label">
<image class="icon" src="{{IMGURL}}shop_icon.png" />
<view class="tip">{{strSubstr.getString(user.merchantName,user.seriseName?10:20)}}</view>
</view>
</view>
</view>