<?php $__env->startPush('style'); ?>
	<link rel="stylesheet" href="<?php echo e(asset($activeTemplateTrue.'css/invest.css')); ?><?php echo e($catch); ?>">
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<uni-app class="uni-app--showtabbar uni-app--maxwidth">
	<uni-page data-page="pages/index/shop">
		<uni-page-wrapper class="plNjs">
			<uni-page-body>
				<uni-view data-v-098dd34f="" class="shop content">

		<uni-view data-v-098dd34f="" class="color-bg" style="z-index:-2;"></uni-view>
		
		<p data-v-098dd34f="" title="true" style="display:none;margin-bottom: 15px; margin-top: 30px;">Proudct Center</p>
		<uni-view data-v-098dd34f="" class="goods-title">
			<uni-view data-v-098dd34f="" onclick="thTab(this,'lease')" data-cur="lease" class="active tabs" style="width: 50%;margin-left:10px;border-radius:4px"><span data-v-098dd34f="">G -Series</span></uni-view>
			<uni-view data-v-098dd34f="" onclick="thTab(this,'purchase')" data-cur="purchase" class="tabs" style="width: 50%;margin-right:15px;border-radius:4px;margin-left:0px;"><span data-v-098dd34f="">Featured</span></uni-view>
		</uni-view>
<?php $normal = ""; $featured = ""; ?>


