在这个文件里面可以获取当前已经登录用户的id嘛 迅睿框架 更新 2022-04-17 20:13:33 多一边 在这个文件里面可以获取当前已经登录用户的id嘛?App/Notice/Models/Notice.php这个文件。如果能获取是怎么样写?应用版权:官方应用名称:提醒消息
public function add_notice($uid, $type, $note, $url = '', $mark = '') { if (!$uid || !$note) { return ''; } $uids = is_array($uid) ? $uid : explode(',', $uid); foreach ($uids as $uid) { $this->db->table('member_notice')->insert([ 'uid' => $uid, //自己增加代(这里对嘛?获取当前已经登录id) 'touid' => $this->uid, 'type' => max(1, (int)$type), 'isnew' => 1, 'content' => $note, 'url' => (string)$url, 'mark' => (string)$mark, 'inputtime' => SYS_TIME, ]); } return ''; }<?php namespace Phpcmf\Model\Notice; class Notice extends \Phpcmf\Model { /** * 添加一条通知 * * @param string $uid * @param string $note * @return null */ public function add_notice($uid, $type, $note, $url = '', $mark = '') { if (!$uid || !$note) { return ''; } $touid = $this->uid; $uids = is_array($uid) ? $uid : explode(',', $uid); foreach ($uids as $uid) { $this->db->table('member_notice')->insert([ 'uid' => $uid, //自己增加代(这里对嘛?获取当前已经登录id) 'touid' => $touid, 'type' => max(1, (int)$type), 'isnew' => 1, 'content' => $note, 'url' => (string)$url, 'mark' => (string)$mark, 'inputtime' => SYS_TIME, ]); } return ''; } }这里的