终极提交~

This commit is contained in:
2019-10-27 20:15:29 +08:00
parent df11660e6a
commit 4131f1ac50
17 changed files with 588 additions and 118 deletions

View File

@ -114,32 +114,61 @@ class Orders extends Base{
$flag = -1;
$type = input('param.type');
$status = [];
switch ($type) {
case 'waitPay':
$status=[-2];
break;
case 'waitDeliver':
$status=[0];
break;
case 'waitReceive':
$status=[1];
break;
case 'waitAppraise':
$status=[2];
$flag=0;
break;
case 'finish':
$status=[2];
break;
case 'abnormal': // 退款/拒收 与取消合并
$status=[-1,-3];
break;
default:
$status=[-5,-4,-3,-2,-1,0,1,2];
break;
}
$m = new M();
$rs = $m->userOrdersByPage($status,$flag);
$m = new M();
if(strpos($type, "zg")===0){
switch ($type) {
case 'zgwaitPay':
$status=[-2];
break;
case 'zgwaitDeliver':
$status=[0];
break;
case 'zgwaitReceive':
$status=[1];
break;
case 'zgwaitAppraise':
$status=[2];
$flag=0;
break;
case 'zgfinish':
$status=[2];
break;
case 'zgabnormal': // 退款/拒收 与取消合并
$status=[-1,-3];
break;
case 'zgall':
default:
$status=[-5,-4,-3,-2,-1,0,1,2];
break;
}
$rs = $m->userZgOrdersByPage($status,$flag);
}else{
switch ($type) {
case 'waitPay':
$status=[-2];
break;
case 'waitDeliver':
$status=[0];
break;
case 'waitReceive':
$status=[1];
break;
case 'waitAppraise':
$status=[2];
$flag=0;
break;
case 'finish':
$status=[2];
break;
case 'abnormal': // 退款/拒收 与取消合并
$status=[-1,-3];
break;
default:
$status=[-5,-4,-3,-2,-1,0,1,2];
break;
}
$rs = $m->userOrdersByPage($status,$flag);
}
foreach($rs['Rows'] as $k=>$v){
if(!empty($v['list'])){
foreach($v['list'] as $k1=>$v1){
@ -152,6 +181,17 @@ class Orders extends Base{
exit(jsonReturn('',1,$rs));
}
public function confirmHelpSale(){
$m = new M();
$id = (int)input('orderId');
exit(jsonReturn('',1,$m->confirmHelpSale($id)));
}
public function cancelHelpSale(){
$m = new M();
$id = (int)input('orderId');
exit(jsonReturn('',1,$m->cancelHelpSale($id)));
}
/**
* 订单详情
*/