feat: add membership activable toggle & change password
This commit is contained in:
@@ -26,8 +26,11 @@ export class Commission {
|
||||
|
||||
async getData() {
|
||||
const response = await http.get(`/config/commission?page=${this.page}&pageSize=${this.pageSize}`);
|
||||
console.log(response)
|
||||
this.data = response.body.data ?? []
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
}) ?? []
|
||||
|
||||
this.total_data = response.body.total_data ?? 0
|
||||
}
|
||||
async create(data) {
|
||||
|
||||
@@ -14,7 +14,7 @@ export class Membership {
|
||||
|
||||
async getData() {
|
||||
const response = await http.get(`/users?page=${this.page}&pageSize=${this.pageSize}`);
|
||||
|
||||
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
@@ -47,6 +47,8 @@ export class Membership {
|
||||
}
|
||||
|
||||
async changeStatus(id, status) {
|
||||
console.log(`/users/${id}/${status}`);
|
||||
|
||||
const response = await http.get(`/users/${id}/${status}`);
|
||||
await this.getData();
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user