电竞赏金源码 APP+H5

简介:
电竞赏金电竞系统源码 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;
}
}
`

  • 22
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AALoveTouch

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值