qifengquan 1 年之前
父節點
當前提交
c16c438909
共有 2 個文件被更改,包括 672 次插入223 次删除
  1. 22 0
      application/api/controller/User.php
  2. 650 223
      public/api.html

+ 22 - 0
application/api/controller/User.php

@@ -6,12 +6,14 @@ use app\admin\model\Goods;
 use app\common\controller\Api;
 use app\common\library\Ems;
 use app\common\library\Sms;
+use app\common\library\Token;
 use app\common\model\Order;
 use app\common\model\OrderInvoice;
 use fast\Random;
 use think\Config;
 use think\Db;
 use think\Exception;
+use think\Hook;
 use think\Validate;
 
 /**
@@ -429,6 +431,16 @@ class User extends Api
         }
     }
     /**
+     * 注销用户
+     */
+    public function cancellation(){
+        if (\app\common\model\User::update(['status'=>'lock'],['id'=>$this->auth->id])){
+            $this->auth->logout();
+            $this->success('注销成功');
+        }
+        $this->error('注销失败');
+    }
+    /**
      * 我的订单列表
      * @ApiMethod (POST)
      * @ApiReturnParams (name="uid",description="用户id")
@@ -631,4 +643,14 @@ class User extends Api
         }
         $this->success('请求成功',$data);
     }
+    /**
+     * 发票确认收货
+     * @ApiParams (name="id")
+     */
+    public function invoice_receive(){
+        $res = OrderInvoice::where('id',input('id'))->update(['status'=>3]);
+        if ($res){
+            $this->success('收货成功');
+        }
+    }
 }

文件差異過大導致無法顯示
+ 650 - 223
public/api.html


部分文件因文件數量過多而無法顯示