Skip to content

Instantly share code, notes, and snippets.

@hanshou101
Created April 22, 2019 07:24
Show Gist options
  • Save hanshou101/e95831c56978fdccbef1d82f38f297c3 to your computer and use it in GitHub Desktop.
Save hanshou101/e95831c56978fdccbef1d82f38f297c3 to your computer and use it in GitHub Desktop.
// 当前用户不是经纪商
if (this.userDetail.isAgent == 0) {
if (this.setNewcomer == '0') {
// 修改当前普通用户经纪商信息
const postData = {}
postData.agentId = this.ruleForm.parentId
postData.userId = this.ruleForm.userId
res = await this.userApi.agentApi.createNormalAgent(postData)
} else {
// 修改当前用户为经纪商
res = await this.userApi.agentApi.create(this.ruleForm)
}
} else {
// 当前用户是经纪商
res = await this.userApi.agentApi.update(this.ruleForm)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment