|
@@ -199,7 +199,7 @@
|
|
getList() {
|
|
getList() {
|
|
let _this = this
|
|
let _this = this
|
|
let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : '/api/v1/mp/user/mine/coupon/list'
|
|
let url = _this.state == 0 ? '/api/v1/mp/user/mine/prize/list' : '/api/v1/mp/user/mine/coupon/list'
|
|
- let data = _this.state == 0 ? { status:this.statusIndex } : {
|
|
|
|
|
|
+ let data = _this.state == 0 ? { } : {
|
|
status: 1
|
|
status: 1
|
|
}
|
|
}
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
@@ -228,18 +228,44 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getListTwo(){
|
|
|
|
+ let _this = this
|
|
|
|
+ let url = '/api/v1/mp/user/prize/recovery/list'
|
|
|
|
+ this.loading = true
|
|
|
|
+ this.checkedAll = false
|
|
|
|
+ $http.post(`${ url }?pageNum=${_this.pageNum}&pageSize=20`, {}).then(res => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.loading = false
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ console.log(res);
|
|
|
|
+ res.rows.forEach(item => {
|
|
|
|
+ item.status = 3
|
|
|
|
+ item.goodsNum = item.num
|
|
|
|
+ let picUrlArr = item.picUrl.split(',')
|
|
|
|
+ item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/170'
|
|
|
|
+ })
|
|
|
|
+ _this.list = _this.list.concat(res.rows)
|
|
|
|
+ }
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
typeState(index){
|
|
typeState(index){
|
|
|
|
+ this.list = []
|
|
this.typeIndex = index//样式改变
|
|
this.typeIndex = index//样式改变
|
|
// this.statusIndex = index
|
|
// this.statusIndex = index
|
|
if(index == 0 ){
|
|
if(index == 0 ){
|
|
this.statusIndex = 1 //待提货
|
|
this.statusIndex = 1 //待提货
|
|
|
|
+ this.getList()
|
|
}
|
|
}
|
|
if(index == 1 ){
|
|
if(index == 1 ){
|
|
this.statusIndex = 3 //已兑换
|
|
this.statusIndex = 3 //已兑换
|
|
|
|
+ this.getListTwo()
|
|
}
|
|
}
|
|
- this.list = []
|
|
|
|
- this.getList()
|
|
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
toIndex() {
|
|
toIndex() {
|