From 6df42f81cdb5e05453b863b28c91986fd6a2b131 Mon Sep 17 00:00:00 2001
From: 王智 <wz@bronet.cn>
Date: Tue, 8 Sep 2020 17:05:12 +0800
Subject: [PATCH] baoxiu

---
 application/api/controller/Index.php | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/application/api/controller/Index.php b/application/api/controller/Index.php
index d9825bb..dc9942b 100644
--- a/application/api/controller/Index.php
+++ b/application/api/controller/Index.php
@@ -529,26 +529,21 @@ class Index extends Api
         $param = $this->request->param();
         if ($param['type'] == 0) {
             $is_genghuan = 2;
-//            $status = 0;
+            $status = 0;
         } else {
-            if ($param['type'] == 1) {
-                $is_genghuan = 1;
-//                $status = 0;
-            } else {
-                $is_genghuan = 1;
-//                $status = 1;
-            }
+            $is_genghuan = 1;
+            $status = 1;
         }
         $res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
             [
                 'is_genghuan' => $is_genghuan,
                 'price' => $param['type'],
-//                'status' => $status,
+                'status' => $status,
                 'repair_type' => 1,
             ]
         );
         if ($res) {
-            $this->success('成功', 1);
+            $this->success('成功', $status);
         } else {
             $this->error('失败', 0);
         }
--
libgit2 0.24.0