Authored by yangyang

修改订单status判断。

@@ -27,8 +27,7 @@ class Yohobuy @@ -27,8 +27,7 @@ class Yohobuy
27 const API_URL = 'http://test2.open.yohobuy.com/'; 27 const API_URL = 'http://test2.open.yohobuy.com/';
28 const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; 28 const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
29 const YOHOBUY_URL = 'http://www.yohobuy.com/'; 29 const YOHOBUY_URL = 'http://www.yohobuy.com/';
30 - const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order  
31 -/'; //我的订单 30 + const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order/'; //我的订单
32 const API_URL_MYCENTER = 'http://192.168.102.205:8081/users/'; // 我的个人中心接口URL 31 const API_URL_MYCENTER = 'http://192.168.102.205:8081/users/'; // 我的个人中心接口URL
33 const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL 32 const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
34 const API_URL_PRODUCTDETAIL = 'http://192.168.102.205:8083/product/'; // 商品详情页 33 const API_URL_PRODUCTDETAIL = 'http://192.168.102.205:8083/product/'; // 商品详情页
@@ -57,54 +57,43 @@ class OrderModel @@ -57,54 +57,43 @@ class OrderModel
57 $result[$key]['canceled'] = true; 57 $result[$key]['canceled'] = true;
58 $result[$key]['orderStatus'] = '已取消'; 58 $result[$key]['orderStatus'] = '已取消';
59 break; 59 break;
60 - }  
61 - if ($vo['paymentType'] != 2) {  
62 - switch ($vo['ordersStatus']) { 60 + }
  61 + switch ($vo['status']) {
63 case 0: 62 case 0:
64 $result[$key]['unpaid'] = true; 63 $result[$key]['unpaid'] = true;
65 - $result[$key]['orderStatus'] = '付款'; 64 + $result[$key]['orderStatus'] = '付款';
66 break; 65 break;
67 //未发货&未收货 状态,统一合并到待收货状态。 66 //未发货&未收货 状态,统一合并到待收货状态。
68 case 1: 67 case 1:
  68 + $result[$key]['orderStatus'] = '已付款';
  69 + $result[$key]['unreceived'] = true;
  70 + break;
69 case 2: 71 case 2:
  72 + $result[$key]['orderStatus'] = '备货中';
  73 + $result[$key]['unreceived'] = true;
  74 + break;
70 case 3: 75 case 3:
71 - $result[$key]['orderStatus'] = '已付款'; 76 + $result[$key]['orderStatus'] = '配货中';
72 $result[$key]['unreceived'] = true; 77 $result[$key]['unreceived'] = true;
73 break; 78 break;
74 case 4: 79 case 4:
75 - case 5:  
76 $result[$key]['orderStatus'] = '已发货'; 80 $result[$key]['orderStatus'] = '已发货';
77 - $result[$key]['unreceived'] = true;  
78 - //待收货状态,给查看物流url  
79 $result[$key]['logisticsUrl'] = "暂无logisticsUrl数据"; 81 $result[$key]['logisticsUrl'] = "暂无logisticsUrl数据";
  82 + $result[$key]['unreceived'] = true;
80 break; 83 break;
81 - case 6:  
82 - $result[$key]['orderStatus'] = '交易成功';  
83 - $result[$key]['completed'] = true;  
84 - break;  
85 - default:  
86 - break;  
87 - }  
88 - } elseif ($vo['paymentType'] == 2) {  
89 - switch ($vo['ordersStatus']) {  
90 - case 0:  
91 - case 1:  
92 - case 2:  
93 - case 3:  
94 - case 4:  
95 case 5: 84 case 5:
96 - $result[$key]['orderStatus'] = '备货中';  
97 - $result[$key]['unreceived'] = true;  
98 - //待收货状态,给查看物流url 85 + $result[$key]['orderStatus'] = '运输中';
99 $result[$key]['logisticsUrl'] = "暂无logisticsUrl数据"; 86 $result[$key]['logisticsUrl'] = "暂无logisticsUrl数据";
  87 + $result[$key]['unreceived'] = true;
100 break; 88 break;
101 case 6: 89 case 6:
  90 + $result[$key]['orderStatus'] = '交易成功';
102 $result[$key]['completed'] = true; 91 $result[$key]['completed'] = true;
103 break; 92 break;
104 default: 93 default:
105 break; 94 break;
106 } 95 }
107 - } 96 +
108 } while (false); 97 } while (false);
109 } 98 }
110 } 99 }
@@ -127,7 +116,7 @@ class OrderModel @@ -127,7 +116,7 @@ class OrderModel
127 $arr = array(); 116 $arr = array();
128 foreach ($ordersGoodsList as $key => $vo) { 117 foreach ($ordersGoodsList as $key => $vo) {
129 $arr[$key]['thumb'] = Helpers::getImageUrl($vo['goodsImg'][0]['imageUrl'], 90, 120); 118 $arr[$key]['thumb'] = Helpers::getImageUrl($vo['goodsImg'][0]['imageUrl'], 90, 120);
130 - $arr[$key]['name'] = $vo['goodsName']; 119 + $arr[$key]['name'] = $vo['productName'];
131 $arr[$key]['color'] = $vo['colorName']; 120 $arr[$key]['color'] = $vo['colorName'];
132 $arr[$key]['size'] = $vo['sizeName']; 121 $arr[$key]['size'] = $vo['sizeName'];
133 $arr[$key]['price'] = $vo['goodsPrice']; 122 $arr[$key]['price'] = $vo['goodsPrice'];
@@ -224,7 +213,6 @@ class OrderModel @@ -224,7 +213,6 @@ class OrderModel
224 $code = self::CODE_STROLL; 213 $code = self::CODE_STROLL;
225 //调用接口获得数据 214 //调用接口获得数据
226 $data = OrderData::strollData($gender, $yh_channel, $code); 215 $data = OrderData::strollData($gender, $yh_channel, $code);
227 - $stroll = 1;  
228 //检查数据返回是否正常,正常则处理数据 216 //检查数据返回是否正常,正常则处理数据
229 if ($data['code'] == 200) { 217 if ($data['code'] == 200) {
230 $strollUrl = $data['data'][0]['data'][0]['url']; 218 $strollUrl = $data['data'][0]['data'][0]['url'];