Commit 460ef7b0 by 汪婷

门户网站地址修改

parent a3b2551f
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
var id = getUrlParam("typeId") var id = getUrlParam("typeId")
$.get(api_prefix + '/web/information/getpagelist', { informationTypeId: id, size: 3 }, function(res) { $.get(api_prefix + '/web/informations/page/open', { informationTypeId: id, size: 3 ,terminal_data_key:dataKey,terminal_data_key:dataKey}, function(res) {
if (res && res.success && res.data.result.length > 0) { if (res && res.success && res.data.result.length > 0) {
renderList(res.data) renderList(res.data)
var pages = Math.ceil(res.data.totalCount / res.data.pageSize) var pages = Math.ceil(res.data.totalCount / res.data.pageSize)
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
ActiveClass: "paging-selecte", ActiveClass: "paging-selecte",
EhCondition: 10, EhCondition: 10,
PageOn: function(page) { PageOn: function(page) {
$.get(api_prefix + '/web/information/getpagelist', { informationTypeId: id, page: page - 1, size: 3 }, function(res) { $.get(api_prefix + '/web/informations/page/open', { informationTypeId: id, page: page - 1, size: 3 ,terminal_data_key:dataKey}, function(res) {
if (res.data.result.length == 0) return if (res.data.result.length == 0) return
$(".information-item").empty(); $(".information-item").empty();
renderList(res.data) renderList(res.data)
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
$('.no-data').show() $('.no-data').show()
} }
}) })
$.get(api_prefix + "/web/information/querytypetree", function(result) { $.get(api_prefix + "/web/informations/typetree/open",{terminal_data_key:dataKey},function(result) {
if (result && result.success) { if (result && result.success) {
var chanelArr = []; var chanelArr = [];
result.data.forEach(item => { result.data.forEach(item => {
......
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
$(function () { $(function () {
var id = getUrlParam("id"); var id = getUrlParam("id");
var typeId = null var typeId = null
$.get(api_prefix + '/web/information/getinfordetails?', { id: id }, function (res) { $.get(api_prefix + '/web/informations/infor/details/open?', { id: id ,terminal_data_key:dataKey}, function (res) {
if (res && res.success) { if (res && res.success) {
$(".article-text").append(res.data.content||"文章暂无内容"); $(".article-text").append(res.data.content||"文章暂无内容");
$('.time>span').text(res.data.updateDate ||''); $('.time>span').text(res.data.updateDate ||'');
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
} }
}) })
$.get(api_prefix + "/web/information/querytypetree", function (result) { $.get(api_prefix + "/web/informations/typetree/open", {terminal_data_key:dataKey},function (result) {
if (result && result.success) { if (result && result.success) {
var chanelArr = []; var chanelArr = [];
result.data.forEach(item => { result.data.forEach(item => {
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
getChennelInfo(); getChennelInfo();
}); });
function getChennelInfo() { function getChennelInfo() {
$.get(api_prefix +"/web/information/querytypetree", function (result) { $.get(api_prefix +"/web/informations/typetree/open",{terminal_data_key:dataKey}, function (result) {
var chanelId = null; var chanelId = null;
var chanelArr = []; var chanelArr = [];
var newChaneId = null; var newChaneId = null;
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
var newTitStr = ''; var newTitStr = '';
var imgListStr = ''; var imgListStr = '';
var imgDotStr = ''; var imgDotStr = '';
$.get(api_prefix +'/web/information/getinformationlist', function (res) { $.get(api_prefix +'/web/informations/infor/list/open',{terminal_data_key:dataKey}, function (res) {
if (res && res.success) { if (res && res.success) {
chanelArr.forEach(function (item) { chanelArr.forEach(function (item) {
if(item.navigation){ if(item.navigation){
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
res.data.forEach(function (list) { res.data.forEach(function (list) {
if (list.informationTypeId == imgChaneId) { if (list.informationTypeId == imgChaneId) {
imgDotStr += "<li></li>" imgDotStr += "<li></li>"
imgListStr += '<li><a href="detail.html?id=' + list.informationId + '"target="_blank"><img src="' + IMGURL_PREFIX +api_prefix+ list.titleImg + '" alt=""></a><p>' + list.title + '</p></li>' imgListStr += '<li><a href="detail.html?id=' + list.informationId + '"target="_blank"><img src="' + IMGURL_PREFIX + list.titleImg + '" alt=""></a><p>' + list.title + '</p></li>'
} }
}) })
$('.slideTxtBox .hd>ul').append(newTitStr); $('.slideTxtBox .hd>ul').append(newTitStr);
......
var IMGURL_PREFIX = ''; var IMGURL_PREFIX = 'http://192.168.31.203:2021/plat';
var api_prefix = '/zs-web'; //站点不同要改配置文件 var api_prefix = 'http://192.168.31.203:2021/plat/admin_api'; //站点不同要改配置文件
var dataKey = "fwzs";
$(function() { $(function() {
getTimeInfo(); getTimeInfo();
setInterval(getTimeInfo, 500); setInterval(getTimeInfo, 500);
if (sessionStorage.getItem("webConfig")) { if (sessionStorage.getItem("webConfig")) {
renderConfig(JSON.parse(sessionStorage.getItem("webConfig"))) renderConfig(JSON.parse(sessionStorage.getItem("webConfig")))
} else { } else {
$.get(api_prefix + "/web/information/getWebConfig", function(res) { $.get(api_prefix + "/web/informations/webconfig/open", { terminal_data_key: dataKey }, function(res) {
if (res && res.success) { if (res && res.success) {
sessionStorage.setItem("webConfig", JSON.stringify(res.data)); sessionStorage.setItem("webConfig", JSON.stringify(res.data));
renderConfig(res.data) renderConfig(res.data)
...@@ -78,7 +79,7 @@ function renderConfig(data) { ...@@ -78,7 +79,7 @@ function renderConfig(data) {
$('meta[name="author"]').attr('content', data.author); $('meta[name="author"]').attr('content', data.author);
$("#seo").text(data.htags); $("#seo").text(data.htags);
$('title').text(data.websiteTitle); $('title').text(data.websiteTitle);
var imgSrc = IMGURL_PREFIX + api_prefix + data.coverImg; var imgSrc = IMGURL_PREFIX + data.coverImg;
$(".banner img").attr('src', imgSrc); $(".banner img").attr('src', imgSrc);
} }
//获取url中的参数 //获取url中的参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment