Commit e715fc1777604320eccebd627bdaa6278155367c
1 parent
3207bd2503
Exists in
master
and in
2 other branches
vip状态值新增暂停、停止等
Showing 3 changed files with 35 additions and 1 deletions
littleApp_child/pages/Setting/Setting.js
View file @
e715fc1
... | ... | @@ -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/vipService/vipService.js
View file @
e715fc1
littleApp_child/pages/vipService/vipService.wxml
View file @
e715fc1
... | ... | @@ -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> |