From 6e0b38b0ea6669d532e9d2279a81ca3963e0f3ad Mon Sep 17 00:00:00 2001
From: liyaozhi <lzhflash@163.com>
Date: Thu, 13 Nov 2025 00:14:05 +0800
Subject: [PATCH] 1、小程序端列出所有报名人员名单(含姓名); 2、优化活动促销商品; 3、优化小程序端活动详情页; 4、优化后台连盟活动修改页面,并展示促销商品; 5、参与活动人员积分设置改到职务里添加。
---
admin/app/common/model/branch/Member.php | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/admin/app/common/model/branch/Member.php b/admin/app/common/model/branch/Member.php
index 1ba5f6e..9eaa5f7 100644
--- a/admin/app/common/model/branch/Member.php
+++ b/admin/app/common/model/branch/Member.php
@@ -5,6 +5,7 @@
use app\common\model\BaseModel;
use app\common\model\user\User as UserModel;
use app\common\model\branch\Branch as BranchModel;
+use app\common\model\settings\Region;
/**
* 连盟成员模型
@@ -13,6 +14,12 @@
{
protected $name = 'branch_member';
protected $pk = 'user_id';
+
+ /**
+ * 追加字段
+ * @var string[]
+ */
+ protected $append = ['region'];
/**
* 关联所属分会表
@@ -40,6 +47,32 @@
}
/**
+ * 关联职务
+ */
+ public function position()
+ {
+ return $this->belongsTo('app\\common\\model\\branch\\Position', 'position_id', 'position_id');
+ }
+
+ /**
+ * 籍贯
+ * @param $value
+ * @param $data
+ * @return array
+ */
+ public function getRegionAttr($value, $data)
+ {
+ if (!isset($data['province_id'])) {
+ return false;
+ }
+ return [
+ 'province' => Region::getNameById($data['province_id']),
+ 'city' => Region::getNameById($data['city_id']),
+ 'region' => $data['region_id'] == 0 ? '' : Region::getNameById($data['region_id']),
+ ];
+ }
+
+ /**
* 详情
*/
public static function detail($user_id, $with = ['user'])
--
Gitblit v1.9.2