feat: 完成二级分类真实实拍图替换与功能优化

本次提交内容包括:
1. 替换13个二级分类为真实商业实拍图,同步更新本地与线上数据库
2. 新增会员拨打额度耗尽引导开通会员功能
3. 优化发布页分类选择逻辑,增加会员权益展示
4. 修复分类名称显示问题,完善相关交互逻辑
5. 新增图片同步工具脚本,确保线上线下数据一致性
这个提交包含在:
2026-10-28 14:13:32 +08:00
父节点 111054d984
当前提交 f13fb6cdab
共有 47 个文件被更改,包括 3203 次插入 和 225 次删除

查看文件

@@ -6,7 +6,7 @@ use app\common\controller\Backend;
use think\Db;
/**
* 同城-分类管理(支持一级分类「蔬菜/水果」与带实拍图的二级分类)
* 同城-分类管理(支持一级主分类与各二级子品类)
*
* @icon fa fa-circle-o
*/
@@ -125,19 +125,32 @@ class Category extends Backend
}
/**
* 编辑分类(自动同步 image 与 icon_key)
* 编辑分类(自动补全图片路径并同步 image 与 icon_key)
*
* @param mixed $ids
* @return string
*/
public function edit($ids = null)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
$this->error(__('You have no permission'));
}
if ($this->request->isPost()) {
$params = $this->request->post('row/a', []);
$params = $this->normalizeCategoryParams($params, (int)$ids);
$this->request->post(['row' => $params]);
return parent::edit($ids);
}
return parent::edit($ids);
if (empty($row['image']) && !empty($row['icon_key'])) {
$row['image'] = $this->resolveImageFromKey($row['icon_key']);
}
$this->view->assign("row", $row);
return $this->view->fetch();
}
/**
@@ -193,7 +206,7 @@ class Category extends Backend
{
$iconKey = trim((string)$iconKey);
if ($iconKey === '') {
return '/static/categories/cat-veg.png';
return '/static/icons/cat-service.png';
}
if (preg_match('/^(\/uploads\/|\/static\/|https?:\/\/)/i', $iconKey)) {
return $iconKey;