getChangedData(); //如果有修改头像或昵称,同步到im if (isset($changed['companyname']) || isset($changed['avatar'])) { //user_用户端小程序,master_师傅,kefu_客服 $tenim = new Tenim(); $rs = $tenim->useredit('kefu_'. $row['id'], $row['companyname'], localpath_to_netpath($row['avatar'])); } }); } public function getStatusList() { return ['1' => __('Status 1'), '0' => __('Status 0')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } }