|
@@ -81,8 +81,9 @@ class OrderContractSvc{
|
|
|
|
|
|
public function jiafang(){
|
|
|
$tax=$this->getOrder()->tax;
|
|
|
+ $user=$this->getOrder()->user;
|
|
|
if(!$tax){
|
|
|
- return $this->getOrder()->user->nickname??'';
|
|
|
+ return self::getName($user);
|
|
|
}
|
|
|
if($tax['u_type']==1){
|
|
|
return $tax['name'];
|
|
@@ -91,6 +92,16 @@ class OrderContractSvc{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static function getName($user){
|
|
|
+ if(!$user){
|
|
|
+ return '-';
|
|
|
+ }
|
|
|
+ if($user['username']){
|
|
|
+ return $user['username'];
|
|
|
+ }
|
|
|
+ return $user['mobile'];
|
|
|
+ }
|
|
|
+
|
|
|
public function taxName(){
|
|
|
$tax=$this->getOrder()->tax;
|
|
|
if(empty($tax)){
|