动态参数
// 请求路径:users/:id
参数名 | 参数说明 | 备注 |
---|---|---|
id | 用户 id | 不能为空 参数是url参数:id |
邮箱 | 可以为空 | |
mobile | 手机号 | 可以为空 |
const { data: res } = await this.$http.put('users/' + this.editUserForm.id,
{
email: this.editUserForm.email,
mobile: this.editUserForm.mobile
})
// 请求路径:users/:id
参数名 | 参数说明 | 备注 |
---|---|---|
id | 用户 id | 不能为空 参数是url参数:id |
邮箱 | 可以为空 | |
mobile | 手机号 | 可以为空 |
const { data: res } = await this.$http.put('users/' + this.editUserForm.id,
{
email: this.editUserForm.email,
mobile: this.editUserForm.mobile
})