|
@@ -0,0 +1,404 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport"
|
|
|
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
|
|
+ <meta name='apple-touch-fullscreen' content='yes'>
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
+ <meta content="fullscreen=yes,preventMove=no" name="ML-Config">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
+ <meta name="renderer" content="webkit">
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
+ <meta name="keywords" content="电子烟,关键字" />
|
|
|
+ <meta name="Description" content="网站描述" />
|
|
|
+ <title>商品详情</title>
|
|
|
+ <link rel="stylesheet" href="/assets/api/css/common.css?t=4111">
|
|
|
+ <link rel="stylesheet" href="/assets/api/css/productDetails.css?t=11101">
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <!-- 头部导航栏 -->
|
|
|
+ <header class="headerContainer" id="headerContainer">
|
|
|
+ <!-- 顶部提示 -->
|
|
|
+ <div class="warnContainer">
|
|
|
+ <h4 class="warnText">containscontainscontainsWARNING: This product contains nicotine. Nicotine is an addicti
|
|
|
+ </h4>
|
|
|
+ </div>
|
|
|
+ <!-- pc端头部 -->
|
|
|
+ <div id="computerEndHeader">
|
|
|
+ <a href="./index.html">
|
|
|
+ <h1 class="computerLogo">
|
|
|
+ <img src="/assets/api/asstes/icon/logo.png" alt="Free Shipping Vapes" title="Free Shipping Vapes">
|
|
|
+ </h1>
|
|
|
+ </a>
|
|
|
+ <div class="headNavContainer">
|
|
|
+ <nav class="headNavItem active">
|
|
|
+ <h2 class="headNavTitle">NEW VAPES</h2>
|
|
|
+ <p class="back"></p>
|
|
|
+ </nav>
|
|
|
+ <nav class="headNavItem">
|
|
|
+ <h2 class="headNavTitle">DISPOSABLES</h2>
|
|
|
+ <p class="back"></p>
|
|
|
+ </nav>
|
|
|
+ </div>
|
|
|
+ <div class="headIconContainer">
|
|
|
+ <!-- 购物车 -->
|
|
|
+ <div class="headIconItem shoppingCartIcon">
|
|
|
+ <img src="/assets/api/asstes/icon/shoppingCart.png" alt="shoppingCart" tabindex="shoppingCart">
|
|
|
+ </div>
|
|
|
+ <!-- 收藏 -->
|
|
|
+ <div class="headIconItem collectIcon">
|
|
|
+ <img src="/assets/api/asstes/icon/collect.png" alt="collect" tabindex="collect">
|
|
|
+ </div>
|
|
|
+ <!-- 个人中心 -->
|
|
|
+ <div class="headIconItem userIcon">
|
|
|
+ <img src="/assets/api/asstes/icon/user.png" alt="user" tabindex="user">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 移动端头部 -->
|
|
|
+ <div id="mobileEndHeader">
|
|
|
+ <div class="mobileEndHeaderConten">
|
|
|
+ <a href="./index.html">
|
|
|
+ <h1 class="mobileLogo">
|
|
|
+ <img src="/assets/api/asstes/icon/logo.png" alt="Free Shipping Vapes" title="Free Shipping Vapes">
|
|
|
+ </h1>
|
|
|
+ </a>
|
|
|
+ <div class="mobileUserIconList">
|
|
|
+ <div class="mobileUserIcon userIcon">
|
|
|
+ <img src="/assets/api/asstes/icon/user.png" alt="user" tabindex="user">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="mobileMenu">
|
|
|
+ <p id="mobileMenuBot">
|
|
|
+ <span id="mobileMenuLink"></span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 移动端菜单 -->
|
|
|
+ <section class="mobileMenuFixed">
|
|
|
+ <div class="mobileMenuItem active">
|
|
|
+ <a href="#">
|
|
|
+ <h2 class="menuItemTitle">NEW VAPES</h2>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="mobileMenuItem">
|
|
|
+ <a href="#">
|
|
|
+ <h2 class="menuItemTitle">DISPOSABLES</h2>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="mobileMenuItem">
|
|
|
+ <h2 class="menuItemTitle shoppingCartIcon">Shopping Cart</h2>
|
|
|
+ </div>
|
|
|
+ <div class="mobileMenuItem">
|
|
|
+ <h2 class="menuItemTitle collectIcon">Collect</h2>
|
|
|
+ </div>
|
|
|
+ <div class="mobileMenuItem">
|
|
|
+ <h2 class="menuItemTitle userIcon">Personal</h2>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </header>
|
|
|
+ <main id="main">
|
|
|
+ <section class="sectionContainer">
|
|
|
+ <div class="elementorContainer">
|
|
|
+ <!-- 产品模块 -->
|
|
|
+ <section class="productContainer">
|
|
|
+ <!-- 产品图片 -->
|
|
|
+ <div class="productImgContainer">
|
|
|
+ <div class="prViewImgBox">
|
|
|
+ <img class="prViewImg lazy" src="/assets/api/asstes/icon/transparent.png"
|
|
|
+ data-original="{$goods.goods_image}" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="prImgContainer">
|
|
|
+ <div class="prImgList">
|
|
|
+ {foreach $goods.goods_images as $img}
|
|
|
+ <div class="prImgItem">
|
|
|
+ <img class="lazy" src="/assets/api/asstes/icon/transparent.png"
|
|
|
+ data-original="{$img.preview_url}" alt="">
|
|
|
+ </div>
|
|
|
+ {/foreach}
|
|
|
+ </div>
|
|
|
+ <div class="prevArrow"><</div>
|
|
|
+ <div class="nextArrow">></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 产品信息 -->
|
|
|
+ <div class="productInfoContainer">
|
|
|
+ <div>
|
|
|
+ <h1 class="productTitle">{$goods.goods_name}</h1>
|
|
|
+ <div class="productPrice">
|
|
|
+ <p><span>$</span>{$goods.goods_price_min}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 数量 -->
|
|
|
+ <div class="productNContainer">
|
|
|
+ <div class="productNumberBox">
|
|
|
+ <div class="numberReduce">-</div>
|
|
|
+ <input id="numberInput" value="1" type="text"/>
|
|
|
+ <div class="numberAdd">+</div>
|
|
|
+ </div>
|
|
|
+ <div class="addToCart">
|
|
|
+ <p class="tag">+</p>
|
|
|
+ <p>Add To Cart</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="safeContainer">
|
|
|
+ <p class="safeTag">Guaranteed Safe Checkout</p>
|
|
|
+ <div class="safeList">
|
|
|
+ <div class="safeItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=810087687,2144202516&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1710003600&t=5d86d51c836405ef2225baf3d4aa9349"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ <div class="safeItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=810087687,2144202516&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1710003600&t=5d86d51c836405ef2225baf3d4aa9349"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ <div class="safeItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=810087687,2144202516&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1710003600&t=5d86d51c836405ef2225baf3d4aa9349"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ <div class="safeItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=810087687,2144202516&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1710003600&t=5d86d51c836405ef2225baf3d4aa9349"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <!-- 文案模块 -->
|
|
|
+ <article class="articleContainer">
|
|
|
+ <div class="articleTabBox">
|
|
|
+ <div class="articleTabItem active">
|
|
|
+ <p class="tabTag"></p>
|
|
|
+ <h2 class="articleTabTitle">Description</h2>
|
|
|
+ </div>
|
|
|
+ <div class="articleTabItem">
|
|
|
+ <p class="tabTag"></p>
|
|
|
+ <h2 class="articleTabTitle">Reviews (0)</h2>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="articleInfo">
|
|
|
+ <h2 class="articleTitle">Product description</h2>
|
|
|
+ <div id="richTextContainer"></div>
|
|
|
+ </div>
|
|
|
+ </article>
|
|
|
+
|
|
|
+ <!-- 悬浮底部模块 -->
|
|
|
+ <section class="fixedAddSection">
|
|
|
+ <div class="fixedAddContainer">
|
|
|
+ <div class="elementorContainer">
|
|
|
+ <div class="fixedAddBox">
|
|
|
+ <div class="fPrInfo">
|
|
|
+ <img class="img lazy" src="/assets/api/asstes/icon/transparent.png"
|
|
|
+ data-original="https://www.buranshao.com/Content/Img/iqos3duo.jpg" alt="">
|
|
|
+ <h3 class="fTitle">NEW VAPES</h3>
|
|
|
+ </div>
|
|
|
+ <div class="fPrNumberContainer">
|
|
|
+ <p class="fPrPrice">$9999.99</p>
|
|
|
+ <div class="fPrNumberBox">
|
|
|
+ <div class="fPrNumberReduce">-</div>
|
|
|
+ <input id="fPrNumberInput" value="1" type="text" />
|
|
|
+ <div class="fPrNumberAdd">+</div>
|
|
|
+ </div>
|
|
|
+ <div class="fPrAddToCart">
|
|
|
+ <p class="tag">+</p>
|
|
|
+ <p>Add To Cart</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </main>
|
|
|
+ <!-- 底部 -->
|
|
|
+ <footer class="footerContainer" id="footerContainer">
|
|
|
+ <section class="sectionContainer">
|
|
|
+ <div class="elementorContainer">
|
|
|
+ <div class="footerConter">
|
|
|
+ <div class="leftText">
|
|
|
+ <p class="ltK">NEWALETTER</p>
|
|
|
+ <p class="ltV">Sign up for the Vapesourcing newsletter</p>
|
|
|
+ </div>
|
|
|
+ <div class="footerInputBox">
|
|
|
+ <img class="mailIcon" src="/assets/api/asstes/icon/mailIcon.png" alt="">
|
|
|
+ <input class="footerInput" type="text" />
|
|
|
+ <img class="arrowIcon" src="/assets/api/asstes/icon/arrowIcon.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="footerIconContainer">
|
|
|
+ <div class="footerIconList">
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerIconItem">
|
|
|
+ <img src="https://i1.branchcn.com/social_media/Wechat.png" alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerIconItem">
|
|
|
+ <img src="https://i1.branchcn.com/social_media/Wechat.png" alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerIconItem">
|
|
|
+ <img src="https://i1.branchcn.com/social_media/Wechat.png" alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ <div class="footerVlsaImg">
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerVlsaItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=1367821108,121397947&fm=253&fmt=auto&app=138&f=JPEG?w=1200&h=500"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerVlsaItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=1367821108,121397947&fm=253&fmt=auto&app=138&f=JPEG?w=1200&h=500"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ <a href="#">
|
|
|
+ <div class="footerVlsaItem">
|
|
|
+ <img src="https://img2.baidu.com/it/u=1367821108,121397947&fm=253&fmt=auto&app=138&f=JPEG?w=1200&h=500"
|
|
|
+ alt="">
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </footer>
|
|
|
+ <!-- 年龄提示层 -->
|
|
|
+ <section class="maskContainer">
|
|
|
+ <div class="ageReminderBox">
|
|
|
+ <img class="ageReminderBack" src="/assets/api/asstes/ageReminderBack.jpg" alt="">
|
|
|
+ <div class="ageReminderInfo">
|
|
|
+ <h3>ARE YOU OF LEAAL SMOKIND AGE?</h3>
|
|
|
+ <div class="ageReminderButBox">
|
|
|
+ <div class="ageRBut ageReminderNo"><span>NO</span></div>
|
|
|
+ <div class="ageRBut ageReminderYes"><span>Yes, I am 21+</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <!-- 吐司提示 -->
|
|
|
+ <div id="toastContainer"></div>
|
|
|
+</body>
|
|
|
+<script src="/assets/api/js/jquery-1.12.0.js"></script>
|
|
|
+<script src="/assets/api/js/flexible.js"></script>
|
|
|
+<script src="/assets/api/js/public.js?t=11"></script>
|
|
|
+<script src="/assets/api/js/productDetails.js?t=11"></script>
|
|
|
+<script src="/assets/api/js/jquery.lazyload.js"></script>
|
|
|
+<script>
|
|
|
+ $(document).ready(function () {
|
|
|
+ //触屏事件 || 点击事件
|
|
|
+ const tap = "ontouchstart" in window ? "touchstart" : "click";
|
|
|
+
|
|
|
+ //用户存储token名
|
|
|
+ const VAPES_TOKEN = "vapes_token"
|
|
|
+
|
|
|
+ //富文本处理
|
|
|
+ function initRichText() {
|
|
|
+ $("#richTextContainer").html(`{$goods.content | raw}`)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 登录校验点击
|
|
|
+ * @param state 是否需要跳转登录页
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+ const isLogin = (state) => {
|
|
|
+ const vapesToken = localStorage.getItem(VAPES_TOKEN);
|
|
|
+ state = state || true;
|
|
|
+ if (!vapesToken || vapesToken === "" && state) {
|
|
|
+ window.location.href = "./login.html?return=1"
|
|
|
+ }
|
|
|
+ return vapesToken && vapesToken !== "";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加购物车
|
|
|
+ * @param number 数量
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+ function addCart(number) {
|
|
|
+ if (!number || number <= 0) {
|
|
|
+ showToast("Please enter the quantity of products")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log("商品数量", number)
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 吐司提示
|
|
|
+ * @param message 消息
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+ function showToast(message) {
|
|
|
+ var toastElement = $('#toastContainer');
|
|
|
+ toastElement.text(message);
|
|
|
+ toastElement.stop(true, true).fadeIn(200).delay(2000).fadeOut(200);
|
|
|
+ }
|
|
|
+
|
|
|
+ //商品数量减少
|
|
|
+ $('.numberReduce, .fPrNumberReduce').click(function () {
|
|
|
+ var container = $(this).closest('.productNumberBox, .fPrNumberBox');
|
|
|
+ var inputElement = container.find('#numberInput, #fPrNumberInput');
|
|
|
+ var currentValue = parseInt(inputElement.val());
|
|
|
+ if (currentValue > 1) {
|
|
|
+ inputElement.val(currentValue - 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //商品数量增加
|
|
|
+ $('.numberAdd, .fPrNumberAdd').click(function () {
|
|
|
+ var container = $(this).closest('.productNumberBox, .fPrNumberBox');
|
|
|
+ var inputElement = container.find('#numberInput, #fPrNumberInput');
|
|
|
+ var currentValue = parseInt(inputElement.val());
|
|
|
+ inputElement.val(currentValue + 1);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 输入框禁止为空小于等于0
|
|
|
+ $('#numberInput, #fPrNumberInput').change(function () {
|
|
|
+ var inputElement = $(this);
|
|
|
+ var currentValue = parseInt(inputElement.val());
|
|
|
+ if (currentValue < 1 || isNaN(currentValue)) {
|
|
|
+ inputElement.val(1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ //上面的添加按钮
|
|
|
+ $(".addToCart").on(tap, function () {
|
|
|
+ const state = isLogin()
|
|
|
+ if (state) {
|
|
|
+ const number = $('#numberInput').val();
|
|
|
+ addCart(number)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //悬浮模块的添加按钮
|
|
|
+ $(".fPrAddToCart").on(tap, function () {
|
|
|
+ const state = isLogin()
|
|
|
+ if (state) {
|
|
|
+ const number = $('#fPrNumberInput').val();
|
|
|
+ addCart(number)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ initRichText()
|
|
|
+ });
|
|
|
+</script>
|
|
|
+
|
|
|
+</html>
|