|
@@ -97,6 +97,7 @@ function isDecryptionEnabled() {
|
|
|
|
|
|
|
|
function isOrderItemGrabEnabled() {
|
|
function isOrderItemGrabEnabled() {
|
|
|
let flag = magicJS.data.read(HbcpreConstKey.orderItemDataGrabEnabled, null);
|
|
let flag = magicJS.data.read(HbcpreConstKey.orderItemDataGrabEnabled, null);
|
|
|
|
|
+ magicJS.log(`flag=${flag}`);
|
|
|
if (!flag) {
|
|
if (!flag) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
@@ -446,12 +447,16 @@ function handleSeriesInfo() {
|
|
|
if (isOrderItemGrabEnabled()) {
|
|
if (isOrderItemGrabEnabled()) {
|
|
|
let reqData = getRequestPlainData();
|
|
let reqData = getRequestPlainData();
|
|
|
if (reqData) {
|
|
if (reqData) {
|
|
|
- magicJS.data.write(HbcpreConstKey.castingId, reqData.seriesId);
|
|
|
|
|
- let collectionName = getCollectionName(reqData.seriesId);
|
|
|
|
|
|
|
+ let seriesId = magicJS.data.read(HbcpreConstKey.castingId, null);
|
|
|
let collectionPrice = getCollectionPrice(reqData.seriesId);
|
|
let collectionPrice = getCollectionPrice(reqData.seriesId);
|
|
|
magicJS.data.write(HbcpreConstKey.orderLimitPrice, collectionPrice);
|
|
magicJS.data.write(HbcpreConstKey.orderLimitPrice, collectionPrice);
|
|
|
|
|
+ magicJS.log(`0#seriesId=${seriesId},${reqData.seriesId}`);
|
|
|
|
|
|
|
|
- magicJS.notification.post(scriptName, "", `🎉[${collectionName}]快捷下单采集成功!`);
|
|
|
|
|
|
|
+ if (seriesId != seriesInfo.seriesId) {
|
|
|
|
|
+ magicJS.data.write(HbcpreConstKey.castingId, reqData.seriesId);
|
|
|
|
|
+ let collectionName = getCollectionName(reqData.seriesId);
|
|
|
|
|
+ magicJS.notification.post(scriptName, "", `🎉[${collectionName}]快捷下单采集成功!`);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
let rspData = getResponsePlainData();
|
|
let rspData = getResponsePlainData();
|
|
@@ -471,6 +476,7 @@ function handleSeriesInfo() {
|
|
|
|
|
|
|
|
if (isOrderItemGrabEnabled()) {
|
|
if (isOrderItemGrabEnabled()) {
|
|
|
let seriesId = magicJS.data.read(HbcpreConstKey.castingId, null);
|
|
let seriesId = magicJS.data.read(HbcpreConstKey.castingId, null);
|
|
|
|
|
+ magicJS.log(`1#seriesId=${seriesId},${seriesInfo.seriesId}`);
|
|
|
if (seriesId != seriesInfo.seriesId) {
|
|
if (seriesId != seriesInfo.seriesId) {
|
|
|
magicJS.data.write(HbcpreConstKey.castingId, seriesInfo.seriesId);
|
|
magicJS.data.write(HbcpreConstKey.castingId, seriesInfo.seriesId);
|
|
|
let collectionPrice = getCollectionPrice(seriesId);
|
|
let collectionPrice = getCollectionPrice(seriesId);
|