myProfile.wxml
1.7 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
<!--pages/MyProfile/MyProfile.wxml-->
<view class='box'>
<view class='banner_box'>
<view class='head_img'>
<image src='{{personal_info.avatar}}'></image>
</view>
<view>{{personal_info.user_nickname}}</view>
</view>
</view>
<view class='info_box'>
<view>手机号:{{personal_info.mobile}}</view>
<view class='info_content' bindtap='chargePhoneNum'>更换手机号</view>
</view>
<view class='title_box'>
<view class='list_title'>我的学员</view>
<view class='add_box' bindtap='addUser'>
<text class='iconfont icon-jia'></text>
<text>添加学员</text>
</view>
</view>
<!-- 未绑定年卡,就需要显示为“购卡”;已有年卡就显示为“续卡” -->
<view class='box'>
<view class='list_item' wx:for="{{student_list}}" wx:key="index">
<view class='list_info'>
<text>姓名:{{item.name}}</text>
<text>性 别:{{item.sex === 1?'男':'女'}}</text>
</view>
<view class='list_info'>
<text>生日:{{item.birthday}}</text>
<text>所在城市:{{item.city}}</text>
</view>
<view class='list_label_box'>
<view class='label_item edit_btn' bindtap='editInfo' data-index="{{index}}">编辑学员信息</view>
<view class='label_item renewal_btn' bindtap='renewalInfo' wx:if="{{item.is_end === 1}}">续卡</view>
<view class='label_item renewal_btn' bindtap='buyCard' wx:if="{{item.is_end === 2}}">购卡</view>
<view class='label_item' bindtap='delStudent' data-index="{{index}}">删除学员</view>
</view>
<view class='hint_info' wx:if="{{item.is_end === 1}}">畅玩卡周期:{{item.time}}</view>
<view class='hint_info' wx:if="{{item.is_end === 2}}">无绑定畅玩卡</view>
</view>
</view>