updatePanelUser(userInfo: Object)

版本要求:
@ray-js/ray≥1.5.40
import { health } from '@ray-js/ray';

const { updatePanelUser } = health;

// Promise 调用
try {
  const res = await updatePanelUser({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

更新面板用户

参数

属性类型必填说明
是

返回值

类型:Promise<boolean>

合法值

userInfo.type
值说明最低版本
1--
2--
3--
6--
userInfo.sex
值说明最低版本
0--
1--
userInfo.heightUnit
值说明最低版本
cm--
inch--
userInfo.weightUnit
值说明最低版本
kg--
lb--
st--
jin--

示例代码

基础用法

import { health } from '@ray-js/ray'

health.updatePanelUser({
  userInfo: {
    userId: 'user123',
    devId: 'vdevo169477319679442',
    type: 1,
    userName: '张三',
    sex: 0,
    birthday: 946656000000,
    height: 178,
    heightUnit: 'cm',
    weight: 72,
    weightUnit: 'kg',
    userType: 1,
  },
}).then((success) => {
  console.log('更新结果:', success);
}).catch((error) => {
  console.error(error);
});