小程序会员权益页入会类型接口

This commit is contained in:
2026-04-25 14:28:27 +08:00
parent a9751ef42c
commit 97b77e179d

View File

@@ -14,9 +14,10 @@ use app\common\controller\Api;
class MemberBenefits extends Api class MemberBenefits extends Api
{ {
protected $noNeedLogin = ['index']; protected $noNeedLogin = ['join_config', 'index'];
protected $noNeedRight = ['*']; protected $noNeedRight = ['*'];
protected $join_config_model = null;
protected $level_model = null; protected $level_model = null;
protected $benefits_model = null; protected $benefits_model = null;
protected $article_model = null; protected $article_model = null;
@@ -24,11 +25,27 @@ class MemberBenefits extends Api
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
$this->join_config_model = new \app\api\model\wdsxh\member\JoinConfig();
$this->level_model = new \app\api\model\wdsxh\member\Level(); $this->level_model = new \app\api\model\wdsxh\member\Level();
$this->benefits_model = new \app\api\model\wdsxh\member\MemberBenefits(); $this->benefits_model = new \app\api\model\wdsxh\member\MemberBenefits();
$this->article_model = new \app\api\model\wdsxh\article\Article(); $this->article_model = new \app\api\model\wdsxh\article\Article();
} }
/**
* 入会类型
*
* @param type $param
* @return \think\Response
*/
public function join_config()
{
$list = $this->join_config_model->field(['id', 'name'])
->where('status', 'normal')
->order(['weigh' => 'asc', 'id' => 'asc'])
->select();
$this->success('获取成功', $list);
}
/** /**
* 根据入会类型查询会员级别及权益(每个级别下展示入会类型所有权益,并标记拥有状态) * 根据入会类型查询会员级别及权益(每个级别下展示入会类型所有权益,并标记拥有状态)
* *