产品中心

Copyright © 2018 www.redor360.com 赛车平台 版权所有
网站地图

羽绒服搭配_羽绒被芯_艾莱依服品牌官网商城赛车

2020-10-25

  该物品目前缺货,请不才面输入您的邮箱所在或手机号码,赛车平台当咱们有现货供当令,咱们会发送邮件报告您!

  0) { var tmp = min min = max max = tmp } min = +min max = +max var value = min if(max == 99999999) value += 元以上 else value += - + max + 元 input[0].value = min input[1].value = max setFilter(this, parent, value, min, max) hideFilterPop(this.getParent(.filter-item)) Query.filter(getData()) }, click:relay(.filter-dropdown-label):function(e) { var parent = this.getParent() parent.toggleClass(current) if(!parent.outerclick) parent.getDocument().addEvent(click, function(e){ parent.outerclick = true if(!parent.contains($(e.target))) hideDropdown(parent) }) }, mouseenter:relay(.filter-dropdown-item):function(e){ clearTimeout(this.timer) }, mouseleave:relay(.filter-dropdown-item):function(e){ this.timer = hideDropdown.delay(1000, this, this) }, click:relay(.action-filter-more):function(e) { e.preventDefault() hides.toggleClass(hide) toggleText(this.getElement(.text)) toggleText(this.getElement(.icon)) } }) Module.gallery.sortbar.addEvents({ click:relay(.action-sort):function(e){ e.preventDefault() toggleOrderby(this) if(!this.hasClass(active) this.match([class*=price-])) { Query.filter(getData()) } toggleActive(this) }, change:relay(.action-orderby):function(e) { var sort = Module.elements(gallery.sortbar,.action-sort) var hl = sort.every(function(s){ var sortby = s.get(data-sort) var order = this.value if(order.indexOf(price ) === 0 sortby.indexOf(price ) === 0) { if(order !== sortby) { toggleOrderby(s, false) } toggleActive(s) return false } if(order == sortby) { toggleActive(s) return false } return true }, this) if(hl) sort.removeClass(active) Query.filter(getData()) }, click:relay(.action-showmode):function(e){ e.preventDefault() if(this.hasClass(active)) return toggleActive(this) Module.element(gallery.sortbar,input[name=showtype]).value = this.get(data-show-type) Query.filter(getData()) }, change:relay(.action-gtags,.action-available):function(e) { Query.filter(getData()) }, click:relay(a.flip:not(.over)):function(e){ e.preventDefault() var self = this Query.filter(getData(this), function(e){ self.getSiblings(.over).removeClass(over) var page = getFlipPage() var parent = self.getParent() if(page= getPage().total) parent.getElement(.next).addClass(over) }) } }) Module.gallery.show.addEvents({ click:relay(.action-addtocart):function(e){ if(this.target != _dialog_minicart) { var item = this.getParent(.goods-item) var num = item.getElement(.action-quantity-input) if(!num) return var ginfo = { gid: item.getElement([name=goods[goods_id]]).value, pid: item.getElement([name=goods[product_id]]).value, num: num.value } var url = /index.php/cart-add-goods-{gid}-{pid}-{num}.html this.href= url.substitute(ginfo) // Query.addtocart(this.href, data, this.target) } }, click:relay(.action-notify): function(e) { var id = this.get(rel).split(::) var dialog = new Dialog($(product_notify).wrapped(), { title:到货报告, width: 400, modal: { class: cover }, onLoad: function(){ var content = this.content var holder = content.getElements(input[type=hidden]) var handle = content.getElement([rel=_request]) holder[0].value = id[0] holder[1].value = id[1] handle handle.store(_ajax_config,{ onSuccess:function(rs){ if(rs rs[0]) { if(rs[0][true]) { content.getElement(.product-notify).innerHTML = showCompareFoot() last = content.getElement(.compare-item) } else { var items = ul.getElements(.compare-item) var j = items.length if(j == 5) { return tips.show(最众只可对照5个商品,赛车平台请删除之后再增添。) } for(var i = 0 i1) { this.getParent(.compare-item).destroy() } else clearCompare() }, click:relay(.action-goods-compare):function(e){ var item = Module.gallery.compare.getElements(.compare-item) if(item.length new Element(div,{html:tpl}).getFirst().inject(selected) } else { if(single) { selected_item.getElement(.filter-selected-item).set(data-fid, id).innerHTML = tpl } else { new Element(span.filter-selected-item, { data-fid: id, html:tpl }).inject(selected_item) } } } function setCustom(item) { var price = item.getNext([data-fid$=custom]) if(price) { var area = item.get(data-fid) var input = price.getElements(.action-filter-input) area = area ? area.split(-)[1].split(~) : [] input.each(function(el,i){ el.value = area[i] }) } } function getFlipPage(el) { var page = getPage().current if(el) { if(el.hasClass(next)) page += 1 else if(el.hasClass(prev)) page -= 1 else page = el.get(text) } return page } function getPage() { var pagedata = {} var pagelimit = 32 try { pagedata = JSON.decode(Module.gallery.show.getElement(.action-pagedata).value) {} }catch(e){} return { sum: pagedata.total 0, current: pagedata.pagecurrent 1, total: pagedata.pagetotal 1 } } function updateNum() { var page = getPage() $(filter_container).getElement(.op-search-result).innerHTML = page.sum Module.element(gallery.sortbar, .page-current).innerHTML = page.current Module.element(gallery.sortbar, .page-total).innerHTML = page.total var prev = Module.element(gallery.sortbar, .page-action .prev) var next = Module.element(gallery.sortbar, .page-action .next) if(page.total == 1) { prev.addClass(over) next.addClass(over) } else if(page.total>

   new Element(div,{html:tpl}).getFirst().inject(selected) } else { if(single) { selected_item.getElement(.filter-selected-item).set(data-fid, id).innerHTML = tpl } else { new Element(span.filter-selected-item, { data-fid: id, html:tpl }).inject(selected_item) } } } function setCustom(item) { var price = item.getNext([data-fid$=custom]) if(price) { var area = item.get(data-fid) var input = price.getElements(.action-filter-input) area = area ? area.split(-)[1].split(~) : [] input.each(function(el,i){ el.value = area[i] }) } } function getFlipPage(el) { var page = getPage().current if(el) { if(el.hasClass(next)) page += 1 else if(el.hasClass(prev)) page -= 1 else page = el.get(text) } return page } function getPage() { var pagedata = {} var pagelimit = 32 try { pagedata = JSON.decode(Module.gallery.show.getElement(.action-pagedata).value) {} }catch(e){} return { sum: pagedata.total 0, current: pagedata.pagecurrent 1, total: pagedata.pagetotal 1 } } function updateNum() { var page = getPage() $(filter_container).getElement(.op-search-result).innerHTML = page.sum Module.element(gallery.sortbar, .page-current).innerHTML = page.current Module.element(gallery.sortbar, .page-total).innerHTML = page.total var prev = Module.element(gallery.sortbar, .page-action .prev) var next = Module.element(gallery.sortbar, .page-action .next) if(page.total == 1) { prev.addClass(over) next.addClass(over) } else if(page.total1){ next.removeClass(over) if(page.total == page.current) { prev.removeClass(over) next.addClass(over) } else { if(page.current == 1) { prev.addClass(over) } else { prev.removeClass(over) } next.removeClass(over) } } } function hideFilterPop(el) { if(!el.getElement(input:focus)){ el.removeClass(filter-pop-active) } } function hideDropdown(el) { el.removeClass(current) } function toggleText(el, attr) { attr = attr data-toggle var a = el.get(attr) var b = el.get(text) el.set(attr, b).set(text, a) } function toggleActive(el, cls) { if(!el) return cls = cls active el.addClass(cls).getSiblings(.+cls).removeClass(cls) } function toggleOrderby(el, set){ // if(el.hasClass(active)) return var sel = Module.element(gallery.sortbar, .action-orderby) var sort = if(el.hasClass(price-desc)) { el.swapClass(price-desc, price-asc) sort = price asc el.set(data-sort, sort) } else if(el.hasClass(price-asc)) { el.swapClass(price-asc, price-desc) sort = price desc el.set(data-sort, sort) } else { sort = el.get(data-sort) } if(set !== false) sel.value = sort } //== 为数目采取框绑定事情 bindQuantityEvent(Module.gallery.show,setQuantity) function bindQuantityEvent(elements, callback) { elements = document.id(elements) $$(elements) if(!elements !elements.length) return var value = elements.addEvents({ //= 数目按钮 click:relay(.btn-decrease,.btn-increase): function(e) { var input = this.getParent().getElement(.action-quantity-input) value = +input.value input.value = this.hasClass(btn-decrease) ? value - 1 : value + 1 callback callback(input, value) }, //= 数目输入框 focus:relay(.action-quantity-input): function(e){ value = +this.value }, change:relay(.action-quantity-input): function(e) { callback callback(this, value) } }) } //== 获取商品数目值 function getQuantity(el, type) { return el.getElement(input[name= + type + ]).value } //== 筑设商品数目 function setQuantity(input, value) { var type = product inputCheck(input, {min: input.get(min), max: input.get(max), default: value}) } //== 商品数目输入框准确性检测 function inputCheck(input, options) { if(!input) return false options = options {} if(isNaN(options.min)) options.min = 1 if(isNaN(options.max)) options.max = 9999 options[default] = options[default] options.min var value = +input.value var tips = new Tips(input) var pre = var msg = if(options.store options.store - valueoptions.max){ input.value = options.max msg = pre + 此商品最众只可添置 + options.max + 件 } else if(isNaN(value)) { input.value = options[default] msg = 只批准输入数字 } if (msg) { tips.show(msg) return false } tips.hide() return true } // 商品对照 function openCompare(o) { (o Module.gallery.compare).addClass(gallery-compare-unfold) } function foldCompare(o, delay) { o = o Module.gallery.compare if(delay & o.hasClass(gallery-compare-unfold)) { o.timer = foldCompare.delay(delay, o, o); } else o.removeClass(gallery-compare-unfold); } function clearCompare() { var content = Module.element(gallery.compare, .content); content.innerHTML = Module.element(gallery.compare, .none-template).innerHTML; hideCompareFoot(); } function showCompareFoot() { Module.element(gallery.compare, .footer).removeClass(hide); } function hideCompareFoot() { Module.element(gallery.compare, .footer).addClass(hide); }