Skip to content

Commit 7ce807f

Browse files
author
zhangjiangbin
committed
漏提文件补提
1 parent 945f938 commit 7ce807f

5 files changed

Lines changed: 187 additions & 1 deletion

File tree

‎app/Http/Models/ReferralApply.php‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace App\Http\Models;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
7+
/**
8+
* 返利申请
9+
* Class ReferralApply
10+
* @package App\Http\Models
11+
*/
12+
class ReferralApply extends Model
13+
{
14+
protected $table = 'referral_apply';
15+
protected $primaryKey = 'id';
16+
protected $fillable = [
17+
'user_id',
18+
'before',
19+
'after',
20+
'amount',
21+
'status',
22+
'created_at'
23+
];
24+
25+
}

‎app/Http/Models/ReferralLog.php‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Http\Models;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
7+
/**
8+
* 返利日志
9+
* Class ReferralLog
10+
* @package App\Http\Models
11+
*/
12+
class ReferralLog extends Model
13+
{
14+
protected $table = 'referral_log';
15+
protected $primaryKey = 'id';
16+
protected $fillable = [
17+
'user_id',
18+
'ref_user_id',
19+
'order_id',
20+
'amount',
21+
'ref_amount',
22+
'status',
23+
'created_at'
24+
];
25+
26+
}

‎app/Http/Models/UserBalanceLog.php‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace App\Http\Models;
4+
5+
use Illuminate\Database\Eloquent\Model;
6+
7+
/**
8+
* 账号余额操作日志
9+
* Class UserBalanceLog
10+
* @package App\Http\Models
11+
*/
12+
class UserBalanceLog extends Model
13+
{
14+
protected $table = 'user_balance_log';
15+
protected $primaryKey = 'id';
16+
public $timestamps = false;
17+
protected $fillable = [
18+
'user_id',
19+
'before',
20+
'after',
21+
'balance',
22+
'desc',
23+
'created_at'
24+
];
25+
26+
public function User()
27+
{
28+
return $this->hasOne(User::class, 'id', 'user_id');
29+
}
30+
}

‎readme.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ KVM
99
1010
使用 LNMP1.4 部署时请到/usr/local/php/etc/php.ini下搜索disable_functions,把proc_开头的函数都删掉
1111
12-
telegram:https://t.me/ssrpanel
12+
telegram频道:https://t.me/ssrpanel
13+
telegram群组:https://t.me/chatssrpanel
1314
1415
默认管理账号
1516
用户名:admin 密码:123456
@@ -28,6 +29,8 @@ telegram:https://t.me/ssrpanel
2829
| Law-杰 | ¥10 |
2930
| Err | ¥51 |
3031
| 緃噺開始 | ¥5 |
32+
|良心***| ¥67 |
33+
|、无奈|¥5|
3134

3235

3336

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
@extends('user.layouts')
2+
3+
@section('css')
4+
<link href="/assets/global/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css" />
5+
<style>
6+
.fancybox > img {
7+
width: 75px;
8+
height: 75px;
9+
}
10+
</style>
11+
@endsection
12+
@section('title', '控制面板')
13+
@section('content')
14+
<!-- BEGIN CONTENT BODY -->
15+
<div class="page-content">
16+
<!-- BEGIN PAGE BREADCRUMB -->
17+
<ul class="page-breadcrumb breadcrumb">
18+
<li>
19+
<a href="{{url('user/referral')}}">推广返利</a>
20+
<i class="fa fa-circle"></i>
21+
</li>
22+
</ul>
23+
<!-- END PAGE BREADCRUMB -->
24+
<!-- BEGIN PAGE BASE CONTENT -->
25+
<div class="row">
26+
<div class="col-md-12">
27+
<div class="alert alert-success">
28+
通过您的推广链接注册的账号可以获得 <code>{{$referral_traffic}}MiB流量</code> 奖励。您可以获得他们每笔消费的<code>{{$referral_percent * 100}}%现金返利</code>。累计满 <code>{{$referral_money}}元</code>,就可以申请提现至微信或者支付宝。
29+
</div>
30+
<!-- BEGIN EXAMPLE TABLE PORTLET-->
31+
<div class="portlet light bordered">
32+
<div class="portlet-title">
33+
<div class="caption font-dark">
34+
<i class="icon-diamond font-dark"></i>
35+
<span class="caption-subject bold uppercase"> 推广返利 </span>
36+
</div>
37+
<div class="actions">
38+
<div class="btn-group btn-group-devided" data-toggle="buttons" onclick="extractMoney()">
39+
<a href="javascript:;" class="btn btn-danger"><i class="fa fa-money"></i> 申请提现 </a>
40+
</div>
41+
</div>
42+
</div>
43+
<div class="portlet-body">
44+
<div class="table-scrollable">
45+
<table class="table table-striped table-bordered table-hover table-checkable order-column" id="sample_1">
46+
<thead>
47+
<tr>
48+
<th> ID </th>
49+
<th> 消费者 </th>
50+
<th> 消费金额 </th>
51+
<th> 返利金额 </th>
52+
<th> 日期 </th>
53+
</tr>
54+
</thead>
55+
<tbody>
56+
@if($referralLogList->isEmpty())
57+
<tr>
58+
<td colspan="5">暂无数据</td>
59+
</tr>
60+
@else
61+
@foreach($referralLogList as $key => $referralLog)
62+
<tr class="odd gradeX">
63+
<td> {{$key + 1}} </td>
64+
<td> {{$referralLog->user_id}} </td>
65+
<td> {{$referralLog->amount}} </td>
66+
<td> {{$referralLog->ref_amount}} </td>
67+
<td> {{$referralLog->created_at}} </td>
68+
</tr>
69+
@endforeach
70+
@endif
71+
</tbody>
72+
</table>
73+
</div>
74+
<div class="row">
75+
<div class="col-md-4 col-sm-4">
76+
<div class="dataTables_info" role="status" aria-live="polite">共 {{$referralLogList->total()}} 条记录,合计可提现金额 <code>{{$totalAmount}}元</code></div>
77+
</div>
78+
<div class="col-md-8 col-sm-8">
79+
<div class="dataTables_paginate paging_bootstrap_full_number pull-right">
80+
{{ $referralLogList->links() }}
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
</div>
86+
<!-- END EXAMPLE TABLE PORTLET-->
87+
</div>
88+
</div>
89+
<!-- END PAGE BASE CONTENT -->
90+
</div>
91+
<!-- END CONTENT BODY -->
92+
@endsection
93+
@section('script')
94+
<script src="/assets/global/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
95+
96+
<script type="text/javascript">
97+
// 申请提现
98+
function extractMoney() {
99+
bootbox.alert('开发中');
100+
}
101+
</script>
102+
@endsection

0 commit comments

Comments
 (0)