diff --git a/src/api/user/userList.js b/src/api/user/userList.js index 2d1fffd..581f3d9 100644 --- a/src/api/user/userList.js +++ b/src/api/user/userList.js @@ -96,6 +96,15 @@ export function userUnBan(data) { }) } +// 重置用户(设备标识等,管理端) +export function userResetDevId(data) { + return request({ + url: '/api/web/user/devID/reset', + method: 'post', + data + }) +} + // 用户优惠卷列表 export function couponList(data) { return request({ diff --git a/src/views/user/userList/index.vue b/src/views/user/userList/index.vue index bd51a75..85c0725 100644 --- a/src/views/user/userList/index.vue +++ b/src/views/user/userList/index.vue @@ -291,7 +291,7 @@ v-loading="loading" scope.row.updatedAt | BeiJingTime }} - + @@ -356,7 +357,8 @@ import { getUserList, userExport, userUpdate, - userUnBan + userUnBan, + userResetDevId } from '@/api/user/userList' import { vipTypeList, userTypeList } from '@/filters/user/userList' import Edit from './components/AddOrEdit' @@ -529,6 +531,25 @@ export default { }) }, + resetUserDevId(row) { + this.$confirm('确定重置该用户?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(() => { + userResetDevId({ id: row.id }).then((res) => { + if (res.code === 200) { + this.$message.success('重置成功') + this.getUserData() + } else { + this.$message.error(res.msg || res.tip || '重置失败') + } + }) + }) + .catch(() => {}) + }, + clear(key) { this.searchData[key] = undefined this.getUserData()