作者 王智

baoxiu

... ... @@ -628,23 +628,38 @@ class Index extends Api
$param = $this->request->param();
if ($param['type'] == 1) {
$status = 2;
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
'price' => $param['type'],
'status' => $status,
'king_type' => 1,
]
);
}
if ($param['type'] == 2) {
$status = 1;
$fuzeren = $param['con'];
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
'price' => $param['type'],
'status' => $status,
'fuzeren' => $fuzeren,
'king_type' => 1,
]
);
}
if ($param['type'] == 3) {
$status = 1;
$fuzeren = $param['con'];
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
'price' => $param['type'],
'status' => $status,
'fuzeren' => $fuzeren,
'king_type' => 1,
]
);
}
$res = Db::name('baoxiudan')->where(['id' => $param['id']])->update(
[
'price' => $param['type'],
'status' => $status,
'fuzeren' => $fuzeren,
'king_type' => 1,
]
);
if ($res) {
$this->success('成功', 1);
} else {
... ...