Authored by yangyang

修改订单status判断。

... ... @@ -27,8 +27,7 @@ class Yohobuy
const API_URL = 'http://test2.open.yohobuy.com/';
const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order
/'; //我的订单
const YOHOBUY_ORDER = 'http://192.168.102.205:8084/order/'; //我的订单
const API_URL_MYCENTER = 'http://192.168.102.205:8081/users/'; // 我的个人中心接口URL
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
const API_URL_PRODUCTDETAIL = 'http://192.168.102.205:8083/product/'; // 商品详情页
... ...
... ... @@ -58,53 +58,42 @@ class OrderModel
$result[$key]['orderStatus'] = '已取消';
break;
}
if ($vo['paymentType'] != 2) {
switch ($vo['ordersStatus']) {
switch ($vo['status']) {
case 0:
$result[$key]['unpaid'] = true;
$result[$key]['orderStatus'] = '付款';
$result[$key]['orderStatus'] = '付款';
break;
//未发货&未收货 状态,统一合并到待收货状态。
case 1:
$result[$key]['orderStatus'] = '已付款';
$result[$key]['unreceived'] = true;
break;
case 2:
$result[$key]['orderStatus'] = '备货中';
$result[$key]['unreceived'] = true;
break;
case 3:
$result[$key]['orderStatus'] = '已付款';
$result[$key]['orderStatus'] = '配货中';
$result[$key]['unreceived'] = true;
break;
case 4:
case 5:
$result[$key]['orderStatus'] = '已发货';
$result[$key]['unreceived'] = true;
//待收货状态,给查看物流url
$result[$key]['logisticsUrl'] = "暂无logisticsUrl数据";
$result[$key]['unreceived'] = true;
break;
case 6:
$result[$key]['orderStatus'] = '交易成功';
$result[$key]['completed'] = true;
break;
default:
break;
}
} elseif ($vo['paymentType'] == 2) {
switch ($vo['ordersStatus']) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
$result[$key]['orderStatus'] = '备货中';
$result[$key]['unreceived'] = true;
//待收货状态,给查看物流url
$result[$key]['orderStatus'] = '运输中';
$result[$key]['logisticsUrl'] = "暂无logisticsUrl数据";
$result[$key]['unreceived'] = true;
break;
case 6:
$result[$key]['orderStatus'] = '交易成功';
$result[$key]['completed'] = true;
break;
default:
break;
}
}
} while (false);
}
}
... ... @@ -127,7 +116,7 @@ class OrderModel
$arr = array();
foreach ($ordersGoodsList as $key => $vo) {
$arr[$key]['thumb'] = Helpers::getImageUrl($vo['goodsImg'][0]['imageUrl'], 90, 120);
$arr[$key]['name'] = $vo['goodsName'];
$arr[$key]['name'] = $vo['productName'];
$arr[$key]['color'] = $vo['colorName'];
$arr[$key]['size'] = $vo['sizeName'];
$arr[$key]['price'] = $vo['goodsPrice'];
... ... @@ -224,7 +213,6 @@ class OrderModel
$code = self::CODE_STROLL;
//调用接口获得数据
$data = OrderData::strollData($gender, $yh_channel, $code);
$stroll = 1;
//检查数据返回是否正常,正常则处理数据
if ($data['code'] == 200) {
$strollUrl = $data['data'][0]['data'][0]['url'];
... ...