本帖最后由 phoben 于 2019-8-16 14:09 编辑
通过论坛和帮助文档,已知两种创建用户方法(前端)。
第一种用API:addUser 但是没找到如何设置自定义属性的值。
第二种方法是用POST: Forguncy.Common.forguncyPostSync 这个函数确实找到了例子,但是没有具体说明,例子里是可以,我拿来用就不行,比如例子里对data类的一些定义:
- var data = {
- account: p.getCell("username").getValue(),
- password: p.getCell("password").getValue(),
- nicheng: p.getCell("nicheng").getValue(),
- mail: p.getCell("email").getValue(),
- exPropertyName1: p.getCell("exPropertyName1").getValue(),
- exPropertyValue1: p.getCell("exPropertyValue1").getValue(),</font>
- exPropertyName2: p.getCell("exPropertyName2").getValue(),</font>
- exPropertyValue2: p.getCell("exPropertyValue2").getValue(),</font>
- exPropertyName3: p.getCell("exPropertyName3").getValue(),</font>
- exPropertyValue3: p.getCell("exPropertyValue3").getValue()</font>
- //如果我删掉2、3部分就无法运行
- };
复制代码 这样测试没问题,但是拿掉2个 exPropertyName 点击注册就没反应,留一个参数也不行,这是为什么?不是每个人注册都必须有3个自定义属性啊!
例如我改成下面这样,就不行!
- var data = {
- account: p.getCell("username").getValue(),
- password: p.getCell("password").getValue(),
- nicheng: p.getCell("nicheng").getValue(),
- mail: p.getCell("email").getValue(),
- exPropertyName1: p.getCell("exPropertyName1").getValue(),
- exPropertyValue1: p.getCell("exPropertyValue1").getValue()
- };
复制代码
|
|