// ==UserScript==
// @name 【智狐】淘宝、天猫、京东、唯品会隐藏优惠券查询,自动显示历史价格和比价,拒绝虚假价格,让您购买到最优惠的商品,网购省钱小助手
// @name:zh 【智狐】淘宝、天猫、京东、唯品会隐藏优惠券查询,自动显示历史价格和比价,拒绝虚假价格,让您购买到最优惠的商品,网购省钱小助手
// @name:zh-TW 【智狐】淘寶、天貓、京東、唯品會隱藏優惠券查詢,自動顯示歷史價格和比價,拒絕虛假價格,讓您購買到最優惠的商品,網購省錢小助手
// @namespace zhCoupon
// @version 1.7.9
// @namespace zhCoupon
// @description 无强制跳转,自动显示淘宝、天猫、京东、唯品会隐藏优惠券,展示商品历史价格,包括双十一和618的价格,让你快速了解商品低价,同款商品各大平台快速自动比价,同时显示比价列表,直接点击即可跳转其他平台,历史价格与比价功能正在开发中...
// @description:zh 无强制跳转,自动显示淘宝、天猫、京东、唯品会隐藏优惠券,展示商品历史价格,包括双十一和618的价格,让你快速了解商品低价,同款商品各大平台快速自动比价,同时显示比价列表,直接点击即可跳转其他平台,历史价格与比价功能正在开发中...
// @description:zh-TW 無強製跳轉,自動顯示淘寶、天貓、京東、唯品會隱藏優惠券,展示商品歷史價格,包括雙十一和618的價格,讓你快速了解商品低價,同款商品各大平臺快速自動比價,同時顯示比價列表,直接點擊即可跳轉其他平臺,歷史價格與比價功能正在開發中...
// @author zhihu
// @run-at document-end
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_setClipboard
// @grant GM_info
// @grant GM_xmlhttpRequest
// @grant GM_openInTab
// @grant GM_addValueChangeListener
// @grant GM_removeValueChangeListener
// @grant GM.getValue
// @grant GM.setValue
// @grant GM.setClipboard
// @grant GM_info
// @grant GM.xmlHttpRequest
// @grant GM.openInTab
// @grant GM.addValueChangeListener
// @grant GM.removeValueChangeListener
// @require https://unpkg.com/vue@3/dist/vue.global.js
// @require https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js
// @require https://cdn.jsdelivr.net/npm/js-md5@0.7.3/build/md5.min.js
// @require https://cdn.jsdelivr.net/npm/echarts@5.4.2/dist/echarts.min.js
// @match *://item.taobao.com/*
// @match *://detail.tmall.com/*
// @match *://detail.tmall.hk/*
// @match *://chaoshi.detail.tmall.com/*
// @match *://item.jd.com/*
// @match *://npcitem.jd.hk/*
// @match *://item.yiyaojd.com/*
// @match *://detail.vip.com/*
// @match *://www.vipglobal.hk/detail*
// @match *://www.gwdang.com/v2/trend/*
// @match *://www.wezhicms.com/index/Tools/index*
// @connect www.gwdang.com
// @connect tool.wezhicms.com
// @license GNU GPLv3
// @antifeature referral-link 【应GreasyFork代码规范要求:含有优惠券查询功能的脚本必须添加此提示!在此感谢大家的理解...】
// @downloadURL none
// ==/UserScript==
!(function (e) {
var t = {};
function o(n) {
if (t[n]) return t[n].exports;
var i = (t[n] = { i: n, l: !1, exports: {} });
return e[n].call(i.exports, i, i.exports, o), (i.l = !0), i.exports;
}
(o.m = e),
(o.c = t),
(o.d = function (e, t, n) {
o.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: n });
}),
(o.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
}),
(o.t = function (e, t) {
if ((1 & t && (e = o(e)), 8 & t)) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var n = Object.create(null);
if (
(o.r(n),
Object.defineProperty(n, "default", { enumerable: !0, value: e }),
2 & t && "string" != typeof e)
)
for (var i in e)
o.d(
n,
i,
function (t) {
return e[t];
}.bind(null, i)
);
return n;
}),
(o.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return o.d(t, "a", t), t;
}),
(o.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(o.p = ""),
o((o.s = 6));
})([
function (e, t) {
e.exports = Vue;
},
function (e, t, o) {
"use strict";
var n,
i = function () {
return (
void 0 === n &&
(n = Boolean(window && document && document.all && !window.atob)),
n
);
},
r = (function () {
var e = {};
return function (t) {
if (void 0 === e[t]) {
var o = document.querySelector(t);
if (
window.HTMLIFrameElement &&
o instanceof window.HTMLIFrameElement
)
try {
o = o.contentDocument.head;
} catch (e) {
o = null;
}
e[t] = o;
}
return e[t];
};
})(),
c = [];
function a(e) {
for (var t = -1, o = 0; o < c.length; o++)
if (c[o].identifier === e) {
t = o;
break;
}
return t;
}
function s(e, t) {
for (var o = {}, n = [], i = 0; i < e.length; i++) {
var r = e[i],
s = t.base ? r[0] + t.base : r[0],
l = o[s] || 0,
p = "".concat(s, " ").concat(l);
o[s] = l + 1;
var d = a(p),
u = { css: r[1], media: r[2], sourceMap: r[3] };
-1 !== d
? (c[d].references++, c[d].updater(u))
: c.push({ identifier: p, updater: b(u, t), references: 1 }),
n.push(p);
}
return n;
}
function l(e) {
var t = document.createElement("style"),
n = e.attributes || {};
if (void 0 === n.nonce) {
var i = o.nc;
i && (n.nonce = i);
}
if (
(Object.keys(n).forEach(function (e) {
t.setAttribute(e, n[e]);
}),
"function" == typeof e.insert)
)
e.insert(t);
else {
var c = r(e.insert || "head");
if (!c)
throw new Error(
"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."
);
c.appendChild(t);
}
return t;
}
var p,
d =
((p = []),
function (e, t) {
return (p[e] = t), p.filter(Boolean).join("\n");
});
function u(e, t, o, n) {
var i = o
? ""
: n.media
? "@media ".concat(n.media, " {").concat(n.css, "}")
: n.css;
if (e.styleSheet) e.styleSheet.cssText = d(t, i);
else {
var r = document.createTextNode(i),
c = e.childNodes;
c[t] && e.removeChild(c[t]),
c.length ? e.insertBefore(r, c[t]) : e.appendChild(r);
}
}
function g(e, t, o) {
var n = o.css,
i = o.media,
r = o.sourceMap;
if (
(i ? e.setAttribute("media", i) : e.removeAttribute("media"),
r &&
"undefined" != typeof btoa &&
(n += "\n/*# sourceMappingURL=data:application/json;base64,".concat(
btoa(unescape(encodeURIComponent(JSON.stringify(r)))),
" */"
)),
e.styleSheet)
)
e.styleSheet.cssText = n;
else {
for (; e.firstChild; ) e.removeChild(e.firstChild);
e.appendChild(document.createTextNode(n));
}
}
var m = null,
h = 0;
function b(e, t) {
var o, n, i;
if (t.singleton) {
var r = h++;
(o = m || (m = l(t))),
(n = u.bind(null, o, r, !1)),
(i = u.bind(null, o, r, !0));
} else
(o = l(t)),
(n = g.bind(null, o, t)),
(i = function () {
!(function (e) {
if (null === e.parentNode) return !1;
e.parentNode.removeChild(e);
})(o);
});
return (
n(e),
function (t) {
if (t) {
if (
t.css === e.css &&
t.media === e.media &&
t.sourceMap === e.sourceMap
)
return;
n((e = t));
} else i();
}
);
}
e.exports = function (e, t) {
(t = t || {}).singleton ||
"boolean" == typeof t.singleton ||
(t.singleton = i());
var o = s((e = e || []), t);
return function (e) {
if (
((e = e || []),
"[object Array]" === Object.prototype.toString.call(e))
) {
for (var n = 0; n < o.length; n++) {
var i = a(o[n]);
c[i].references--;
}
for (var r = s(e, t), l = 0; l < o.length; l++) {
var p = a(o[l]);
0 === c[p].references && (c[p].updater(), c.splice(p, 1));
}
o = r;
}
};
};
},
function (e, t, o) {
"use strict";
e.exports = function (e) {
var t = [];
return (
(t.toString = function () {
return this.map(function (t) {
var o = e(t);
return t[2] ? "@media ".concat(t[2], " {").concat(o, "}") : o;
}).join("");
}),
(t.i = function (e, o, n) {
"string" == typeof e && (e = [[null, e, ""]]);
var i = {};
if (n)
for (var r = 0; r < this.length; r++) {
var c = this[r][0];
null != c && (i[c] = !0);
}
for (var a = 0; a < e.length; a++) {
var s = [].concat(e[a]);
(n && i[s[0]]) ||
(o &&
(s[2]
? (s[2] = "".concat(o, " and ").concat(s[2]))
: (s[2] = o)),
t.push(s));
}
}),
t
);
};
},
function (e, t, o) {
"use strict";
var n = o(2),
i = o.n(n)()(function (e) {
return e[1];
});
i.push([
e.i,
"\n#history_chart[data-v-1c244362]{\r\n width: 100%;\r\n height: calc(100% - 50px);\n}\r\n",
""
]),
(t.a = i);
},
function (e, t, o) {
"use strict";
var n = o(2),
i = o.n(n)()(function (e) {
return e[1];
});
i.push([
e.i,
"\n.zh-bg{\r\n background: url(https://cdn.gwdang.com/images/extensions/xbt/newbar-top3.png) no-repeat;\n}\n.logo{\r\n width: 60px;\r\n height: 50px;\r\n line-height: 50px;\r\n text-align: center;\r\n border-right: 1px solid #f7f8f9;\n}\n.logo img{\r\n width: 30px;\r\n height: 30px;\n}\n.bijia_list{\r\n display: flex;\r\n align-items: center;\n}\n.bijia_list .bijia_item{\r\n padding: 0 20px;\r\n border-right: 1px solid rgba(0,0,0,.06);\r\n height: 100%;\r\n line-height: 50px;\r\n font-size: 14px;\r\n font-weight: bold;\r\n cursor: pointer;\n}\n.bijia_list .bijia_item:hover .bijia-goods-list{\r\n display: block;\n}\n.bijia_list .bijia_item text{\r\n margin-left: 10px;\r\n color: #E4393C;\n}\n.price_status{\r\n padding: 0 20px;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n border-right: 1px solid rgba(0,0,0,.06);\r\n font-size: 14px;\r\n color: #333333;\r\n cursor:pointer;\n}\n.price_status .price_status_icon{\r\n width: 22px;\r\n height: 20px;\r\n display: inline-block;\r\n line-height: 20px;\r\n margin-right: 10px;\n}\n.price_status .history_price{\r\n /* opacity: 0; */\r\n position: absolute;\r\n bottom: 50px;\r\n left: -1px;\r\n right: -1px;\r\n background: #fff;\r\n box-shadow: 0 -5px 10px 0 rgba(22,24,26,.15);\r\n width: auto;\r\n height: 350px;\n}\n.history_price .history-tips{\r\n display: flex;\r\n align-items: center;\r\n height: 50px;\r\n font-size: 12px;\r\n margin: 0 30px;\n}\n.history-tips .max-price{\r\n color: #e4393c;\r\n font-weight: 700;\r\n margin-right: 8px;\n}\n.history-tips .min-price{\r\n color: #35bd68;\r\n font-weight: 700;\r\n margin-right: 8px;\n}\n.history-tips .tips{\r\n background: #f7f7f7;\r\n border-radius: 4px;\r\n color: #666;\r\n font-size: 12px;\r\n height: 28px;\r\n line-height: 28px;\r\n margin-left: 41px;\r\n padding-left: 15px;\r\n padding-right: 15px;\n}\n.top_coupon_btn {\r\n background: url(https://cdn.gwdang.com/images/extensions/coupon@3x.png) 0 0 no-repeat;\r\n display: inline-flex;\r\n height: 28px;\r\n width: 189px;\r\n white-space: nowrap;\r\n position: relative;\r\n z-index: 999999999999;\r\n padding: 0 !important;\r\n border: none !important;\r\n background-size: cover;\r\n align-items: center;\r\n text-decoration: none!important;\r\n margin: 0 48px 0 20px;\n}\n.top_coupon_btn * {\r\n cursor: pointer;\n}\n.top_coupon_btn .top-coupon-tle {\r\n flex: 1;\r\n height: 12px;\r\n text-align: center;\r\n line-height: 12px;\r\n margin-left: 4px;\r\n font-size: 12px !important;\r\n font-weight: normal !important;\r\n color: #fff;\n}\n.top_coupon_btn .price-num {\r\n font-size: 14px;\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n width: 56px;\r\n height: 22px;\r\n text-align: center;\r\n margin-left: 3px;\r\n line-height: 22px !important;\r\n padding: 0px !important;\r\n vertical-align: middle;\n}\n.top_coupon_btn .price-num span {\r\n display: inline;\n}\n.top_coupon_btn .price-sm {\r\n font-size: 12px;\r\n transform: scale(0.8333);\r\n transform-origin: bottom right;\n}\n.top_coupon_btn .link_hand {\r\n display: inline-block;\r\n height: 30px;\r\n width: 38px;\r\n position: absolute;\r\n right: -38px;\r\n top: -2px;\r\n background: url(https://cdn.gwdang.com/images/extensions/newbar/hand.gif) 0px 0px no-repeat;\n}\n.bijia-goods-list {\r\n display: none;\r\n position: absolute;\r\n bottom: 50px;\r\n left: -1px;\r\n right: -1px;\r\n height: 270px;\r\n background: #fff;\r\n box-shadow: 0 -5px 10px 0 rgba(22,24,26,.15);\n}\n.bijia-goods-list .goods-list{\r\n flex: 1;\r\n overflow-x: auto;\r\n display: flex;\r\n align-items: center;\n}\n.bijia-goods-list .goods-list .goods-item{\r\n display: inline-block;\r\n text-align: center;\r\n width: 270px;\r\n margin: 0 10px;\n}\n.goods-list .goods-item img{\r\n width: 120px;\r\n height: 120px;\n}\n.goods-list .goods-item p{\r\n font-size: 14px;\r\n margin-top: 8px;\r\n line-height: 1;\n}\n.goods-list .goods-item .price{\r\n color: #E4393C;\n}\n.goods-list .goods-item .shop-name{\r\n color: #666666;\n}\n.goods-list .goods-item .title{\r\n height: 38px;\r\n line-height: 19px;\r\n width: 210px;\r\n overflow: hidden;\r\n margin: 8px auto 0 auto;\n}\n.bijia-goods-list .pre-page,.bijia-goods-list .next-page{\r\n height: 33px;\r\n width: 120px;\r\n text-align: center;\n}\n.pre-page em,.next-page em{\r\n height: 33px;\r\n width: 20px;\r\n display: inline-block;\r\n cursor: pointer;\n}\n.pre-page em{\r\n background-position: -112px -38px;\n}\n.pre-page em:hover{\r\n background-position: -160px -38px;\n}\n.next-page em{\r\n background-position: -137px -38px;\n}\n.next-page em:hover{\r\n background-position: -185px -38px;\n}\n.bijia-goods-list .pagination{\r\n position: absolute;\r\n top: 15px;\r\n width: auto;\r\n right: 30px;\r\n padding: 0;\r\n text-align: center;\r\n font-size: 12px;\r\n margin: 0;\r\n height: auto;\r\n font-weight: 400;\r\n color: #999999;\n}\r\n",
""
]),
(t.a = i);
},
function (e, t, o) {
"use strict";
Object.defineProperty(t, "__esModule", { value: !0 }),
(t.default = (e, t) => {
const o = e.__vccOpts || e;
for (const [e, n] of t) o[e] = n;
return o;
});
},
function (e, t, o) {
"use strict";
o.r(t);
var n = o(0);
const i = function () {
console.log(this);
};
(i.prototype.getter = function (e) {
return this.name;
}),
(i.prototype.set = function (e, t) {
this.name = t;
});
var r = new ((function () {
let e = null;
return function () {
return e || (e = new i()), e;
};
})())();
const c = (e = "default") => `${e}_${Date.now()}`,
a = function (e) {
var t,
o = "";
return new Promise(function (n, i) {
t = setInterval(function () {
if (e instanceof Array)
e.forEach((e) => {
const o = document.querySelector(e);
null !== o && (n(o), clearInterval(t));
});
else {
const o = document.querySelector(e);
null !== o && (n(o), clearInterval(t));
}
100 == o && clearInterval(t), o++;
}, 200);
});
},
s = function (e, t = !1) {
let o = new Date(e),
n = o.getFullYear() + "-",
i =
(o.getMonth() + 1 < 10
? "0" + (o.getMonth() + 1)
: o.getMonth() + 1) + "-",
r = o.getDate() < 10 ? "0" + o.getDate() : o.getDate();
return t
? n +
i +
r +
(" " + o.getHours() + ":") +
(o.getMinutes() + ":") +
o.getSeconds()
: n + i + r;
},
l = function (e, t) {
"function" == typeof GM_openInTab
? GM_openInTab(e, t)
: GM.openInTab(e, t);
},
p = function (e, t) {
"function" == typeof GM_setValue
? GM_setValue(e, t)
: GM.setValue(e, t);
};
function d(e) {
return new Promise((t, o) => {
setTimeout(() => {
t("cookie" === e ? document.cookie : r.getter("goodsInfo"));
}, 300);
});
}
const u = {
key: 0,
style: {
"background-image":
"url(https://gw.alicdn.com/tfs/TB16d.1ykPoK1RjSZKbXXX1IXXa-665-115.png)",
position: "relative",
"font-family": "HelveticaNeue-Bold,Helvetica Neue",
width: "426px",
height: "75px",
"background-size": "100%,100%",
"background-repeat": "no-repeat",
margin: "10px 0 10px 10px",
display: "flex",
"align-items": "center"
}
},
g = {
key: 0,
style: {
"font-size": "28px",
"line-height": "28px",
"font-weight": "900",
"white-space": "nowrap"
}
},
m = Object(n.createElementVNode)(
"text",
{ style: { "font-size": "20px" } },
"优惠券:",
-1
),
h = Object(n.createElementVNode)(
"text",
{ style: { "font-size": "18px", "margin-right": "2px" } },
"¥",
-1
),
b = {
key: 1,
style: {
"font-size": "22px",
"font-weight": "900",
"white-space": "nowrap"
}
},
f = { key: 2, style: { "margin-top": "5px" } },
x = { key: 3, style: { "margin-top": "5px" } },
y = {
style: {
"text-align": "center",
width: "calc(100% - 279px)",
"font-size": "20px",
color: "#fff",
"font-weight": "bold",
"letter-spacing": "1px",
cursor: "pointer"
}
},
w = ["href"],
j = {
style: {
position: "absolute",
display: "none",
right: "426px",
"padding-right": "5px",
top: "-10px",
width: "124px",
"z-index": "999999"
}
},
v = {
style: {
"text-align": "center",
padding: "12px 5px 8px",
background: "#fff",
"background-color": "#fff",
border: "1px solid rgba(0, 0, 0, 0.08)",
"-webkit-box-shadow": "0 12px 24px 0 rgb(0 0 0%)",
"-moz-box-shadow": "0 12px 24px 0 rgb(0 0 0%)",
"box-shadow": "0 12px 24px 0 rgb(0 0 0%)",
"border-radius": "12px"
}
},
k = { style: { margin: "0 auto", width: "100px" } },
O = ["src"],
C = { style: { "margin-top": "4px" } },
I = {
key: 1,
style: {
"background-image":
"url(https://gw.alicdn.com/tfs/TB16d.1ykPoK1RjSZKbXXX1IXXa-665-115.png)",
position: "relative",
"font-family": "HelveticaNeue-Bold,Helvetica Neue",
width: "426px",
height: "75px",
"background-size": "100%,100%",
"background-repeat": "no-repeat",
margin: "10px 0 10px 10px",
display: "flex",
"align-items": "center"
}
},
D = {
style: {
width: "279px",
color: "#fff",
"padding-left": "20px",
"box-sizing": "border-box"
}
},
B = Object(n.createElementVNode)(
"div",
{
style: {
"font-size": "22px",
"font-weight": "900",
"white-space": "nowrap"
}
},
"暂无优惠券",
-1
),
A = { style: { "margin-top": "5px" } };
var N = {
__name: "coupon",
setup(e) {
const t = Object(n.reactive)({
isLoad: !1,
hasCoupon: !1,
isQrCodeShow: !1,
shortUrl: "",
price: 0,
couponMoney: 0,
couponUseTime: "",
goodsId: "",
platform: "手机",
searchUrl: "",
isScan: !1
}),
{ page: o, initData: i } = Object(n.inject)("global");
function c(e, t) {
return new Promise((o, n) => {
axios
.get(
`https://tool.wezhicms.com/coupon/newCoupon.php?m=${e}&goods_info=${t}`
)
.then((e) => {
const t = e.data;
0 === t.code ? (console.log(t.data), o(t.data)) : n();
})
.catch((e) => {
n();
});
});
}
async function p() {
try {
let e, n, a, s, l, p;
(t.goodsId = (function (e) {
var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)"),
o = window.location.search.substr(1).match(t);
return null != o ? o[2] : "";
})("id")),
(p = t.goodsId + "-83"),
"taobao" === o
? ((e = document.querySelector("#J_ImgBooth").src),
(n = document.querySelector("#J_SellCounter").textContent),
(a =
document.querySelector(i[o].titleClass).dataset.title ||
"淘宝商品"),
(s = document.querySelector(".tb-main-title").dataset.title),
(l =
document.querySelector(i[o].priceClass).textContent || 0))
: "tianmao" === o
? (console.log(
document.querySelector(".PicGallery--mainPic--1eAqOie")
),
(a =
document.querySelector(i[o].titleClass).textContent ||
"天猫商品"),
(s = document.querySelector(
".ShopHeader--title--2qsBE1A"
).title),
(l =
document.querySelector(i[o].priceClass).textContent || 0))
: "chaoshi" === o &&
((a =
document.querySelector(i[o].titleClass).textContent ||
"天猫超市商品"),
(s = "天猫超市"),
(l =
Number(
document.querySelector(i[o].priceClass).textContent
) || 0)),
r.set("goodsInfo", { goodsId: t.goodsId, title: a, price: l });
const u = await (function (e, t, o, n, i, r) {
return new Promise((c, a) => {
axios
.get(
`https://u.gwdang.com/helper/qrcode?event=appQrcode&tag=9_default&rebate=&union=&dp_id=${r}&img=${e}&title=${o}&price=${i}&sellAmount=${t}&shopName=${n}`
)
.then((e) => {
const t = e.data;
1 === t.code &&
-1 != t.data.t.indexOf("s.click.taobao.com")
? c(t.data.t)
: a(t);
})
.catch((e) => {
a(e);
});
});
})(e, n, a, s, l, p),
g = await c("taobao", u);
console.log(u, g),
"" !== g.couponTotalCount
? ((t.couponMoney = (g.originalPrice - g.actualPrice).toFixed(
0
)),
(t.couponUseTime = g.couponStartTime + "-" + g.couponEndTime),
(t.shortUrl = g.shortUrl),
(t.hasCoupon = !0),
d())
: ((t.price = g.originalPrice),
(t.hasCoupon = !1),
(t.shortUrl = g.shortUrl)),
(t.isLoad = !0);
} catch (e) {
console.log(e);
}
}
function d() {
const e = `\n \n 当前商品领券立减\n ¥${
t.couponMoney
}\n \n \n `;
a("#menu-coupon").then((t) => {
t.innerHTML = e;
});
}
function N() {
l(t.searchUrl, { active: !0 });
}
return (
Object(n.watch)(
() => t.shortUrl,
(e, n) => {
if (!t.isScan && "" !== e) {
t.isScan = !0;
let n = document.createElement("div");
(n.innerHTML = `
`),
(n.style =
"position: fixed;right: 10px;padding-right: 5px;width: 124px;z-index: 999999;bottom: 60px;"),
document.body.appendChild(n);
let r = `领券购买`;
a(i[o].btnNode).then((e) => {
e.insertAdjacentHTML("beforebegin", r);
});
}
},
{ deep: !0 }
),
Object(n.onBeforeMount)(() => {
switch ((console.log(window.location.href), o)) {
case "taobao":
case "tianmao":
case "chaoshi":
(t.platform = "手机淘宝"), p();
break;
case "jd":
(t.platform = "手机京东或微信"),
(async function () {
try {
t.goodsId = (function (e) {
-1 != e.indexOf("?") && (e = e.split("?")[0]),
-1 != e.indexOf("#") && (e = e.split("#")[0]);
var t = e.split("/");
return t[t.length - 1].replace(".html", "");
})(window.location.href);
let e = document.querySelector(i[o].titleClass)
? document.querySelector(i[o].titleClass).textContent
: "京东商品",
n = document.querySelector(i[o].priceClass)
? document.querySelector(i[o].priceClass).textContent
: 0;
r.set("goodsInfo", {
goodsId: t.goodsId,
title: e,
price: n
});
let a = await c("jd", t.goodsId),
s = await c(
"jdConvert",
"https://item.jd.com/" + t.goodsId + ".html"
);
if (!(a instanceof Array && a.length > 0))
throw new Error("优惠券数据获取失败");
(a = a[0]),
(t.price = a.originPrice),
a.couponAmount > 0
? ((t.couponMoney = a.couponAmount),
(t.couponUseTime =
a.couponStartTime + "-" + a.couponEndTime),
(t.shortUrl = s.shortUrl),
(t.hasCoupon = !0),
d())
: ((t.shortUrl = s.shortUrl), (t.hasCoupon = !1)),
(t.isLoad = !0);
} catch (e) {
console.log(e);
}
})();
break;
case "vip":
(t.platform = "手机唯品会或微信"),
(async function () {
try {
const e = window.location.href.match(/-(\d*).html/);
if (e.length < 2) throw new Error("id获取失败");
t.goodsId = e[1];
let n = document.querySelector(i[o].titleClass)
? document.querySelector(i[o].titleClass).title
: "唯品会商品",
a = document.querySelector(i[o].priceClass)
? document.querySelector(i[o].priceClass).title
: 0;
r.set("goodsInfo", {
goodsId: t.goodsId,
title: n,
price: a
});
let l = await c("vip", t.goodsId);
if (!(l instanceof Array && l.length > 0))
throw new Error("优惠券数据获取失败");
{
(l = l[0]), (t.price = l.vipPrice);
let e = await c("vipConvert", l.destUrlPc);
0 !== l.couponPriceType
? ((t.couponMoney = l.couponInfo.buy),
(t.couponUseTime =
s(l.couponInfo.useBeginTime) +
"-" +
s(l.couponInfo.useEndTime)),
(t.shortUrl = e.urlInfoList[0].url),
(t.hasCoupon = !0),
d())
: ((t.shortUrl = e.urlInfoList[0].url),
(t.hasCoupon = !1)),
(t.isLoad = !0);
}
} catch (e) {
console.log(e);
}
})();
}
(t.searchUrl = i.cmsUrl + "?r=/l&origin_id=&sort=0"),
a(i[o].titleClass).then((e) => {
const o = e.textContent;
t.searchUrl = `${i.cmsUrl}?r=/l&kw=${encodeURIComponent(
o
)}&origin_id=&sort=0`;
});
}),
(e, r) =>
t.isLoad
? (Object(n.openBlock)(),
Object(n.createElementBlock)("div", u, [
Object(n.createElementVNode)(
"div",
{
style: {
width: "279px",
color: "#fff",
"padding-left": "20px",
"box-sizing": "border-box"
},
onMouseover:
r[0] || (r[0] = (e) => (t.isQrCodeShow = !0)),
onMouseout: r[1] || (r[1] = (e) => (t.isQrCodeShow = !1))
},
[
t.hasCoupon
? (Object(n.openBlock)(),
Object(n.createElementBlock)("div", g, [
m,
h,
Object(n.createTextVNode)(
Object(n.toDisplayString)(t.couponMoney),
1
)
]))
: (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
b,
"满" + Object(n.toDisplayString)(t.price) + "减0元",
1
)),
t.hasCoupon
? (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
f,
Object(n.toDisplayString)(t.couponUseTime),
1
))
: (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
x,
Object(n.toDisplayString)(
Object(n.unref)(i).qqGroupText +
Object(n.unref)(i).qqGroup
),
1
))
],
32
),
Object(n.createElementVNode)("div", y, [
Object(n.createElementVNode)(
"a",
{
target: "_blank",
href:
Object(n.unref)(i).scanUrl +
"?link=" +
t.shortUrl +
"&platform=" +
encodeURIComponent(t.platform),
style: { "text-decoration": "none", color: "#fff" }
},
"领券购买",
8,
w
)
]),
Object(n.withDirectives)(
Object(n.createElementVNode)(
"div",
j,
[
Object(n.createElementVNode)("div", v, [
Object(n.createElementVNode)("div", k, [
Object(n.createElementVNode)(
"img",
{
style: { width: "100px" },
src:
"http://v.zhihupe.com/enQrcode?url=" +
t.shortUrl
},
null,
8,
O
)
]),
Object(n.createElementVNode)(
"div",
C,
"手机" +
Object(n.toDisplayString)(
Object(n.unref)(i)[Object(n.unref)(o)].text
) +
"扫一扫,享优惠",
1
)
])
],
512
),
[[n.vShow, t.isQrCodeShow && t.shortUrl]]
)
]))
: (Object(n.openBlock)(),
Object(n.createElementBlock)("div", I, [
Object(n.createElementVNode)("div", D, [
B,
Object(n.createElementVNode)(
"div",
A,
Object(n.toDisplayString)(
Object(n.unref)(i).qqGroupText +
Object(n.unref)(i).qqGroup
),
1
)
]),
Object(n.createElementVNode)(
"div",
{
style: {
"text-align": "center",
width: "calc(100% - 279px)",
"font-size": "20px",
color: "#fff",
"font-weight": "bold",
"letter-spacing": "1px",
cursor: "pointer"
}
},
[
Object(n.createElementVNode)(
"span",
{
onClick: N,
style: { "text-decoration": "none", color: "#fff" }
},
"搜同款优惠"
)
]
)
]))
);
}
};
const E = (e, t) => {
const o = (function (e, t) {
var o = e.split("; ");
for (let e = 0; e < o.length; e++) {
let n = o[e].split("=");
if (n[0] == t) return decodeURIComponent(n[1]);
}
return null;
})(e, "fp");
console.log(o);
const n = Object.keys(t);
n.sort();
const i = [];
n.forEach((e) => {
i.push(`${e.toString()}=${t[e]}`);
}),
console.log(i);
let r = i.join("*");
return (r += "*fp=" + o), console.log(r), md5(r);
};
const M = { id: "history_chart" };
var S = {
__name: "historyChart",
props: { chartData: { type: Object, default: { data: [], date: [] } } },
setup(e) {
const t = e,
{ chartData: o } = Object(n.toRefs)(t);
let i = null;
return (
Object(n.onMounted)(() => {
!(function () {
if (
(console.log(o),
!(o.value.data.length < 1 || o.value.date.length < 1))
) {
console.log(o),
(i = echarts.init(
document.getElementById("history_chart")
)),
window.addEventListener("resize", function () {
i.resize();
});
var e = {
tooltip: { trigger: "axis" },
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: !0
},
xAxis: {
type: "category",
boundaryGap: !1,
data: [...o.value.date]
},
yAxis: { type: "value" },
series: [
{
name: "到手价",
type: "line",
stack: "Total",
data: [...o.value.data]
}
]
};
i.setOption(e),
Object(n.nextTick)(() => {
setTimeout(() => {
i.resize();
}, 1500);
});
}
})();
}),
(e, t) => (
Object(n.openBlock)(), Object(n.createElementBlock)("div", M)
)
);
}
},
V = o(1),
T = o.n(V),
G = o(3),
z = { insert: "head", singleton: !1 },
P = (T()(G.a, z), G.a.locals, o(5));
var L = o.n(P)()(S, [["__scopeId", "data-v-1c244362"]]);
const F = {
style: {
width: "auto",
height: "50px",
display: "flex",
"align-items": "center",
background: "#fff",
border: "1px solid #f7f8f9",
"font-family": "HelveticaNeue-Bold, 'Helvetica Neue'",
position: "relative"
}
},
R = Object(n.createElementVNode)(
"div",
{ class: "logo" },
[
Object(n.createElementVNode)("img", {
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGvmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5j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N/RTIvC7ncDyUA1u1WCe5vdtkHmY7/zHB1skPTJM0iJCJSnEKuEBuX/z0KFGg+kaDGmqP/8y/P63FKfTAxrM6LzIUDyf0vQCLhZIc5+kTwXcGuwVWAn8KLBQ4JDZn3/j0+EBf7YB/K8FASkqZBmQLBCheSIEtycpWwUcNKBIgxKj/inZoL/TbYD/ASbcNlFOij7YAAAAAElFTkSuQmCC"
})
],
-1
),
U = { key: 2, class: "bijia_list" },
Z = { key: 0, class: "bijia-goods-list" },
Q = {
style: {
display: "flex",
"align-items": "center",
width: "100%",
height: "100%"
}
},
q = ["onClick"],
Y = [Object(n.createElementVNode)("em", { class: "zh-bg" }, null, -1)],
X = { class: "goods-list" },
J = ["onClick"],
_ = ["src"],
H = { key: 0, class: "price" },
W = { key: 1, class: "price" },
K = { class: "shop-name" },
$ = { class: "title" },
ee = ["onClick"],
te = [Object(n.createElementVNode)("em", { class: "zh-bg" }, null, -1)],
oe = { class: "pagination" },
ne = { style: { color: "#E4393C", margin: "0" } },
ie = { key: 5, class: "price_status", style: { color: "#E4393C" } },
re = {
key: 0,
class: "price_status_icon zh-bg",
style: { "background-position": "-96px -13px" }
},
ce = {
key: 1,
class: "price_status_icon zh-bg",
style: { "background-position": "-70px -12px" }
},
ae = {
key: 2,
class: "price_status_icon zh-bg",
style: { "background-position": "-40px -12px" }
},
se = {
key: 3,
class: "price_status_icon zh-bg",
style: { "background-position": "-122px -190px" }
},
le = { key: 4, class: "history_price" },
pe = { class: "history-tips" },
de = { class: "max-price" },
ue = { class: "min-price" },
ge = { style: { color: "#9d9d9d", "font-weight": "400" } },
me = { class: "tips" },
he = Object(n.createElementVNode)("div", { id: "menu-coupon" }, null, -1);
var be = {
__name: "menu",
setup(e) {
const t = Object(n.reactive)({
goodsInfo: {},
bijiaList: [],
bijiaListShow: !1,
historyData: null,
historyChartData: { date: [], data: [] },
historyChartShow: !1,
bijiaRequestFail: !1,
requestFail: !1,
isBan: !1,
gwdangCookie: ""
});
Object(n.watch)(
() => t.historyData,
(e, o) => {
console.log(e, o),
e.promo_series && e.promo_series.length > 0
? e.promo_series[0].data.forEach((e) => {
t.historyChartData.date.push(s(1e3 * e.x)),
t.historyChartData.data.push(e.y / 100);
})
: e.series &&
e.series.length > 0 &&
e.series[0].data.forEach((e) => {
t.historyChartData.date.push(s(1e3 * e.x)),
t.historyChartData.data.push(e.y / 100);
});
},
{ deep: !0 }
);
let { fpid: o, page: i, initData: c } = Object(n.inject)("global");
function a() {
t.historyChartShow ||
(console.log(t.historyChartShow), (t.historyChartShow = !0));
}
function u() {
t.historyChartShow &&
(console.log(t.historyChartShow), (t.historyChartShow = !1));
}
async function g() {
try {
if (
((t.goodsInfo = await (async function () {
let e = r.getter("goodsInfo");
for (let t = 0; t < 10; t++) {
if (e) return console.log(t, e), e;
e = await d();
}
})()),
(t.gwdangCookie = (function (e) {
console.log(document.cookie);
var t = document.cookie.split("; ");
console.log(t);
for (let o = 0; o < t.length; o++) {
let n = t[o].split("=");
if ((console.log(n), n[0] == e))
return decodeURIComponent(n[1]);
}
return null;
})("gwdangCookie")),
console.log(t.gwdangCookie),
!t.gwdangCookie || "''" === t.gwdangCookie)
) {
l(
"http://www.gwdang.com/v2/trend/" +
t.goodsInfo.goodsId +
"-" +
o +
".html",
!0
);
const i =
((e = "gwdangCookie"),
(n = function (e, o, n, r) {
var c;
n &&
-1 !== n.indexOf("fp=") &&
(console.log(n),
(document.cookie =
"gwdangCookie=" + encodeURIComponent(n)),
(t.gwdangCookie = n),
(c = i),
"function" == typeof GM_removeValueChangeListener
? GM_removeValueChangeListener(c)
: GM.removeValueChangeListener(c),
p("gwdangCookie", null));
}),
void ("function" == typeof GM_addValueChangeListener
? GM_addValueChangeListener(e, n)
: GM.addValueChangeListener(e, n)));
}
} catch (e) {
console.log(e);
}
var e, n;
}
function m() {
let e = t.goodsInfo.goodsId;
GM_xmlhttpRequest({
url:
"http://www.gwdang.com/trend/data_www?dp_id=" +
e +
"-" +
o +
"&show_prom=true&v=2&get_coupon=0&price=" +
t.goodsInfo.price,
method: "GET",
timeout: 1e4,
headers: {
":Authority": "www.gwdang.com",
Accept: "application/json",
Cookie: t.gwdangCookie,
Referer:
"http://www.gwdang.com/v2/trend/" +
e +
"-" +
o +
".html?static=true"
},
onload: function (e) {
if (
(console.log(e),
-1 !== e.responseText.indexOf("Too Many Requests"))
)
(t.requestFail = !0), (t.isloading = !0);
else {
const o = JSON.parse(e.responseText);
o.product_status &&
((t.historyData = { ...o }),
(t.requestFail = !1),
(t.isBan = !1));
}
}
});
}
function h() {
const e = new Date().getTime(),
n = t.goodsInfo.goodsId + "-" + o,
i = E(t.gwdangCookie, {
dp_id: n,
price: t.goodsInfo.price,
title: t.goodsInfo.title,
timestamp: e
});
console.log(i);
const r = (new Date().getTime() / 1e3).toFixed(0);
GM_xmlhttpRequest({
url:
"https://www.gwdang.com/product/aj_same?dp_id=" +
n +
"&title=" +
encodeURIComponent(t.goodsInfo.title) +
"&price=" +
t.goodsInfo.price +
"&from=trend×tamp=" +
e +
"&str=" +
i +
"&t=" +
r,
method: "GET",
timeout: 1e4,
headers: {
":Authority": "gwdang.com",
Accept:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"Cache-Control": "public",
Cookie: t.gwdangCookie,
Host: "gwdang.com",
Referer:
"http://www.gwdang.com/v2/trend/" +
t.goodsInfo.goodsId +
"-" +
o +
".html"
},
onload: function (e) {
if (
(console.log(e),
-1 !== e.responseText.indexOf("Too Many Requests"))
)
return void (t.bijiaRequestFail = !0);
console.log(e.responseText.indexOf("Too Many Requests"));
const o = JSON.parse(e.responseText);
if ((console.log(o), (t.bijiaList = []), 0 === o.code)) {
if (
(o.data.b2c.length > 0 &&
o.data.b2c.forEach((e) => {
("3" !== e.site_id &&
"83" !== e.site_id &&
"129" !== e.site_id) ||
t.bijiaList.push({ ...e, currentPage: 1 });
}),
o.data.tb.taobao.product.length > 0)
) {
const e = {
min_price: o.data.tb.taobao.product[0].coupon_price
? 100 * o.data.tb.taobao.product[0].coupon_price
: 100 * o.data.tb.taobao.product[0].price,
products: [...o.data.tb.taobao.product],
site_id: "83",
site_name: "淘宝",
currentPage: 1
};
t.bijiaList.push(e);
}
if (o.data.tb.tmall.product.length > 0) {
const e = {
min_price: o.data.tb.tmall.product[0].coupon_price
? 100 * o.data.tb.tmall.product[0].coupon_price
: 100 * o.data.tb.tmall.product[0].price,
products: [...o.data.tb.tmall.product],
site_id: "83",
site_name: "天猫商城",
currentPage: 1
};
t.bijiaList.push(e);
}
(t.bijiaRequestFail = !1), console.log(t.bijiaList);
} else
(document.cookie = "gwdangCookie=''"),
(t.bijiaRequestFail = !0),
g();
}
});
}
return (
Object(n.onBeforeMount)(() => {
g();
}),
(e, o) => (
Object(n.openBlock)(),
Object(n.createElementBlock)("div", F, [
R,
t.bijiaRequestFail || 0 !== t.bijiaList.length
? Object(n.createCommentVNode)("v-if", !0)
: (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
key: 0,
class: "price_status",
onClick: h,
style: { color: "##35bd68" }
},
" 查看比价商品列表 "
)),
t.bijiaRequestFail
? (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
key: 1,
class: "price_status",
onClick: h,
style: { color: "#E4393C" }
},
" 商品比价获取失败,点击重试 "
))
: (Object(n.openBlock)(),
Object(n.createElementBlock)("div", U, [
(Object(n.openBlock)(!0),
Object(n.createElementBlock)(
n.Fragment,
null,
Object(n.renderList)(
t.bijiaList,
(e, o) => (
Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{ class: "bijia_item", key: o },
[
Object(n.createElementVNode)("div", null, [
Object(n.createTextVNode)(
Object(n.toDisplayString)(e.site_name),
1
),
Object(n.createElementVNode)(
"text",
null,
"¥" +
Object(n.toDisplayString)(
(e.min_price / 100).toFixed(2)
),
1
)
]),
e.products.length > 0
? (Object(n.openBlock)(),
Object(n.createElementBlock)("div", Z, [
Object(n.createElementVNode)("div", Q, [
Object(n.createElementVNode)(
"div",
{
class: "pre-page",
onClick: (e) =>
(function (e) {
t.bijiaList[e].currentPage >
1 &&
t.bijiaList[e].currentPage--;
})(o)
},
Y,
8,
q
),
Object(n.createElementVNode)("div", X, [
(Object(n.openBlock)(!0),
Object(n.createElementBlock)(
n.Fragment,
null,
Object(n.renderList)(
e.products.slice(
6 * (e.currentPage - 1),
6 * e.currentPage
),
(t, o) => (
Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
class: "goods-item",
key: o,
onClick: (e) => {
return (
"83" ==
(o = t).site_id ||
"8" == o.site_id ||
"123" == o.site_id
? l(
`https://tool.wezhicms.com/coupon/newCoupon.php?m=redirect&goods_info=${o.url_crc}&site_id=${o.site_id}`,
{
active: !0,
insert: !0,
setParent: !0
}
)
: l(
`https://tool.wezhicms.com/coupon/newCoupon.php?m=redirect&goods_info=${o.url}&site_id=${o.site_id}`,
{
active: !0,
insert: !0,
setParent: !0
}
),
void console.log(o)
);
var o;
}
},
[
Object(
n.createElementVNode
)(
"img",
{ src: t.img_url },
null,
8,
_
),
"淘宝" === e.site_name ||
"天猫商城" === e.site_name
? (Object(n.openBlock)(),
Object(
n.createElementBlock
)(
"p",
H,
"¥" +
Object(
n.toDisplayString
)(
t.coupon_price
? t.coupon_price
: t.price
),
1
))
: (Object(n.openBlock)(),
Object(
n.createElementBlock
)(
"p",
W,
"¥" +
Object(
n.toDisplayString
)(
(
t.price / 100
).toFixed(2)
),
1
)),
Object(
n.createElementVNode
)(
"p",
K,
Object(n.toDisplayString)(
t.site_name
),
1
),
Object(
n.createElementVNode
)(
"p",
$,
Object(n.toDisplayString)(
t.title
),
1
)
],
8,
J
)
)
),
128
))
]),
Object(n.createElementVNode)(
"div",
{
class: "next-page",
onClick: (e) =>
(function (e) {
t.bijiaList[e].currentPage <
Math.ceil(
t.bijiaList[e].products
.length / 6
) &&
t.bijiaList[e].currentPage++;
})(o)
},
te,
8,
ee
)
]),
Object(n.createElementVNode)("div", oe, [
Object(n.createTextVNode)("第"),
Object(n.createElementVNode)(
"text",
ne,
Object(n.toDisplayString)(
e.currentPage
),
1
),
Object(n.createTextVNode)(
"页,共" +
Object(n.toDisplayString)(
Math.ceil(e.products.length / 6)
) +
"页",
1
)
])
]))
: Object(n.createCommentVNode)("v-if", !0)
]
)
)
),
128
))
])),
t.requestFail || t.isBan || t.historyData
? Object(n.createCommentVNode)("v-if", !0)
: (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
key: 3,
class: "price_status",
onClick: m,
style: { color: "##35bd68" }
},
" 查看历史价格 "
)),
t.requestFail && !t.historyData
? (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
key: 4,
class: "price_status",
onClick: m,
style: { color: "#E4393C" }
},
" 历史价格获取失败,点击重试 "
))
: Object(n.createCommentVNode)("v-if", !0),
t.isBan && !t.historyData
? (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
ie,
" 历史价格获取失败,点击重试 "
))
: Object(n.createCommentVNode)("v-if", !0),
null !== t.historyData
? (Object(n.openBlock)(),
Object(n.createElementBlock)(
"div",
{
key: 6,
class: "price_status",
onMouseenter: a,
onMouseleave: u
},
[
1 === t.historyData.product_status.status
? (Object(n.openBlock)(),
Object(n.createElementBlock)("em", re))
: Object(n.createCommentVNode)("v-if", !0),
0 === t.historyData.product_status.status
? (Object(n.openBlock)(),
Object(n.createElementBlock)("em", ce))
: Object(n.createCommentVNode)("v-if", !0),
-1 === t.historyData.product_status.status
? (Object(n.openBlock)(),
Object(n.createElementBlock)("em", ae))
: Object(n.createCommentVNode)("v-if", !0),
-2 === t.historyData.product_status.status
? (Object(n.openBlock)(),
Object(n.createElementBlock)("em", se))
: Object(n.createCommentVNode)("v-if", !0),
Object(n.createTextVNode)(
" " +
Object(n.toDisplayString)(
t.historyData.product_status.status_text
) +
" ",
1
),
t.historyChartShow
? (Object(n.openBlock)(),
Object(n.createElementBlock)("div", le, [
Object(n.createElementVNode)("div", pe, [
Object(n.createElementVNode)(
"div",
de,
"最高: ¥" +
Object(n.toDisplayString)(
t.historyData.series[0].max / 100
),
1
),
Object(n.createElementVNode)("div", ue, [
Object(n.createTextVNode)(
" 最低(单件): ¥" +
Object(n.toDisplayString)(
t.historyData.series[0].min / 100
) +
" (",
1
),
Object(n.createElementVNode)(
"span",
ge,
Object(n.toDisplayString)(
Object(n.unref)(s)(
1e3 * t.historyData.series[0].min_stamp
)
),
1
),
Object(n.createTextVNode)(")")
]),
Object(n.createElementVNode)(
"div",
me,
Object(n.toDisplayString)(
t.historyData.analysis.tips[360]
),
1
)
]),
Object(n.createVNode)(
L,
{ "chart-data": t.historyChartData },
null,
8,
["chart-data"]
)
]))
: Object(n.createCommentVNode)("v-if", !0)
],
32
))
: Object(n.createCommentVNode)("v-if", !0),
he
])
)
);
}
},
fe = o(4),
xe = { insert: "head", singleton: !1 };
T()(fe.a, xe), fe.a.locals;
var ye = be;
let we = {
qqGroup: "188872170",
qqGroupText: "智狐捡漏Q群:",
scanUrl: "http://tool.wezhicms.com/coupon/getscan.php",
cmsUrl: "http://wxego.yhzu.cn/",
wenkuCode: 696852,
taobao: {
text: "淘宝",
couponNode: "#J_StepPrice",
titleClass: ".tb-main-title",
priceClass: "#J_SellCounter"
},
tianmao: {
text: "淘宝",
couponNode: ".Promotion--root--3qHQalP",
titleClass: ".ItemHeader--mainTitle--3CIjqW5",
priceClass: ".Price--priceText--2nLbVda"
},
chaoshi: {
text: "淘宝",
couponNode: ".Promotion--root--3qHQalP",
titleClass: ".ItemHeader--mainTitle--3CIjqW5",
priceClass: ".ItemHeader--salesDesc--srlk2Hv"
},
jd: {
text: "京东",
couponNode: "#J-summary-top",
titleClass: ".sku-name",
priceClass: ".p-price>.price"
},
vip: {
text: "唯品会",
couponNode: "#J_product_delivery",
titleClass: ".pib-title-detail",
priceClass: ".sp-price"
}
},
je = "",
ve = "";
const ke = window.location.host;
function Oe() {
switch (ke) {
case "item.taobao.com":
(je = "taobao"), (ve = "83"), Ce(), Ie();
break;
case "chaoshi.detail.tmall.com":
(je = "chaoshi"), (ve = "8"), Ce(), Ie();
break;
case "detail.tmall.com":
case "detail.tmall.hk":
(je = "tianmao"), (ve = "83"), Ce(), Ie();
break;
case "item.yiyaojd.com":
case "item.jd.com":
case "npcitem.jd.hk":
(je = "jd"), (ve = "3"), Ce(), Ie();
break;
case "detail.vip.com":
case "www.vipglobal.hk":
(je = "vip"), (ve = "129"), Ce(), Ie();
break;
case "www.gwdang.com":
!(async function () {
let e = document.cookie;
for (let t = 0; t < 10; t++) {
if (
-1 !== e.indexOf("fp=") &&
-1 !== e.indexOf("dfp=") &&
-1 !== e.indexOf("Hm_lvt") &&
-1 !== e.indexOf("Hm_lvt")
)
return (
console.log(t, e), p("gwdangCookie", e), window.close(), null
);
(e = await d("cookie")), 9 === t && window.close();
}
})();
break;
case "www.wezhicms.com":
a("#code").then((e) => {
(e.value = we.wenkuCode),
(e.placeholder = "验证码是" + we.wenkuCode);
});
}
}
function Ce() {
const e = c("coupon"),
t = ``;
a(we[je].couponNode).then((o) => {
o.insertAdjacentHTML("beforebegin", t);
const n = Vue.createApp(N);
n.provide("global", { page: je, fpid: ve, initData: we }),
n.mount("#" + e);
});
}
function Ie() {
const e = c("menu");
let t = document.createElement("div");
(t.id = e),
(t.style =
"position: fixed;bottom: 0;left: 0;right: 0;z-index:99999999"),
document.body.appendChild(t);
const n = o(0).createApp(ye);
n.provide("global", { page: je, fpid: ve, initData: we }),
n.mount("#" + e);
}
new Promise((e, t) => {
axios
.get("https://tool.wezhicms.com/coupon/getInitData.php")
.then((t) => {
const o = t.data;
e(o);
})
.catch((e) => {
t();
});
})
.then((e) => {
we = e;
})
.finally(() => {
Oe();
});
}
]);