# Niushop开源商城通过插件开发会员行为
---
支付插件开发是针对3.1以上版本,实现统一化的会员操作行为功能进行设置的。
下面以会员签到插件的开发进行说明:
![](https://img.kancloud.cn/ad/84/ad84bb99ed02b669c14e7a871634279f_380x164.png)
* 后台功能操作,实现会员签到功能配置
![](https://img.kancloud.cn/e1/a0/e1a06ebdf1c064dcb6c17cfaf52bc9e4_1312x879.png)
![](https://img.kancloud.cn/81/d7/81d7f0728c38da65be8b5bd15bf79c35_1800x726.png)
* 钩子功能配置 1. 获取行为配置,实现获取行为相关配置信息,方便前台获取信息的时候调用
```php
/**
* 获取行为设置
* @param unknown $params
*/
public function getMemberActionConfig($params = [])
{
$arr = [
'name' => $this->info['name'],
'title' => $this->info['title'],
'ico' => $this->info['ico'],
'description' => $this->info['description'],
'index' => 'MemberSign/index'
];
if (isset($params['type'])) {
if ($params['type'] == 'all' || $params['type'] == $this->info['name']) {
return $arr;
}
}
return [];
}
```
* 钩子功能配置 2. 实现会员行为操作 memberAction
```php
/**
* 会员签到行为
*
* @param unknown $params
*/
public function memberAction($params = [])
{
if (empty($params['uid']) || empty($params['type']) || $params['type'] != $this->info['name']) {
return 0;
}
$member_sign = new MemberSignService();
$is_sign_in = $member_sign->isSignIn($params['uid']);
return $is_sign_in;
}
```