diff --git a/src/api/mall/trade/brokerage/user/index.ts b/src/api/mall/trade/brokerage/user/index.ts index 95f3a6a1..213a6cbd 100644 --- a/src/api/mall/trade/brokerage/user/index.ts +++ b/src/api/mall/trade/brokerage/user/index.ts @@ -8,6 +8,8 @@ export interface BrokerageUserVO { brokerageTime: Date price: number frozenPrice: number + + nickname: string } // 查询分销用户列表 @@ -19,3 +21,18 @@ export const getBrokerageUserPage = async (params: any) => { export const getBrokerageUser = async (id: number) => { return await request.get({ url: `/trade/brokerage-user/get?id=` + id }) } + +// 修改推广员 +export const updateBindUser = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/update-bind-user`, data }) +} + +// 清除推广员 +export const clearBindUser = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/clear-bind-user`, data }) +} + +// 修改推广资格 +export const updateBrokerageEnabled = async (data: any) => { + return await request.put({ url: `/trade/brokerage-user/update-brokerage-enable`, data }) +} diff --git a/src/views/mall/trade/brokerage/user/index.vue b/src/views/mall/trade/brokerage/user/index.vue index db59c52d..4e67cc8c 100644 --- a/src/views/mall/trade/brokerage/user/index.vue +++ b/src/views/mall/trade/brokerage/user/index.vue @@ -104,8 +104,8 @@ active-text="有" inactive-text="无" inline-prompt - :disabled="!checkPermi(['trade:brokerage-user:update-brokerage-user'])" - @change="handleBrokerageEnabledChange(scope.row.id, !scope.row.brokerageEnabled)" + :disabled="!checkPermi(['trade:brokerage-user:update-bind-user'])" + @change="handleBrokerageEnabledChange(scope.row)" /> @@ -131,10 +131,14 @@ v-hasPermi="[ 'trade:brokerage-user:user-query', 'trade:brokerage-user:order-query', - 'trade:brokerage-user:update-brokerage-user', - 'trade:brokerage-user:clear-brokerage-user' + 'trade:brokerage-user:update-bind-user', + 'trade:brokerage-user:clear-bind-user' ]" > + + + 更多 +