Sfoglia il codice sorgente

领取证书用户名调整

赵启卫 2 anni fa
parent
commit
341cde16fc

+ 2 - 0
application/wap/model/topic/CertificateRecord.php

xqd
@@ -86,7 +86,9 @@ class CertificateRecord extends ModelBasic
     {
         $certificate = self::setWhere($uid)->where(['id' => $id, 'obtain' => $obtain])->find();
         if (!$certificate) return [];
+        $realname = User::where('uid', $uid)->value('realname');
         $certificate['certificate'] = Certificate::getone($certificate['cid'], $obtain);
+        $certificate['realname'] = $realname ? $realname : $certificate['nickname'];
         return $certificate;
     }
 

+ 1 - 1
application/wap/view/first/special/details.html

xqd
@@ -1932,7 +1932,7 @@
 
                         context.font = 'bold 34px sans-serif';
                         context.fillStyle = '#29466D';
-                        context.fillText(certificate.nickname, 300, 296);
+                        context.fillText(certificate.realname, 300, 296);
 
                         context.font = '24px sans-serif';
                         context.fillText('颁发时间:' + moment(certificate.add_time * 1000).format('YYYY.MM.DD'), 300, 481);