订单详情查看
// ==UserScript==
// @name 订单详情查看
// @namespace http://tampermonkey.net/
// @version 0.32
// @description try to take over the world!
// @author You
// @match https://www.baidu.com/*
// @match https://qn.taobao.com/*
// @match https://myseller.taobao.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ishumei.com
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM.setClipboard
// ==/UserScript==
function sleep(time){return new Promise((resolve) => setTimeout(resolve, time));}
let Container = document.createElement('div');
Container.id = "sp-ac-container1";
Container.style.position = "fixed"
Container.style.left = "800px"
Container.style.top = "10px"
Container.style['z-index'] = "999999"
Container.style.border = "2px";
Container.style.border = "solid #a1a1a1";
Container.style.padding = "10px 40px";
Container.style.background = "#FFFFFF";
Container.style.width = "300px";
Container.style.borderRadius = "20px";
Container.innerHTML =`
<h2>————功能区————</h2>
<textarea id="wjTEXT" value="" cols="" rows="" style="width:210px; "></textarea>
</br>
<input type="button" value="查红包" id="kaishihb">--
<input type="button" value="查评价" id="kaishipj">--
<input type="button" value="订单备注" id="kaishijdbz">--
<input type="button" value="查物流" id="kaishicwl"></br>
<input type="button" value="查视频评价" id="kaishicsppj">
</br>
<h2>————使用说明————</h2>
1、查红包在输入框输入 【订单编号】</br>
2、查评价在输入框输入 【订单编号】</br>
3、订单备注在输入框输入 【旺旺号】</br>
4、查物流在输入框输入 【订单编号】</br>
`
if(document.location.href.indexOf("https://www.baidu.com/") !== -1){
document.body.appendChild(Container);
kaishihb.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("https://qn.taobao.com/home.htm/trade-platform/tp/detail?spm=a21dvs.23742411.0.0.52d9645ezi9xzl&bizOrderId="+shuju[i]+"#chbwypd");
}
}
}
kaishipj.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("https://myseller.taobao.com/home.htm/comment-manage/list/rateWait4PC?current=1&pageSize=20&search="+shuju[i]+"#cpjwypd");
}
}
}
kaishijdbz.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("https://myseller.taobao.com/home.htm/trade-platform/tp/sold?buyerNick="+shuju[i]+"#jdbzwypd");
}
}
}
kaishicwl.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("https://wuliu2.taobao.com/user/n/order_detail2.htm?tradeId="+shuju[i]+"#/#jdbzwypd");
}
}
}
kaishicsppj.onclick=function(){
var shuju = document.querySelector("#wjTEXT").value.split("\n")
console.log(shuju)
for(let i=0;i<shuju.length;i++){
if(shuju[i]!==""){
window.open("https://creator.guanghe.taobao.com/page/unify/contentDetail?source=guanghe&contentId="+shuju[i]+"&tab=1&mode=0&contentType=video");
}
}
}
}
if(document.location.href.indexOf("#jdbzwypd")!==-1){
setTimeout(function() {
console.log('-----第一次执行步骤1-----');
//第一次执行步骤1--------------------------------------------------------
console.log('执行步骤1');
if(document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img")!=null
){document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img").click()
setTimeout(function() {
console.log('执行步骤2');
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}else{
setTimeout(function() {
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}
}, 2000);
}
}, 2000);
}else{
console.log('-----第二次执行步骤1-----');
//第二次执行步骤1--------------------------------------------------------
setTimeout(function() {
console.log('执行步骤1');
if(document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img")!=null
){document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img").click()
setTimeout(function() {
console.log('执行步骤2');
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}else{
setTimeout(function() {
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}
}, 2000);
}
}, 2000);
}else{
console.log('-----第三次执行步骤1-----');
//第三次执行步骤1--------------------------------------------------------
setTimeout(function() {
console.log('执行步骤1');
if(document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img")!=null
){document.querySelector("#icestarkNode > div > div.next-table.next-table-medium.no-header.next-table-group > div.next-table-inner > div > table > tbody > tr.next-table-group-header > td > div > div > div.sold_order-notes__MZ9PD > div > img").click()
setTimeout(function() {
console.log('执行步骤2');
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}else{
setTimeout(function() {
if(document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input")!=null
){document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div:nth-child(2) > label > span.next-radio > input").click()
document.querySelector("#qn-worbench-container > div.next-overlay-wrapper.opened > div.next-dialog.next-closeable.next-overlay-inner.new-order-notes_operate-dialog__5o3as > div > div > div > div > div:nth-child(2) > span > textarea").value="灰太狼"
}
}, 2000);
}
}, 2000);
}else{
}
}, 2000);
}
}, 2000);
}
}, 2000);
}
/**
if(document.location.href.indexOf("#wypdq")!==-1){
let zt = document.querySelector("#icestarkNode > div > div.next-loading.next-loading-inline > div > div.detail_trade-status-container__3JQVP > div.detail_tabs-container__zcPde > div > div > div.next-tabs-content > div > div:nth-child(4) > div > div > div.amount-info_rightBlock__DdNuP > div:nth-child(4) > div > span:nth-child(1)").innerText
console.log(zt)
if(zt == "通过"){
document.querySelector("body > div.row > div > table.table.table-striped.table-bordered.table-hover > tbody > tr:nth-child(15) > td:nth-child(2) > a").click()
}else{
console.log("已通过")
}
}
**/