Authored by leo

Update: 增加逛详情图片历史数据更新

... ... @@ -83,6 +83,8 @@ module.exports=function(app) {
/*获取文章详情*/
app.post("/guang/queryAllGoodsSort","infoManager_queryAllGoodsSort");
app.get("/guang/updateArticlePic/background", "infoManager_updateArticlePic");
app.get("/guang/updateArticlePic/background/:page", "guang.info.Update");
app.post("/guang/updateArticlePic", "infoManager_updateArticlePic");
}
... ...
... ... @@ -149,7 +149,10 @@ module.exports={
},
updateArticlePic: {
title: "更新逛详情中图片大小",
url: "/guang/article/updateArticlePic/background"
url: "/guang/article/updateArticlePic/background",
params: [
{name: "page", type:"Number"}
]
}
}
}
\ No newline at end of file
... ...
<p>更新请求已发送!</p>
\ No newline at end of file
... ...
var $ = require('jquery');
common = require('../../../common/common');
function getPageFromUrl() {
var uri = location.href + '';
var index = uri.indexOf('background');
index = uri.indexOf('/', index);
if(index == -1) {
return 0;
} else {
var page = uri.substring(index + 1);
return +page;
}
}
var page = getPageFromUrl();
common.util.__ajax({
url: '/guang/updateArticlePic',
data: {
page: page
}
})
\ No newline at end of file
... ...