修改转换管理员接口

This commit is contained in:
qiaomu 2025-03-04 17:32:41 +08:00
parent fc5ef4b931
commit 1b69035ed2
2 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,7 @@
// pages/workBench/components/account/index.js
import request from "../../../../utils/request"
import { getTenementBackInfo, } from "../../../../service/tenement"
import { getBackApproveList, removeUser, approveUser } from "../../../../service/user"
import { getTenementBackInfo, updateUserApp} from "../../../../service/tenement"
import { getBackApproveList, removeUser } from "../../../../service/user"
import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index"
const { OK } = request
@ -72,7 +72,7 @@ Component({
const { id, name } = e.currentTarget.dataset;
const { tenement } = this.data;
await wxModal({ content: `确认要将${name}设置为管理吗?` })
const { code, message } = await approveUser({ userId: id, type: 2, tenement: tenement })
const { code, message } = await updateUserApp({ userId: id, type: 2, tenement: tenement })
if (code !== OK) {
alertInfo(message)
return;

View File

@ -76,4 +76,9 @@ export const bindMeter = async function(pid, tid, data) {
// 修改管理员手机号
export const updateAdminPhone = async function(data) {
return await PUT(`/wx/updatePhone`, data)
}
// 工作台移交管理权限
export const updateUserApp = async function(data) {
return await PUT(`/wx/updateUserApp`, data)
}