init
This commit is contained in:
@@ -17,6 +17,14 @@ export function resetUserPassword(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function resetUserMobile(data) {
|
||||
return request({
|
||||
url: '/cai/user/updateMobile',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询用户详细
|
||||
export function getUser(id) {
|
||||
return request({
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-info">完整信息</el-dropdown-item>
|
||||
<el-dropdown-item command="handleResetPwd" icon="el-icon-key">重置密码</el-dropdown-item>
|
||||
<el-dropdown-item command="handleResetMobile" icon="el-icon-phone">修改手机</el-dropdown-item>
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete" v-hasPermi="['cai:user:remove']">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -147,7 +148,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {delUser, getFullUser, listUser, resetUserPassword} from '@/api/cai/user'
|
||||
import {delUser, getFullUser, listUser, resetUserMobile, resetUserPassword} from '@/api/cai/user'
|
||||
import {authList, genderList, userStatusList, isAnchorList, videoStatusList} from '@/constant/statusMap'
|
||||
import UserAddUpdateDialog from '@/views/cai/user/user-add-update-dialog.vue'
|
||||
import UserInfoDialog from "@/views/cai/user/user-info-dialog";
|
||||
@@ -283,6 +284,23 @@ export default {
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleResetMobile(row){
|
||||
this.$prompt('请输入"' + row.nickname + '"的新手机号', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputPattern: /^1[0-9]{10}$/,
|
||||
inputErrorMessage: "请输入正确格式的手机号"
|
||||
}).then(({ value }) => {
|
||||
resetUserMobile({
|
||||
id: row.id,
|
||||
mobile: value,
|
||||
}).then(response => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("修改成功,新手机号是:" + value);
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleCommand(command, row) {
|
||||
switch (command) {
|
||||
case "handleDelete":
|
||||
@@ -291,6 +309,9 @@ export default {
|
||||
case "handleResetPwd":
|
||||
this.handleResetPwd(row);
|
||||
break;
|
||||
case "handleResetMobile":
|
||||
this.handleResetMobile(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user