|
|
@@ -212,20 +212,19 @@ class Model_express_tt extends Lin_Model {
|
|
|
|
|
|
//获取订单承运的快递商
|
|
|
private function getExpressCompany($info,$shop_info){
|
|
|
- // if(is_string($info['extra_text'])){
|
|
|
- // $extra_text = json_decode($info['extra_text'],true);
|
|
|
- // }else{
|
|
|
- // $extra_text = $info['extra_text'];
|
|
|
- // }
|
|
|
- // if(isset($extra_text['server_info'])){
|
|
|
- // return [
|
|
|
- // 'x'=>1,
|
|
|
- // 'msg'=>'获取成功',
|
|
|
- // 'data'=>$info
|
|
|
- // ];
|
|
|
- // }
|
|
|
+ if(is_string($info['extra_text'])){
|
|
|
+ $extra_text = json_decode($info['extra_text'],true);
|
|
|
+ }else{
|
|
|
+ $extra_text = $info['extra_text'];
|
|
|
+ }
|
|
|
+ if(isset($extra_text['server_info'])){
|
|
|
+ return [
|
|
|
+ 'x'=>1,
|
|
|
+ 'msg'=>'获取成功',
|
|
|
+ 'data'=>$info
|
|
|
+ ];
|
|
|
+ }
|
|
|
$res = $this->apitt->getExpressCompany($info,$shop_info);
|
|
|
- print_r($res);
|
|
|
if($res['code'] != 0){
|
|
|
return [
|
|
|
'x'=>0,
|
|
|
@@ -247,20 +246,19 @@ class Model_express_tt extends Lin_Model {
|
|
|
|
|
|
//创建发货单和运单标签
|
|
|
private function createExpressLabel($info,$shop_info){
|
|
|
- // if(is_string($info['extra_text'])){
|
|
|
- // $extra_text = json_decode($info['extra_text'],true);
|
|
|
- // }else{
|
|
|
- // $extra_text = $info['extra_text'];
|
|
|
- // }
|
|
|
- // if(isset($extra_text['label_info'])){
|
|
|
- // return [
|
|
|
- // 'x'=>1,
|
|
|
- // 'msg'=>'获取成功',
|
|
|
- // 'data'=>$info
|
|
|
- // ];
|
|
|
- // }
|
|
|
+ if(is_string($info['extra_text'])){
|
|
|
+ $extra_text = json_decode($info['extra_text'],true);
|
|
|
+ }else{
|
|
|
+ $extra_text = $info['extra_text'];
|
|
|
+ }
|
|
|
+ if(isset($extra_text['label_info'])){
|
|
|
+ return [
|
|
|
+ 'x'=>1,
|
|
|
+ 'msg'=>'获取成功',
|
|
|
+ 'data'=>$info
|
|
|
+ ];
|
|
|
+ }
|
|
|
$res = $this->apitt->createLabel($info,$shop_info);
|
|
|
- print_r($res);
|
|
|
if($res['code'] != 0){
|
|
|
return [
|
|
|
'x'=>0,
|
|
|
@@ -286,7 +284,6 @@ class Model_express_tt extends Lin_Model {
|
|
|
$extra_text = json_decode($info['extra_text'],true);
|
|
|
$packageid = $extra_text['label_info']['packageid'];
|
|
|
$res = $this->apitt->downloadLabel($packageid,$shop,$info);
|
|
|
- print_r($res);
|
|
|
if($res['code'] != 0){
|
|
|
return [
|
|
|
'x'=>0,
|