<uni-view data-v-098dd34f="" id="container" style="padding: 0px 15px;">
		<div class="uni-swiper-wrapper">
			<div class="uni-swiper-slides" style="inset: 0px -2px;">
				<div class="uni-swiper-slide-frame lease kJse" style="width: 100%; height: 100%; transform: translate(0%, 0px) translateZ(0px);">

	<uni-view data-v-481e7aa4="" style="width: 100%; padding-left: 0px; align-items: center;" class="dKleroa">
	<?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
		<?php if( $plan->featured == 0 ): ?>
		<uni-view data-v-481e7aa4="" class="linkBTN" data-href="<?php echo e(route('user.product.view', ['id' => $plan['identifier']])); ?>" data-name="$plan['identifier']" style="position:relative;">
			<div class="bgs" style="background-image: linear-gradient(to bottom, rgb(6 66 207 / 67%), rgb(27 68 110)),url(<?php echo e(asset('assets/'.$plan['img'])); ?>);"></div>
			<uni-view data-v-481e7aa4="" class="coin-card " style="">
				<uni-view data-v-481e7aa4="" style="flex-shrink: 0; margin-right: 10px; display: flex; align-items: center; margin-bottom: 5px;">
					<uni-image data-v-481e7aa4="" style="width: 100%; height: 70px;">
						<div style="background-image: url(&quot;<?php echo e(asset('assets/'.$plan['img'])); ?>&quot;); background-size: 100% 100%; background-repeat: no-repeat;"></div>
						<img src="<?php echo e(asset('assets/'.$plan['img'])); ?>" draggable="false">
					</uni-image>
				</uni-view>
					<div class="lasser">Limit <?php echo e($plan->limit_buy); ?></div>
				<uni-view data-v-481e7aa4="" class="nth2" style="padding:2px 10px">
					<span data-v-481e7aa4="" style="font-weight: bold; font-size: 15px; text-wrap: nowrap;margin-left:4px;color:#FFF;"><?php echo e(strtoupper($plan->name)); ?></span>
					<span data-v-481e7aa4="" style="font-weight: bold; font-size: 20px; text-wrap: nowrap;margin-left:4px;color:#47e49b;"><?php echo e($plan->cur_sym); ?> <?php echo e(getAmount($plan['min_amount'],2)); ?></span>
				</uni-view>
			</uni-view>
		</uni-view>
		<?php endif; ?>
	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
	</uni-view>


						</div>
						
				<div class="uni-swiper-slide-frame purchase kJse" style="display:none;width: 100%; height: 100%; transform: translate(0%, 0px) translateZ(0px);">

	<uni-view data-v-481e7aa4="" style="width: 100%; padding-left: 0px; align-items: center;" class="dKleroa">
	<?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
		<?php if( $plan->featured == 1 ): ?>
		<uni-view data-v-481e7aa4="" class="linkBTN" data-href="<?php echo e(route('user.product.view', ['id' => $plan['identifier']])); ?>" data-name="$plan['identifier']" style="position:relative;">
			<div class="bgs" style="background-image: linear-gradient(to bottom, rgb(6 66 207 / 67%), rgb(27 68 110)),url(<?php echo e(asset('assets/'.$plan['img'])); ?>);"></div>
			<uni-view data-v-481e7aa4="" class="coin-card " style="">
				<uni-view data-v-481e7aa4="" style="flex-shrink: 0; margin-right: 10px; display: flex; align-items: center; margin-bottom: 5px;">
					<uni-image data-v-481e7aa4="" style="width: 100%; height: 70px;">
						<div style="background-image: url(&quot;<?php echo e(asset('assets/'.$plan['img'])); ?>&quot;); background-size: 100% 100%; background-repeat: no-repeat;"></div>
						<img src="<?php echo e(asset('assets/'.$plan['img'])); ?>" draggable="false">
					</uni-image>
				</uni-view>
					<div class="lasser">Limit <?php echo e($plan->limit_buy); ?></div>
				<uni-view data-v-481e7aa4="" class="nth2" style="padding:2px 10px">
					<span data-v-481e7aa4="" style="font-weight: bold; font-size: 15px; text-wrap: nowrap;margin-left:4px;color:#FFF;"><?php echo e(strtoupper($plan->name)); ?></span>
					<span data-v-481e7aa4="" style="font-weight: bold; font-size: 20px; text-wrap: nowrap;margin-left:4px;color:#47e49b;"><?php echo e($plan->cur_sym); ?> <?php echo e(getAmount($plan['min_amount'],2)); ?></span>
				</uni-view>
			</uni-view>
		</uni-view>
		<?php endif; ?>
	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
	</uni-view>


						</div>
						
						
					</div>
				</div>
		</uni-view>
	</uni-view>


			</uni-page-body>
		</uni-page-wrapper>
	</uni-page>
	
	<?php echo $__env->make($activeTemplate.'layouts.menu',['activeLink'=>'invest'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<uni-view data-v-79177165="" data-v-1e84548a="" data-v-098dd34f="" class="uni-popup bottom investForm" style="z-index:1020;">
	<uni-view data-v-79177165="">
		<uni-view data-v-acf5fb64="" data-v-79177165="" class="iOksm" name="mask" style="opacity: 1; position: fixed; inset: 0px; background-color: rgba(0, 0, 0, 0.4); transition: opacity 300ms, -webkit-transform 300ms, transform 300ms; transform-origin: 50% 50%;"></uni-view>
		<uni-view data-v-acf5fb64="" data-v-79177165="" class="" name="content" style="transform: translateY(0px); opacity: 1; position: fixed; left: 0px; right: 0px; bottom: 0px; padding-bottom: 0px; background-color: transparent; transition: -webkit-transform 300ms, transform 300ms; transform-origin: 50% 50%;">
			<uni-view data-v-79177165="" class="uni-popup__wrapper bottom" style="background-color: transparent;">
				<form action="<?php echo e(route('user.investment.post')); ?>" class="postForm" method="post" data-v-1e84548a="" class="protocol offset" style="height: auto; width: 100%;">
					<uni-view data-v-1e84548a="" class="protocol_content" style="border-radius:20px 20px 0 0;">
						<uni-view data-v-1e84548a="" class="desc">
							<h2 data-v-1e84548a="" id="packName" >Protocol</h2>
							<uni-scroll-view data-v-1e84548a="" show-scrollbar="true">
								<div class="uni-scroll-view">
									<div class="uni-scroll-view" style="overflow: hidden auto;height: 30vh;">
										<div class="uni-scroll-view-content">
										<span data-v-1e84548a="" id="inContent"></span>
										</div>
									</div>
									<uni-view data-v-1e84548a="" style="position: absolute;bottom: 0px; width: 100%;">
										<uni-input data-v-64270b22="" class="inView" style="background:#f7e7d4;display:none;" id="amountDiv">
											<span data-v-64270b22="" style="margin-left:9px;width: 94%;display: flex;justify-content: space-between;">
												<span data-v-0a75b799="" class="uni-icons uniui-wallet"></span>
												<input type="number" name="amount" id="orderAmount" style="width:78%;padding:12px 2px;background:transparent;" placeholder="Enter Amount" step="" enterkeyhint="done" autocomplete="off" class="uni-input-input" required />
												<div style="margin-top:4px;" id="packCurrency"><?php echo e(config('settings')->cur_sym); ?></div>
											</span>
										</uni-input>
								
										<uni-input data-v-64270b22="" class="inView" style="background:#f7e7d4;margin-top:8px">
											<span data-v-64270b22="" style="margin-left:9px;width: 94%;display: flex;justify-content: space-between;">
												<span data-v-0a75b799="" class="uni-icons uniui-gift"></span>
												<input maxlength="140" style="width:78%;padding:10px 2px;background:transparent;" placeholder="Have coupon code? Enter it" name="coupon" step="" enterkeyhint="done" autocomplete="off" type="text" class="uni-input-input">
												<span data-v-0a75b799="" class="uni-icons uniui-closeempty"></span>
											</span>
										</uni-input>
									</uni-view>
								
								</div>
							</uni-scroll-view>
						</uni-view>
						
						<input type="hidden" name="id" id="proid" value="0">
						<?php echo csrf_field(); ?>
						<input type="hidden" name="pay_with" id="pay_with" value="">
						
						<uni-view data-v-1e84548a="" class="button">
							<uni-view data-v-1e84548a="" class="iOksm">Cancel</uni-view>
							<uni-view data-v-1e84548a="" class="investNow">Accept</uni-view>
						</uni-view>
					</uni-view>
				</form>
			</uni-view>
		</uni-view>
	</uni-view>
</uni-view>

</uni-app>
<?php $__env->stopSection(); ?>


<?php $__env->startPush('script'); ?>
<script>
	var inUS = <?php echo e($user->usdt_balance); ?>;
	var inNG = <?php echo e($user->balance); ?>; 

	jQuery.fn.shake = function(interval,distance,times){
	   interval = typeof interval == "undefined" ? 100 : interval;
	   distance = typeof distance == "undefined" ? 10 : distance;
	   times = typeof times == "undefined" ? 3 : times;
	   var jTarget = $(this);
	   jTarget.css('position','relative');
	   for(var iter=0;iter<(times+1);iter++){
		  jTarget.animate({ left: ((iter%2==0 ? distance : distance*-1))}, interval);
	   }
	   return jTarget.animate({ left: 0},interval);
	}

	function thTab(ac,vi){
		$(".tabs").removeClass('active');
		$(ac).addClass('active');
		
		$(".kJse").hide();
		$("."+vi).show();
	}
	
	$().ready(function () {
		$(document).on("click", '.iOksm', function () {
			$('body,html').css({
				overflow: 'scroll'
			})
			$('.investForm').fadeOut();
		});
		
		$(document).on("click", '.investNow', function () {
			var buyAmount = $('#orderAmount').val();
			var coupon = $('#coupon').val();
			var pay_with = $('#pay_with').val();
			var token = document.querySelector('input[name="_token"]').value;

			var is_status = true;

			if (!buyAmount) {
				messaged("Please enter an amount to buy order",'error');
				return false;
				is_status = false;
			}

			if (pay_with == 'USDT' && buyAmount > inUS ) {
				$('.iOksm').trigger('click');
				Toast("USDT Account balance is insufficient, please recharge first!",'ERROR MESSAGE',false,'RECHARGE','<?php echo e(route("user.deposit")); ?>');
				//loading.showLoading({type: 2,tip: "Wait.."});
				is_status = false;
				return false;
			}

			if (pay_with == 'NGN' && buyAmount > inNG ) {
				$('.iOksm').trigger('click');
				Toast("NGN Account balance is insufficient, please recharge first!",'ERROR MESSAGE',false,'RECHARGE','<?php echo e(route("user.deposit")); ?>');
				//loading.showLoading({type: 2,tip: "Wait.."});
				is_status = false;
				return false;
			}
			
			loading.showLoading({type: 2,tip: "Wait.."});
			$(".postForm").submit();
			return true;
		});

		
		$('.miningbutton').on('click', function() {
			$('.investForm').fadeIn();
			$('body,html').css({
				overflow: 'hidden'
			})
			
			var info = $(this).data("resource");
			
			var maxAmount = parseFloat(info.max_amount).toFixed(2);
			var minAmount = parseFloat(info.min_amount).toFixed(2);
			
			$("#proid").val(info.id);
			$("#orderAmount").val(minAmount);
			$("#packCurrency").html(info.cur_sym);
			$("#packName").html(info.name);
			$("#pay_with").val(info.cur_text);
			$("#orderAmount").attr({
			   "max" : maxAmount,
			   "min" : minAmount
			});
			
			if( info.interest_type == 1 ){
				$("#amountDiv").show();
			}else{
				$("#amountDiv").hide();
			}
			
			$('#inContent').html(info.notes);

			$('.investForm').slideDown();

		});
		
		$(document).on("click", '.noBuy', function () {
			messaged('Package soldout or coming soon. Try another.');
			$(this).shake(100,10,5);
		});

		//广告
		var timer;
		$('#auto-scroll').hover(function() {
			clearInterval(timer);
		}, function() {
			timer = setInterval(function() {
				$('#auto-scroll').find("ul:first").animate({
					marginTop: "-.5rem"
				}, 800, function() {
					$(this).css({
						marginTop: "0px"
					}).find("li:first").appendTo(this);
				});
			}, 3000);
		}).trigger('mouseleave');
		
	})
	
</script>

<?php $__env->stopPush(); ?>

<?php echo $__env->make($activeTemplate.'layouts.users', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/metalixz/public_html/core/resources/views/templates/gpt/user/plans.blade.php ENDPATH**/ ?>