249 lines
12 KiB
Smarty
Executable File
249 lines
12 KiB
Smarty
Executable File
{include file='user/header.tpl'}
|
||
<script src="//{$config['jsdelivr_url']}/npm/jquery/dist/jquery.min.js"></script>
|
||
|
||
<div class="page-wrapper">
|
||
<div class="container-xl">
|
||
<div class="page-header d-print-none text-white">
|
||
<div class="row align-items-center">
|
||
<div class="col">
|
||
<h2 class="page-title">
|
||
<span class="home-title">邀请注册</span>
|
||
</h2>
|
||
<div class="page-pretitle my-3">
|
||
<span class="home-subtitle">查看邀请注册链接和邀请返利记录</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="page-body">
|
||
<div class="container-xl">
|
||
<div class="row row-deck row-cards">
|
||
<div class="col-12">
|
||
<div class="row row-deck row-cards">
|
||
<div class="col-sm-12 col-lg-6">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<p>
|
||
可以获得受邀请用户的首单金额的 <span class="myLight" style="font-size:20px;">{$invite_reward_rate}%</span> 作为返利,年套餐除外。
|
||
</p>
|
||
<!-- <p>邀请注册的用户在账单确认后,您可获得其账单金额的 <span class="myLight" style="font-size:20px;">{$invite_reward_rate}%</span>
|
||
作为返利。</p>
|
||
<p> -->
|
||
您目前获得的返利为 <span class="myLight" style="font-size:20px;">{$user->money_aff}</span> 元。
|
||
</p>
|
||
<div class="col-auto" style="margin-top:26px;">
|
||
<div class="btn-list">
|
||
{if $wait_draw_have === true}
|
||
<button type="button" class="btn btn-green" id="delete-user-5" onclick="deleteUser({$user->id})">提现申请正在审核,点击撤销申请</button>
|
||
{else}
|
||
<a href="#" class="btn btn-azure" data-bs-toggle="modal"
|
||
data-bs-target="#toUsdt">
|
||
提现到USDT(TRC20)
|
||
</a>
|
||
{/if}
|
||
<a href="#" class="btn btn-indigo" data-bs-toggle="modal"
|
||
data-bs-target="#toBalance">
|
||
划转至余额
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-sm-12 col-lg-6">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h3 class="card-title">邀请链接</h3>
|
||
<input class="form-control" id="invite-url" value="{$invite_url}" disabled>
|
||
</div>
|
||
<div class="card-footer">
|
||
<div class="d-flex">
|
||
<button class="btn text-red btn-link"
|
||
hx-post="/user/invite/reset" hx-swap="none">
|
||
重置
|
||
</button>
|
||
<button data-clipboard-text="{$invite_url}"
|
||
class="copy btn btn-primary ms-auto">复制</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-12 my-3">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h3 class="card-title">返利记录</h3>
|
||
</div>
|
||
<div class="table-responsive">
|
||
<table class="table card-table table-vcenter text-nowrap datatable">
|
||
<thead>
|
||
<tr>
|
||
<th>记录ID</th>
|
||
<th>邀请用户ID</th>
|
||
<th>邀请用户昵称</th>
|
||
<th>返利金额</th>
|
||
<th>返利时间</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach $paybacks as $payback}
|
||
<tr>
|
||
<td>{$payback->id}</td>
|
||
<td>{$payback->userid}</td>
|
||
<td>{$payback->user_name}</td>
|
||
<td>{$payback->ref_get} 元</td>
|
||
<td>{$payback->datetime}</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="modal modal-blur fade" id="toBalance" tabindex="-1" role="dialog" aria-hidden="true">
|
||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document" style="max-width:400px;">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">划转至余额</h5>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<p>
|
||
划转至账户余额,用于购买套餐。
|
||
<p>
|
||
您目前获得的返利为
|
||
<span class="myLight" style="font-size:20px;">
|
||
{$user->money_aff}
|
||
</span>元。
|
||
</p>
|
||
<div class="form-group mb-3 row">
|
||
<div class="col">
|
||
<input id="amount1" type="text" class="form-control"
|
||
placeholder="输入划转金额并点击划转">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn me-auto" data-bs-dismiss="modal">取消</button>
|
||
<button id="apply-giftcard" class="btn btn-primary" data-bs-dismiss="modal"
|
||
hx-post="/user/affToBanlance" hx-swap="none"
|
||
hx-vals='js:{ amount: document.getElementById("amount1").value }'
|
||
hx-on="htmx:afterRequest: alert('请求已完成!')"
|
||
hx-swap="js:alert(2)"
|
||
>
|
||
划转
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="modal modal-blur fade" id="toUsdt" tabindex="-1" role="dialog" aria-hidden="true">
|
||
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document" style="max-width:500px;">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">提现到USDT(TRC20)</h5>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
</div>
|
||
<div class="modal-body" style="padding-bottom:10px;">
|
||
<p>
|
||
获得返利满 <span class="myTip">{$aff_draw_need}</span> 元可以提现到USDT,审核时间 <span class="myTip">1-7</span> 天,手续费<span class="myTip"> 5% </span>。
|
||
</p>
|
||
<p>
|
||
审核期间暂时扣除提现金额,审核失败会返还。
|
||
</p>
|
||
<p>
|
||
目前获得的返利为
|
||
<span class="myLight" style="font-size:20px;">
|
||
{$user->money_aff}
|
||
</span>元。
|
||
</p>
|
||
<div class="form-group mb-3 row">
|
||
<div class="col">
|
||
<input id="usdtAddr" type="text" class="form-control"
|
||
placeholder="输入提现USDT地址(TRC20)">
|
||
<br>
|
||
<input id="amount2" type="text" class="form-control"
|
||
placeholder="输入提现金额并点击提交申请">
|
||
</div>
|
||
</div>
|
||
<!--
|
||
<p>
|
||
目前您有<span class="myDanger"> 1 </span>笔审核中的申请,总金额为 <span class="myDanger"> 1 </span>。
|
||
</p>
|
||
-->
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn me-auto" data-bs-dismiss="modal">取消</button>
|
||
<button id="apply-giftcard" class="btn btn-primary" data-bs-dismiss="modal"
|
||
hx-post="/user/drawToUsdt" hx-swap="none"
|
||
hx-vals='js:{
|
||
usdtAddr: document.getElementById("usdtAddr").value,
|
||
amount: document.getElementById("amount2").value,
|
||
redir: window.location.href
|
||
}'>
|
||
提交申请
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="modal modal-blur fade" id="notice-dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||
<div class="modal-dialog modal-sm modal-dialog-centered" role="document">
|
||
<div class="modal-content">
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||
<div class="modal-status bg-yellow"></div>
|
||
<div class="modal-body text-center py-4">
|
||
<i class="ti ti-alert-circle icon mb-2 text-yellow icon-lg" style="font-size:3.5rem;"></i>
|
||
<p id="notice-message" class="text-secondary">注意</p>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn me-auto" data-bs-dismiss="modal">取消</button>
|
||
<button id="notice-confirm" type="button" class="btn btn-yellow" data-bs-dismiss="modal">确认</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
|
||
function deleteUser(user_id) {
|
||
$('#notice-message').text('确定撤回提现申请?');
|
||
$('#notice-dialog').modal('show');
|
||
$('#notice-confirm').off('click').on('click', function () {
|
||
$.ajax({
|
||
url: "/user/cancelDraw",
|
||
type: 'POST',
|
||
dataType: "json",
|
||
success: function (data) {
|
||
if (data.ret === 1) {
|
||
location.reload();
|
||
} else {
|
||
alert('撤销失败,请联系管理员');
|
||
//$('#fail-message').text(data.msg);
|
||
//$('#fail-dialog').modal('show');
|
||
}
|
||
}
|
||
})
|
||
});
|
||
}
|
||
|
||
window.onload = function() {
|
||
$('#success-confirm').click(function(){
|
||
location.reload();
|
||
});
|
||
}
|
||
|
||
</script>
|
||
|
||
{include file='user/footer.tpl'}
|