Pārlūkot izejas kodu

重构修改地址

stanley-king 8 gadi atpakaļ
vecāks
revīzija
da307c4661

+ 4 - 0
helper/pay_helper.php

@@ -53,6 +53,8 @@ class pay_helper
         if($left_cents == 0)
         {
             $output['need_pay'] = false;
+            $output['tips'] = "已经用红包支付完成";
+
             $payinfo = self::update_order($pay_sn, $pay_sn, 'bonus');  // 更新订单
             // 推送到oms
             if (isset($payinfo) && $payinfo['state'])
@@ -90,6 +92,8 @@ class pay_helper
             $order_sn = $payinfo['data']['order_list'][0]['order_sn'];
 
             $output['need_pay'] = true;
+            $output['tips'] = "";
+
             $third_param = $pay->gen_pay($pay_sn,$left_cents,$order_sn,$subject);
             $output['param'] = $third_param;
 

+ 23 - 0
mobile/control/member_buy.php

@@ -96,6 +96,29 @@ class member_buyControl extends mbMemberControl
         }
     }
 
+    public function change_addrexOp()
+    {
+        $logic_buy = Logic('buy');
+        $data = $logic_buy->changeAddr($_POST['freight_hash'], $_POST['city_id'], $_POST['area_id'], $_SESSION['member_id']);
+        if (!empty($data) && $data['state'] == 'success')
+        {
+            $result['offpay_hash'] = $data['offpay_hash'];
+            $result['offpay_hash_batch'] = $data['offpay_hash_batch'];
+
+            $freight = 0.00;
+            foreach ($data['content'] as $value) {
+                $freight += $value['value'];
+            }
+            $result['freight'] = $freight;
+
+            return self::outsuccess($result);
+        } else {
+            return self::outerr(errcode::ErrOrder, '地址修改失败');
+        }
+    }
+
+    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
     /**
      * 购物车、直接购买第一步:选择收获地址和配置方式
      */

+ 1 - 1
mobile/framework/function/function.php

@@ -43,7 +43,7 @@ function joutput_data($datas,$type='')
     $data['code'] = $code;
     $data['message'] = errcode::msg($code);
     $data['datas'] = $datas;
-
+//    ob_clean();
     if(!empty($type) && $type == 'web') {
         echo(json_encode($data,JSON_UNESCAPED_UNICODE));
     } else {