feat(common): 新增师傅头像URL处理类统一生成头像地址

- 新增MasterAvatar类统一处理师傅头像URL生成逻辑
- 替换所有分散的cdnurl调用为统一类方法
- 优化后台师傅详情页表格响应式布局
- 更新应用版本号至1.0.92
这个提交包含在:
2026-11-20 11:27:56 +08:00
父节点 07f3349dd0
当前提交 8af5672aeb
共有 10 个文件被更改,包括 151 次插入 和 66 次删除

查看文件

@@ -35,7 +35,20 @@
.md-card-header { padding: 10px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; }
.md-card-title { font-size: 13.5px; font-weight: 700; color: #1e293b; margin: 0; display: flex; align-items: center; gap: 8px; }
.md-card-title i { color: #f97316; }
.md-card-body { padding: 16px; }
.md-card-body { padding: 16px; min-width: 0; }
.md-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.md-table-scroll table { min-width: 560px; }
.md-grid-list { min-width: 0; }
.md-item-v { min-width: 0; }
.master-detail-container .md-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 0 24px; }
@media (max-width: 900px) {
.master-detail-container > .row > .col-sm-6 { width: 100%; float: none; }
}
@media (max-width: 500px) {
.md-grid-list { grid-template-columns: 1fr !important; }
.md-grid-list .md-item { grid-column: auto !important; }
.md-kpi-grid { flex-wrap: wrap; }
}
.md-grid-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.md-item { display: flex; align-items: baseline; font-size: 13px; line-height: 1.5; }
@@ -48,11 +61,12 @@
.idcard-img-wrap .tag { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 11px; text-align: center; padding: 2px 0; }
</style>
<?php $masterAvatarUrl = \app\common\library\MasterAvatar::url($row['avatar']); ?>
<div class="master-detail-container">
<!-- 1. Hero 师傅名片 -->
<div class="md-hero">
<div class="md-hero-left">
<img class="md-avatar" src="{$row.avatar|default='/assets/img/avatar.png'|htmlentities}" onerror="this.src='/assets/img/avatar.png'" />
<img class="md-avatar" src="{$masterAvatarUrl|default='/assets/img/avatar.png'|htmlentities}" onerror="this.src='/assets/img/avatar.png'" />
<div>
<div class="md-info-name">
<span class="name-txt">{$row.realname|htmlentities}</span>
@@ -163,7 +177,7 @@
</div>
<div class="md-card-body">
{if !empty($certs)}
<table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 0;">
<div class="md-table-scroll"><table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 0;">
<thead><tr class="active"><th>证书名称</th><th>证件照片</th><th>有效期至</th><th>状态</th></tr></thead>
<tbody>
{foreach name="certs" item="ct"}
@@ -183,7 +197,7 @@
</tr>
{/foreach}
</tbody>
</table>
</table></div>
{else /}
<div style="text-align: center; color: #94a3b8; padding: 14px 0;">暂未上传技能资质证书</div>
{/if}
@@ -214,7 +228,7 @@
<div style="font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px;">近期工单结算分成:</div>
{if !empty($recentSettles)}
<table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 12px;">
<div class="md-table-scroll"><table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 12px;">
<thead><tr class="active"><th>工单号</th><th>订单总额</th><th>抽成</th><th>师傅所得</th><th>状态</th></tr></thead>
<tbody>
{foreach name="recentSettles" item="st"}
@@ -231,14 +245,14 @@
</tr>
{/foreach}
</tbody>
</table>
</table></div>
{else /}
<div class="text-muted" style="font-size:12px; margin-bottom:12px;">暂无结算入账记录</div>
{/if}
<div style="font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px;">近期提现申请记录:</div>
{if !empty($recentWithdraws)}
<table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 0;">
<div class="md-table-scroll"><table class="table table-bordered table-condensed" style="font-size: 12px; margin-bottom: 0;">
<thead><tr class="active"><th>申请金额</th><th>手续费</th><th>实到金额</th><th>渠道</th><th>状态</th></tr></thead>
<tbody>
{foreach name="recentWithdraws" item="w"}
@@ -256,7 +270,7 @@
</tr>
{/foreach}
</tbody>
</table>
</table></div>
{else /}
<div class="text-muted" style="font-size:12px;">暂无提现申请记录</div>
{/if}
@@ -272,7 +286,7 @@
</div>
<div class="md-card-body" style="padding: 12px 16px;">
{if !empty($recentReviews)}
<table class="table table-bordered table-condensed" style="font-size:12px; margin-bottom:0;">
<div class="md-table-scroll"><table class="table table-bordered table-condensed" style="font-size:12px; margin-bottom:0;">
<thead>
<tr class="active">
<th style="width:155px;">关联工单</th>
@@ -299,7 +313,7 @@
</tr>
{/foreach}
</tbody>
</table>
</table></div>
{else /}
<div style="text-align: center; color: #94a3b8; padding: 14px 0;">暂无客户评价记录</div>
{/if}
@@ -313,7 +327,7 @@
</div>
<div class="md-card-body" style="padding: 12px 16px;">
{if !empty($recentOrders)}
<table class="table table-bordered table-hover table-condensed" style="font-size: 12px; margin-bottom: 0;">
<div class="md-table-scroll"><table class="table table-bordered table-hover table-condensed" style="font-size: 12px; margin-bottom: 0;">
<thead>
<tr class="active">
<th>工单编号</th>
@@ -340,22 +354,19 @@
</tr>
{/foreach}
</tbody>
</table>
</table></div>
{else /}
<div style="text-align: center; color: #94a3b8; padding: 16px 0;">暂无接单履约历史</div>
{/if}
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-10" style="display:flex; gap:10px; align-items:center;">
<div class="md-footer">
{if $row.verify_status == 'pending'}
<a href="master/audit?ids={$row.id}" class="btn btn-warning btn-embossed btn-dialog" data-area='["920px", "88%"]' title="师傅资质审核 - {$row.realname|htmlentities}">
<i class="fa fa-check-square-o"></i> 立即审核该师傅
</a>
{/if}
<button type="button" class="btn btn-default btn-embossed" onclick="parent.Layer.closeAll();"><i class="fa fa-close"></i> 关闭档案</button>
</div>
</div>
</div>

查看文件

@@ -272,7 +272,8 @@
<div class="od-card-body">
{if $row.master_id && $row.master}
<div style="display:flex; align-items:center; gap:14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9;">
<img src="{$row.master.avatar|default='/assets/img/avatar.png'|htmlentities}" onerror="this.src='/assets/img/avatar.png'" style="width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #fed7aa;" />
<?php $orderMasterAvatarUrl = \app\common\library\MasterAvatar::url($row['master']['avatar']); ?>
<img src="{$orderMasterAvatarUrl|default='/assets/img/avatar.png'|htmlentities}" onerror="this.src='/assets/img/avatar.png'" style="width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #fed7aa;" />
<div>
<div style="font-size: 15px; font-weight: 700; color: #1e293b; display:flex; align-items:center; gap:8px;">
<span>{$row.master.realname|htmlentities}</span>