|
|
@@ -140,22 +140,22 @@ function readItemCntRwDict(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function getCollectionIndexData(id){
|
|
|
+function getCollectionIndexData(seriesId){
|
|
|
let dataList = magicJS.data.read(HbcpreConstKey.collectionClassList, []);
|
|
|
for(let i=0; i < dataList.length; i++){
|
|
|
- if(id == dataList[i].id){
|
|
|
+ if(seriesId == dataList[i].seriesId){
|
|
|
return dataList[i];
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
-function getCollectionName(id){
|
|
|
- let data = getCollectionIndexData(id);
|
|
|
+function getCollectionName(seriesId){
|
|
|
+ let data = getCollectionIndexData(seriesId);
|
|
|
if(data){
|
|
|
- return `${data.title}`;
|
|
|
+ return `${data.seriesName}`;
|
|
|
}
|
|
|
- return `${id}`;
|
|
|
+ return `${seriesId}`;
|
|
|
}
|
|
|
|
|
|
function checkHandleRequest() {
|
|
|
@@ -225,9 +225,9 @@ function checkHandleRequest() {
|
|
|
}else if (path.indexOf('/api/market/packlistdetail') > -1) {
|
|
|
// 产品详情
|
|
|
// handlePacklistDetail();
|
|
|
- }else if (path.indexOf('/api/market/newpackorderlistdetail') > -1) {
|
|
|
+ }else if (path.indexOf('/mall/series/seriesInfo') > -1) {
|
|
|
// 产品列表
|
|
|
- handleNewpackOrderListDetail();
|
|
|
+ handleSeriesInfo();
|
|
|
}else if (path.indexOf('/mall/resale/getSeriesList') > -1) {
|
|
|
// 产品类别
|
|
|
handleSeriesList();
|
|
|
@@ -347,14 +347,18 @@ function handleSeriesList(){
|
|
|
|
|
|
let itemData = rspData.data.list;
|
|
|
for(let i=0; i < itemData.length; i++){
|
|
|
- const iData = itemData[i];
|
|
|
+ // seriesId
|
|
|
+ // seriesName
|
|
|
+ // seriesType
|
|
|
+ // nftType 类别
|
|
|
// quantityNumber //发行
|
|
|
// soldNum //流通
|
|
|
// amount //最低价格
|
|
|
+ // care
|
|
|
+ // grade
|
|
|
+ // isSpillover
|
|
|
const id = iData.id;
|
|
|
tmpItemDict[id] = iData;
|
|
|
- // 退市标志
|
|
|
- iData.amount = null;
|
|
|
}
|
|
|
|
|
|
dataList = [];
|
|
|
@@ -363,20 +367,15 @@ function handleSeriesList(){
|
|
|
}
|
|
|
magicJS.data.write(HbcpreConstKey.collectionClassList, dataList);
|
|
|
|
|
|
- const baseConfig = getBaseConfig();
|
|
|
- if (baseConfig.encrypt) {
|
|
|
- gRetBody = encryptAES(JSON.stringify(rspData), baseConfig.k, baseConfig.v);
|
|
|
- } else {
|
|
|
- gRetBody = rspData;
|
|
|
- }
|
|
|
+ gRetBody = rspData;
|
|
|
}
|
|
|
|
|
|
-function handleNewpackOrderListDetail(){
|
|
|
+function handleSeriesInfo(){
|
|
|
if(isOrderItemGrabEnabled()){
|
|
|
let reqData = getRequestPlainData();
|
|
|
if (reqData) {
|
|
|
- magicJS.data.write(HbcpreConstKey.castingId, reqData.collection_id);
|
|
|
- let collectionName = getCollectionName(reqData.collection_id);
|
|
|
+ magicJS.data.write(HbcpreConstKey.castingId, reqData.seriesId);
|
|
|
+ let collectionName = getCollectionName(reqData.seriesId);
|
|
|
magicJS.notification.post(scriptName, "", `🎉[${collectionName}]快捷下单采集成功!`);
|
|
|
}
|
|
|
}
|
|
|
@@ -384,27 +383,21 @@ function handleNewpackOrderListDetail(){
|
|
|
if (!rspData) {
|
|
|
return;
|
|
|
}
|
|
|
- if (rspData.code != 1000) {
|
|
|
+ if (rspData.code != 200) {
|
|
|
return;
|
|
|
}
|
|
|
- let itemList = rspData.data.data;
|
|
|
- for(let i = 0; i < itemList.length; i++){
|
|
|
- const iData = itemList[i];
|
|
|
- if(iData.lock_uid && iData.lock_uid > 0){
|
|
|
- iData.lock_uid = null;
|
|
|
- iData.lock_time = null;
|
|
|
- iData.pay_price = `${iData.pay_price}#0`;
|
|
|
- iData.pay_type1 = 1;
|
|
|
- iData.pay_type2 = 1;
|
|
|
- iData.pay_type3 = 1;
|
|
|
- }
|
|
|
- }
|
|
|
- const baseConfig = getBaseConfig();
|
|
|
- if (baseConfig.encrypt) {
|
|
|
- gRetBody = encryptAES(JSON.stringify(rspData), baseConfig.k, baseConfig.v);
|
|
|
- } else {
|
|
|
- gRetBody = rspData;
|
|
|
+ let seriesInfo = rspData.data;
|
|
|
+ // quantityNumber //发行
|
|
|
+ // circulationNumber //流通
|
|
|
+ seriesInfo.openingTime = 0;
|
|
|
+ seriesInfo.limitBuy = 1;
|
|
|
+ seriesInfo.canQuick = 1;
|
|
|
+
|
|
|
+ let seriesId = magicJS.data.read(HbcpreConstKey.castingId, null);
|
|
|
+ if(seriesId != seriesInfo.seriesId){
|
|
|
+ magicJS.notification.post(scriptName, "", `🎉[${seriesInfo.seriesName}]快捷下单采集成功!`);
|
|
|
}
|
|
|
+ gRetBody = rspData;
|
|
|
}
|
|
|
|
|
|
function handleCompoundIndex(){
|