From ae6a9d03278032583280b118c20a558321301992 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Mon, 22 Jan 2024 15:20:25 +0800 Subject: [PATCH] =?UTF-8?q?v5.0=E5=88=87=E6=8D=A2=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96=E3=80=81?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E9=80=89=E6=A1=86=E7=BB=84=E4=BB=B6=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96=E3=80=81?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=94=AF=E6=8C=81=E6=8C=87=E5=AE=9A=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E9=80=89=E4=B8=AD=E3=80=81=E5=85=B6=E4=BB=96=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.txt | 2 +- public/static/admin/default/css/common.css | 16 ++++++ .../static/admin/default/css/pluginsadmin.css | 3 ++ public/static/admin/default/js/common.js | 12 ----- public/static/common/css/common.css | 10 ++-- public/static/common/js/common.js | 36 +++++++++----- .../lib/amazeui-chosen/amazeui.chosen.js | 2 +- .../lib/amazeui-switch/amazeui.switch.css | 2 - public/static/index/default/js/goods.js | 49 +++++++++++++++++++ 9 files changed, 98 insertions(+), 34 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2cf3ff183..1d6f99ba7 100755 --- a/changelog.txt +++ b/changelog.txt @@ -12,7 +12,7 @@ 9.【新增】手机端支持APP(IOS+Android) 10.【新增】手机端支持多语言(中文、繁体、英文、西班牙) 11.【新增】手机端我的中支持门店订单查看和下单自动进入门店订单 -12.【新增】手机端购物车支持优惠明显查看及选择 +12.【新增】手机端购物车支持优惠明细查看及选择 13.【新增】短信对接多平台(腾讯、百度、云片、loginsms) 14.【新增】第三方登录APP支持(微信、QQ、苹果、谷歌、本机号码) 15.【新增】扫码收款和消息通知支持语音播报 diff --git a/public/static/admin/default/css/common.css b/public/static/admin/default/css/common.css index b76f140c5..54b05eb10 100755 --- a/public/static/admin/default/css/common.css +++ b/public/static/admin/default/css/common.css @@ -1198,3 +1198,19 @@ body[class^="admin-plugins-"] .content-right > .content { left: 50%; transform: translateX(-50%); } + + +/** + * 操作可伸缩的提示信息 + */ +.am-operate-stretch-tips { + background-color: var(--color-tips-warm-bg); + border-color:var(--color-tips-warm-br); +} +.am-operate-stretch-tips.am-close-tips { + border-color: var(--color-main); + background-color: var(--color-main-light); +} +.am-operate-stretch-tips.am-close-tips .title { + color: var(--color-main); +} \ No newline at end of file diff --git a/public/static/admin/default/css/pluginsadmin.css b/public/static/admin/default/css/pluginsadmin.css index 0f43f2497..940192aa6 100755 --- a/public/static/admin/default/css/pluginsadmin.css +++ b/public/static/admin/default/css/pluginsadmin.css @@ -150,6 +150,9 @@ background-color: transparent !important; border: 0 !important; } +.plugins-data-list>ul>li .operation button.am-btn-danger { + color: var(--color-red); +} .plugins-data-list>ul>li .operation a i, .plugins-data-list>ul>li .operation button i { diff --git a/public/static/admin/default/js/common.js b/public/static/admin/default/js/common.js index 56a4fbf20..e5a3aa687 100644 --- a/public/static/admin/default/js/common.js +++ b/public/static/admin/default/js/common.js @@ -517,18 +517,6 @@ $(function () { $("[data-key='" + key + "']").addClass('am-active').siblings('.item').removeClass('am-active'); }); - - // 后台顶级提示信息 - $(document).on('click', '.am-operate-stretch-tips .title', function () { - if ($(this).parent().hasClass('am-close-tips')) { - $(this).parent().removeClass('am-close-tips'); - $(this).parent().animate({ height: '100%', width: '100%' }, 500); - } else { - $(this).parent().addClass('am-close-tips'); - $(this).parent().animate({ height: '35px', width: '84px' }, 500); - } - }); - // 点击页面关闭父级的tab右侧工具弹窗 $('body').on('click', function () { if ((parent.IframeCloseNavTabsRightTools || null) != null) { diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index ac80f84b7..de9886b80 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -3309,8 +3309,8 @@ table.am-table .am-operate-grid .am-btn i { * 操作可伸缩的提示信息 */ .am-operate-stretch-tips { - background-color: var(--color-tips-warm-bg); - border: 0.1rem solid var(--color-tips-warm-br); + background-color: #f1fcff; + border: 0.1rem solid #f1fcff; display: block; width: 100%; height: 100%; @@ -3321,12 +3321,12 @@ table.am-table .am-operate-grid .am-btn i { margin-bottom: 2rem; } .am-operate-stretch-tips.am-close-tips { - border: 0.1rem solid var(--color-main); - background-color: var(--color-main-light); + border: 0.1rem solid #2a94ff; + background-color: #edf4ff; border-radius: var(--border-radius); } .am-operate-stretch-tips.am-close-tips .title { - color: var(--color-main); + color: #2a94ff; } .am-operate-stretch-tips.am-close-tips .contract { diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 4346dabf1..2ef4e68f3 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -2591,19 +2591,17 @@ function UrlUseCurrentHostHandle (url) { */ function SelectChosenInit () { if ($('select.chosen-select').length > 0) { - $('select.chosen-select').each(function () { - if ($(this).parent().find('.chosen-container').length > 0) { - $('select.chosen-select').trigger('chosen:updated'); - } else { - $('select.chosen-select').chosen({ - inherit_select_classes: true, - enable_split_word_search: true, - search_contains: true, - no_results_text: window['lang_chosen_select_no_results_text'], - disable_search_threshold: 10 - }); - } - }) + // 已初始化的则更新 + $('select.chosen-select.chosen-init-success').trigger('chosen:updated'); + + // 初始化 + $('select.chosen-select:not(.chosen-init-success)').chosen({ + inherit_select_classes: true, + enable_split_word_search: true, + search_contains: true, + no_results_text: window['lang_chosen_select_no_results_text'], + disable_search_threshold: 10 + }); } } @@ -5619,4 +5617,16 @@ $(function () { var key = $(this).data('key'); $("[data-key='" + key + "']").addClass('am-active').siblings('.item').removeClass('am-active'); }); + + // 顶级提示信息 + $(document).on('click', '.am-operate-stretch-tips .title', function () { + var $parent = $(this).parent(); + if ($parent.hasClass('am-close-tips')) { + $parent.removeClass('am-close-tips'); + $parent.animate({ height: '100%', width: '100%' }, 500); + } else { + $parent.addClass('am-close-tips'); + $parent.animate({ height: '35px', width: '90px' }, 500); + } + }); }); \ No newline at end of file diff --git a/public/static/common/lib/amazeui-chosen/amazeui.chosen.js b/public/static/common/lib/amazeui-chosen/amazeui.chosen.js index 49cc86ed1..387139d6d 100755 --- a/public/static/common/lib/amazeui-chosen/amazeui.chosen.js +++ b/public/static/common/lib/amazeui-chosen/amazeui.chosen.js @@ -590,7 +590,7 @@ This file is generated by `grunt build`, do not edit it by hand. } else { this.container.html('' + this.default_text + '
'); } - this.form_field_jq.hide().after(this.container); + this.form_field_jq.hide().addClass('chosen-init-success').after(this.container); this.dropdown = this.container.find('div.chosen-drop').first(); this.search_field = this.container.find('input').first(); this.search_results = this.container.find('ul.chosen-results').first(); diff --git a/public/static/common/lib/amazeui-switch/amazeui.switch.css b/public/static/common/lib/amazeui-switch/amazeui.switch.css index e16d8d2d9..f7351dd91 100755 --- a/public/static/common/lib/amazeui-switch/amazeui.switch.css +++ b/public/static/common/lib/amazeui-switch/amazeui.switch.css @@ -17,7 +17,6 @@ transition-property: background-color, border; border: 2px solid #ddd; background-color: #ddd; - background-clip: padding-box; cursor: pointer; font-family: "iconfont" !important; font-style: normal; @@ -46,7 +45,6 @@ -webkit-transition-property: -webkit-transform, width, left; transition-property: transform, width, left; background-color: #fff; - background-clip: padding-box; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, .4); box-shadow: 0 2px 5px rgba(0, 0, 0, .4); } diff --git a/public/static/index/default/js/goods.js b/public/static/index/default/js/goods.js index f109bef6e..a0e4e4500 100755 --- a/public/static/index/default/js/goods.js +++ b/public/static/index/default/js/goods.js @@ -562,6 +562,55 @@ $(function() { // 购物车表单初始化 FromInit('form.cart-form'); + // 指定规格初始化选中 + var spec = decodeURIComponent(GetQueryValue('spec') || ''); + if((spec || null) != null) + { + spec = spec.split('|'); + if($('.sku-container').length > 0 && $('.sku-container .sku-items').length > 0 && $('.sku-container .sku-items').length == spec.length && $('.buy-submit-container').length > 0 && ($('.buy-submit-container button.buy-submit').length > 0 || $('.buy-submit-container button.cart-submit').length > 0)) + { + var $other_price = $('.tb-detail-price .price-top-content .items dd b'); + var $price = $('.tb-detail-price .price-top-content .goods-sale-price .goods-price'); + // 先清除价格展示信息 + $other_price.text(__currency_symbol__+'...'); + $price.text('...'); + var num = 0; + var timer = setInterval(function() + { + $('.sku-container .sku-items').each(function(k, v) + { + // 清除价格展示信息、避免获取价格类型赋值 + $other_price.text(__currency_symbol__+'...'); + $price.text('...'); + // 必须不存在已选择项 + if($(this).find('ul li.selected').length <= 0) + { + var temp_spec = spec[k]; + var status = false; + $(this).find('ul li').each(function(ks, vs) + { + // 必须是可选和未选 + if(!status && !$(this).hasClass('sku-items-disabled') && !$(this).hasClass('sku-dont-choose') && temp_spec == $(this).attr('data-value')) + { + $(this).trigger('click'); + status = true; + num++; + } + }); + } + }); + if(num >= $('.sku-container .sku-items').length) + { + clearInterval(timer); + } + }, 100); + setTimeout(function() + { + clearInterval(timer); + }, 20000); + } + } + // 商品规格选择 $('.theme-options').each(function() {