作者 吴亚瑞

goodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgood…

…goodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgoodgood
... ... @@ -34,6 +34,14 @@ Page({
},
// 兑换
duihuan(e) {
var data = e.currentTarget.dataset.id.number
if(this.data.meData.score*1 < data*1){
wx.showToast({
title: '您的积分不够',
icon: 'none'
})
return
}
wx.navigateTo({
url: '/pages/requre/requre?goods_data=' + JSON.stringify(e.currentTarget.dataset.id),
})
... ...
... ... @@ -30,8 +30,13 @@ Page({
bindNav(e) {
var nav = e.currentTarget.dataset.nav
this.setData({
nav
nav,
orderPage:{ //点击切换类型重新设置页数
page:1,//列表页数
last_page:1,//最大页数
}
})
this.GetScore()
},
/**
* 生命周期函数--监听页面加载
... ... @@ -44,6 +49,10 @@ Page({
//如果当前页数大于最大页数 提示没有更多数据
if(this.data.orderPage.page > this.data.orderPage.last_page){
console.log('没有更多数据')
wx.showToast({
title: '没有更多数据',
icon: 'none'
})
return
}
var that = this;
... ... @@ -61,6 +70,12 @@ Page({
last_page:res.data.last_page
}
})
if(res.data.data.length == 0){
wx.showToast({
title: '没有更多数据',
icon: 'none'
})
}
}
}).catch(err => {
wx.showToast({
... ...
<view class="navbar">
<view class="item {{nav==1?'choose':''}}" bindtap="bindNav" data-nav="{{1}}">我的一级伙伴</view>
<view class="item {{nav==2?'choose':''}}" bindtap="bindNav" data-nav="{{2}}">我的二级伙伴</view>
<view class="item {{nav==0?'choose':''}}" bindtap="bindNav" data-nav="{{0}}">积分支出</view>
<view class="item {{nav==1?'choose':''}}" bindtap="bindNav" data-nav="{{1}}">积分收入</view>
</view>
<view wx:if="{{nav==1}}">
<view class="linet" wx:for="{{linet}}" wx:key='key'>
<view>
<view class="linet" wx:for="{{orderData}}" wx:key='key'>
<view class="lin-1">
<text>{{item.line}}</text>
<view>11月13日 17:00</view>
<text>{{item.text}}</text>
<view>{{item.createtime}}</view>
</view>
<view>{{item.go}}</view>
</view>
</view>
<view wx:if="{{nav==2}}">
<view class="linet" wx:for="{{linet}}" wx:key='key'>
<view class="lin-1">
<text>{{item.line}}</text>
<view>11</view>
</view>
<view>{{item.go}}</view>
<view>{{item.number}}</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -35,6 +35,7 @@ Page({
login: true
})
}
this.getMe()
},
// 关闭
myevent() {
... ...
... ... @@ -7,7 +7,7 @@
<view class="bigtitle">{{meData.nickname}}</view>
<text class="t3" bindtap="getmy">查看并编辑个人资料</text>
</view>
<view class="right">积分·500</view>
<view class="right">积分·{{meData.score}}</view>
</view>
<view class="contents">
<view class="cont" wx:for="{{cont}}" wx:key='key'>
... ...