增加重置用户

This commit is contained in:
mac
2026-04-08 22:16:53 +08:00
parent fca9aa5dce
commit 30f2999231
2 changed files with 32 additions and 2 deletions
+9
View File
@@ -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) { export function couponList(data) {
return request({ return request({
+23 -2
View File
@@ -291,7 +291,7 @@ v-loading="loading"
scope.row.updatedAt | BeiJingTime scope.row.updatedAt | BeiJingTime
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="650"> <el-table-column align="center" fixed="right" label="操作" width="740">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="openQr(scope.$index, scope.row)">查看二维码</el-button> <el-button size="mini" type="primary" @click="openQr(scope.$index, scope.row)">查看二维码</el-button>
<el-button <el-button
@@ -323,6 +323,7 @@ size="mini"
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button @click="BindBankCard(scope.$index, scope.row)" size="mini" type="success">绑定银行卡</el-button> <el-button @click="BindBankCard(scope.$index, scope.row)" size="mini" type="success">绑定银行卡</el-button>
<el-button @click="resetUserDevId(scope.row)" size="mini" type="warning" plain>重置用户</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -356,7 +357,8 @@ import {
getUserList, getUserList,
userExport, userExport,
userUpdate, userUpdate,
userUnBan userUnBan,
userResetDevId
} from '@/api/user/userList' } from '@/api/user/userList'
import { vipTypeList, userTypeList } from '@/filters/user/userList' import { vipTypeList, userTypeList } from '@/filters/user/userList'
import Edit from './components/AddOrEdit' 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) { clear(key) {
this.searchData[key] = undefined this.searchData[key] = undefined
this.getUserData() this.getUserData()