gorden 1 miesiąc temu
rodzic
commit
ec21ce495d

+ 1 - 1
app/admin/controller/client/EvaluateController.php

@@ -154,7 +154,7 @@ class EvaluateController extends Curd
 
         if (!empty($evaluate->info)){
             $evaluate->info->member_info_headimg = $evaluate->info->member_info_headimg ?? getenv('STORAGE_DOMAIN').'/images/avatar_default.png';
-            $evaluate->info->member_info_nickname ?? substr($evaluate->member->member_mobile,-4).'用户';
+            $evaluate->info->member_info_nickname ?? substr($evaluate->member->member_mobile,-4).'会员';
         }
         if (!empty($evaluate->goods)){
             $evaluate->goods->goods_cover = getenv('STORAGE_DOMAIN').$evaluate->goods->goods_cover;

+ 8 - 2
app/admin/controller/order/KangyangCityController.php

@@ -78,7 +78,7 @@ class KangyangCityController extends Curd
             $goodsOrderIds = OrderSheet::whereIn('join_sheet_goods_id', $goodsIds)->pluck('join_sheet_order_id')->toArray();
             if (!empty($where['order_id'])) {
                 $orderIds = array_intersect($orderIds, $goodsOrderIds);
-            }else{
+            } else {
                 $orderIds = $goodsOrderIds;
             }
         }
@@ -957,10 +957,16 @@ class KangyangCityController extends Curd
                         }
                     }
                 }
-                $item['member']['level'] = '普通用户';
+                $item['member']['level'] = '普通会员';
                 if (!empty($item['member']['join_member_role_id'])) {
                     $item['member']['level'] = MemberRole::where('member_role_id', $item['member']['join_member_role_id'])->value('member_role_name');
                 }
+
+                if (!empty($item['member_info'])){
+                    if (empty($item['member_info']['member_info_headimg']) || substr($item['member_info']['member_info_headimg'],0,1) == '.'){
+                        $item['member_info']['member_info_headimg'] = "https://img.wanyuewellness.com.cn/images/avatar_default.png";
+                    }
+                }
             }
             $order->sheet_amount = number_format($sheetAmount, 2);
 

+ 8 - 2
app/admin/controller/order/WholeController.php

@@ -459,10 +459,16 @@ class WholeController extends Curd
                         }
                     }
                 }
-                $item['member']['level'] = '普通用户';
+                $item['member']['level'] = '普通会员';
                 if (!empty($item['member']['join_member_role_id'])) {
                     $item['member']['level'] = MemberRole::where('member_role_id', $item['member']['join_member_role_id'])->value('member_role_name');
                 }
+
+                if (!empty($item['member_info'])){
+                    if (empty($item['member_info']['member_info_headimg']) || substr($item['member_info']['member_info_headimg'],0,1) == '.'){
+                        $item['member_info']['member_info_headimg'] = "https://img.wanyuewellness.com.cn/images/avatar_default.png";
+                    }
+                }
             }
             $order->sheet_amount = number_format($sheetAmount, 2);
 
@@ -4543,7 +4549,7 @@ class WholeController extends Curd
             if (!empty($item['member']) && $item['member']['member_mobile'] == '0000') {
                 $memberName = '散客';
             } else {
-                $memberName = !empty($item['cert']) ? $item['cert']['member_cert_name'] : (!empty($item['member']) ? (substr($item['member']['member_mobile'], -4) . '用户' . '-') : '');
+                $memberName = !empty($item['cert']) ? $item['cert']['member_cert_name'] : (!empty($item['member']) ? (substr($item['member']['member_mobile'], -4) . '会员' . '-') : '');
                 if (!empty($item['member'])) {
                     $memberName .= $item['member']['member_mobile'];
                 }

+ 3 - 3
app/admin/service/member/MemberService.php

@@ -267,7 +267,7 @@ class MemberService
         $exportData = [];
         foreach ($rows as $row) {
             $row['info'] = [
-                'member_info_nickname' => !empty($row['member_info_nickname']) ? $row['member_info_nickname'] : substr($row['member_mobile'], -4, 4) . '用户',
+                'member_info_nickname' => !empty($row['member_info_nickname']) ? $row['member_info_nickname'] : substr($row['member_mobile'], -4, 4) . '会员',
                 'member_info_headimg' => !empty($row['member_info_headimg']) ? $row['member_info_headimg'] : '',
                 'member_info_referee' => !empty($row['member_info_referee']) ? $row['member_info_referee'] : '',
                 'member_info_business' => !empty($row['member_info_business']) ? $row['member_info_business'] : '',
@@ -322,7 +322,7 @@ class MemberService
                 'cash' => isset($account['cash']) ? $account['cash']['member_account_surplus'] + $account['cash']['member_account_added'] : 0,
                 'points' => isset($account['points']) ? $account['points']['member_account_surplus'] + $account['points']['member_account_added'] : 0,
                 'is_auth' => $row['is_auth'],
-                'level' => $row['member_role_name'] ?? '普通用户',
+                'level' => $row['member_role_name'] ?? '普通会员',
                 'member_addtimes' => $row['member_addtimes'],
                 'member_info_referee' => $row['info']['member_info_referee'] ?? '',
                 'member_info_business' => $row['info']['member_info_business'] ?? '',
@@ -343,7 +343,7 @@ class MemberService
         }
         $member = $member->toArray();
         $member['info'] = [
-            'member_info_nickname' => !empty($member['info']) && !empty($member['info']['member_info_nickname']) ? $member['info']['member_info_nickname'] : substr($member['member_mobile'], -4, 4) . '用户',
+            'member_info_nickname' => !empty($member['info']) && !empty($member['info']['member_info_nickname']) ? $member['info']['member_info_nickname'] : substr($member['member_mobile'], -4, 4) . '会员',
             'member_info_headimg' => !empty($member['info']) && !empty($member['info']['member_info_headimg']) ? $member['info']['member_info_headimg'] : '',
             'member_info_referee' => !empty($member['info']) && !empty($member['info']['member_info_referee']) ? $member['info']['member_info_referee'] : '',
             'member_info_business' => !empty($member['info']) && !empty($member['info']['member_info_business']) ? $member['info']['member_info_business'] : '',

+ 8 - 6
app/model/OrderSheet.php

@@ -37,7 +37,7 @@ class OrderSheet extends Model
     public function memberInfo()
     {
         return $this->hasOne(MemberInfo::class, 'join_info_member_id', 'join_sheet_member_id')
-            ->select('join_info_member_id', 'member_info_nickname');
+            ->select('join_info_member_id', 'member_info_nickname', 'member_info_headimg');
     }
 
     public function cert()
@@ -100,16 +100,18 @@ class OrderSheet extends Model
             ->select('join_running_goods_id', 'goods_running_storage', 'goods_running_sale');
     }
 
-    public function skus(){
-        return $this->hasMany(GoodsSku::class,'join_sku_goods_id','join_sheet_goods_id');
+    public function skus()
+    {
+        return $this->hasMany(GoodsSku::class, 'join_sku_goods_id', 'join_sheet_goods_id');
     }
 
     public function sku()
     {
         return $this->hasOne(GoodsSku::class, 'goods_sku_id', 'join_sheet_goods_sku_id');
     }
-    
-    public function benefit(){
-        return $this->hasMany(MemberBenefit::class,'join_benefit_order_id','join_sheet_order_id');
+
+    public function benefit()
+    {
+        return $this->hasMany(MemberBenefit::class, 'join_benefit_order_id', 'join_sheet_order_id');
     }
 }