|
|
@@ -20,6 +20,7 @@ const WuBianConstKey = {
|
|
|
Token: 'WubianProToken',
|
|
|
BrowserProxyUrl: 'WubianBrowserProxyUrl',
|
|
|
TenantId: 'WubianTenantId',
|
|
|
+ MarketAlbumListData: 'WubianMarketAlbumListData',
|
|
|
AllMarketGroupListData: 'WubianAllMarketGroupListData',
|
|
|
|
|
|
ActivityListData: 'WubianActivityListData',
|
|
|
@@ -164,6 +165,7 @@ function checkHandleRequest() {
|
|
|
break;
|
|
|
case '/vmf/app/market/albumList':
|
|
|
// 市场分区专辑列表
|
|
|
+ handleMarketAlbumList();
|
|
|
break;
|
|
|
case '/vmf/app/market/groupList':
|
|
|
// 市场产品寄售列表信息
|
|
|
@@ -415,12 +417,14 @@ function handleNoticeInfo() {
|
|
|
let reqData = getRequestPlainData();
|
|
|
let hashId = reqData.hashId;
|
|
|
if (hashId == '468xab6e') {
|
|
|
+ let marketAlbumList = magicJS.data.write(WuBianConstKey.MarketAlbumListData, []);
|
|
|
let marketGroupLstDict = magicJS.data.read(WuBianConstKey.AllMarketGroupListData, {});
|
|
|
- let baseList = [];
|
|
|
- let relationList = [];
|
|
|
+ let baseLstDict = [];
|
|
|
+ let relationLstDict = [];
|
|
|
let sortId = 1;
|
|
|
for (let artId in marketGroupLstDict) {
|
|
|
const artInfo = marketGroupLstDict[artId];
|
|
|
+ const groupName = artInfo.groupName;
|
|
|
const artInfoA = {
|
|
|
hash_id: artInfo.artId,
|
|
|
id: sortId,
|
|
|
@@ -429,7 +433,10 @@ function handleNoticeInfo() {
|
|
|
event: "art",
|
|
|
type: { syn: "合成兑换", act: "空投", art: "藏品", pri: "抽奖", article: "公告" },
|
|
|
};
|
|
|
- baseList.push(artInfoA);
|
|
|
+ if (!baseLstDict[groupName]) {
|
|
|
+ baseLstDict[groupName] = [];
|
|
|
+ }
|
|
|
+ baseLstDict[groupName].push(artInfoA);
|
|
|
sortId += 1;
|
|
|
const artInfoB = {
|
|
|
jumpType: "",
|
|
|
@@ -444,30 +451,46 @@ function handleNoticeInfo() {
|
|
|
categoryType: "",
|
|
|
relationId: artInfo.artId,
|
|
|
};
|
|
|
- relationList.push(artInfoB);
|
|
|
+ if (!relationLstDict[groupName]) {
|
|
|
+ relationLstDict[groupName] = [];
|
|
|
+ }
|
|
|
+ relationLstDict[groupName].push(artInfoB);
|
|
|
}
|
|
|
let artLstText = ``;
|
|
|
- for (let i = 0; i < baseList.length; ++i) {
|
|
|
- let element = baseList[i];
|
|
|
- let dataStr = JSON.stringify(element);
|
|
|
- dataStr = dataStr.replace(/"/g, """);
|
|
|
- let tmpStr = `<input ` +
|
|
|
- `style="align-content:center;width:80%;height:35px;background:#18bc9c;color:#FFFFFF;" readonly="readonly" ` +
|
|
|
- `disabled="disabled" ` +
|
|
|
- `name="relation['art'][]" ` +
|
|
|
- `value="[显示]藏品:${element.title}" ` +
|
|
|
- `data-event="art" ` +
|
|
|
- `data-id="${element.hash_id}" ` +
|
|
|
- `data-show="1" ` +
|
|
|
- `data="${dataStr}" />`;
|
|
|
- artLstText += tmpStr;
|
|
|
- };
|
|
|
- magicJS.logger.info(`artLstText: \n${artLstText}`);
|
|
|
+ let relationAllList = [];
|
|
|
+ for (let t = 0; t < marketAlbumList.length; t++) {
|
|
|
+ const albumInfo = marketAlbumList[t];
|
|
|
+ const albumName = albumInfo.name;
|
|
|
+ if (albumName.indexOf('推荐') >= 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ artLstText += `<p><strong><span style="color:#E53333;"> <span style="color:#000000;">${albumName}:</span></span></strong></p>`;
|
|
|
+ let artLstSubText = ``;
|
|
|
+ let baseList = baseLstDict[albumName] || [];
|
|
|
+ let relationList = relationLstDict[groupName] || [];
|
|
|
+ relationAllList = relationAllList.concat(relationList);
|
|
|
+ for (let i = 0; i < baseList.length; ++i) {
|
|
|
+ let element = baseList[i];
|
|
|
+ let dataStr = JSON.stringify(element);
|
|
|
+ dataStr = dataStr.replace(/"/g, """);
|
|
|
+ let tmpStr = `<input ` +
|
|
|
+ `style="align-content:center;width:80%;height:35px;background:#18bc9c;color:#FFFFFF;" readonly="readonly" ` +
|
|
|
+ `disabled="disabled" ` +
|
|
|
+ `name="relation['art'][]" ` +
|
|
|
+ `value="[显示]藏品:${element.title}" ` +
|
|
|
+ `data-event="art" ` +
|
|
|
+ `data-id="${element.hash_id}" ` +
|
|
|
+ `data-show="1" ` +
|
|
|
+ `data="${dataStr}" />`;
|
|
|
+ artLstSubText += tmpStr;
|
|
|
+ };
|
|
|
+ artLstText += `<p><strong><span style="color:#E53333;">${artLstSubText}<br /></span></strong></p>`;
|
|
|
+ }
|
|
|
let content = `
|
|
|
<p><br /></p>
|
|
|
<p style="white-space:normal;"><strong>以下过往开放过的藏品:</strong></p>
|
|
|
<p><br /></p>
|
|
|
- <p><strong><span style="color:#E53333;">${artLstText}<br /></span></strong></p>
|
|
|
+ ${artLstText}
|
|
|
<p><strong><span style="color:#E53333;"><br /></span></strong></p>
|
|
|
<p><strong><span style="color:#E53333;"><br /></span></strong></p>
|
|
|
<p><strong><span style="color:#E53333;"> </span></strong></p>
|
|
|
@@ -477,12 +500,25 @@ function handleNoticeInfo() {
|
|
|
<p><br /></p>
|
|
|
`;
|
|
|
rspData.data.content = content;
|
|
|
- rspData.data.relationList = relationList;
|
|
|
+ rspData.data.relationList = relationAllList;
|
|
|
rspData.data.title = '欢迎来到神秘空间';
|
|
|
gRetBody = rspData;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function handleMarketAlbumList() {
|
|
|
+ let rspData = getResponsePlainData();
|
|
|
+ if (!rspData) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (rspData.code != 200) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (rspData.data && rspData.data.length > 0) {
|
|
|
+ magicJS.data.write(WuBianConstKey.MarketAlbumListData, rspData.data);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function hadnleMarketGroupList() {
|
|
|
let rspData = getResponsePlainData();
|
|
|
if (!rspData) {
|