测试验证完成
This commit is contained in:
+26
-4
@@ -308,10 +308,10 @@
|
||||
|
||||
function loadBasicConfig() {
|
||||
Promise.all([
|
||||
ApiClient.get("/api/web/config").catch(function () {
|
||||
ApiClient.get(ApiClient.API.webConfig).catch(function () {
|
||||
return { data: {} };
|
||||
}),
|
||||
ApiClient.get("/api/web/config/site").catch(function () {
|
||||
ApiClient.get(ApiClient.API.configSite).catch(function () {
|
||||
return { data: {} };
|
||||
}),
|
||||
]).then(function (results) {
|
||||
@@ -392,8 +392,30 @@
|
||||
return String((item && (item.expertId || item.createBy || item.accountId)) || createBy || "");
|
||||
}
|
||||
|
||||
function getArticleMenuIdFromMenus(item) {
|
||||
const menus = ApiClient.asArray(item && item.menus);
|
||||
const menu =
|
||||
menus.find(function (entry) {
|
||||
return entry && entry.type !== "lottery" && (entry.id || entry.menuId);
|
||||
}) ||
|
||||
menus.find(function (entry) {
|
||||
return entry && (entry.id || entry.menuId);
|
||||
});
|
||||
return menu ? String(menu.id || menu.menuId || "") : "";
|
||||
}
|
||||
|
||||
function getArticleMenuId(item) {
|
||||
return String((item && (item.menuId || item.parentId || item.typeId)) || parentId || "");
|
||||
return String(
|
||||
(item &&
|
||||
(item.menuId ||
|
||||
item.playMenuId ||
|
||||
item.typeMenuId ||
|
||||
item.parentId ||
|
||||
item.typeId ||
|
||||
getArticleMenuIdFromMenus(item))) ||
|
||||
parentId ||
|
||||
"",
|
||||
);
|
||||
}
|
||||
|
||||
function getArticlePrice(item) {
|
||||
@@ -423,7 +445,7 @@
|
||||
if (!item) return [];
|
||||
const expert = item.expertId || item.createBy || createBy;
|
||||
const lottery = item.code || item.suoxie || code;
|
||||
const menu = item.menuId || item.parentId || item.typeId || parentId;
|
||||
const menu = getArticleMenuId(item);
|
||||
const issue = getArticleIssue(item);
|
||||
if (!expert || !issue) return [];
|
||||
const normalized = function (parts) {
|
||||
|
||||
Reference in New Issue
Block a user