|
@@ -18,18 +18,31 @@ const WuBianConstKey = {
|
|
|
// 基础数据
|
|
// 基础数据
|
|
|
UserInfo: 'WubianUserInfo',
|
|
UserInfo: 'WubianUserInfo',
|
|
|
Token: 'WubianProToken',
|
|
Token: 'WubianProToken',
|
|
|
|
|
+ TenantId: 'WubianTenantId',
|
|
|
|
|
+
|
|
|
ActivityListData: 'WubianActivityListData',
|
|
ActivityListData: 'WubianActivityListData',
|
|
|
ActivityGoodsList: 'WubianActivityGoodsList',
|
|
ActivityGoodsList: 'WubianActivityGoodsList',
|
|
|
ActivityTaskCaptureEnabled: 'WubianActivityTaskCaptureEnabled',
|
|
ActivityTaskCaptureEnabled: 'WubianActivityTaskCaptureEnabled',
|
|
|
ActivityTagName: 'WubianActivityActivityTagName',
|
|
ActivityTagName: 'WubianActivityActivityTagName',
|
|
|
ActivityIndexName: 'WubianActivityIndexName',
|
|
ActivityIndexName: 'WubianActivityIndexName',
|
|
|
ActivityId: 'WubianActivityId',
|
|
ActivityId: 'WubianActivityId',
|
|
|
- TenantId: 'WubianTenantId',
|
|
|
|
|
|
|
+
|
|
|
|
|
+ SynthesisConcurrentMode: 'WubianSynthesisConcurrentMode',
|
|
|
|
|
+ SynthesisRunsPerSecond: 'WubianSynthesisRunsPerSecond',
|
|
|
|
|
+
|
|
|
FirstOrderCaptureEnabled: 'WubianFirstOrderCaptureEnabled',
|
|
FirstOrderCaptureEnabled: 'WubianFirstOrderCaptureEnabled',
|
|
|
FirstArtListData: 'WubianFirstArtListData',
|
|
FirstArtListData: 'WubianFirstArtListData',
|
|
|
FirstGoodsId: 'WubianFirstGoodsId',
|
|
FirstGoodsId: 'WubianFirstGoodsId',
|
|
|
FirstGoodsName: 'WubianFirstGoodsName',
|
|
FirstGoodsName: 'WubianFirstGoodsName',
|
|
|
CreateFirstOrderData: 'WubianCreateFirstOrderData',
|
|
CreateFirstOrderData: 'WubianCreateFirstOrderData',
|
|
|
|
|
+ FirstGrabConcurrentMode: 'WubianFirstGrabConcurrentMode',
|
|
|
|
|
+ FirstGrabRunsPerSecond: 'WubianFirstGrabRunsPerSecond',
|
|
|
|
|
+
|
|
|
|
|
+ ConsignmentCaptureEnabled: 'WubianConsignmentCaptureEnabled',
|
|
|
|
|
+ MyCollectListData: 'WubianMyCollectListData',
|
|
|
|
|
+ ConsignmentArtName: 'WubianConsignmentArtName',
|
|
|
|
|
+ ConsignmentArtId: 'WubianConsignmentArtId',
|
|
|
|
|
+ ConsignmentArtAmount: 'WubianConsignmentArtAmount',
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const gUserAgent = `Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/20) uni-app`;
|
|
const gUserAgent = `Mozilla/5.0 (iPhone; CPU iPhone OS 16_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/20) uni-app`;
|
|
@@ -406,6 +419,11 @@ function isFirstOrderCaptureEnabled() {
|
|
|
return isEnabled;
|
|
return isEnabled;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function isConsignmentCaptureEnabled() {
|
|
|
|
|
+ let isEnabled = magicJS.data.read(WuBianConstKey.ConsignmentCaptureEnabled, true);
|
|
|
|
|
+ return isEnabled;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function handleCvtGoodsList() {
|
|
function handleCvtGoodsList() {
|
|
|
let rspData = getResponsePlainData();
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
if (!rspData) {
|
|
@@ -422,7 +440,7 @@ function handleCvtGoodsList() {
|
|
|
activityId = activityInfo.activityId;
|
|
activityId = activityInfo.activityId;
|
|
|
magicJS.data.write(WuBianConstKey.ActivityId, activityId);
|
|
magicJS.data.write(WuBianConstKey.ActivityId, activityId);
|
|
|
activityInfo.type = 1;
|
|
activityInfo.type = 1;
|
|
|
- magicJS.notification.appendNotifyInfo(`🎉[${activityInfo.name}]数据采集成功!`);
|
|
|
|
|
|
|
+ magicJS.notification.appendNotifyInfo(`🎉[${activityInfo.name}]兑换数据采集成功!`);
|
|
|
}
|
|
}
|
|
|
let key = `${WuBianConstKey.ActivityGoodsList}#${activityId}`;
|
|
let key = `${WuBianConstKey.ActivityGoodsList}#${activityId}`;
|
|
|
magicJS.data.write(key, rspData.data);
|
|
magicJS.data.write(key, rspData.data);
|
|
@@ -445,7 +463,7 @@ function handleCompositeGoodsList() {
|
|
|
activityId = activityInfo.activityId;
|
|
activityId = activityInfo.activityId;
|
|
|
magicJS.data.write(WuBianConstKey.ActivityId, activityId);
|
|
magicJS.data.write(WuBianConstKey.ActivityId, activityId);
|
|
|
activityInfo.type = 0;
|
|
activityInfo.type = 0;
|
|
|
- magicJS.notification.appendNotifyInfo(`🎉[${activityInfo.name}]数据采集成功!`);
|
|
|
|
|
|
|
+ magicJS.notification.appendNotifyInfo(`🎉[${activityInfo.name}]合成数据采集成功!`);
|
|
|
}
|
|
}
|
|
|
let key = `${WuBianConstKey.ActivityGoodsList}#${activityId}`;
|
|
let key = `${WuBianConstKey.ActivityGoodsList}#${activityId}`;
|
|
|
magicJS.data.write(key, rspData.data);
|
|
magicJS.data.write(key, rspData.data);
|
|
@@ -524,6 +542,10 @@ function handleFirstArtList() {
|
|
|
// }
|
|
// }
|
|
|
// rspData = result;
|
|
// rspData = result;
|
|
|
let artDataDict = magicJS.data.read(WuBianConstKey.FirstArtListData, {});
|
|
let artDataDict = magicJS.data.read(WuBianConstKey.FirstArtListData, {});
|
|
|
|
|
+ let reqData = getRequestPlainData();
|
|
|
|
|
+ if (reqData && reqData.page == 1) {
|
|
|
|
|
+ artDataDict = {};
|
|
|
|
|
+ }
|
|
|
let artList = rspData.data.list;
|
|
let artList = rspData.data.list;
|
|
|
for (let item of artList) {
|
|
for (let item of artList) {
|
|
|
const artId = item.artId;
|
|
const artId = item.artId;
|
|
@@ -547,6 +569,16 @@ function getFirstArtName(artId) {
|
|
|
return `${artId}`;
|
|
return `${artId}`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function checkIsValidFirstArt(artId) {
|
|
|
|
|
+ let artData = getFirstArtData(artId);
|
|
|
|
|
+ if (artData) {
|
|
|
|
|
+ if (artData.status == 1) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
function handleGoodsInfo() {
|
|
function handleGoodsInfo() {
|
|
|
let rspData = getResponsePlainData();
|
|
let rspData = getResponsePlainData();
|
|
@@ -630,6 +662,9 @@ function handleGoodsInfo() {
|
|
|
}
|
|
}
|
|
|
*/
|
|
*/
|
|
|
let artInfo = rspData.data.info;
|
|
let artInfo = rspData.data.info;
|
|
|
|
|
+ if (isisConsignmentCaptureEnabled()) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
let authorInfo = rspData.data.author;
|
|
let authorInfo = rspData.data.author;
|
|
|
let paymentInfo = rspData.data.paymentInfo;
|
|
let paymentInfo = rspData.data.paymentInfo;
|
|
|
if (typeof paymentInfo.saleMinPrice == 'string' && paymentInfo.saleMinPrice.length == 0) {
|
|
if (typeof paymentInfo.saleMinPrice == 'string' && paymentInfo.saleMinPrice.length == 0) {
|
|
@@ -784,15 +819,19 @@ function handleFirstArtInfo() {
|
|
|
let authorInfo = rspData.data.authorInfo;
|
|
let authorInfo = rspData.data.authorInfo;
|
|
|
let payInfo = rspData.data.payInfo;
|
|
let payInfo = rspData.data.payInfo;
|
|
|
|
|
|
|
|
- if (isFirstOrderCaptureEnabled()) {
|
|
|
|
|
- magicJS.data.write(WuBianConstKey.CreateFirstOrderData, {
|
|
|
|
|
- title: artInfo.title,
|
|
|
|
|
- artId: artInfo.artId,
|
|
|
|
|
- price: artInfo.price,
|
|
|
|
|
- num: payInfo.limited,
|
|
|
|
|
- });
|
|
|
|
|
- magicJS.data.write(WuBianConstKey.FirstGoodsId, artInfo.artId);
|
|
|
|
|
- magicJS.notification.appendNotifyInfo(`🎉产品[${artInfo.title}]数据采集成功!`);
|
|
|
|
|
|
|
+ if (checkIsValidFirstArt(artInfo.artId)) {
|
|
|
|
|
+ if (isFirstOrderCaptureEnabled()) {
|
|
|
|
|
+ magicJS.data.write(WuBianConstKey.CreateFirstOrderData, {
|
|
|
|
|
+ title: artInfo.title,
|
|
|
|
|
+ artId: artInfo.artId,
|
|
|
|
|
+ price: artInfo.price,
|
|
|
|
|
+ num: payInfo.limited,
|
|
|
|
|
+ });
|
|
|
|
|
+ magicJS.data.write(WuBianConstKey.FirstGoodsId, artInfo.artId);
|
|
|
|
|
+ magicJS.notification.appendNotifyInfo(`🎉产品[${artInfo.title}]首发数据采集成功!`);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
artInfo.title = `${artInfo.title}(流通:${artInfo.circulationNum})`;
|
|
artInfo.title = `${artInfo.title}(流通:${artInfo.circulationNum})`;
|
|
@@ -834,7 +873,7 @@ function handleCreateFirstOrder() {
|
|
|
num: reqData.num,
|
|
num: reqData.num,
|
|
|
});
|
|
});
|
|
|
magicJS.data.write(WuBianConstKey.FirstGoodsId, reqData.artHashId);
|
|
magicJS.data.write(WuBianConstKey.FirstGoodsId, reqData.artHashId);
|
|
|
- magicJS.notification.appendNotifyInfo(`🎉产品[${getFirstArtName(reqData.artHashId)}]数据采集成功!`);
|
|
|
|
|
|
|
+ magicJS.notification.appendNotifyInfo(`🎉产品[${getFirstArtName(reqData.artHashId)}]首发数据采集成功!`);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|