diff --git a/Application/Base/Tool/GameResource/LeyouClient.class.php b/Application/Base/Tool/GameResource/LeyouClient.class.php index 126cad57d..316ef6050 100644 --- a/Application/Base/Tool/GameResource/LeyouClient.class.php +++ b/Application/Base/Tool/GameResource/LeyouClient.class.php @@ -85,13 +85,20 @@ class LeyouClient public function apply($order, $role) { - $result = $this->api('provide', [ + $data = [ 'role_id' => $role['role_id'], - 'money' => intval($order['ref_amount']) * 10, - 'type' => 2, - // 'goods_id' => 0, 'server_no' => $role['server_id'], - ]); + ]; + + if ($order['ref_id'] < 100) { + $data['money'] = intval($order['ref_amount']) * 10; + $data['type'] = 2; + } else { + $data['goods_id'] = $order['ref_id']; + $data['type'] = 1; + } + + $result = $this->api('provide', $data); if ($result == 'SUCCESS') { return [ 'status' => true, @@ -133,6 +140,18 @@ class LeyouClient 12 => ['ref_id' => 12, 'name' => '100000元宝', 'amount' => 10000], 13 => ['ref_id' => 13, 'name' => '200000元宝', 'amount' => 20000], 14 => ['ref_id' => 14, 'name' => '680元宝', 'amount' => 68], + 121246 => ['ref_id' => 121246, 'name' => '私人定制30元激活卡', 'amount' => 30], + 121247 => ['ref_id' => 121247, 'name' => '私人定制68元激活卡', 'amount' => 68], + 121248 => ['ref_id' => 121248, 'name' => '私人定制128元激活卡', 'amount' => 128], + 121249 => ['ref_id' => 121249, 'name' => '私人定制198元激活卡', 'amount' => 198], + 121250 => ['ref_id' => 121250, 'name' => '私人定制328元激活卡', 'amount' => 328], + 121251 => ['ref_id' => 121251, 'name' => '私人定制648元激活卡', 'amount' => 648], + 121252 => ['ref_id' => 121252, 'name' => '68元礼包激活卡', 'amount' => 68], + 121253 => ['ref_id' => 121253, 'name' => '98元礼包激活卡', 'amount' => 98], + 121254 => ['ref_id' => 121254, 'name' => '128元礼包激活卡', 'amount' => 128], + 121255 => ['ref_id' => 121255, 'name' => '198元礼包激活卡', 'amount' => 198], + 121256 => ['ref_id' => 121256, 'name' => '328元礼包激活卡', 'amount' => 328], + 121257 => ['ref_id' => 121257, 'name' => '648元礼包激活卡', 'amount' => 648], ]; /* return [ diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index faa94c69b..8681a24af 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -184,7 +184,7 @@ class HomeController extends Controller $this->error('访问错误'); } - $identifier = $code != '' ? $code : 'gid/' . $gameId . '/pid/' . $promoteId; + $identifier = $code != '' ? urldecode($code) : 'gid/' . $gameId . '/pid/' . $promoteId; $isBlack = M('device_bans', 'tab_')->where(['type' => 3, 'tag' => ['like', '%' . $identifier . '%']])->limit(1)->getField('id'); if ($isBlack) { $this->error('该链接已被禁');