|
@@ -44,12 +44,14 @@ export default {
|
|
|
pagination: { page: 1, limit: 15 },
|
|
pagination: { page: 1, limit: 15 },
|
|
|
loadStatus: 'more', // 'more', 'loading', 'noMore'
|
|
loadStatus: 'more', // 'more', 'loading', 'noMore'
|
|
|
isLoading: false,
|
|
isLoading: false,
|
|
|
- info: {}
|
|
|
|
|
|
|
+ info: {},
|
|
|
|
|
+ pointType: 1 // 1 普通积分 2 拓店积分
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
|
this.info = getAdminInfo();
|
|
this.info = getAdminInfo();
|
|
|
this.totalPoints = opt.pointsCount;
|
|
this.totalPoints = opt.pointsCount;
|
|
|
|
|
+ this.pointType = opt.pointType;
|
|
|
this.fetchRecords(true);
|
|
this.fetchRecords(true);
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
@@ -76,7 +78,7 @@ export default {
|
|
|
// --- 模拟API请求 ---
|
|
// --- 模拟API请求 ---
|
|
|
console.log(`请求第 ${this.pagination.page} 页...`);
|
|
console.log(`请求第 ${this.pagination.page} 页...`);
|
|
|
|
|
|
|
|
- scoreRecord(this.pagination.page,this.pagination.limit).then(res=>{
|
|
|
|
|
|
|
+ scoreRecord(this.pagination.page,this.pagination.limit,this.pointType).then(res=>{
|
|
|
let data = res.data;
|
|
let data = res.data;
|
|
|
let mockData = data.records;
|
|
let mockData = data.records;
|
|
|
if(mockData == null){
|
|
if(mockData == null){
|
|
@@ -111,7 +113,7 @@ export default {
|
|
|
type = 1;
|
|
type = 1;
|
|
|
}
|
|
}
|
|
|
console.log('跳转到积分商城或使用页面:'+type);
|
|
console.log('跳转到积分商城或使用页面:'+type);
|
|
|
- uni.navigateTo({ url: '/pages/cjx/shop/shop?type='+type });
|
|
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/cjx/shop/shop?pointType='+this.pointType+'&type='+type });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|