修改转换管理员接口
This commit is contained in:
parent
fc5ef4b931
commit
1b69035ed2
|
@ -1,7 +1,7 @@
|
||||||
// pages/workBench/components/account/index.js
|
// pages/workBench/components/account/index.js
|
||||||
import request from "../../../../utils/request"
|
import request from "../../../../utils/request"
|
||||||
import { getTenementBackInfo, } from "../../../../service/tenement"
|
import { getTenementBackInfo, updateUserApp} from "../../../../service/tenement"
|
||||||
import { getBackApproveList, removeUser, approveUser } from "../../../../service/user"
|
import { getBackApproveList, removeUser } from "../../../../service/user"
|
||||||
import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index"
|
import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index"
|
||||||
const { OK } = request
|
const { OK } = request
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ Component({
|
||||||
const { id, name } = e.currentTarget.dataset;
|
const { id, name } = e.currentTarget.dataset;
|
||||||
const { tenement } = this.data;
|
const { tenement } = this.data;
|
||||||
await wxModal({ content: `确认要将${name}设置为管理吗?` })
|
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) {
|
if (code !== OK) {
|
||||||
alertInfo(message)
|
alertInfo(message)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -77,3 +77,8 @@ export const bindMeter = async function(pid, tid, data) {
|
||||||
export const updateAdminPhone = async function(data) {
|
export const updateAdminPhone = async function(data) {
|
||||||
return await PUT(`/wx/updatePhone`, data)
|
return await PUT(`/wx/updatePhone`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工作台移交管理权限
|
||||||
|
export const updateUserApp = async function(data) {
|
||||||
|
return await PUT(`/wx/updateUserApp`, data)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user