public function stuCardList($sid = 17) { $data = D('StudentCertificate')->stuCertificate($sid); $cardModel = D('Certificate'); foreach ($data as $k => $v) { $card = $cardModel->getCartType($v['certificate_id']); $data[$k]['card_type'] = $card['certificate_type']; $data[$k]['all_type'] = $cardModel->getCartTypeList($card['certificate_type']); } $this->assign('card', $data); $this->assign('tpl', false); $this->assign('CertificateType', AdminController::getCertificateType()); $html = $this->fetch('student_certificate'); return $html; }