From e45bd57a48467858d4574963f4aae78a676f6e8f Mon Sep 17 00:00:00 2001
From: gongfuxiang <2499232802@qq.com>
Date: Wed, 24 Jul 2019 00:29:55 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../index/view/default/goods/index.html | 2 +-
public/static/index/default/css/goods.css | 6 +++---
public/static/index/default/js/goods.js | 18 ++++++++++++++++++
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html
index 448c8df94..9a820244c 100755
--- a/application/index/view/default/goods/index.html
+++ b/application/index/view/default/goods/index.html
@@ -176,7 +176,7 @@
{{$goods.show_field_original_price_text|raw}}
- ¥ {{$goods.original_price}}
+ ¥ {{$goods.original_price}}
{{/if}}
diff --git a/public/static/index/default/css/goods.css b/public/static/index/default/css/goods.css
index 6122b2a5d..3fd75be1f 100755
--- a/public/static/index/default/css/goods.css
+++ b/public/static/index/default/css/goods.css
@@ -37,7 +37,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
.theme-signin-left{padding-bottom:30px;max-height:250px ;overflow-y: scroll;background: #fff;}
.theme-options{display: block;overflow: hidden;padding-left: 10px;padding-right:10px; margin-bottom: 5px;}
.theme-signin-left .cart-title{font-size:14px ;font-weight: 600;}
-.theme-signin-left .sku-line{float: left; margin:10px;margin-left:0;border-radius:3px ; background:#efefef ;padding:0px 8px; border: 1px solid #d5d5d5;}
+.theme-signin-left .sku-line{float: left; margin:10px;margin-left:0;border-radius:3px ; background:#efefef ;padding:3px 8px; border: 1px solid #d5d5d5;}
.theme-signin-left .sku-line.selected{background:#d2364c;color: #fff; border: 1px solid #d2364c;}
.sku-line-images { padding:3px !important; }
.sku-line-images img { width: 30px; height: 30px; vertical-align: middle; }
@@ -91,7 +91,7 @@ input{font-size:12px;font-size:100%;outline:none;line-height:normal;color:#444;}
.theme-options .cart-title{margin-top:5px ;}
.theme-options ul{float: left;}
- .theme-signin-left .sku-line {background: none;border-radius:0 ;margin:5px;padding:0px 8px;border:1px solid #d5d5d5 ;color:#333; background-color: #f5f5f5; }
+ .theme-signin-left .sku-line {background: none;border-radius:0 ;margin:5px;border:1px solid #d5d5d5 ;color:#333; background-color: #f5f5f5; }
.theme-signin-left .sku-line.selected, .theme-signin-left .sku-line:hover {background:none;color:#333;border: 1px solid #e23f36; box-shadow: 0px 0 0px 1px #e23f36; }
/*选中样式*/
@@ -359,7 +359,7 @@ ul.detail-attr li {height: 26px;overflow: hidden;line-height: 26px;vertical-alig
.theme-options{overflow: visible;padding:0px 0px; margin-bottom: 5px;}
.theme-options ul{overflow: hidden;float: none;}
.theme-signin-left {max-width:100%;margin-bottom: 0;}
- .theme-signin-left .sku-line{margin: 5px;cursor: pointer; padding: 0px 8px; }
+ .theme-signin-left .sku-line{cursor: pointer; }
.theme-signin-left .cart-title{margin-left: -46px;font-size:12px ;font-weight: 100;color:#888 ;float: left;}
.scoll{display: none;}
diff --git a/public/static/index/default/js/goods.js b/public/static/index/default/js/goods.js
index 4fff6ab58..e1b014905 100755
--- a/public/static/index/default/js/goods.js
+++ b/public/static/index/default/js/goods.js
@@ -377,6 +377,7 @@ function GoodsSpecType()
function GoodsBaseRestore()
{
$('.text-info .price-now').text('¥'+$('.text-info .price-now').data('original-price'));
+ $('.sys_item_mktprice').text($('.sys_item_mktprice').data('original-price'));
$('.sys_item_price').text($('.sys_item_price').data('original-price'));
$('.number-tag input[type="number"]').attr('max', $('.number-tag input[type="number"]').data('original-max'));
$('.stock-tips .stock').text($('.stock-tips .stock').data('original-stock'));
@@ -593,6 +594,23 @@ $(function() {
var max = $('.stock-tips .stock').data('max-limit') || 0;
var unit = $('.stock-tips .stock').data('unit') || '';
+ // 手动输入
+ $sotck.on('blur', function()
+ {
+ var number = parseInt($(this).val());
+ var inventory = parseInt($('.stock-tips .stock').text());
+ if(number > inventory)
+ {
+ number = inventory;
+ }
+ if(number <= 1)
+ {
+ number = 1;
+ }
+ $sotck.val(number);
+ console.log(number)
+ });
+
//数量增加操作
$('#add').on('click', function()
{
--
GitLab