From 30f29992310370a7d288a7d419700642c1dbbcb2 Mon Sep 17 00:00:00 2001 From: mac Date: Wed, 8 Apr 2026 22:16:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=8D=E7=BD=AE=E7=94=A8?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user/userList.js | 9 +++++++++ src/views/user/userList/index.vue | 25 +++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) 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()