|
@@ -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('收货成功');
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|