|
|
@@ -215,6 +215,18 @@ 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
|
|
|
+ ];
|
|
|
+ }
|
|
|
$res = $this->apitt->getExpressCompany($info,$shop_info);
|
|
|
if($res['code'] != 0){
|
|
|
return [
|
|
|
@@ -237,7 +249,19 @@ class Model_express_tt extends Lin_Model {
|
|
|
|
|
|
//创建发货单和运单标签
|
|
|
private function createExpressLabel($info,$shop_info){
|
|
|
- $res = $this->apitt->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
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $res = $this->apitt->createLabel($info,$shop_info);
|
|
|
if($res['code'] != 0){
|
|
|
return [
|
|
|
'x'=>0,
|