mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 01:40:16 +00:00
90 lines
3.5 KiB
PHP
90 lines
3.5 KiB
PHP
<?php
|
|
|
|
return [
|
|
'balance' => [
|
|
'key' => 'balance',
|
|
'name' => '送红包', // 礼包名称
|
|
'desc' => '发放红包', // 礼包说明
|
|
'component' => '/src/app/views/member/components/gift-balance.vue',
|
|
'grant' => function($member_id, $config, $param) {
|
|
$account_type = \app\dict\member\MemberAccountTypeDict::BALANCE;
|
|
$service = new \app\service\core\member\CoreMemberAccountService();
|
|
$service->addLog($member_id, $account_type, $config['money'], $param['from_type'] ?? '', $param['memo'] ?? '', $param['related_id'] ?? '');
|
|
},
|
|
'content' => [
|
|
'admin' => function($config) {
|
|
return "{$config['money']}元红包";
|
|
},
|
|
// 会员等级
|
|
'member_level' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['money']}元",
|
|
'background' => '/static/resource/images/member/gift/gift_balance_bg.png'
|
|
];
|
|
return $content;
|
|
},
|
|
// 会员签到(日签)
|
|
'member_sign' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['money']}元",
|
|
'icon' => '/static/resource/images/member/sign/packet.png'
|
|
];
|
|
return $content;
|
|
},
|
|
// 会员签到(连签)
|
|
'member_sign_continue' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['money']}元",
|
|
'icon' => '/static/resource/images/member/sign/packet01.png'
|
|
];
|
|
return $content;
|
|
}
|
|
]
|
|
],
|
|
'point' => [
|
|
'key' => 'point',
|
|
'name' => '送积分', // 礼包名称
|
|
'desc' => '发放积分', // 礼包说明
|
|
'component' => '/src/app/views/member/components/gift-point.vue',
|
|
'grant' => function($member_id, $config, $param) {
|
|
$account_type = \app\dict\member\MemberAccountTypeDict::POINT;
|
|
$service = new \app\service\core\member\CoreMemberAccountService();
|
|
$service->addLog($member_id, $account_type, $config['num'], $param['from_type'] ?? '', $param['memo'] ?? '', $param['related_id'] ?? '');
|
|
},
|
|
'content' => [
|
|
'admin' => function($config) {
|
|
return "{$config['num']}积分";
|
|
},
|
|
'member_level' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['num']}积分",
|
|
'background' => '/static/resource/images/member/gift/gift_point_bg.png'
|
|
];
|
|
return $content;
|
|
},
|
|
// 会员签到(日签)
|
|
'member_sign' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['num']}积分",
|
|
'icon' => '/static/resource/images/member/sign/point.png'
|
|
];
|
|
return $content;
|
|
},
|
|
// 会员签到(连签)
|
|
'member_sign_continue' => function($config) {
|
|
$content = [];
|
|
$content[] = [
|
|
'text' => "{$config['num']}积分",
|
|
'icon' => '/static/resource/images/member/sign/point01.png'
|
|
];
|
|
return $content;
|
|
}
|
|
]
|
|
]
|
|
];
|