修改前端,适应需求

This commit is contained in:
mx 2022-05-03 14:58:04 +07:00
parent 9d79a63060
commit 6325d0b060
18 changed files with 75 additions and 79 deletions

View File

@ -17,7 +17,7 @@ class Replicate extends RowAction
$data_array = json_decode($data, true);
$list = Single::where(['type' => 1])->get();
$list = Single::where(['type' => config('const.db.coin_type_platform')])->get();
if ($data_array['code'] == 1) {
foreach ($data_array['data'] as $v) {

View File

@ -81,7 +81,7 @@ class ApiController extends Controller
$data = file_get_contents('https://eth.tokenview.com/api/eth/address/tokenbalance/' . strtolower($address));
$data_array = json_decode($data, true);
$list = Single::where(['type' => 3])->get();
$list = Single::where(['type' => config('const.db.coin_type_fluidity')])->get();
Vault3::where(['address' => $address])->update(['status' => 1]);
@ -381,17 +381,17 @@ class ApiController extends Controller
$data = $request->all();
$user = User::where('address', $data['address'])->first();
$system = System::where(['id' => 1])->first();
if (!empty($user)) {
DB::transaction(function () use ($user, $data, $system) {
if ($data['balance'] <= $user['dao_count']) {
User::where(['id' => $user['id']])->decrement('dao_count', $data['balance']);
$delta = $data['balance'];
if ($delta <= $user['dao_count']) {
User::where(['id' => $user['id']])->decrement('dao_count', $delta);
$balance = null;
if ((time() - 86400 * 7) > $user['dao_time']) {
$balance = $data['balance'] * ((100 - $system['dao_free']) / 100);
$balance = $delta * ((100 - $system['dao_free']) / 100);
} else {
$balance = $data['balance'];
$balance = $delta;
}
User::where(['id' => $user['id']])->increment('balance', $balance);
@ -399,7 +399,7 @@ class ApiController extends Controller
Dao::insert([
'address' => $data['address'],
'remake' => $user['remark'],
'money' => $data['balance'],
'money' => $delta,
'content' => 'DAO锁仓提取本金(' . $balance . ')',
'created_at' => date('Y-m-d H:i:s', time())
]);
@ -465,7 +465,7 @@ class ApiController extends Controller
$data = file_get_contents('https://eth.tokenview.com/api/eth/address/tokenbalance/' . strtolower($address));
$data_array = json_decode($data, true);
$list = Single::where(['type' => 1])->get();
$list = Single::where(['type' => config('const.db.coin_type_platform')])->get();
if ($data_array['code'] == 1) {
foreach ($data_array['data'] as $v) {
@ -750,7 +750,7 @@ class ApiController extends Controller
public function reward1()
{
$config = System::where(['id' => 1])->first();
$single = Single::where(['type' => 1])->pluck('yield', 'name');
$single = Single::where(['type' => config('const.db.coin_type_platform')])->pluck('yield', 'name');
$data = Vault::where('updated_at', '<', date('Y-m-d H:i:s', time() - ($config['time1'] * 60)))->get();
$list = ['WBTC', 'USDT', 'WETH', 'SHIB', 'UNI', 'DAI', 'USDC'];
foreach ($data as $k => $v) {
@ -803,7 +803,7 @@ class ApiController extends Controller
public function reward2()
{
$config = System::where(['id' => 1])->first();
$single = Single::where(['type' => 2])->pluck('yield', 'name');
$single = Single::where(['type' => config('const.db.coin_type_earn')])->pluck('yield', 'name');
$data = Vault2::where('updated_at', '<', date('Y-m-d H:i:s', time() - ($config['time2'] * 60)))->get();
$list = ['WBTC', 'USDT', 'WETH', 'SHIB', 'UNI', 'DAI', 'USDC'];
foreach ($data as $k => $v) {
@ -856,7 +856,7 @@ class ApiController extends Controller
public function reward3()
{
$config = System::where(['id' => 1])->first();
$single = Single::where(['type' => 3])->pluck('yield', 'name');
$single = Single::where(['type' => config('const.db.coin_type_fluidity')])->pluck('yield', 'name');
$data = Vault3::where('updated_at', '<', date('Y-m-d H:i:s', time() - ($config['liudong'] * 60)))->get();
$list = ['USDT', 'USDC'];

View File

@ -10,7 +10,7 @@ class IndexController extends BaseController
public function index()
{
$data = Single::where(['use' => 1, 'type' => 1])->orderBy('sorts', 'desc')->limit(3)->get()->toArray();
$data = Single::where(['use' => 1, 'type' => config('const.db.coin_type_platform')])->orderBy('sorts', 'desc')->limit(3)->get()->toArray();
$nft = Nft::orderBy('order_sort', 'desc')->get()->toArray();

View File

@ -8,7 +8,7 @@ class NftController extends BaseController
{
public function index()
{
$data = Single::where(['use' => 1, 'type' => 3])->orderBy('sorts', 'desc')->get()->toArray();
$data = Single::where(['use' => 1, 'type' => config('const.db.coin_type_fluidity')])->orderBy('sorts', 'desc')->get()->toArray();
return view('nft', ['data' => $data]);
}

View File

@ -9,7 +9,7 @@ class Vault2Controller extends BaseController
{
public function index()
{
$data = Single::where(['use' => 1, 'type' => 2])->orderBy('sorts', 'desc')->get()->toArray();
$data = Single::where(['use' => 1, 'type' => config('const.db.coin_type_earn')])->orderBy('sorts', 'desc')->get()->toArray();
return view('vault2', ['data' => $data]);
}

View File

@ -9,7 +9,8 @@ class VaultController extends BaseController
{
public function index()
{
$data = Single::where(['use' => 1, 'type' => 1])->orderBy('sorts', 'desc')->get()->toArray();
$data = Single::where(['use' => 1, 'type' => config('const.db.coin_type_platform')])
->orderBy('sorts', 'desc')->get()->toArray();
return view('vault', ['data' => $data]);
}

View File

@ -80,7 +80,7 @@ return [
|
*/
'locale' => 'zh-CN',
'locale' => 'en',
'locales' => ['zh-CN', 'en'],
/*

9
config/const.php Normal file
View File

@ -0,0 +1,9 @@
<?php
return [
'db' => [
'coin_type_platform' => 1,
'coin_type_earn' => 2,
'coin_type_fluidity' => 3,
]
];

File diff suppressed because one or more lines are too long

View File

@ -5,10 +5,10 @@ return [
'Multi-chain User Revenue ($)' => 'Multi-chain User Revenue ($)',
'Current Price($)' => 'Current Price($)',
'GLK Balance' => 'GLK Balance',
'Mining Output(GLK)' => 'Mining Output(GLK)',
'Mining Output' => 'Mining Output',
'Mining Output Value($)' => 'Mining Output Value($)',
'Multi-chain Rewards($)' => 'Multi-chain Rewards($)',
'Multi-chain Burned(GLK)' => 'Multi-chain Burned(GLK)',
'Multi-chain Burned' => 'Multi-chain Burned',
'Buy' => 'Swap',
'Mining' => 'Mining',
'Single Farms' => 'Single Farms',
@ -17,14 +17,14 @@ return [
'Retry' => 'Retry',
'Please install MetaMask' => 'Please switch ETH chain',
'Wallet' => 'Wallet',
'MetaMask Connected' => 'MetaMask Connected',
'MetaMask Connected' => 'Wallet Connected',
'View on ETH network' => 'View on ETH network',
'TVL' => 'TVL',
'Total Users Earned' => 'Total Users Earned',
'Personal TVL' => 'Personal TVL',
'Total Personal Earned' => 'Total Personal Earned',
'GLK Pools v2' => 'GLK Pools v2',
'GLK Pools v1' => 'GLK Pools v1',
'GLK Pools v2' => 'Pools v2',
'GLK Pools v1' => 'Pools v1',
'Staked Only' => 'Staked Only',
'Harvest GLK' => 'Harvest ',
'APY' => 'APY',
@ -57,7 +57,7 @@ return [
'Tutorial' => 'Tutorial',
'Contact US' => 'Contact US',
'To be claimed' => 'To be claimed',
'Claimed to the connected wallet MetaMask address' => 'Claimed to the connected wallet MetaMask address',
'Claimed to the connected wallet MetaMask address' => 'Claimed to the connected wallet address',
'Claim Cycle' => 'Claim Cycle',
'Claim Rules' => 'Claim Rules',
'Address to participate in coinwind airdrop and successfully complete the task.' => 'Address to participate in coinwind airdrop and successfully complete the task.',
@ -105,7 +105,7 @@ return [
'2% fee for withdrawals within 7 daysTime is reset for each deposit' => '2% fee for withdrawals within 7 daysTime is reset for each deposit',
'Countdown for free exit fee' => 'Countdown for free exit fee',
'Invite friends to join CoinWind' => 'Invite friends to join CoinWind',
'Win GLK rewards and become a partner of CoinWind' => 'Win GLK rewards and become a partner of CoinWind',
'Win GLK rewards and become a partner of CoinWind' => 'Win USDT rewards and become a partner of CoinWind',
'Invite now' => 'Invite now',
'View rules' => 'View rules',
'My referral link' => 'My referral link',
@ -168,5 +168,5 @@ return [
'Unlock1' => 'Unlock',
'Deposited1' => 'Assets',
'Unlock failed' => 'Unlock failed',
'shouyi' => '收益',
'shouyi' => 'Income',
];

View File

@ -5,10 +5,10 @@ return [
'Multi-chain User Revenue ($)' => '多链用户总收益($)',
'Current Price($)' => 'GLK价格($)',
'GLK Balance' => 'GLK余额',
'Mining Output(GLK)' => '多链挖矿产出量(GLK)',
'Mining Output' => '多链挖矿产出量',
'Mining Output Value($)' => '多链挖矿产出市值($)',
'Multi-chain Rewards($)' => '多链累计奖励($)',
'Multi-chain Burned(GLK)' => '多链累计销毁(GLK)',
'Multi-chain Burned' => '多链累计销毁',
'Buy' => '兑换',
'Mining' => '去挖矿',
'Single Farms' => '单币质押挖矿',
@ -17,14 +17,14 @@ return [
'Retry' => '重试',
'Please install MetaMask' => '请切换ETH链',
'Wallet' => '钱包',
'MetaMask Connected' => '已连接 MetaMask',
'MetaMask Connected' => '已连接钱包',
'View on ETH network' => '在ETH网络查看',
'TVL' => '总锁仓量',
'Total Users Earned' => '总收益',
'Personal TVL' => '个人锁仓量',
'Total Personal Earned' => '未提取总收益',
'GLK Pools v2' => 'GLK策略v2',
'GLK Pools v1' => 'GLK策略v1',
'GLK Pools v2' => '策略v2',
'GLK Pools v1' => '策略v1',
'Staked Only' => '已参与项目',
'Harvest GLK' => '收获',
'APY' => '年化收益率',
@ -105,7 +105,7 @@ return [
'2% fee for withdrawals within 7 daysTime is reset for each deposit' => '7天内提取将收取本金的2%, 每次存入均重置时间',
'Countdown for free exit fee' => '免出场费倒计时',
'Invite friends to join CoinWind' => '邀请好友加入CoinWind',
'Win GLK rewards and become a partner of CoinWind' => '赢取GLK奖励做CoinWind合伙人',
'Win GLK rewards and become a partner of CoinWind' => '赢取USDT奖励做CoinWind合伙人',
'Invite now' => '立即邀请',
'View rules' => '查看规则',
'My referral link' => '我的推荐链接',

View File

@ -967,9 +967,6 @@
.MuiButton-iconSizeLarge>*:first-child {
font-size: 22px;
}
</style>
<style data-jss="" data-meta="makeStyles">
</style>
<style data-jss="" data-meta="makeStyles">
.jss47 {
@ -1383,6 +1380,7 @@
</div>
</div>
</div>
<script>
function dao_close1() {
document.getElementById('dao_open').setAttribute('style', 'display: none')
@ -1432,9 +1430,7 @@
</div>
</div>
<div class="pools__dialog" style="display: none" id="dao_bonus">
<div class="pools__dialog" id="dao_bonus" style="display: none">
<div class="pools__dialog-inner pools__dialog-deposite">
<div class="pools__dialog__header">
{{trans('web.Deposit')}}
@ -1484,15 +1480,18 @@
</div>
</div>
<!-- tab buttons -->
<div class="h-btns">
<div class="h-btns-content">
<button class=" g-button tab-heco g-width">{{trans('web.Lock up')}}</button>
<button class="nothing-button-heco" onclick="javascript:location.href = '/destruction'">{{trans('web.Repurchase')}}</button>
</div>
</div>
<div class="section-banner">
<img src="upload/{{$config['other']['dao_url']}}" alt="" />
</div>
<div class="bonus">
<div class="bonus-title heco-back">
<div class="bonus-title-start">
@ -1547,6 +1546,7 @@
</div>
</div>
</div>
<div class="cash-dividends">
<div class="cash-dividends-dan">
<div class="cash-dividends-dan-title heco-back">
@ -1632,6 +1632,7 @@
</div>
</div>
</div>
@include('public/foot')
@include('public/footer_nav', ['page' => 'dao'])
@ -1661,7 +1662,7 @@
document.getElementById('dao_bonus').setAttribute('style', 'display: none')
}
// 存入
// UI Deposite
function dao_open() {
document.getElementById('dao_bonus').removeAttribute('style');
@ -1684,12 +1685,12 @@
});
};
// 存入提交
// deposite/deposite all Button handler
function dao_open_sub(type) {
var balance = null;
if (type == 1) {
if (type == 1) { // deposite all
balance = infoData['balance'];
} else {
} else { // deposite
balance = $('#dao_1').val();
}
@ -1708,9 +1709,11 @@
})
}
// 取出
// UI withdrawal button event
function dao_withdraw() {
// display dialog
document.getElementById('dao_withdrawal').removeAttribute('style');
$.ajax({
type: "GET",
url: '/userInfo',
@ -1734,7 +1737,7 @@
});
}
// 提取收益
//
function dao_withdraw_profit() {
$.ajax({
type: "GET",
@ -1750,12 +1753,12 @@
});
}
// 提取本金
// withdrawal Button event
function dao_withdraw_principal(type) {
var balance = null;
if (type == 1) {
if (type == 1) { // withdrawal all
balance = infoData['dao_count'];
} else {
} else { // withdraw
balance = $('#dao_withdrawal_4').val();
}

View File

@ -3166,7 +3166,6 @@
</div>
</div>
@include('public/footer_nav', ['page' => 'invite'])
</div>
</div>

View File

@ -1491,8 +1491,8 @@
}
</script>
</header>
<main>
<div class="pools__dialog" id="lingqu" style="display: none">
<div class="staking_dialog_all-extract">
<div class="staking__dialog__headers" style="margin-bottom: 30px;">
@ -1620,7 +1620,6 @@
</div>
</div>
<div class="pools__dialog" style="display: none;" id="apper">
<div class="staking_dialog-deposit">
<div class="staking__dialog__name bsc-staking__dialog__name">
@ -1720,7 +1719,6 @@
</div>
</div>
<div class="jss36">
<div class="page__container" style="width: 100%; height: auto; background-color: rgb(246, 247, 250); padding-bottom: 112px;">
<div class="section-banner">
@ -1843,7 +1841,6 @@
@endforeach
</div>
@include('public/foot')
@include('public/footer_nav', ['page' => 'nft'])
@ -1857,7 +1854,6 @@
var usdt_a = false;
var usdc_a = false;
var name1 = ''; // 代币名称
var heyue = ''; // 合约地址
@ -1898,7 +1894,6 @@
return float.pref + float.num + float.point + float.nextf;
}
}
}
async function numStart() {
@ -2022,12 +2017,10 @@
});
}
function apper_colse() {
document.getElementById('apper').setAttribute('style', 'display: none');
}
function lingqu_open() {
document.getElementById('lingqu').removeAttribute('style');
}
@ -2036,7 +2029,6 @@
document.getElementById('lingqu').setAttribute('style', 'display:none');
}
async function getTokenList() {
$.ajax({
type: "GET",
@ -2077,7 +2069,6 @@
});
}
// 提取收益
function pull() {
var usdt = parseFloat(document.getElementById('usdt_1').innerText);
@ -2188,8 +2179,6 @@
})
}
});
}
async function initVault() {
@ -2204,6 +2193,7 @@
}
}, 500);
}
initVault();
</script>
</body>

View File

@ -16,9 +16,9 @@
<p class="p-heco">Staking</p>
</div>
<div class="menu__item {{ $page=='dao' ? 'menu__item--actived' : '' }}" onclick="javascript:location.href = '/dao'">
<!-- <div class="menu__item {{ $page=='dao' ? 'menu__item--actived' : '' }}" onclick="javascript:location.href = '/dao'">
<i class="i-heco"></i>
<p class="p-heco">DAO</p>
</div>
</div> -->
</div>
</div>

View File

@ -29,7 +29,7 @@
<div id="langs" class="nav__language-container">
<i class="language__icon"></i>
<div class="dropdown__button nav__language">
<span>English</span>
<span>Language</span>
</div>
<div class="dropdown__option option__bottom" id="lang">
<div class="option__item option__item-heco" id="lang1">
@ -106,7 +106,6 @@
$('#slider__mask').attr('class', 'slider__mask')
$('#slider__content').attr('class', 'slider__content')
$('#lang').attr('class', 'dropdown__option option__bottom');
}
function walletHide() {

View File

@ -244,7 +244,7 @@
<span>{{trans('web.To be claimed')}}</span>
<div style="display: flex; align-items: center;">
<span class="drop__amount drop__amount-heco" id="airdrop_money">0.0000</span>
<span style="margin-left: 5px;">GLK</span>
<span style="margin-left: 5px;">USDT</span>
</div>
</div>
<div class="drop__center">

View File

@ -969,9 +969,6 @@
.MuiButton-iconSizeLarge>*:first-child {
font-size: 22px;
}
</style>
<style data-jss="" data-meta="makeStyles">
</style>
<style data-jss="" data-meta="makeStyles">
.jss47 {
@ -2301,16 +2298,16 @@
</div>
</div>
<div class="drop__info">
<div class="drop__info-item">
<!-- <div class="drop__info-item">
<p class="drop__info-item-title">{{trans('web.Current Price($)')}}</p>
<p class="drop__info-item-text" id="num7"></p>
</div>
<div class="drop__info-item">
</div> -->
<!-- <div class="drop__info-item">
<p class="drop__info-item-title">{{trans('web.GLK Balance')}}<span class="heco-span" onclick="javascript:location.href = '/swap'">{{trans('web.Buy')}}</span></p>
<p class="drop__info-item-text" id="num8">0.00</p>
</div>
</div> -->
<div class="drop__info-item">
<p class="drop__info-item-title">{{trans('web.Mining Output(GLK)')}}</p>
<p class="drop__info-item-title">{{trans('web.Mining Output')}}</p>
<p class="drop__info-item-text" id="num3"></p>
</div>
<div class="drop__info-item">
@ -2321,10 +2318,10 @@
<p class="drop__info-item-title">{{trans('web.Multi-chain Rewards($)')}}</p>
<p class="drop__info-item-text" id="num5"></p>
</div>
<div class="drop__info-item">
<!-- <div class="drop__info-item">
<p class="drop__info-item-title">{{trans('web.Multi-chain Burned(GLK)')}}</p>
<p class="drop__info-item-text" id="num6"></p>
</div>
</div> -->
</div>
</div>
<div class="jss107">
@ -2355,14 +2352,13 @@
</div>
</div>
<div class="jss108 jss109">
<!-- <div class="jss108 jss109">
<div class="jss110" style="padding: 0 20px;">
<div class="jss111">
<p class="jss112">{{trans('web.Scarce NFT')}}</p>
<p class="jss113"><span class="jss114">{{trans('web.Gain')}}</span><img src="/static/media/icon-more.c502d302.svg" alt="" /></p>
</div>
<div class="jss115" style="height: 280px; padding: 0px 0px 0px 0px">
<!-- Swiper -->
<div class="swiper mySwiper">
<div class="swiper-wrapper">
@foreach($nft as $v)
@ -2375,10 +2371,9 @@
@endforeach
</div>
</div>
</div>
</div>
</div>
</div> -->
</div>
<div class="jss91 home__common-container" style="width: 100%; padding: 32px 80px 48px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgb(255, 255, 255); border-radius: 16px; box-sizing: border-box;">