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) {
|
export function getUser(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -126,6 +126,7 @@
|
|||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="handleDelete" icon="el-icon-info">完整信息</el-dropdown-item>
|
<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="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-item command="handleDelete" icon="el-icon-delete" v-hasPermi="['cai:user:remove']">删除</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@@ -147,7 +148,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 {authList, genderList, userStatusList, isAnchorList, videoStatusList} from '@/constant/statusMap'
|
||||||
import UserAddUpdateDialog from '@/views/cai/user/user-add-update-dialog.vue'
|
import UserAddUpdateDialog from '@/views/cai/user/user-add-update-dialog.vue'
|
||||||
import UserInfoDialog from "@/views/cai/user/user-info-dialog";
|
import UserInfoDialog from "@/views/cai/user/user-info-dialog";
|
||||||
@@ -283,6 +284,23 @@ export default {
|
|||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).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) {
|
handleCommand(command, row) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case "handleDelete":
|
case "handleDelete":
|
||||||
@@ -291,6 +309,9 @@ export default {
|
|||||||
case "handleResetPwd":
|
case "handleResetPwd":
|
||||||
this.handleResetPwd(row);
|
this.handleResetPwd(row);
|
||||||
break;
|
break;
|
||||||
|
case "handleResetMobile":
|
||||||
|
this.handleResetMobile(row);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user