fd82d64c by 任超

style:新闻

1 parent a90a86d1
......@@ -20,6 +20,10 @@ function login() {
});
})
}
// $(document).ready(function() {
// })
$(document).on('click', '.PersonLogin', function () {
login();
window.onbeforeunload = function () {
......@@ -74,7 +78,7 @@ $(function () {
})
// 点击注册的时候
$(document).on('click', '#registerButton', function () {
window.open(`${localhostPaht}/staticViews/register.html`, '_self')
window.open(''+localhostPaht+'/staticViews/register.html', '_self')
});
function clicklogin(data) {
$.ajax({
......
......@@ -8,7 +8,8 @@ $(function () {
addTabs('#news');
});
//加载新闻列表数据
function LoadNewsData(currentPage = 1) {
function LoadNewsData(currentPage) {
var currentPage = currentPage || 1;
$.ajax({
type: "get", //提交方式
url: portal.api_url + "/portal/MhNews/getNewsArticleList",//路径
......@@ -19,7 +20,7 @@ function LoadNewsData(currentPage = 1) {
async: false,
dataType: "json",
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
success: function (result) {
data.total = result.data.total;
if (result.code == 200 && result.data != null) {
data.list = result.data.records;
......@@ -30,8 +31,8 @@ function LoadNewsData(currentPage = 1) {
, view = document.getElementById('ulNews');
laytpl(getTpl).render(data, function (html) {
view.innerHTML = html;
});
});
})
})
}
})
}
......
No preview for this file type