Authored by leo

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

@@ -83,6 +83,8 @@ module.exports=function(app) { @@ -83,6 +83,8 @@ module.exports=function(app) {
83 /*获取文章详情*/ 83 /*获取文章详情*/
84 app.post("/guang/queryAllGoodsSort","infoManager_queryAllGoodsSort"); 84 app.post("/guang/queryAllGoodsSort","infoManager_queryAllGoodsSort");
85 85
86 - app.get("/guang/updateArticlePic/background", "infoManager_updateArticlePic"); 86 + app.get("/guang/updateArticlePic/background/:page", "guang.info.Update");
  87 +
  88 + app.post("/guang/updateArticlePic", "infoManager_updateArticlePic");
87 } 89 }
88 90
@@ -149,7 +149,10 @@ module.exports={ @@ -149,7 +149,10 @@ module.exports={
149 }, 149 },
150 updateArticlePic: { 150 updateArticlePic: {
151 title: "更新逛详情中图片大小", 151 title: "更新逛详情中图片大小",
152 - url: "/guang/article/updateArticlePic/background" 152 + url: "/guang/article/updateArticlePic/background",
  153 + params: [
  154 + {name: "page", type:"Number"}
  155 + ]
153 } 156 }
154 } 157 }
155 } 158 }
  1 +<p>更新请求已发送!</p>
  1 +var $ = require('jquery');
  2 +common = require('../../../common/common');
  3 +
  4 +function getPageFromUrl() {
  5 + var uri = location.href + '';
  6 + var index = uri.indexOf('background');
  7 + index = uri.indexOf('/', index);
  8 + if(index == -1) {
  9 + return 0;
  10 + } else {
  11 + var page = uri.substring(index + 1);
  12 + return +page;
  13 + }
  14 +}
  15 +
  16 +var page = getPageFromUrl();
  17 +
  18 +common.util.__ajax({
  19 + url: '/guang/updateArticlePic',
  20 + data: {
  21 + page: page
  22 + }
  23 +})