智慧教务系统 PHP-NiuCloud框架开发
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
3.5 KiB

<?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;
}
]
]
];