| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace crmeb\services\async;
- use think\facade\Config;
- use crmeb\services\async\ActivityCalc;
- /**
- * 抢清仓活动
- *
- * 玩法:
- * 指定一个清仓分类. 该分类下的所有商品在一个周期内一起开奖,
- * 中奖的退款并赔款, 未中奖的安排发货.
- *
- * 在宣传中, 抢到的发货, 未抢到的退款并赔款.
- *
- * Class ClearanceCalc
- * @package crmeb\services\async
- */
- class ClearanceCalc extends ActivityCalc{
- // 活动代号
- protected static $NAME = 'clr';
- protected function getId() {
- return Config::get('activity.clearance_cate_id');
- }
- protected function getName() {
- return self::$NAME;
- }
- protected function getNameCN() {
- return '抢神';
- }
- protected function repRate() {
- return 0.2;
- }
- protected function getResult($leftwin=true) {
- return 0;
- }
- protected function leaningJudge($index, $product, $attr) {
- return $index % 2 != 0;
- }
- }
|