diff --git a/service/Application/Admin/View/Default/Goods/SaveInfo.html b/service/Application/Admin/View/Default/Goods/SaveInfo.html index f8d1f4bfa..6e64a37b1 100755 --- a/service/Application/Admin/View/Default/Goods/SaveInfo.html +++ b/service/Application/Admin/View/Default/Goods/SaveInfo.html @@ -284,7 +284,7 @@ $(function() - img_file_upload_show('.images-file-tag-{{$v.id}}'); + ImageFileUploadShow('.images-file-tag-{{$v.id}}'); }); diff --git a/service/Application/Home/View/Default/Cart/Index.html b/service/Application/Home/View/Default/Cart/Index.html index adc2a629e..ae8810319 100755 --- a/service/Application/Home/View/Default/Cart/Index.html +++ b/service/Application/Home/View/Default/Cart/Index.html @@ -141,7 +141,7 @@ $.AMUI.progress.done(); Prompt(e.msg, 'success'); $('#data-list-'+e.data_id).remove(); - $('.top-nav-cart-total').text(parseInt(e.data)); + HomeCartNumberTotalUpdate(parseInt(e.data)); } else { $('form.form-validation').find('button[type="submit"]').button('reset'); $.AMUI.progress.done(); diff --git a/service/Application/Home/View/Default/Public/HeaderTopNav.html b/service/Application/Home/View/Default/Public/HeaderTopNav.html index dbede74fb..22198c843 100755 --- a/service/Application/Home/View/Default/Public/HeaderTopNav.html +++ b/service/Application/Home/View/Default/Public/HeaderTopNav.html @@ -66,7 +66,11 @@ javascript:;{{:U('Home/Cart/Index')}}" target="_top"> 购物车 - {{$common_cart_total}} + + {{$common_cart_total}} + + {{$common_cart_total}} + diff --git a/service/Application/Home/View/Default/Public/Nav.html b/service/Application/Home/View/Default/Public/Nav.html index 65f321319..951cb9ecc 100755 --- a/service/Application/Home/View/Default/Public/Nav.html +++ b/service/Application/Home/View/Default/Public/Nav.html @@ -8,7 +8,7 @@
  • class="active"> href="javascript:;" class="login-event" href="{{:U('Home/Cart/Index')}}">购物车 - {{$common_cart_total}} + {{$common_cart_total}}
  • class="active"> diff --git a/service/Application/Home/View/Default/UserAddress/Index.html b/service/Application/Home/View/Default/UserAddress/Index.html index b9b71573f..3de8d159b 100644 --- a/service/Application/Home/View/Default/UserAddress/Index.html +++ b/service/Application/Home/View/Default/UserAddress/Index.html @@ -63,6 +63,9 @@ + +
    {{:L('common_not_data_tips')}}
    +
    diff --git a/service/Public/Admin/Default/Js/Goods.js b/service/Public/Admin/Default/Js/Goods.js index 59a25a78d..090df39c4 100755 --- a/service/Public/Admin/Default/Js/Goods.js +++ b/service/Public/Admin/Default/Js/Goods.js @@ -136,7 +136,7 @@ $(function() $content_tag.append(html); $content_tag.attr('index', index); $(this).attr('index', i+1); - img_file_upload_show('.images-file-tag-'+index); + ImageFileUploadShow('.images-file-tag-'+index); }); // 手机详情删除 diff --git a/service/Public/Common/Js/Common.js b/service/Public/Common/Js/Common.js index 74c0036c8..916a072c1 100755 --- a/service/Public/Common/Js/Common.js +++ b/service/Public/Common/Js/Common.js @@ -162,14 +162,14 @@ function IsExitsFunction(fun_name) } /** - * [Get_Tag_Value 根据tag对象获取值] + * [GetTagValue 根据tag对象获取值] * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2017-10-07T20:53:40+0800 * @param {[object]} tag_obj [tag对象] */ -function Get_Tag_Value(tag_obj) +function GetTagValue(tag_obj) { // 默认值 var v = null; @@ -246,8 +246,8 @@ function FromInit(form_name) { validity.valid = true; } else { - var v1 = Get_Tag_Value($(validity.field)); - var v2 = Get_Tag_Value($(tag)); + var v1 = GetTagValue($(validity.field)); + var v2 = GetTagValue($(tag)); validity.valid = (v1 == null && v2 == null) ? false : true; } } @@ -587,12 +587,12 @@ function Tree(id, url, level, is_add_node) } /** - * [img_file_upload_show 图片上传预览] + * [ImageFileUploadShow 图片上传预览] * @param {[string]} class_name [class名称] * @param {[string]} show_img [预览图片id或class] * @param {[string]} default_images [默认图片] */ -function img_file_upload_show(class_name, show_img, default_images) +function ImageFileUploadShow(class_name, show_img, default_images) { $(document).on("change", class_name, function(imgFile) { @@ -988,7 +988,7 @@ $(function() * @param {[string]} type [edit, add] * @return {[object]} [处理后的数据] */ - function fun_save_win_additional(data, type) + function FunSaveWinAdditional(data, type) { // 额外处理数据 if($('#tree').length > 0) @@ -1061,7 +1061,7 @@ $(function() } // 填充数据 - var data = fun_save_win_additional($(this).data('json'), 'edit'); + var data = FunSaveWinAdditional($(this).data('json'), 'edit'); // 开始填充数据 FormDataFill(data, '#'+tag); @@ -1077,7 +1077,7 @@ $(function() $('#tree').on('click', '.tree-submit-add-node', function() { // 清空表单数据 - tree_form_init(); + TreeFormInit(); // 父节点赋值 var id = parseInt($(this).data('id')) || 0; @@ -1129,7 +1129,7 @@ $(function() */ $('.tree-submit-add').on('click', function() { - tree_form_init(); + TreeFormInit(); }); /** @@ -1140,7 +1140,7 @@ $(function() * @date 2018-08-06 * @desc description */ - function tree_form_init() + function TreeFormInit() { // 更改窗口名称 $title = $('#data-save-win').find('.am-popup-title'); @@ -1150,7 +1150,7 @@ $(function() var data = {"id":"", "pid":0, "name":"", "sort":0, "is_enable":1, "icon":""}; // 额外处理数据 - data = fun_save_win_additional(data, 'init'); + data = FunSaveWinAdditional(data, 'init'); // 清空表单 FormDataFill(data); @@ -1366,7 +1366,7 @@ $(function() // 图片预览 if($('.images-file-event').length > 0) { - img_file_upload_show('.images-file-event'); + ImageFileUploadShow('.images-file-event'); } // 图片组合input清除按钮 @@ -1436,12 +1436,12 @@ $(function() $(this).parent().removeClass('plug-images-add-tag'); // 继续添加 - plug_images_list_add('add'); + PlugImagesListAdd('add'); } }); // 多图片上传 - 继续添加 - function plug_images_list_add(event) + function PlugImagesListAdd(event) { var max = $plug_images_list.data('max-count') || 0; var count = $plug_images_list.find('li').length; @@ -1469,7 +1469,7 @@ $(function() // 初始化 if($plug_images_list.length > 0) { - plug_images_list_add('init'); + PlugImagesListAdd('init'); } // 多图片上传 - 点击事件禁止 @@ -1482,7 +1482,7 @@ $(function() $(document).on('click', '.plug-images-delete-submit', function() { $(this).parent().parent().parent().remove(); - plug_images_list_add('del'); + PlugImagesListAdd('del'); }); /* 搜索切换 */ diff --git a/service/Public/Home/Default/Css/Search.css b/service/Public/Home/Default/Css/Search.css index 503c79a73..72a553ad5 100755 --- a/service/Public/Home/Default/Css/Search.css +++ b/service/Public/Home/Default/Css/Search.css @@ -1,11 +1,3 @@ -@charset "utf-8"; -/* CSS Document */ -*, *:after, *:before{ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - -o-box-sizing: border-box; - box-sizing: border-box; } -/*任何标签、包括它前面、后面生成的内容都不要影响盒子的边框*/ ul, li, ol {list-style: none;} dl,dt,dd{ margin:0px auto; padding:0px;} [class*="am-u-"] {padding-left:0rem;padding-right:0rem;} @@ -23,7 +15,6 @@ img{ width:100%;} /* select */ .sort-nav{padding:0px;font-size:12px} - .suggest{ display:none;} .select li { margin: 5px 0px; } .select dl{zoom:1;position:relative;line-height:24px; } @@ -48,7 +39,7 @@ li.select-result dt {left:-26px; top:0;font-weight:bold;width:50px;} /*排序*/ .sort-nav { width:100%; background: #fff; overflow: hidden; height: 30px; } .sort-nav li{ float:left;width:33.33%;height:30px; line-height:30px; text-align:center; padding:0px 0px;cursor: pointer;} -.sort-nav li a{font-size:14px;} +.sort-nav li a{font-size:14px; text-decoration: none;} .sort-nav li.first {color: #F03726;} @@ -77,7 +68,6 @@ dl#select3 .dd-conent{ left:-200%; right:0px;} .search-pages-submit { margin: 10px 0; } - @media only screen and (min-width: 640px) { /* select */ .theme-popover { padding: 0 5px; } @@ -91,13 +81,10 @@ dl#select3 .dd-conent{ left:-200%; right:0px;} .select li{list-style:none;padding:0px 0px 0px 100px;border-top:#eee 1px dashed;float: none;display: block;height: auto;} .select-result dl dt{width:100px;} - .screening-remove-submit{width:80px;float:right;margin-right:20px;} - .search-content .am-badge{font-size:14px ;padding:0px 0px;background: none; } - /*排序*/ .sort-nav{padding:0px 0px;margin:10px 5px; font-size: 12px;width:auto;overflow: hidden;} .sort-nav li{ display:inline; padding:0px 20px;width:auto;border-right:1px solid #eee;} @@ -115,13 +102,11 @@ dl#select3 .dd-conent{ left:-200%; right:0px;} /*搜索结果*/ li.select-result dl {padding: 10px 0px 0px 0px;} - .scoll{ margin-top:70px;} .am-slider-default .am-direction-nav a {z-index:0;} span.am-icon-th-list{color:orangered;margin-right:1px ;} - /*改写的布局*/ .flood li{width:33.3%;float: left; text-align: center;} .smallnav img{max-width:60px;} @@ -149,7 +134,7 @@ dl#select3 .dd-conent{ left:-200%; right:0px;} .data-list li:nth-child(2n) .i-pic.limit { margin-right: 0px; } .data-list li:nth-child(2n+1) .i-pic.limit { margin-left: 0px; } .screening-remove-submit { margin-top: -28px; } - .select .title-tips { padding: 0 5px; } + .select .title-tips { padding: 5px 5px 0 5px; } .sort-nav li { border-bottom: 1px solid #eee; } .select-list .dd-conent { overflow-y: scroll;overflow-x: hidden; } } diff --git a/service/Public/Home/Default/Css/UserAddress.css b/service/Public/Home/Default/Css/UserAddress.css index ed4cfe48b..757d4dffd 100755 --- a/service/Public/Home/Default/Css/UserAddress.css +++ b/service/Public/Home/Default/Css/UserAddress.css @@ -3,7 +3,6 @@ */ ul.address-list { overflow: hidden; - margin-top: 10px; } ul.address-list li.address-default { @@ -40,6 +39,12 @@ ul.address-list li:nth-child(2n) { margin-right: 0; } +@media only screen and (min-width: 641px) { + ul.address-list { + margin-top: 10px; + } +} + @media only screen and (min-width: 1025px) { ul.address-list li { width: calc(25% - 8px); @@ -53,6 +58,19 @@ ul.address-list li:nth-child(2n) { } } +@media only screen and (max-width: 641px) { + .control .address-submit-save { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + z-index: 2; + } + .am-footer { + padding-bottom: 30px; + } +} + /** * 地址添加/编辑 diff --git a/service/Public/Home/Default/Js/Buy.js b/service/Public/Home/Default/Js/Buy.js index a62c16366..f3b35ec62 100755 --- a/service/Public/Home/Default/Js/Buy.js +++ b/service/Public/Home/Default/Js/Buy.js @@ -1,8 +1,5 @@ -var store = $.AMUI.store; -if(!store.enabled) +if(store.enabled) { - alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.'); -} else { // 选择缓存key var store_address_key = 'store-buy-address-selected-index'; var store_use_new_address_status_key = 'store-buy-use-new-address-status-count'; diff --git a/service/Public/Home/Default/Js/Cart.js b/service/Public/Home/Default/Js/Cart.js index 221e3e493..7de2fe546 100755 --- a/service/Public/Home/Default/Js/Cart.js +++ b/service/Public/Home/Default/Js/Cart.js @@ -49,8 +49,7 @@ $(function() stock = 1; } self.parents('.stock-tag').find('input').val(stock); - var temp_price = FomatFloat(stock*price, 2); - self.parents('tr').find('.total-price-content').text('¥'+temp_price); + self.parents('tr').find('.total-price-content').text('¥'+FomatFloat(stock*price, 2)); // 开启进度条 $.AMUI.progress.start(); @@ -69,6 +68,9 @@ $(function() { PromptCenter(result.msg, 'success'); + // 数量更新 + self.parents('tr').find('.wap-number').text('x'+stock); + // 计算选择的商品总数和总价 cart_base_total(); } else { diff --git a/service/Public/Home/Default/Js/Common.js b/service/Public/Home/Default/Js/Common.js index bcef09df9..904e9c127 100755 --- a/service/Public/Home/Default/Js/Common.js +++ b/service/Public/Home/Default/Js/Common.js @@ -11,6 +11,20 @@ if(!store.enabled) var store_user_menu_key = 'store-user-menu-active-key'; } +// 购物车数量更新 +function HomeCartNumberTotalUpdate(number) +{ + var $this = $('.common-cart-total'); + if(number <= 0) + { + $this.text(''); + $this.removeClass('am-badge am-badge-danger'); + } else { + $this.text(number); + $this.addClass('am-badge am-badge-danger'); + } +} + $(function() { // 选中处理 diff --git a/service/Public/Home/Default/Js/Goods.js b/service/Public/Home/Default/Js/Goods.js index 81801084c..fce4badfe 100755 --- a/service/Public/Home/Default/Js/Goods.js +++ b/service/Public/Home/Default/Js/Goods.js @@ -98,7 +98,7 @@ function CartAdd(e) if(result.code == 0) { - $('.top-nav-cart-total').text(parseInt(result.data)); + HomeCartNumberTotalUpdate(parseInt(result.data)); PromptCenter(result.msg, 'success'); } else { PromptCenter(result.msg);