bobing_901_6

This commit is contained in:
dengbw
2021-09-01 16:56:25 +08:00
parent d0cd8310ad
commit 810f47ce02
4 changed files with 56 additions and 41 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ class Home extends Wxapp
$menulist[] = array('title' => '预约试驾', 'url' => '/pages/buyCar/detail/index?id=13', 'img' => $img_url . '/bobing/2021/icon-mine-4.png');
$menulist[] = array('title' => '我的海报', 'url' => '/bobing/pages/game/invite/index', 'img' => $img_url . '/bobing/2021/icon-mine-2.png');
$menulist[] = array('title' => '联系客服', 'url' => '/pages/', 'img' => $img_url . '/bobing/2021/icon-mine-3.png');
$menulist[] = array('title' => '狸车首页', 'url' => 'lc://switchTab/pages/index/index', 'img' => $img_url . '/bobing/2021/icon-mine-5.png');
$menulist[] = array('title' => '关于狸车', 'url' => 'lc://switchTab/pages/index/index', 'img' => $img_url . '/bobing/2021/icon-mine-5.png');
$data = array(
"title" => $this->appConfig['title'],
"credit" => array('title' => '幸运分', 'value' => $credit),
+20 -16
View File
@@ -32,13 +32,13 @@ class Bo extends Base
$popup = array('title' => '邀请好友', 'content' => $content, 'btn' => array('title' => '立即邀请', 'url' => '/bobing/pages/game/invite/index'));
return array('status' => 1, 'popup' => $popup);
}
$mc = &load_cache();
$key = 'LiChe_bobing_' . $this->act_key . $this->app_id . $this->uid;
$timeout = $mc->get($key);
if ($timeout && (time() - $timeout) < 2) {
return array('status' => API_CODE_FAIL, 'content' => '您操作太快了,速度越慢越能博到状元,刷新页面再试试');
}
$mc->save($key, time());
// $mc = &load_cache();
// $key = 'LiChe_bobing_' . $this->act_key . $this->app_id . $this->uid;
// $timeout = $mc->get($key);
// if ($timeout && (time() - $timeout) < 2) {
// return array('status' => API_CODE_FAIL, 'content' => '您操作太快了,速度越慢越能博到状元,刷新页面再试试');
// }
// $mc->save($key, time());
$this->ci->load->library('bobing/dice');
$this->ci->dice->init();
$size_result = $this->ci->dice->getResultArr();
@@ -95,13 +95,13 @@ class Bo extends Base
$popup = array('title' => '开桌', 'content' => $content, 'btn' => array('title' => '立即开桌', 'url' => '/bobing/pages/game/index'));
return array('status' => 2, 'popup' => $popup);
}
$mc = &load_cache();
$key = 'LiChe_bobing_' . $this->act_key . $this->app_id . $this->uid;
$timeout = $mc->get($key);
if ($timeout && (time() - $timeout) < 2) {
return array('status' => API_CODE_FAIL, 'msg' => '您操作太快了,速度越慢越能博到状元,刷新页面再试试');
}
$mc->save($key, time());
// $mc = &load_cache();
// $key = 'LiChe_bobing_' . $this->act_key . $this->app_id . $this->uid;
// $timeout = $mc->get($key);
// if ($timeout && (time() - $timeout) < 2) {
// return array('status' => API_CODE_FAIL, 'msg' => '您操作太快了,速度越慢越能博到状元,刷新页面再试试');
// }
// $mc->save($key, time());
$this->ci->load->library('bobing/dice');
$this->ci->dice->init();
$size_result = $this->ci->dice->getResultArr();
@@ -195,7 +195,9 @@ class Bo extends Base
$data['type'] == 2 && $up_data["wxqy"] = 1;//加企业微信
$this->ci->bobing_user_model->update($up_data, $map);
$map['bo_date'] = $data['bo_date'];
if ($this->ci->bobing_user_credit_model->cache('get', array($map, 'id'))) {
$re_c = $this->ci->bobing_user_credit_model->get($map);
if ($re_c) {
//if ($this->ci->bobing_user_credit_model->cache('get', array($map, 'id'))) {
$this->ci->bobing_user_credit_model->update(array("credit = credit+{$data['credit']}" => null), $map);
} else {
$map['credit'] = $data['credit'];
@@ -207,7 +209,9 @@ class Bo extends Base
$map_my = array('act_key' => $data['act_key'], 'app_id' => $data['app_id'], 'uid' => $data['cf_uid']);
$this->ci->bobing_user_model->update(array("credit = credit+{$data['credit']}" => null), $map_my);
$map_my['bo_date'] = $data['bo_date'];
if ($this->ci->bobing_user_credit_model->cache('get', array($map_my, 'id'))) {
$re_c = $this->ci->bobing_user_credit_model->get($map_my);
if ($re_c) {
//if ($this->ci->bobing_user_credit_model->cache('get', array($map_my, 'id'))) {
$this->ci->bobing_user_credit_model->update(array("credit = credit+{$data['credit']}" => null), $map_my);
} else {
$map_my['credit'] = $data['credit'];
+11 -11
View File
@@ -95,7 +95,7 @@ class Dice
static public function show_result_msg($resultlevel, &$resultname, &$istop)
{
if ($resultlevel == 0) {
$resultname = "鱼鱼加油 再试一次";
$resultname = "加油 再试一次";
} else if ($resultlevel == Dice::RESULT_YX) {
$resultname .= " 一马当先";
} else if ($resultlevel == Dice::RESULT_EJ) {
@@ -261,17 +261,17 @@ class Dice
{
$level = $level == false ? $this->_resultLevel : $level;
$arr = array(
self::RESULT_ZYCJH => 80, //状元插金花
self::RESULT_LBHONG => 60, //六勃红
self::RESULT_ZYCJH => 110, //状元插金花
self::RESULT_LBHONG => 100, //六勃红
//self::RESULT_BD => 13, //遍地锦
self::RESULT_LBHEI => 50, //六勃黑
self::RESULT_WH => 45, //五红
self::RESULT_WZDYX => 40, //五子带一秀
self::RESULT_WZ => 35, //五子
self::RESULT_ZY => 30, //状元
self::RESULT_DT => 15, //对堂
self::RESULT_SH => 8, //三红
self::RESULT_SJ => 4, //四进
self::RESULT_LBHEI => 90, //六勃黑
self::RESULT_WH => 80, //五红
self::RESULT_WZDYX => 70, //五子带一秀
self::RESULT_WZ => 60, //五子
self::RESULT_ZY => 50, //状元
self::RESULT_DT => 20, //对堂
self::RESULT_SH => 10, //三红
self::RESULT_SJ => 5, //四进
self::RESULT_EJ => 2, //二举
self::RESULT_YX => 1, //一秀
self::RESULT_FH => 0, //罚黑
+24 -13
View File
@@ -36,23 +36,34 @@ class Bobing_user_model extends Base_model
$config = array(
'title' => 'LiChe博饼', 'content' => '2021闽南博饼嘉年华', 'game_start_date' => '2021-07-20', 'game_end_date' => '2021-09-31',
'group' => array('title' => '添加小狸', 'btn' => '加小狸企业微信', 'tips' => '通过后送288幸运分'),
'app_id' => 1, 'act_key' => $act_key, 'kz_nums' => 5, 'zl_nums' => 3, 'wxqy_nums' => 288, 'ratio_hong_bao' => 50, 'ratio_car_gold' => 50,
'app_id' => 1, 'act_key' => $act_key, 'kz_nums' => 25, 'zl_nums' => 15, 'wxqy_nums' => 288, 'ratio_hong_bao' => 50, 'ratio_car_gold' => 50,
'max_car_gold' => 500, 'buy_car_gold' => 500, 'hong_bao_day' => 1000, 'lottery_nums' => 10,
'rule' => array('title' => '活动流程及规则', 'content' => '
<div>1.通过投放、社群、经销商等渠道,获取种子用户,种子用户发起活动,通过汽车大奖、iPHONE大奖,吸引开桌用户;</div>
<div>2.开桌用户可以直接获得5次博饼次数,博饼次数用完后,通过邀请助力用户为其博饼,双方可获得如下福利</div>
<div>一、活动时间:2021年9月9日10:00-2021年10月8日15:00</div>
<div>二、活动流程及规则</div>
<div>1. 开桌用户可以直接获得5次博饼次数,博饼次数用完后,通过邀请助力用户为其博饼,双方可获得如下奖励</div>
<div>1)开桌用户:</div>
<div>&nbsp;&nbsp;① 获得购车金:助力用户每次助力博饼,随机为开桌用户获得一定金额的购车金,购车金累计最高为500元</div>
<div>&nbsp;&nbsp;② 获得幸运分: 助力用户每次助力博饼,根据博出的结果,为开桌用户获得不同的幸运分:一秀1分、二举2分、四进5分、三红10分、对堂20分、状元50分</div>
<div> 获得购车金:助力用户每次助力博饼,随机为开桌用户获得一定金额的购车金,购车金可以累计使用</div>
<div> 获得幸运分: 助力用户每次助力博饼,根据博出的结果,为开桌用户获得不同的幸运分:一秀1分、二举2分、四进5分、三红10分、对堂20分、状元50分</div>
<div>2)助力用户:</div>
<div>&nbsp;&nbsp;① 获得购车金:助力用户每次助力博饼,随机获得0.30元 - 0.68元不等现金红包,点击“立即开桌”后,即可到账(微信钱包</div>
<div>&nbsp;&nbsp;② 获得幸运分: 助力用户每次助力博饼,根据博出的结果,同时为自己获得幸运分:一秀1分、二举2分、四进5分、三红10分、对堂20分、状元50分…</div>
<div>3.所有用户添加小狸企业微信,即可获得288幸运分</div>
<div>4.添加小狸后,自动获取微信小程序链接,9.9元换购500元购车金,与博饼开桌获得的购车金合并,形成1000元购车金</div>
<div>5.每日博饼幸运分进入排行榜,前10名可获得100元购物卡(每位用户活动期间只能获得一次);</div>
<div>6.开桌用户活动期间累计博饼幸运分,进入总排行榜,前11名可获得大奖:</div>
<div>&nbsp;&nbsp;① 第1名获得雷丁芒果大奖</div>
<div>&nbsp;&nbsp;② 第2-11名获得iPHONE 13大奖</div>'),
<div> 获得购车金:助力用户每次助力博饼,随机获得现金红包,现金红包直接进入获奖用户的微信钱包;</div>
<div> 获得幸运分: 助力用户每次助力博饼,根据博出的结果,同时为自己获得幸运分:一秀1分、二举2分、四进5分、三红10分、对堂20分、状元50分…</div>
<div>2. 所有用户均可通过添加狸车企业微信,获得288幸运分</div>
<div>3. 每日博饼幸运分进入日排行榜,前10名可获得购物卡1张;</div>
<div>4. 开桌用户活动期间累计博饼幸运分进入排行榜</div>
<div> 1)单周博饼幸运分排行榜</div>
<div> ① 活动期间设置3个单周饼幸运分排行榜,单周博饼幸运分排名第一的用户,将获得iPhone13 手机一只(每位用户活动期间只能获得一次)</div>
<div> ② 单周饼幸运分排行榜周期:9月13日-9月19日、9月20日-9月26日、9月27日-10月3日</div>
<div>2)饼幸运分总排行榜</div>
<div> ① 活动期间博饼幸运分排名第一的用户,将获得新能源汽车一台(个人偶然所得税自理)</div>
<div> ② 活动期间博饼幸运分排名第二至第八的用户,将获得iPhone13 手机一只(已获得单周排行榜手机大奖用户不重复获取,顺延至下一位)</div>
<div>5. 关于购车金</div>
<div>(1)活动期间用户博取的购车金及9.9元换购的500元购车金均可累计使用;</div>
<div>(2)使用范围为:厦门、泉州、漳州</div>
<div>(3)使用的品牌或车型为:雷丁芒果、东风新能源EX1、哪吒汽车、零跑汽车、奇瑞小蚂蚁、欧拉黑猫、欧拉白猫、欧拉好猫</div>
<div>(4)购车金在指定经销商处使用,用户可在经销商处协商好购车价后,再提出购车金抵扣,不影响正常车辆优惠政策;</div>
<div>6. 任何问题均可联系新能源汽车顾问解答 (联系新能源汽车顾问按钮)</div>
<div>7. 在法律允许范围内,主办方拥有对本次活动的最终解释权。</div>'),
'gift' => array(
array('id' => 1, 'title' => '第一名', 'img' => 'https://qs.haodian.cn/wechat_app/liche/bobing/2021/gift_box_tip_1.jpg'),
array('id' => 2, 'title' => '第2`11名', 'img' => 'https://qs.haodian.cn/wechat_app/liche/bobing/2021/gift_box_tip_2.jpg'),