Commit c6b4af5e by 高淑倩

modify: 修改优惠券列表接口

parent 37db3a58
...@@ -49,7 +49,6 @@ wxService.page({ ...@@ -49,7 +49,6 @@ wxService.page({
const {result,data} = res.data const {result,data} = res.data
if(result == 0){ if(result == 0){
// 变更 激活状态 // 变更 激活状态
console.log('000000')
wx.setStorageSync('memberActivateStatus',true) wx.setStorageSync('memberActivateStatus',true)
wx.hideLoading() wx.hideLoading()
wxService.router(`/pages/userCenter/userCenter`) wxService.router(`/pages/userCenter/userCenter`)
......
...@@ -74,16 +74,22 @@ wxService.page({ ...@@ -74,16 +74,22 @@ wxService.page({
}, },
//获取优惠券列表 //获取优惠券列表
getCouponList(pageNo,pageSize,status){ getCouponList(pageNo,pageSize,statusNum){
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
let params;
const params = { if(statusNum == 1){
status params = {
status: 1
}
} else {
params = {
statusNot: 1
}
} }
wxService.post(`/coupon/coupon/listWithMember?number=${pageNo}&size=${pageSize}`, params).then(res => { wxService.post(`/coupon/coupon/listWithMember4Mina?number=${pageNo}&size=${pageSize}`, params).then(res => {
const {result,data} = res.data const {result,data} = res.data
if(result == 0){ if(result == 0){
wx.hideLoading() wx.hideLoading()
...@@ -93,7 +99,7 @@ wxService.page({ ...@@ -93,7 +99,7 @@ wxService.page({
item.endTime = item.endTime.substring(0,10) item.endTime = item.endTime.substring(0,10)
}) })
// 可使用 or 已失效 // 可使用 or 已失效
if(status == 1) { if(statusNum == 1) {
// couponList // couponList
this.setData({ this.setData({
couponList: this.data.pageNo == 1? [...data.content]: [...this.data.couponList,...data.content], couponList: this.data.pageNo == 1? [...data.content]: [...this.data.couponList,...data.content],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment