|
@@ -303,7 +303,8 @@ function checkHandleRequest() {
|
|
|
// 产品类别
|
|
// 产品类别
|
|
|
handleMarketSeriesList();
|
|
handleMarketSeriesList();
|
|
|
} else if (path.indexOf('/mall/home/series')) {//无需登录
|
|
} else if (path.indexOf('/mall/home/series')) {//无需登录
|
|
|
- //首页数字资产和盲盒推荐
|
|
|
|
|
|
|
+ //首页数字资产和盲盒上新
|
|
|
|
|
+ handlerHomeSeriesInfo();
|
|
|
} else if (path.indexOf('/mall/homepage/info')) {//无需登录
|
|
} else if (path.indexOf('/mall/homepage/info')) {//无需登录
|
|
|
//首页信息,包括广告喇叭、banner上多个入口配置
|
|
//首页信息,包括广告喇叭、banner上多个入口配置
|
|
|
handlerHomePageInfo();
|
|
handlerHomePageInfo();
|
|
@@ -355,7 +356,7 @@ function getResponsePlainData() {
|
|
|
if (!data) {
|
|
if (!data) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- return JSON.parse(data);;
|
|
|
|
|
|
|
+ return JSON.parse(data);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function getRequestPlainData() {
|
|
function getRequestPlainData() {
|
|
@@ -419,6 +420,26 @@ function handleUserInfo() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function handlerHomeSeriesInfo(){
|
|
|
|
|
+ let rspData = getResponsePlainData();
|
|
|
|
|
+ if (!rspData) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (rspData.code != 200) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let otimeOffset = magicJS.data.read(HbcpreConstKey.openingTimeOffset, 60000);
|
|
|
|
|
+ let seriesList = rspData.data.list;
|
|
|
|
|
+ for(let i=0; i < seriesList.length; i++){
|
|
|
|
|
+ const item = seriesList[i];
|
|
|
|
|
+ if(item.soldNum >= item.issueNum){
|
|
|
|
|
+ item.soldNum = item.issueNum - 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ item.saleTime -= otimeOffset;
|
|
|
|
|
+ item.status = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function handlerHomePageInfo(){
|
|
function handlerHomePageInfo(){
|
|
|
let rspData = getResponsePlainData();
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|
|
if (!rspData) {
|
|
@@ -519,10 +540,11 @@ function handleSeriesInfo() {
|
|
|
let otimeOffset = magicJS.data.read(HbcpreConstKey.openingTimeOffset, 60000);
|
|
let otimeOffset = magicJS.data.read(HbcpreConstKey.openingTimeOffset, 60000);
|
|
|
seriesInfo.openingTime -= otimeOffset;
|
|
seriesInfo.openingTime -= otimeOffset;
|
|
|
// 强开限制可购买数
|
|
// 强开限制可购买数
|
|
|
- if(seriesInfo.circulationNumber == seriesInfo.quantityNumber){
|
|
|
|
|
|
|
+ if(seriesInfo.circulationNumber >= seriesInfo.quantityNumber){
|
|
|
seriesInfo.circulationNumber = seriesInfo.quantityNumber - 1;
|
|
seriesInfo.circulationNumber = seriesInfo.quantityNumber - 1;
|
|
|
seriesInfo.authorName = `${seriesInfo.authorName}#改`;
|
|
seriesInfo.authorName = `${seriesInfo.authorName}#改`;
|
|
|
}
|
|
}
|
|
|
|
|
+ seriesInfo.status = 0;
|
|
|
// 强开限制购买次数
|
|
// 强开限制购买次数
|
|
|
seriesInfo.limitBuy = 1000;
|
|
seriesInfo.limitBuy = 1000;
|
|
|
}
|
|
}
|