/* Js for , Version=1555083373 */ v.theme = {"template":"mobile","theme":"default","device":"mobile"};; $(function() { $.refreshCommentList = function() { $('#commentsListWrapper').load(window.location.href + ' #commentsList'); }; var $commentForm = $('#commentForm'); $commentForm.ajaxform({onSuccess: function(response) { if(response.result == 'success') { $('#commentDialog').modal('hide'); if(window.v) { $commentForm.find('#content').val(''); setTimeout($.refreshCommentList, 200) } } if(response.reason == 'needChecking') { $commentForm.find('.captcha-box').html(Base64.decode(response.captcha)).removeClass('hide'); } } }); }); ; $(function() { var countLink = '/cart-count.mhtml'; var browseLink = '/cart-browse.mhtml'; $.refreshCart = function(twinkle) { $.getJSON(countLink, function(data) { if($.isPlainObject(data) && data.result === 'success') { var $count = $('.cart-count').text(data.count).toggleClass('hide', data.count < 1); if(data.count > 0 && twinkle) { $count.addClass('twinkle'); setTimeout(function(){$count.removeClass('twinkle')}, 200); if(window.v && window.v.addToCartSuccess) $.messager.success(window.v.addToCartSuccess + "
" + window.v.gotoCart + "
" + data.count + "
", {time: 10000, cssClass: 'msger-cart'}); } } }); }; $.refreshCart(); });