dever 3 years ago
parent
commit
c9881a39b0

+ 1 - 1
service/option/database/account.php

@@ -187,7 +187,7 @@ return array
             'option'    => $is_idcard,
             'search'    => 'select',
             //'update'    => 'radio',
-            'list'      => !$search_stype ? false : true,
+            'list'      => !$search_stype ? false : 'Dever::load("option/lib/account.getIdcard", {id})',
             'list_order' => 3,
         ),
 

+ 23 - 0
service/option/lib/Account.php

@@ -6,6 +6,29 @@ use Dever;
 
 class Account
 {
+    public function getIdcard($id)
+    {
+        if ($id < 0) {
+            return '无';
+        }
+        $account = Dever::db('option/account')->find($id);
+        if ($account && $account['is_idcard'] == 1) {
+            $html = '已上传';
+
+            $table = array();
+            if ($account['idcard_front']) {
+                $table['正面'] = '<img src="'.$account['idcard_front'].'" width="150">';
+            }
+            if ($account['idcard_back']) {
+                $table['背面'] = '<img src="'.$account['idcard_back'].'" width="150">';
+            }
+            $html .= Dever::table($table);
+            return $html;
+        } else {
+            return '未上传';
+        }
+    }
+
     public function getInfo($id)
     {
         if ($id < 0) {

+ 1 - 1
service/option/lib/Email.php

@@ -86,7 +86,7 @@ class Email
         $mail->SMTPAuth = true;
         $mail->Username = $config['username'];
         $mail->Password = $config['password'];
-        $mail->setFrom($config['from'][0], $config['from'][1]);
+        $mail->setFrom($config['from'][0], '期权管理系统');
         $mail->addAddress($email, $username);
         $mail->Subject = "=?utf-8?B?" . base64_encode($title) . "?=";
         $mail->Body = $content;