Selaa lähdekoodia

feat: 优化没有头像的显示默认头像

xiansin 2 vuotta sitten
vanhempi
commit
eeeb934273

+ 1 - 1
server/app/Admin/Controllers/Market/UserRechargeRecordController.php

xqd
@@ -25,7 +25,7 @@ class UserRechargeRecordController extends AdminController
             $grid->column('avatar','用户')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';

+ 1 - 1
server/app/Admin/Controllers/Order/UserConsumeRecordController.php

xqd
@@ -23,7 +23,7 @@ class UserConsumeRecordController extends AdminController
             $grid->column('user_id','用户')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';

+ 1 - 1
server/app/Admin/Controllers/Order/UserEpisodesRecordController.php

xqd
@@ -24,7 +24,7 @@ class UserEpisodesRecordController extends AdminController
             $grid->column('user_id')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';

+ 1 - 1
server/app/Admin/Controllers/Order/UserRechargeRecordController.php

xqd
@@ -26,7 +26,7 @@ class UserRechargeRecordController extends AdminController
             $grid->column('user_id')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';

+ 1 - 1
server/app/Admin/Controllers/Share/UserController.php

xqd
@@ -24,7 +24,7 @@ class UserController extends AdminController
             $grid->column('avatar', '基本信息')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->mobile . '</p>';

+ 1 - 1
server/app/Admin/Controllers/Share/UserWithdrawController.php

xqd
@@ -24,7 +24,7 @@ class UserWithdrawController extends AdminController
             $grid->column('avatar', '基本信息')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= "</div>";

+ 1 - 1
server/app/Admin/Controllers/UserController.php

xqd
@@ -29,7 +29,7 @@ class UserController extends AdminController
             $grid->column('avatar')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->nickname . '</p>';
                 $str .= "</div>";

+ 1 - 1
server/app/Admin/Controllers/UserVipRecordController.php

xqd
@@ -24,7 +24,7 @@ class UserVipRecordController extends AdminController
             $grid->column('user_id')->display(function () {
                 $str  = "";
                 $str .= "<div style='margin-right:10px;display: flex;align-items: center'>";
-                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
+                $str .= '<img data-action="preview-img" src="' . $this->user->avatar . '" onerror="this.src=\'https://fourtiao.oss-cn-beijing.aliyuncs.com/zhangsiye/images/6b40343b27263be34cf3212bf44f74c3.png\'" style="height:50px;width:50px;cursor:pointer;margin-right:10px;" class="img img-thumbnail">';
                 $str .= '<div>';
                 $str .= '<p style="margin-bottom: 5px">' . $this->user->nickname . '</p>';
                 $str .= '<p style="margin-bottom: 0px">' . $this->user->mobile . '</p>';