Commit 9cf3a1a0c3a5ea836a731201e23e5971590422a7
Exists in
master
and in
2 other branches
Merge branch 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child
* 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child: vip状态值新增暂停、停止等 no message
Showing 5 changed files
littleApp_child/pages/Setting/Setting.js
View file @
9cf3a1a
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | // { icon: '../../source/jianchajilu.png', text: '交易记录', right_text: '', margin: 0 }, |
| 16 | 16 | // { icon: '../../source/jianchajilu.png', text: '我的收藏', right_text: '', margin: 10 }, |
| 17 | 17 | { icon: '../../source/feedback_icon.png', text: '用户反馈', right_text: '', margin: 0 }, |
| 18 | - { icon: '../../source/clear_cach.png', text: '清楚缓存', right_text: '', margin:10} ], | |
| 18 | + { icon: '../../source/clear_cach.png', text: '清除缓存', right_text: '', margin:10} ], | |
| 19 | 19 | isShowOne: false, |
| 20 | 20 | isShowTwo: false, |
| 21 | 21 | isShowThree: false, |
| ... | ... | @@ -24,7 +24,8 @@ |
| 24 | 24 | }, |
| 25 | 25 | onLoad: function (option) { |
| 26 | 26 | |
| 27 | - this.setData({ userData: getApp().globalData.userInfo}) | |
| 27 | + | |
| 28 | + this.getUserInfo() | |
| 28 | 29 | }, |
| 29 | 30 | onShow:function(){ |
| 30 | 31 | var self=this |
| ... | ... | @@ -37,6 +38,34 @@ |
| 37 | 38 | isVip: false |
| 38 | 39 | }) |
| 39 | 40 | } |
| 41 | + }, | |
| 42 | + // 获取用户信息 | |
| 43 | + getUserInfo(userId) { | |
| 44 | + networkUtil.showLoading() | |
| 45 | + var self = this | |
| 46 | + var param = { 'token': app.globalData.token } | |
| 47 | + if (getApp().globalData.tourist == true) { | |
| 48 | + param.type = 2 | |
| 49 | + } | |
| 50 | + networkUtil._get(api.userInfo + app.globalData.currentId, param, function (res) { | |
| 51 | + console.log('获取用户信息', res) | |
| 52 | + | |
| 53 | + self.setUserInfo(res.data.data) | |
| 54 | + | |
| 55 | + }, function (res) { | |
| 56 | + networkUtil.showErrorToast(res.errormsg) | |
| 57 | + }) | |
| 58 | + }, | |
| 59 | + // 设置UI 用户信息 | |
| 60 | + setUserInfo(data) { | |
| 61 | + var self = this | |
| 62 | + app.globalData.days = data.days | |
| 63 | + app.globalData.userInfo = data | |
| 64 | + self.setData({ | |
| 65 | + userData: data, | |
| 66 | + tourist: getApp().globalData.tourist | |
| 67 | + }) | |
| 68 | + | |
| 40 | 69 | }, |
| 41 | 70 | selectPhoto(){ |
| 42 | 71 | var that = this |
littleApp_child/pages/Setting/Setting.wxml
View file @
9cf3a1a
| ... | ... | @@ -21,11 +21,11 @@ |
| 21 | 21 | <view class="titleText">出生日期</view> |
| 22 | 22 | <view class="timeText">{{userData.birth}}</view> |
| 23 | 23 | </view> |
| 24 | - <view class="infoView"> | |
| 24 | + <view class="infoView" hidden='true'> | |
| 25 | 25 | <view class="titleText">出生时间</view> |
| 26 | 26 | <view class="timeText">{{userData.birth}}</view> |
| 27 | 27 | </view> |
| 28 | - <view class="infoView"> | |
| 28 | + <view class="infoView" hidden='true'> | |
| 29 | 29 | <view class="titleText">分娩方式</view> |
| 30 | 30 | <view class="timeText">{{userData.birth}}</view> |
| 31 | 31 | </view> |
littleApp_child/pages/Setting/Setting.wxss
View file @
9cf3a1a
littleApp_child/pages/vipService/vipService.js
View file @
9cf3a1a
littleApp_child/pages/vipService/vipService.wxml
View file @
9cf3a1a
| ... | ... | @@ -35,7 +35,10 @@ |
| 35 | 35 | |
| 36 | 36 | <view class="vip_intr_price_text" wx:if="{{item.price!=0}}">¥{{item.price}}</view> |
| 37 | 37 | <view class="vip_intr_status_text" wx:if="{{item.status==1}}">已开通</view> |
| 38 | + <view class="vip_intr_status_text" wx:if="{{item.status==3}}">已过期</view> | |
| 39 | + <view class="vip_intr_status_text" wx:if="{{item.status==4}}">已暂停</view> | |
| 38 | 40 | <view class="openbt" wx:if="{{item.status==0&&item.price!=0 }}">开通</view> |
| 41 | + <view class="openbt" wx:if="{{item.status==2&&item.price!=0 }}">开通</view> | |
| 39 | 42 | </view> |
| 40 | 43 | <view class="vip_intr_content">{{item.desc}}</view> |
| 41 | 44 | <view style='height:19px;'></view> |