var Util = Util || {}; Util.isMobile = { Android: function() { return !!navigator.userAgent.match(/Android/i) }, BlackBerry: function() { return !!navigator.userAgent.match(/BlackBerry/i) }, iOS: function() { return !!navigator.userAgent.match(/iPhone|iPad|iPod/i) }, iPhoneX: function() { return 375 == screen.availWidth && screen.availHeight > 700 }, Windows: function() { return !!navigator.userAgent.match(/IEMobile/i) }, Weixin: function() { return !!navigator.userAgent.match(/MicroMessenger/i) }, Sqkb: function() { return '' }, Haozhi: function() { return '' }, any: function() { return Util.isMobile.Android() || Util.isMobile.BlackBerry() || Util.isMobile.iOS() || Util.isMobile.Windows() || Util.isMobile.Weixin() } }, Util.getSqkbVersion = function() { }, Util.sqkbVersionComp = function(i, t) { }, Util.linkedmeInit = function(i) { }, Util.getLkmUrl = function(i, t, e) { var n = { inapp_data: { url: i, ref: window.location.href, os: t, browser: window.navigator.userAgent } }, o = {}; o.type = "test", o.params = JSON.stringify(n), o.req_version = encodeURIComponent(i), linkedme.link(o, function(i, t) { e(i, t) }, !1) }, Util.dockBar = function() { var i = $("#dock").val(); if (i) { var t = window.location.pathname; } }, Util.addShareMeta = function(i, t, e, n, o, s, a) { o || (o = "weixin,weixin_friends,qq_space,qq_friends,weibo"), window[s] = function() { a && a() }; var c = ''; c += '', c += '', c += '', c += '', c += '', c += '', $("head").append(c), setTimeout(function() { try { metaHandler.checkShareMode() } catch (i) {} try { checkShareMode() } catch (i) {} try { Util.JSBridge.callHandler("getShareInfo", { share_title: i, share_desc: t, share_pic: e, share_url: n, share_channel: o, share_callback: s }) } catch (i) {} }, 0) }, Util.scrollLoading = function(i, t) { var e = document.documentElement; $(document).on("touchmove scroll", function() { e.scrollHeight - e.clientHeight - (e.scrollTop || window.pageYOffset || document.body.scrollTop) <= i && t() }) }, Util.noCouponProductUrlTrans = function(i, t) { //nbpdd var e = "https://item.taobao.com/item.htm?id=" + i; //nbpdd return e; }, Util.scrollToTop = function(i) { var t = $("body,html"); i < 20 ? t.scrollTop(0) : t.stop(!0, !0).animate({ scrollTop: 0 }, i) }, Util.scrollToID = function(i,toid) { console.log('toid:'+toid); if(toid){ $('html, body').animate({ scrollTop: $("#"+toid).offset().top }, 500) } }, Util.backToTopInit = function(i, t, e) { var n = $('
'); n.on("click", function() { Util.scrollToTop(200), e && Util.gaSendEvent(e) }), $("body").append(n); var o = document.documentElement; $(document).on("touchmove scroll", function() { (o.scrollTop || window.pageYOffset || document.body.scrollTop) >= 100 ? n.show() : n.hide() }) }, Util.springbBackToTopInit = function(i, t, e) { var n = $('
'); n.on("click", function() { Util.scrollToTop(200), e && Util.gaSendEvent(e) }), $("body").append(n); var o = document.documentElement; $(document).on("touchmove scroll", function() { (o.scrollTop || window.pageYOffset || document.body.scrollTop) >= 100 ? n.show() : n.hide() }) }, Util.lazyload = function(i) { $("." + i).each(function() { var i = $(this), t = i.attr("data-original"); $("").one("load", function() { i.is("img") ? i.attr("src", t) : i.css("background-image", "url(" + t + ")"), setTimeout(function() { i.css("opacity", "1") }, 15) }).one("error", function() { i.css("opacity", "1") }).attr("src", t) }) }, Util.timeCountForDE = function(i) { var t = (i = $(i)).data("endtime"); if (t) { var e = t - 1 * Math.floor((new Date).getTime() / 1e3); if (e <= 0) window.location.reload(); else { var n = Math.floor(e / 86400), o = Math.floor((e - 60 * n * 60 * 24) / 3600), s = Math.floor((e - 60 * n * 60 * 24 - 60 * o * 60) / 60), a = e - 60 * n * 60 * 24 - 60 * o * 60 - 60 * s; o = (o = (o = 24 * n + o).toString()).length <= 1 ? "0" + o : o, s = (s = s.toString()).length <= 1 ? "0" + s : s, a = (a = a.toString()).length <= 1 ? "0" + a : a; var c = '' + o[0] + ""; c += '' + o[1] + "", c += '' + s[0] + "", c += '' + s[1] + "", c += '' + a[0] + "", c += '' + a[1] + "", i.html(c) } } }, Util.isPhoneNumber = function(i) { return /^1[34578]\d{9}$/.test(i) }, Util.gaSendEvent = function(i) { //var t = i.split(":"); //"undefined" != typeof ga && t.length >= 3 && ga("send", "event", t[0], t[1], t[2]) }, Util.gaInit = function(i) { $(i).click(function() { var i = $(this).attr("data-ga-event"); Util.gaSendEvent(i) }) }, Util.getAppInfo = function(i) { var t = i; if (!t) return {}; for (var e = {}, n = 0, o = (t = t.split(";")).length; n < o; n++) { var s = t[n].split("="); e["" + s[0]] = s[1] } return e }, Util.getQueryString = function(i) { if (i.split("?").length <= 1) return {}; var t = i.split("?")[1]; if (!t) return {}; for (var e = {}, n = 0, o = (t = t.split("&")).length; n < o; n++) { var s = t[n].split("="); e["" + s[0]] = s[1] } return e }, Util.getFixedTopInSqkb = function() { var i = Util.getQueryString(window.location.href).app_nav_ratio, t = 0; return i && (t = ($("body").width() * i).toFixed(3)), t }, Util.urlExtend = function(i, t) { for (var e = 0; e < i.length; e++) { -1 != i[e].extend.indexOf("?") ? i[e].extend = i[e].extend + "&" + t : i[e].extend = i[e].extend + "?" + t } return i }, Util.timeCountDown = function(i, t, e, n) { i = $(i); e = e || 0; var o = i.data("endtime"), s = 1 * Math.floor((new Date).getTime() / 1e3); if (s > o && t) i.html(t); else { var a = 0, c = 0, l = 0, r = 0, p = o - s; if (p > 0) r = p - 60 * (a = Math.floor(p / 86400)) * 60 * 24 - 60 * (c = Math.floor((p - 60 * a * 60 * 24) / 3600)) * 60 - 60 * (l = Math.floor((p - 60 * a * 60 * 24 - 60 * c * 60) / 60)); var d = ""; a < 1 && (a = "0"), a = a >= 10 ? "" + a : "0" + a, c = c >= 10 ? "" + c : "0" + c, l = l >= 10 ? "" + l : "0" + l, r = r >= 10 ? "" + r : "0" + r, d = 1 == e ? '
' + c[0] + '
' + c[1] + '
' + l[0] + '
' + l[1] + '
' + r[0] + '
' + r[1] + '
' : 2 == e ? "00" === a ? "" + n + '
' + c[0] + '
' + c[1] + '
' + l[0] + '
' + l[1] + '
' + r[0] + '
' + r[1] + '
' : "" + n + '
' + a[0] + '
' + a[1] + '
' + c[0] + '
' + c[1] + '
' + l[0] + '
' + l[1] + '
' + r[0] + '
' + r[1] + '
' : '距更新
' + l[0] + '
' + l[1] + '
' + r[0] + '
' + r[1] + "
", i.html(d) } }, Util.getCouponDetailUrl = function(i, t, e) { /*详情*/ return 0 == i.is_from_tb && i.coupon_id ? t ? "/coupon/" + i.coupon_id + "?channel_id=" + t + "&event_id=" + e : "/coupon/" + i.coupon_id : Util.noCouponProductUrlTrans(i.item_id, i.apply_commission_type) }, Util.longPress = function(i, t) { for (var e = void 0, n = 0; n < i.length; n++) i[n].addEventListener("touchstart", function(i) { e = setTimeout(t, 600) }, !1), i[n].addEventListener("touchend", function(i) { clearTimeout(e) }, !1) }, Util.JSBridge = { versionSupport: function() { return Util.isMobile.Sqkb() && Util.isMobile.iOS() && Util.sqkbVersionComp(Util.getSqkbVersion(), "2.5.6") }, setupWebViewJavascriptBridge: function(i) { if (window.WebViewJavascriptBridge) return i(WebViewJavascriptBridge); if (window.WVJBCallbacks) return window.WVJBCallbacks.push(i); window.WVJBCallbacks = [i]; var t = document.createElement("iframe"); t.style.display = "none", t.src = "https://__bridge_loaded__", document.documentElement.appendChild(t), setTimeout(function() { document.documentElement.removeChild(t) }, 0) }, callHandler: function(i, t) { this.versionSupport() && this.setupWebViewJavascriptBridge(function(e) { e.callHandler(i, t) }) }, registerHandler: function(i, t) { this.versionSupport() && this.setupWebViewJavascriptBridge(function(e) { e.registerHandler(i, function(i, e) { t && t(i, e) }) }) } }, Util.registerNativeCb = function(i, t) { window[i] = function(i) { t(i) }, Util.JSBridge.registerHandler(i, function(i) { t(i) }) }, Util.getChannel = function() { var i = window.location.href, t = Util.getQueryString(i), e = t.channel, n = t.dp; (e || n) && $("a").on("click", function() { }) }, Util.getCouponType = function(i) { if (i.is_from_tb) { if (1 == i.product_type) return 11; if (2 == i.product_type) return i.discount < 10 ? 22 : 33 } else if (0 == i.is_promotion) { if (1 == i.product_type) return 1; if (2 == i.product_type) return i.discount < 10 ? 2 : 3 } else { if (0 != parseInt(i.prepayment)) return 7; if (1 == i.product_type) return 4; if (2 == i.product_type) return i.discount < 10 ? 5 : 6 } }, Util.insertCouponFunc = function(i, t) { for (var e = t.length, n = 0; n < e; n++) { var o = t[n].index - 1; if ("topic_ids" == t[n].element_type) { if (t[n].topic_list) for (var s = t[n].topic_list, a = 0; a < s.length; a++) s[a].coupon_info && (s[a].coupon_info.tag = "", s[a].coupon_info.description = s[a].description, s[a].coupon_info.topic_id = s[a].topic_id, s[a].coupon_info.subtitle = s[a].subtitle, s[a].coupon_info.is_product_topic = s[a].is_product_topic, s[a].coupon_info.item_count = s[a].item_count, 0 == s[a].is_product_topic && (s[a].coupon_info.month_sales = s[a].month_sales, s[a].coupon_info.is_must_grab = s[a].is_must_grab, s[a].coupon_info.is_new = s[a].is_new), i.splice(o, 0, s[a].coupon_info)) } else if ("coupon_ids" == t[n].element_type) { if (t[n].coupon_list) for (var c = t[n].coupon_list, l = t[n].tag, r = c.length - 1; r >= 0; r--) c[r].is_product_topic = 1, c[r].tag = l, i.splice(o, 0, c[r]) } else "webview" == t[n].element_type ? i.splice(o, 0, t[n]) : "image" == t[n].element_type && i.splice(1, 0, t[n]) } return i }, Util.preventScroll = function(i) { i ? $("html,body").bind("touchmove", function(i) { i.preventDefault() }) : $("html,body").unbind("touchmove") }, Util.preventScrollMobile = function(i) { i ? $("html,body").css("overflow-y", "hidden") : $("html,body").css("overflow-y", "auto") }, Util.openSqkbApp = function() { }, $(function() { Util.getChannel(), Util.dockBar(), $("[data-ga-event]").click(function() { var i = $(this).attr("data-ga-event"); Util.gaSendEvent(i) }), Util.linkedmeInit(function() { var i = Util.getQueryString(window.location.href).dp ? window.location.href : $("[data-dp-link]"); Util.deepLinks(i) }), Util.JSBridge.callHandler("getHtmlInfo", { title: $("title").html() }), Util.openSqkbApp() }), Date.prototype.format = function(i) { var t = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours() % 12 == 0 ? 12 : this.getHours() % 12, "H+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), S: this.getMilliseconds() }; /(y+)/.test(i) && (i = i.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length))), /(E+)/.test(i) && (i = i.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "星期" : "周" : "") + { 0: "日", 1: "一", 2: "二", 3: "三", 4: "四", 5: "五", 6: "六" }[this.getDay() + ""])); for (var e in t) new RegExp("(" + e + ")").test(i) && (i = i.replace(RegExp.$1, 1 == RegExp.$1.length ? t[e] : ("00" + t[e]).substr(("" + t[e]).length))); return i }, Vue.component("toast", { data: function() { return { text: "", isShow: 0 } }, template: '

{{text}}

', mounted: function() {}, methods: { show: function(i, t) { var e = this; e.text = i, e.isShow = 1, setTimeout(function() { e.isShow = 0 }, t || 3e3) } } }), Vue.component("alert", { data: function() { return { text: "", isShow: 0 } }, template: '

{{text}}

确定

', mounted: function() {}, methods: { show: function(i) { this.text = i, this.isShow = 1 }, hide: function() { this.isShow = 0 } } }), Vue.component("buyAlert", { data: function() { return { text: "", isShow: 0, dpLink: "#" } }, template: '
{{text}}

暂时不了

立即打开
', created: function() { var i = window.location.pathname; this.dpLink = i.indexOf("/dp/") >= 0 ? "" : "/dp" + i }, mounted: function() {}, methods: { show: function(i) { this.text = i, this.isShow = 1 }, hide: function() { this.isShow = 0 } } }), Vue.component("m-bottom", { data: { text: ["手机版", "电脑版", "APP", "意见反馈"] }, template: '' }), Vue.component("rank-coupon", { props: ["rankItem", "index"], template: '\n
\n
{{index+1}}
\n
\n
\n

\n \n \n {{rankItem.title}}\n

\n
{{rankItem.description}}
\n
\n 原价 ¥ {{rankItem.raw_price}}\n 月售 {{monthSale}} \n
\n
\n ¥ {{rankItem.zk_price}}\n {{couponTpye}}\n
\n
\n
', computed: { couponTpye: function() { return 1 == this.rankItem.product_type ? this.rankItem.ticket.coupon_price + "元券" : this.rankItem.discount < 10 ? this.rankItem.discount + "折" : "立即抢购" }, monthSale: function() { var i = this.rankItem.month_sales; return i >= 1e4 && i < 1e5 ? Math.round(i / 1e4 * 10) / 10 + "万" : i >= 1e5 ? Math.round(i / 1e4) + "万" : i } }, methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } }, mounted: function() { Util.lazyload("lazy") } }), Vue.component("rank-detail-coupon", { props: ["rankItem", "index"], template: '
{{index+1}}

{{rankItem.title}}

{{rankItem.description}}
原价 ¥ {{rankItem.raw_price}} 月售 {{monthSale}} 
¥ {{rankItem.zk_price}} {{couponTpye}}
', computed: { couponTpye: function() { return 1 == this.rankItem.product_type ? this.rankItem.ticket.coupon_price + "元券" : this.rankItem.discount < 10 ? this.rankItem.discount + "折" : "立即抢购" }, monthSale: function() { var i = this.rankItem.month_sales; return i >= 1e4 && i < 1e5 ? Math.round(i / 1e4 * 10) / 10 + "万" : i >= 1e5 ? Math.round(i / 1e4) + "万" : i } }, mounted: function() { Util.lazyload("lazy.new"), $(".lazy.new").removeClass("new") }, methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } } }), Vue.component("rank-total-coupon", { props: ["rankItem"], template: "\n
\n
{{rankItem.title}}
\n
\n
\n" + '
\n
\n
\n
{{item.title}}
\n
到手价

 ¥{{item.zk_price}}

\n
\n
\n
', created: function() {} }), Vue.component("horizontal-coupon", { props: ["item", "index", "gaTitle"], /*首页list*/ template: '

约奖{{item.fanli}}

约赚{{item.spfee}}

{{item.title}}

单买券后:{{item.itemfee2}}元
原价 ¥ {{item.raw_price}} 已拼 {{monthSale}} 件
 ¥ {{item.zk_price}}' + " {{couponTpye.des}}
", methods: { getInfo: function(i) { var info = i.info; return info; }, getid: function(i) { var id = i.itemid; return id; }, getHref: function(i) { var iid = i.itemid; var pic = encodeURIComponent(i.thumbnail_pic); var tit = encodeURI(i.title); var qfee = i.qfee; var fee1 = i.raw_price; var fee2t = i.zk_price; var sell = i.month_sales; var fanli = i.fanli; var spfee = i.spfee; var yj = i.shouru_yongjin; var jurl = "./index.php?i=2&c=entry&spadmin=0&op=show&shopid=0&v=1714333791&do=view&m=nice_pdd&id="+iid+"&pic="+pic+"&q="+qfee+"&f1="+fee1+"&f2t="+fee2t+"&sell="+sell+"&tit="+tit+"&fl="+fanli+"&spfee="+spfee+"&yj="+yj; console.log('list_index'); return jurl; } }, computed: { couponTpye: function() { var i = Util.getCouponType(this.item), t = { type: "", des: "" }; return 1 != i && 4 != i && 11 != i || (t.type = "quan", t.des = this.item.qfee + "元券"), 2 != i && 5 != i && 22 != i || (t.type = "zhe_kou", t.des = this.item.discount + "折"), 3 != i && 6 != i && 33 != i || (t.type = "grab", t.des = "立即抢购"), 7 == i && (t.type = "deposit", t.des = "" + this.item.qfee +"元券"), t }, gaType: function() { var i = ""; return 0 == this.item.is_product_topic ? i = this.gaTitle + "_单排列表:点击:专场" : 1 == this.item.product_type ? i = this.gaTitle + "_单排列表:点击:优惠券" : 2 == this.item.product_type && (i = this.gaTitle + "_单排列表:点击:折扣商品"), i }, monthSale: function() { var i = this.item.month_sales; return i >= 1e4 && i < 1e5 ? Math.round(i / 1e4 * 10) / 10 + "万" : i >= 1e5 ? Math.round(i / 1e4) + "万" : i } }, mounted: function() { Util.lazyload("lazy.lazy-coupon"), $(".lazy.lazy-coupon").removeClass("lazy-coupon"), Util.lazyload("lazy.lazy-coupon-ad"), $(".lazy.lazy-coupon-ad").removeClass("lazy-coupon-ad"), Util.gaInit(".ga"), $(".ga").removeClass("ga") } //列表 }), Vue.component("double-coupon", { props: ["item", "gaTitle", "spring"], data: { item: "", itemHref: "" }, template: '
相关推荐
{{value}}
', methods: { getInfo: function(i) { var info = i.info; return info; }, go: function(i) { var iid = i.itemid; var pic = encodeURIComponent(i.thumbnail_pic); var tit = encodeURI(i.title); var qfee = i.qfee; var fee1 = i.raw_price; var fee2t = i.zk_price; var sell = i.month_sales; var fanli = i.fanli; var spfee = i.spfee; var yj = i.shouru_yongjin; var jurl = "./index.php?i=2&c=entry&spadmin=0&op=show&shopid=0&v=1714333791&do=view&m=nice_pdd&id="+iid+"&pic="+pic+"&q="+qfee+"&f1="+fee1+"&f2t="+fee2t+"&sell="+sell+"&tit="+tit+"&fl="+fanli+"&spfee="+spfee+"&yj="+yj; console.log('list'); return jurl; }, insertItem: function(i) { for (var t = (new Date).getTime(), e = 0; e < localStorage.length; e++) i == localStorage.getItem(localStorage.key(e)) && localStorage.removeItem(localStorage.key(e)); localStorage.setItem(t, i); }, getHref: function(i) { this.searchWords = i; var t = window.location.href, e = Util.getQueryString(t).channel; window.location.href = e ? "./index.php?i=2&c=entry&shopid=0&do=so_list&m=nice_pdd&q=" + encodeURIComponent(this.searchWords) + "&channel=" + e : "./index.php?i=2&c=entry&shopid=0&do=so_list&m=nice_pdd&q=" + encodeURIComponent(this.searchWords) }, searchFun: function(i, t) { this.insertItem(t), this.getHref(t) } }, computed: { searchArr: function() { if (this.searchIndex) for (var i = 0; i < this.item.length; i++) return this.item.split(",") }, couponLeftDes: function() { var i = { type: "", des: "" }; return 1 == this.item.is_promotion ? (i.type = 1, i.des = "双12价") : 1 == this.item.product_type ? (i.type = 2, i.des = "券后") : (i.type = 3, i.des = "拼购"), i }, couponTpye: function() { var i = Util.getCouponType(this.item), t = { type: "", des: "" }; return 1 != i && 4 != i && 11 != i || (t.type = "quan", t.des = this.item.ticket.coupon_price + "元券"), 2 != i && 5 != i && 22 != i || (t.type = "zhe_kou", t.des = this.item.discount + "折"), 3 != i && 6 != i && 33 != i || (t.type = "grab", t.des = "立即抢购"), 7 == i && (t.type = "deposit", t.des = "" + this.item.qfee+"元券"), t }, isNew: function() { if (1 == this.item.is_product_topic && this.item.is_new) return 1 }, isTotal: function() { if (this.item && 0 == this.item.is_product_topic) return 1 }, gaType: function() { var i = ""; return 0 == this.item.is_product_topic ? i = this.gaTitle + "_双排列表:点击:专场" : 1 == this.item.product_type ? i = this.gaTitle + "_双排列表:点击:优惠券" : 2 == this.item.product_type && (i = this.gaTitle + "_双排列表:点击:折扣商品"), i }, monthSale: function() { var i = this.item.month_sales; return i >= 1e4 && i < 1e5 ? Math.round(i / 1e4 * 10) / 10 + "万" : i >= 1e5 ? Math.round(i / 1e4) + "万" : i } }, mounted: function() { Util.lazyload("coupon-pic"), $(".lazy.coupon-pic").removeClass("coupon-pic"), Util.gaInit(".ga"), $(".ga").removeClass("ga") } }), Vue.component("double-coupon9", { props: ["item", "gaTitle"], data: { item: "", itemHref: "" }, template: '

{{item.description}}

共{{item.item_count}}件

{{item.title}}
{{item.tag}}
已售 {{monthSale}}
已售 {{monthSale}}

原价 ¥ {{item.raw_price}}

 ¥ {{item.zk_price}}

', methods: { getInfo: function(i) { var info = i.info; return info; }, go: function(i) { var iid = i.itemid; var pic = encodeURIComponent(i.thumbnail_pic); var tit = encodeURI(i.title); var qfee = i.qfee; var fee1 = i.raw_price; var fee2t = i.zk_price; var sell = i.month_sales; var fanli = i.fanli; var spfee = i.spfee; var yj = i.shouru_yongjin; var jurl = "./index.php?i=2&c=entry&spadmin=0&op=show&shopid=0&v=1714333791&do=view&m=nice_pdd&id="+iid+"&pic="+pic+"&q="+qfee+"&f1="+fee1+"&f2t="+fee2t+"&sell="+sell+"&tit="+tit+"&fl="+fanli+"&spfee="+spfee+"&yj="+yj; return jurl; } }, computed: { isNew: function() { if (1 == this.item.is_product_topic && this.item.is_new) return 1 }, isTotal: function() { if (this.item && 0 == this.item.is_product_topic) return 1 }, gaType: function() { var i = ""; return 0 == this.item.is_product_topic ? i = this.gaTitle + "_双排列表:点击:专场" : 1 == this.item.product_type ? i = this.gaTitle + "_双排列表:点击:优惠券" : 2 == this.item.product_type && (i = this.gaTitle + "_双排列表:点击:折扣商品"), i }, isTag: function() { if (this.item.tag) return 1 }, monthSale: function() { var i = this.item.month_sales; return i >= 1e4 && i < 1e5 ? Math.round(i / 1e4 * 10) / 10 + "万" : i >= 1e5 ? Math.round(i / 1e4) + "万" : i } }, mounted: function() { Util.lazyload("coupon-pic"), $(".lazy.coupon-pic").removeClass("coupon-pic") } }), Vue.component("jd-horizontal-coupon", { props: ["item", "index"], template: '

{{item.title}}

原价 : ¥{{item.price}}

已拼 {{item.month_sale}} 件
', mounted: function() {} }), Vue.component("ladiesclothes-coupona", { props: ["coupon", "subjectid", "colortype"], data: { list: [] }, template: '

{{coupon.title}}

{{item.title}}
{{item.ex_desc}}
¥{{item.raw_price}}
已拼 {{item.month_sales}} 件
{{item.product_type==1?"券后价":"折后价"}}
¥{{item.zk_price}}
{{item.coupon_price}}
', computed: { list: function() { var i = null; if (this.coupon && "" != this.coupon.title && this.coupon.coupon_list.length > 0) { for (var t = 0; t < this.coupon.coupon_list.length; t++) { var e = "", n = (i = this.coupon.coupon_list[t]).month_sales; e = n >= 1e4 && n < 1e5 ? Math.round(n / 1e4 * 10) / 10 + "万" : n >= 1e5 ? Math.round(n / 1e4) + "万" : n, this.coupon.coupon_list[t].month_sales = e; var o = ""; o = 1 == i.product_type ? i.ticket && i.ticket.coupon_price + "元券" : i.discount < 10 ? i.discount + "折" : "立即抢购", this.coupon.coupon_list[t].coupon_price = o } return this.coupon.coupon_list } return [] } }, methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } }, mounted: function() {} }), Vue.component("ladiesclothes-couponb", { props: ["coupon", "subjectid", "colortype"], data: { list: [] }, template: '

{{coupon.title}}

\n
\n
{{item.title}}
{{item.ex_desc}}
¥
{{item.zk_price}}
¥{{item.raw_price}}
已拼 {{item.month_sales}} 件

{{item.coupon_price}}元优惠券

尊享{{item.coupon_price}}

{{item.coupon_price}}

{{item.product_type==1?\'立即领劵\':\'立即抢购\'}}
', computed: { list: function() { var i = null; if (this.coupon && "" != this.coupon.title && this.coupon.coupon_list.length > 0) { for (var t = 0; t < this.coupon.coupon_list.length; t++) { var e = "", n = (i = this.coupon.coupon_list[t]).month_sales; e = n >= 1e4 && n < 1e5 ? Math.round(n / 1e4 * 10) / 10 + "万" : n >= 1e5 ? Math.round(n / 1e4) + "万" : n, this.coupon.coupon_list[t].month_sales = e; var o = ""; o = 1 == i.product_type ? i.ticket && i.ticket.coupon_price : i.discount < 10 ? i.discount : "立即抢购", this.coupon.coupon_list[t].coupon_price = o } return this.coupon.coupon_list } return [] } }, methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } }, mounted: function() {} }), Vue.component("ladiesclothes-doublecoupon", { props: ["dbcoupon", "subjectid"], data: { list: [] }, template: '
', methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } }, mounted: function() {} }), Util.getDp = function() { var i = window.location.href, t = Util.getQueryString(i).dp; t && !Util.isMobile.Sqkb() && $("a").on("click", function() { var i = $(this), e = i.attr("href"); e && (t ? Util.openSqkbApp() : $.cookie("oauth_token") ? i.attr("href", e) : Util.callLogin()) }) }, Vue.component("hot-coupon", { props: ["coupon", "channelid", "eventid"], template: '
{{item.title}}
{{item.description}}

{{item.platform_id==1?\'淘宝价\':\'天猫价\'}} ¥{{item.raw_price}}

已拼 {{item.month_sales}} 件

' + "

¥{{item.zk_price}}

{{item.money}}
", methods: { getHref: function(i) { var t = window.location.href; return Util.getQueryString(t).dp ? "javascript:;" : $.cookie("oauth_token") ? Util.getCouponDetailUrl(i, this.channelid, this.eventid) : "#" } }, computed: { couponArr: function() { for (var i = this.coupon, t = 0; t < this.coupon.length; t++) { var e = this.coupon[t].month_sales; i[t].month_sales = e >= 1e4 && e < 1e5 ? Math.round(e / 1e4 * 10) / 10 + "万" : e >= 1e5 ? Math.round(e / 1e4) + "万" : e, this.coupon[t].money = 0, this.coupon[t].couponType = 0, 1 == this.coupon[t].product_type ? this.coupon[t].ticket && (this.coupon[t].money = this.coupon[t].ticket.coupon_price + "元券") : this.coupon[t].discount > 0 ? this.coupon[t].money = i[t].discount + "折" : (this.coupon[t].couponType = 1, this.coupon[t].money = "立即抢购") } return this.coupon } }, mounted: function() {} }), Vue.component("cate-doublecoupon", { props: ["dbcoupon", "subjectid"], data: { list: [] }, template: '
', computed: { list: function() { this.dbcoupon; for (var i = 0; i < this.dbcoupon.length; i++) { var t = this.dbcoupon[i].couponList ? this.dbcoupon[i].couponList : []; if (t.length > 0) for (var e = 0; e < t.length; e++) { var n = t[e].month_sales; t[e].month_sales = n >= 1e4 && n < 1e5 ? Math.round(n / 1e4 * 10) / 10 + "万" : n >= 1e5 ? Math.round(n / 1e4) + "万" : n, t[e].money = 0, t[e].des = "", t[e].couponType = 0, 1 == t[e].product_type ? (t[e].des = "券后", t[e].ticket && (t[e].money = t[e].ticket.coupon_price + "元券")) : (t[e].des = "折后", t[e].discount > 0 ? t[e].money = t[e].discount + "折" : (t[e].couponType = 1, t[e].money = "立即抢购")) } } return this.dbcoupon } }, methods: { getHref: function(i) { return Util.getCouponDetailUrl(i) } }, mounted: function() { console.log(this.dbcoupon) } });