作者 郭鑫
1 个管道 的构建 通过 耗费 1 秒

页面修改

... ... @@ -198,15 +198,18 @@ class MemberController extends CommentController
// 取消订单/确认完成
public function changeStatus(){
$data = $this->request->param();
$where_order['id'] = $data['id'];
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'];
}
$order = Db::name('Order')->where($where_order)->find();
if($order){
if($data['type'] == 1){
// 取消
... ...
... ... @@ -85,10 +85,10 @@ function def() {
" <div class=\"footbtn\">\n" ;
// 2待审核,3审核通过,待付款,4审核未通过,5已取消,6待完成,7待评价,8已评价
if(val.orderStatus == 3){
html += "<p class=\"cancelorder\" onclick='change("+val.id+",1)'>取消订单</p>\n" +
html += "<p class=\"cancelorder\" onclick='change("+val.id+","+val.logId+",1)'>取消订单</p>\n" +
" <p class=\"sureorder \" onclick='toPay("+val.id+")'>付款</p>" ;
}else if(val.orderStatus == 6){
html += "<p class=\"sureorder\" onclick='change("+val.id+",2)'>确认完成</p>" ;
html += "<p class=\"sureorder\" onclick='change("+val.id+","+val.logId+",2)'>确认完成</p>" ;
}else if(val.orderStatus == 7){
html += "<p class=\"sureorder\" onclick='common("+val.id+")'>评价</p>\n" ;
}
... ...