songxingwei 2 gadi atpakaļ
vecāks
revīzija
6331707581
2 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 3 1
      app/common.php
  2. 2 2
      app/data/controller/api/Auth.php

+ 3 - 1
app/common.php

@@ -6,6 +6,7 @@ use AlibabaCloud\SDK\Cloudauth\V20190307\Models\InitFaceVerifyRequest;
 use AlibabaCloud\Tea\Exception\TeaError;
 use AlibabaCloud\Tea\Utils\Utils;
 use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions;
+use app\data\model\DataUserRepair;
 use Darabonba\OpenApi\Models\Config;
 use think\admin\model\SystemConfig;
 use app\common\library\QRcode;
@@ -180,7 +181,8 @@ function setword($type,$id){
     switch ($type){
         case 1:
             $templateProcessor = new TemplateProcessor($dir.'/wxdd.docx');
-            $templateProcessor->setValue('order_no','1234');
+            $info = DataUserRepair::mk()->findOrEmpty($id);
+            $templateProcessor->setValue('order_no',$info['order_no']);
             $templateProcessor->setValue('date','2023-02-20 15:05:50');
             $templateProcessor->setValue('fbz','张三');
             $templateProcessor->setValue('jdf','李四');

+ 2 - 2
app/data/controller/api/Auth.php

@@ -81,7 +81,7 @@ abstract class Auth extends Controller
             }
             if($this->uuid) {
                 $user = UserAdminService::get($this->uuid, $this->type);
-                if (!$user['status']) $this->error('账户已被冻结!',null);
+                if (!$user['status']) $this->error('账户已被冻结!',null,401);
                 return $user;
             }
             return [];
@@ -99,7 +99,7 @@ abstract class Auth extends Controller
     protected function checkUserStatus()
     {
         if (empty($this->user['status'])) {
-            $this->error('账户已被冻结!');
+            $this->error('账户已被冻结!',null,401);
         }
     }