测试验证完成
This commit is contained in:
+1
-1
@@ -180,7 +180,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 && res.code !== 200) return;
|
if (res.code !== 0 && res.code !== 200) return;
|
||||||
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
|
|||||||
+19
-10
@@ -143,6 +143,12 @@
|
|||||||
return { Authorization: "Bearer " + token };
|
return { Authorization: "Bearer " + token };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function escapeJsString(value) {
|
||||||
|
return String(value == null ? "" : value)
|
||||||
|
.replace(/\\/g, "\\\\")
|
||||||
|
.replace(/'/g, "\\'");
|
||||||
|
}
|
||||||
|
|
||||||
// Load collection list
|
// Load collection list
|
||||||
function loadCollections() {
|
function loadCollections() {
|
||||||
const token = localStorage.getItem("token");
|
const token = localStorage.getItem("token");
|
||||||
@@ -152,10 +158,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.get(
|
ApiClient.get(
|
||||||
"/api/user/collect/list?page=" +
|
ApiClient.API.mineFreeCollectList,
|
||||||
currentPage +
|
{
|
||||||
"&pageSize=" +
|
pageNum: currentPage,
|
||||||
pageSize,
|
pageSize: pageSize,
|
||||||
|
},
|
||||||
{ headers: authHeaders() },
|
{ headers: authHeaders() },
|
||||||
).then(function (res) {
|
).then(function (res) {
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
@@ -189,6 +196,8 @@
|
|||||||
$grid.append(
|
$grid.append(
|
||||||
'<div class="cxz-collect-card" data-collect-id="' +
|
'<div class="cxz-collect-card" data-collect-id="' +
|
||||||
(item.id || "") +
|
(item.id || "") +
|
||||||
|
'" data-article-id="' +
|
||||||
|
articleId +
|
||||||
'">' +
|
'">' +
|
||||||
'<div class="cxz-card-body">' +
|
'<div class="cxz-card-body">' +
|
||||||
'<div class="cxz-card-title"><a href="' +
|
'<div class="cxz-card-title"><a href="' +
|
||||||
@@ -200,9 +209,9 @@
|
|||||||
"<span>" +
|
"<span>" +
|
||||||
displayDate +
|
displayDate +
|
||||||
"</span>" +
|
"</span>" +
|
||||||
'<button class="cxz-card-remove" onclick="removeCollect(this, ' +
|
'<button class="cxz-card-remove" onclick="removeCollect(this, \'' +
|
||||||
(item.id || 0) +
|
escapeJsString(articleId) +
|
||||||
')">取消收藏</button>' +
|
'\')">取消收藏</button>' +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>",
|
"</div>",
|
||||||
@@ -210,15 +219,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeCollect(btn, collectId) {
|
function removeCollect(btn, articleId) {
|
||||||
layui.layer.confirm(
|
layui.layer.confirm(
|
||||||
"确定要取消收藏吗?",
|
"确定要取消收藏吗?",
|
||||||
{ icon: 3, title: "提示" },
|
{ icon: 3, title: "提示" },
|
||||||
function (index) {
|
function (index) {
|
||||||
layui.layer.close(index);
|
layui.layer.close(index);
|
||||||
ApiClient.post(
|
ApiClient.post(
|
||||||
"/api/user/collect/delete",
|
ApiClient.API.freeArticleCollect(articleId),
|
||||||
{ id: collectId },
|
{},
|
||||||
{ headers: authHeaders() },
|
{ headers: authHeaders() },
|
||||||
).then(function (res) {
|
).then(function (res) {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
+4
-4
@@ -226,7 +226,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -250,7 +250,7 @@
|
|||||||
|
|
||||||
// Load menu data (3-level cascade)
|
// Load menu data (3-level cascade)
|
||||||
function loadMenuData() {
|
function loadMenuData() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
menuData = res.data;
|
menuData = res.data;
|
||||||
renderLotteryFilter();
|
renderLotteryFilter();
|
||||||
@@ -559,7 +559,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentTypeId = typeId;
|
currentTypeId = typeId;
|
||||||
ApiClient.get("/api/web/pay-article/expert-rank", {
|
ApiClient.get(ApiClient.API.payArticleExpertRank, {
|
||||||
menuId: typeId,
|
menuId: typeId,
|
||||||
issueCount: currentPageSize,
|
issueCount: currentPageSize,
|
||||||
pageNum: currentPage,
|
pageNum: currentPage,
|
||||||
@@ -664,7 +664,7 @@
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ApiClient.get("/api/web/pay-article/expert-rank", {
|
ApiClient.get(ApiClient.API.payArticleExpertRank, {
|
||||||
menuId: typeId,
|
menuId: typeId,
|
||||||
issueCount: 50,
|
issueCount: 50,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|||||||
+26
-4
@@ -308,10 +308,10 @@
|
|||||||
|
|
||||||
function loadBasicConfig() {
|
function loadBasicConfig() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
ApiClient.get("/api/web/config").catch(function () {
|
ApiClient.get(ApiClient.API.webConfig).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
ApiClient.get("/api/web/config/site").catch(function () {
|
ApiClient.get(ApiClient.API.configSite).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
]).then(function (results) {
|
]).then(function (results) {
|
||||||
@@ -392,8 +392,30 @@
|
|||||||
return String((item && (item.expertId || item.createBy || item.accountId)) || createBy || "");
|
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) {
|
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) {
|
function getArticlePrice(item) {
|
||||||
@@ -423,7 +445,7 @@
|
|||||||
if (!item) return [];
|
if (!item) return [];
|
||||||
const expert = item.expertId || item.createBy || createBy;
|
const expert = item.expertId || item.createBy || createBy;
|
||||||
const lottery = item.code || item.suoxie || code;
|
const lottery = item.code || item.suoxie || code;
|
||||||
const menu = item.menuId || item.parentId || item.typeId || parentId;
|
const menu = getArticleMenuId(item);
|
||||||
const issue = getArticleIssue(item);
|
const issue = getArticleIssue(item);
|
||||||
if (!expert || !issue) return [];
|
if (!expert || !issue) return [];
|
||||||
const normalized = function (parts) {
|
const normalized = function (parts) {
|
||||||
|
|||||||
+3
-7
@@ -142,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -337,16 +337,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "cjdlt" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "cjdlt" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+2
-2
@@ -300,10 +300,10 @@
|
|||||||
|
|
||||||
function loadBasicConfig() {
|
function loadBasicConfig() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
ApiClient.get("/api/web/config").catch(function () {
|
ApiClient.get(ApiClient.API.webConfig).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
ApiClient.get("/api/web/config/site").catch(function () {
|
ApiClient.get(ApiClient.API.configSite).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
]).then(function (results) {
|
]).then(function (results) {
|
||||||
|
|||||||
@@ -526,7 +526,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (!isApiSuccess(res)) return;
|
if (!isApiSuccess(res)) return;
|
||||||
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
||||||
var $nav = layui.$("#navLotteryItems");
|
var $nav = layui.$("#navLotteryItems");
|
||||||
@@ -573,7 +573,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadMenuList() {
|
function loadMenuList() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {})
|
ApiClient.loadMenuCompat()
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
if (!isApiSuccess(res)) throw new Error(res.msg || "获取彩种失败");
|
if (!isApiSuccess(res)) throw new Error(res.msg || "获取彩种失败");
|
||||||
menuList = ApiClient.asArray(ApiClient.pickData(res, [])).filter(
|
menuList = ApiClient.asArray(ApiClient.pickData(res, [])).filter(
|
||||||
|
|||||||
+3
-7
@@ -144,7 +144,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -394,16 +394,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "fc3d" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "fc3d" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+4
-16
@@ -252,7 +252,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(
|
ApiClient.loadMenuCompat().then(
|
||||||
function (res) {
|
function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAffInfo() {
|
function getAffInfo() {
|
||||||
return ApiClient.post("/api/web/rebate/getAffInfo", {}, { headers: CommonUtil.authHeaders() });
|
return ApiClient.get(ApiClient.API.referralShareInfo, null, { headers: CommonUtil.authHeaders() });
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyText(text) {
|
function copyText(text) {
|
||||||
@@ -442,13 +442,7 @@
|
|||||||
},
|
},
|
||||||
function (index) {
|
function (index) {
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
ApiClient.post(
|
ApiClient.post(ApiClient.API.referralBind, {}, { headers: CommonUtil.authHeaders() })
|
||||||
"/api/web/user/applyDistribution",
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
headers: CommonUtil.authHeaders(),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
layer.msg(
|
layer.msg(
|
||||||
@@ -482,13 +476,7 @@
|
|||||||
},
|
},
|
||||||
function (index) {
|
function (index) {
|
||||||
layer.close(index);
|
layer.close(index);
|
||||||
ApiClient.post(
|
ApiClient.post(ApiClient.API.expertApply, {}, { headers: CommonUtil.authHeaders() })
|
||||||
"/api/web/user/applyExpert",
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
headers: CommonUtil.authHeaders(),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
layer.msg(
|
layer.msg(
|
||||||
|
|||||||
+1
-1
@@ -243,7 +243,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderTopNav() {
|
function renderTopNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (!isApiSuccess(res)) return;
|
if (!isApiSuccess(res)) return;
|
||||||
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
var list = ApiClient.asArray(ApiClient.pickData(res, []));
|
||||||
var $nav = layui.$("#navLotteryItems");
|
var $nav = layui.$("#navLotteryItems");
|
||||||
|
|||||||
+1
-1
@@ -139,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
|
|||||||
+2
-5
@@ -766,7 +766,7 @@
|
|||||||
$("#historyTableBody").html(
|
$("#historyTableBody").html(
|
||||||
'<tr><td colspan="4" class="is-empty">正在加载历史开奖数据...</td></tr>',
|
'<tr><td colspan="4" class="is-empty">正在加载历史开奖数据...</td></tr>',
|
||||||
);
|
);
|
||||||
ApiClient.post("/api/web/lotteryResult/getList", { suoxie: code })
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: code })
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
historyCache[code] = res.data.records || res.data || [];
|
historyCache[code] = res.data.records || res.data || [];
|
||||||
@@ -834,10 +834,7 @@
|
|||||||
renderAdGroups(data.adList || []);
|
renderAdGroups(data.adList || []);
|
||||||
renderRecommendGrid(data.linkList || []);
|
renderRecommendGrid(data.linkList || []);
|
||||||
renderLinksGrid(data.linkList || []);
|
renderLinksGrid(data.linkList || []);
|
||||||
ApiClient.post("/api/web/QRCode").then(function (res) {
|
CommonUtil.generateQRCode(location.origin + "/html/appdown.html", "downloadQrImg");
|
||||||
if (res.code === 0 && res.data)
|
|
||||||
CommonUtil.generateQRCode(res.data, "downloadQrImg");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
$(function () {
|
$(function () {
|
||||||
bindStaticEvents();
|
bindStaticEvents();
|
||||||
|
|||||||
+3
-7
@@ -142,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -303,16 +303,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "kl8" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "kl8" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (!ApiClient.isSuccess(res) || !res.data) return;
|
if (!ApiClient.isSuccess(res) || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
|
|||||||
+3
-7
@@ -144,7 +144,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -382,16 +382,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "pl3" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "pl3" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+3
-7
@@ -145,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -311,16 +311,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "pl5" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "pl5" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+3
-7
@@ -144,7 +144,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -333,16 +333,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "qlc" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "qlc" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+3
-7
@@ -147,7 +147,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -321,16 +321,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "qxc" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "qxc" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on("click", ".qishu-but", function () {
|
$(document).on("click", ".qishu-but", function () {
|
||||||
|
|||||||
+1
-1
@@ -466,7 +466,7 @@
|
|||||||
AuthPageUtil.startSmsCountdown("#sendSmsBtn", waitSeconds);
|
AuthPageUtil.startSmsCountdown("#sendSmsBtn", waitSeconds);
|
||||||
throw new Error("__SMS_WAIT__");
|
throw new Error("__SMS_WAIT__");
|
||||||
}
|
}
|
||||||
return AuthPageUtil.sendForgotPasswordSmsCode(
|
return AuthPageUtil.sendSmsCode(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
{ phoneNumber: $("#phone").val().trim() },
|
{ phoneNumber: $("#phone").val().trim() },
|
||||||
verifyParams,
|
verifyParams,
|
||||||
|
|||||||
+2
-2
@@ -335,10 +335,10 @@
|
|||||||
|
|
||||||
function loadBasicConfig() {
|
function loadBasicConfig() {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
ApiClient.get("/api/web/config").catch(function () {
|
ApiClient.get(ApiClient.API.webConfig).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
ApiClient.get("/api/web/config/site").catch(function () {
|
ApiClient.get(ApiClient.API.configSite).catch(function () {
|
||||||
return { data: {} };
|
return { data: {} };
|
||||||
}),
|
}),
|
||||||
]).then(function (results) {
|
]).then(function (results) {
|
||||||
|
|||||||
+3
-7
@@ -142,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
@@ -396,16 +396,12 @@
|
|||||||
|
|
||||||
// Load data from API
|
// Load data from API
|
||||||
function loadData() {
|
function loadData() {
|
||||||
ApiClient.post(
|
ApiClient.requestLegacyLotteryResultCompat({ suoxie: "ssq" }).then(function (res) {
|
||||||
"/api/web/lotteryResult/getList",
|
|
||||||
{ suoxie: "ssq" },
|
|
||||||
function (res) {
|
|
||||||
if (res && res.data) {
|
if (res && res.data) {
|
||||||
allData = res.data;
|
allData = res.data;
|
||||||
renderData(currentCount);
|
renderData(currentCount);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Period count buttons
|
// Period count buttons
|
||||||
|
|||||||
+1
-1
@@ -359,7 +359,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(function (res) {
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
$nav.find(".topbar__nav-link").not(":first").remove();
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
||||||
|
|||||||
+7
-16
@@ -815,11 +815,7 @@
|
|||||||
|
|
||||||
// ====== Logout ======
|
// ====== Logout ======
|
||||||
function handleLogout() {
|
function handleLogout() {
|
||||||
ApiClient.post(
|
ApiClient.post(ApiClient.API.authLogout, null, { headers: CommonUtil.authHeaders() })
|
||||||
"/api/web/user/logout",
|
|
||||||
{},
|
|
||||||
{ headers: CommonUtil.authHeaders() },
|
|
||||||
)
|
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
localStorage.removeItem("token");
|
localStorage.removeItem("token");
|
||||||
window.location.href = "login.html";
|
window.location.href = "login.html";
|
||||||
@@ -833,10 +829,9 @@
|
|||||||
// ====== Sign-in Records ======
|
// ====== Sign-in Records ======
|
||||||
function loadSignInRecords(pageNum) {
|
function loadSignInRecords(pageNum) {
|
||||||
signInPageNum = pageNum || 1;
|
signInPageNum = pageNum || 1;
|
||||||
ApiClient.post(
|
ApiClient.get(
|
||||||
"/api/web/user/signIn/getPageList",
|
ApiClient.API.mineSignInList,
|
||||||
{
|
{
|
||||||
delFlag: "0",
|
|
||||||
pageNum: signInPageNum,
|
pageNum: signInPageNum,
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
pointsType: 1,
|
pointsType: 1,
|
||||||
@@ -845,7 +840,7 @@
|
|||||||
).then(function (res) {
|
).then(function (res) {
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
renderSignInTable(res.data.records || []);
|
renderSignInTable(res.data.records || []);
|
||||||
renderSignInPager(res.data.totalRow);
|
renderSignInPager(res.data.totalRow || res.data.total || 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -898,11 +893,7 @@
|
|||||||
|
|
||||||
// ====== Load Menu for Filter ======
|
// ====== Load Menu for Filter ======
|
||||||
function loadMenuList() {
|
function loadMenuList() {
|
||||||
ApiClient.post(
|
ApiClient.loadMenuCompat().then(function (res) {
|
||||||
"/api/web/menu/getFormatList",
|
|
||||||
{},
|
|
||||||
{ headers: CommonUtil.authHeaders() },
|
|
||||||
).then(function (res) {
|
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
menuListData = res.data;
|
menuListData = res.data;
|
||||||
// 免费文章 - 只需彩种
|
// 免费文章 - 只需彩种
|
||||||
@@ -953,7 +944,7 @@
|
|||||||
articlePageNum = pageNum || 1;
|
articlePageNum = pageNum || 1;
|
||||||
var menuId = $("#filterLottery").val() || "";
|
var menuId = $("#filterLottery").val() || "";
|
||||||
ApiClient.get(
|
ApiClient.get(
|
||||||
"/api/web/mine/free-article/list",
|
ApiClient.API.mineFreeArticleList,
|
||||||
{
|
{
|
||||||
menuId: menuId,
|
menuId: menuId,
|
||||||
pageNum: articlePageNum,
|
pageNum: articlePageNum,
|
||||||
@@ -1090,7 +1081,7 @@
|
|||||||
$("#paidFilterLottery").val() ||
|
$("#paidFilterLottery").val() ||
|
||||||
"";
|
"";
|
||||||
ApiClient.get(
|
ApiClient.get(
|
||||||
"/api/web/mine/pay-article/list",
|
ApiClient.API.minePayArticleList,
|
||||||
{
|
{
|
||||||
menuId: menuId,
|
menuId: menuId,
|
||||||
pageNum: paidArticlePageNum,
|
pageNum: paidArticlePageNum,
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(
|
ApiClient.loadMenuCompat().then(
|
||||||
function (res) {
|
function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
@@ -205,8 +205,8 @@
|
|||||||
|
|
||||||
function loadDistList(pageNum) {
|
function loadDistList(pageNum) {
|
||||||
currentPage = pageNum;
|
currentPage = pageNum;
|
||||||
ApiClient.post(
|
ApiClient.get(
|
||||||
"/api/web/distribution/getPageList",
|
ApiClient.API.referralInviteList,
|
||||||
{
|
{
|
||||||
pageNum: pageNum,
|
pageNum: pageNum,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
|
|||||||
@@ -228,7 +228,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(
|
ApiClient.loadMenuCompat().then(
|
||||||
function (res) {
|
function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
|
|||||||
@@ -272,7 +272,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderNav() {
|
function renderNav() {
|
||||||
ApiClient.post("/api/web/menu/getFormatList", {}).then(
|
ApiClient.loadMenuCompat().then(
|
||||||
function (res) {
|
function (res) {
|
||||||
if (res.code !== 0 || !res.data) return;
|
if (res.code !== 0 || !res.data) return;
|
||||||
var $nav = $("#navLotteryItems");
|
var $nav = $("#navLotteryItems");
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
CommonUtil.getCurrentUserDetail(
|
CommonUtil.getCurrentUserDetail(
|
||||||
function (data) {
|
function (data) {
|
||||||
$("#userName").text(data.nickName || data.nickname || data.username || "鐢ㄦ埛");
|
$("#userName").text(data.nickName || data.nickname || data.username || "用户");
|
||||||
$("#userAvatar").attr("src", data.avatar || "../public/img/userimg.png");
|
$("#userAvatar").attr("src", data.avatar || "../public/img/userimg.png");
|
||||||
$("#userLevel").text(CommonUtil.getUserLevelText(data));
|
$("#userLevel").text(CommonUtil.getUserLevelText(data));
|
||||||
},
|
},
|
||||||
|
|||||||
+3
-3
@@ -26,7 +26,7 @@ const ApiClient = {
|
|||||||
noticeList: '/api/web/notice/list',
|
noticeList: '/api/web/notice/list',
|
||||||
noticeDetail: (id) => `/api/web/notice/${encodeURIComponent(id || '')}`,
|
noticeDetail: (id) => `/api/web/notice/${encodeURIComponent(id || '')}`,
|
||||||
friendLinks: '/api/web/link/friend',
|
friendLinks: '/api/web/link/friend',
|
||||||
otherRecommendLinks: '/api/web/link/other',
|
otherRecommendLinks: '/api/web/link/other-recommend',
|
||||||
latestLotteryResult: '/api/web/lottery/result/latest',
|
latestLotteryResult: '/api/web/lottery/result/latest',
|
||||||
lotteryResultList: '/api/web/lottery/result/list',
|
lotteryResultList: '/api/web/lottery/result/list',
|
||||||
webConfigList: '/api/web/config/list',
|
webConfigList: '/api/web/config/list',
|
||||||
@@ -108,8 +108,8 @@ const ApiClient = {
|
|||||||
fc3dSchemeList: '/api/web/fc3d/scheme/list',
|
fc3dSchemeList: '/api/web/fc3d/scheme/list',
|
||||||
fc3dSchemeDetail: (id) => `/api/web/fc3d/scheme/${encodeURIComponent(id)}`,
|
fc3dSchemeDetail: (id) => `/api/web/fc3d/scheme/${encodeURIComponent(id)}`,
|
||||||
walletPurchaseFc3dScheme: '/api/web/wallet/purchase/fc3d-scheme',
|
walletPurchaseFc3dScheme: '/api/web/wallet/purchase/fc3d-scheme',
|
||||||
lotteryTrendTools: '/api/web/lottery/trend/tools',
|
lotteryTrendTools: '/api/web/lottery/result/trend/tools',
|
||||||
lotteryTrend: '/api/web/lottery/trend',
|
lotteryTrend: '/api/web/lottery/result/trend',
|
||||||
},
|
},
|
||||||
|
|
||||||
get baseUrl() {
|
get baseUrl() {
|
||||||
|
|||||||
+2
-2
@@ -1020,7 +1020,7 @@ const CommonUtil = {
|
|||||||
|
|
||||||
if (!window.__cxzCaiinfoMenuLoading && !window.__cxzCaiinfoMenuMeta && typeof ApiClient !== 'undefined') {
|
if (!window.__cxzCaiinfoMenuLoading && !window.__cxzCaiinfoMenuMeta && typeof ApiClient !== 'undefined') {
|
||||||
window.__cxzCaiinfoMenuLoading = true;
|
window.__cxzCaiinfoMenuLoading = true;
|
||||||
ApiClient.post('/api/web/menu/getFormatList', {})
|
ApiClient.loadMenuCompat()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
window.__cxzCaiinfoMenuMeta = findMenuMeta(res.data || []);
|
window.__cxzCaiinfoMenuMeta = findMenuMeta(res.data || []);
|
||||||
if (typeof window.loadArticles === 'function') window.loadArticles();
|
if (typeof window.loadArticles === 'function') window.loadArticles();
|
||||||
@@ -1439,7 +1439,7 @@ const CommonUtil = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
loadLinks() {
|
loadLinks() {
|
||||||
ApiClient.post('/api/web/link/getList', {}).then((res) => {
|
ApiClient.loadLinksCompat().then((res) => {
|
||||||
const list = res.data || [];
|
const list = res.data || [];
|
||||||
this.renderLinks(
|
this.renderLinks(
|
||||||
list.filter((item) => item.type === 1),
|
list.filter((item) => item.type === 1),
|
||||||
|
|||||||
Reference in New Issue
Block a user