Update.js 694 Bytes
var $ = require('jquery');
common = require('../../../common/common');

var page, size = 0;

function getPageFromUrl() {
    var uri = location.href + '';
    var index = uri.indexOf('background');
    index = uri.indexOf('/', index);
    if(index == -1) {
        return 0;
    } else {
        uri = uri.substring(index + 1);
        index = uri.indexOf('?size=');
        if(index != -1) {
            page = +uri.substring(0, index);
            size = +uri.substring(index + '?size='.length);
        } else {
            page = +uri;
        }
    }
}

getPageFromUrl();

common.util.__ajax({
    url: '/guang/updateArticlePic',
    data: {
        page: page,
        size: size
    }
})