...
|
...
|
@@ -198,39 +198,19 @@ class MemberController extends CommentController |
|
|
// 取消订单/确认完成
|
|
|
public function changeStatus(){
|
|
|
$data = $this->request->param();
|
|
|
|
|
|
if($data['type'] == 1){
|
|
|
// 取消
|
|
|
$where_order['id'] = $data['id'];
|
|
|
$where_order['status'] = 3;
|
|
|
$order = Db::name('Order')->where($where_order)->find();
|
|
|
}else if($data['type'] == 2){
|
|
|
// 确认完成
|
|
|
$where_order['status'] = 6;
|
|
|
$where_order['id'] = $data['logId'];
|
|
|
}
|
|
|
|
|
|
$where_order['id'] = $data['id'];
|
|
|
$where_order['status'] = 3;
|
|
|
$order = Db::name('Order')->where($where_order)->find();
|
|
|
if($order){
|
|
|
if($data['type'] == 1){
|
|
|
// 取消
|
|
|
$up['status'] = 5;
|
|
|
}else if($data['type'] == 2){
|
|
|
// 确认完成
|
|
|
$up['status'] = 7;
|
|
|
}
|
|
|
$up['status'] = 5;
|
|
|
$up['update_time'] = time();
|
|
|
$res = Db::name('Order')->where($where_order)->update($up);
|
|
|
if($data['type'] == 1){
|
|
|
// 取消
|
|
|
$meg = '取消';
|
|
|
}else if($data['type'] == 2){
|
|
|
// 确认完成
|
|
|
$meg = '确认完成';
|
|
|
}
|
|
|
if($res){
|
|
|
$this->apiResponse('1',$meg."成功");
|
|
|
$this->apiResponse('1',"取消成功");
|
|
|
}else{
|
|
|
$this->apiResponse('0',$meg.'取消失败');
|
|
|
$this->apiResponse('0','取消失败');
|
|
|
}
|
|
|
}else{
|
|
|
$this->apiResponse('0','状态错误');
|
...
|
...
|
@@ -238,6 +218,27 @@ class MemberController extends CommentController |
|
|
|
|
|
}
|
|
|
|
|
|
// 确认完成
|
|
|
public function sureStatus(){
|
|
|
$data = $this->request->param();
|
|
|
// 确认完成
|
|
|
$where_order['status'] = 6;
|
|
|
$where_order['id'] = $data['id'];
|
|
|
$log = Db::name('CompareLog')->where($where_order)->find();
|
|
|
if($log){
|
|
|
$up['status'] = 7;
|
|
|
$up['update_time'] = time();
|
|
|
$res = Db::name('CompareLog')->where($where_order)->update($up);
|
|
|
if($res){
|
|
|
$this->apiResponse('1',"确认完成成功");
|
|
|
}else{
|
|
|
$this->apiResponse('0','确认完成失败');
|
|
|
}
|
|
|
}else{
|
|
|
$this->apiResponse('0','状态错误');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 评价1
|
|
|
public function common(){
|
|
|
if($this->request->isPost()){
|
...
|
...
|
|