简介:
电竞赏金电竞系统源码 APP+H5双端 附搭建教程 支持运营级搭建
可搭建!运营级!首次公开!
赏金赛源码,用户通过平台打比赛,赢了获得奖金奖励,
金币赛、赏金赛、vip赛等种赛事
可开王者荣耀、和平精英比赛
支持1v1、单排、双排组、战队排等多种比赛模式
支持QQ区、微信区
游戏玩的好的玩家可以通过打比赛赚钱
平台可以通过比赛抽水 、会员充值、手续费盈利
设备需求:服务器+域名运营级源码 ,可二开!
支付配置:对接支付宝。
位置:/application/config.php
第304行,修改为自己的支付宝配置。
`<?php
namespace app\index\controller;
use app\common\controller\Frontend;
use app\common\model\Config;
use Three\EasyWechat;
use app\api\model\orders\Sums;
use app\api\model\store\Store;
use app\api\model\orders\Orders;
use app\api\service\PayService;
class Index extends Frontend
{
protected $noNeedLogin = '*';
protected $noNeedRight = '*';
protected $layout = '';
public function index()
{
echo '暂未开放...';
exit;
return $this->view->fetch();
}
public function pay()
{
$id = $this->request->param('id','');
if (empty($id)) {
$this->error('参数错误');
}
$this->assign('id',$id);
$p_order = Sums::get(['order_no'=>$id]);
if (!$p_order) {
$this->error('获取订单失败');
}
//$p_order->pay_price = 0.01;
/* if ($p_order->success_num <= 0 || $p_order->pay_price < 0.01) {
$this->error('支付金额有误');
}
if ($p_order['status'] != '0' || $p_order['paytime'] || $p_order['pay_log']) {
$this->error('状态异常');
}
//待品鉴
$not_upload = Orders::where(['type'=>'sign','order_sum_id'=>$p_order['id'],'status'=>'1'])->count();
if (intval($not_upload)>0) {
$this->error(__('还有待评鉴的报名订单,暂不支持结算'));
}
//待审核
$not_check = Orders::where(['type'=>'sign','order_sum_id'=>$p_order['id']])->where(" status = '2' or status = '3' ")->count();
if (intval($not_check)>0) {
$this->error(__('还有待审核的报名订单,暂不支持结算'));
} */
$this->assign('p_order', $p_order);
$store = Store::get($p_order['store_id']);
if (!$store) {
$this->error('获取店铺失败');
}
/* if ($store['price']<0.01) {
$this->error('商家餐标设置有误');
} */
$this->assign('store', $store);
$list = Orders::with('user')->where(['order_sum_id'=>$p_order['id'],'status'=>'4'])->select();
$list = collection($list)->toArray();
if ($list) {
foreach ($list as $key=>$val){
$image = [];
$waimai_order_image = $val['waimai_order_image'] ? explode(',', $val['waimai_order_image']) : [];
$image = array_merge($image, $waimai_order_image);
$waimai_comment_image = $val['waimai_comment_image'] ? explode(',', $val['waimai_comment_image']) : [];
$image = array_merge($image, $waimai_comment_image);
foreach ($image as &$img){
$img = cdnurl($img,true);
}
unset($img);
$list[$key]['images'] = $image;
}
}
$this->assign('list', $list);
// $service = new PayService();
// $pay_url =
s
e
r
v
i
c
e
−
>
m
a
k
e
H
5
U
s
e
r
P
r
e
O
r
d
e
r
(
service->makeH5UserPreOrder(
service−>makeH5UserPreOrder(p_order);
//
// $this->assign(‘pay_url’, $pay_url);
// $this->assign(‘pay_url’, ‘’);
return $this->view->fetch();
}
public function topay()
{
$id =
t
h
i
s
−
>
r
e
q
u
e
s
t
−
>
p
a
r
a
m
(
′
i
d
′
,
′
′
)
;
i
f
(
e
m
p
t
y
(
this->request->param('id',''); if (empty(
this−>request−>param(′id′,′′);if(empty(id)) {
$this->error(‘参数错误’);
}
p
o
r
d
e
r
=
S
u
m
s
:
:
g
e
t
(
[
′
o
r
d
e
r
n
o
′
=
>
p_order = Sums::get(['order_no'=>
porder=Sums::get([′orderno′=>id]);
if (!$p_order) {
$this->error(‘获取订单失败’);
}
$service = new PayService();
$pay_url =
s
e
r
v
i
c
e
−
>
m
a
k
e
H
5
U
s
e
r
P
r
e
O
r
d
e
r
(
service->makeH5UserPreOrder(
service−>makeH5UserPreOrder(p_order);
return $pay_url;
}
}
`