Authored by dongjunjie

接口

... ... @@ -118,7 +118,20 @@
},
ready() {
//this.fetchData2();
this.fetchData1();
this.fetchData2();
/*
this.$broadcast('grid-reload',{
type:1,
reqTime:this.dateFormat(new Date(),"YYYYMMdd"),
beginTime:"",
endTime:"",
productSkn:"",
productSkc:"",
productSku:"",
factoryCode:"",
sortId:""
});*/
},
methods:{
//获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额
... ... @@ -127,6 +140,9 @@
type:"post",
url:"/report/getShopBusinessOverview",
dataType: 'json',
data: {
dateId: util.dateFormat(new Date(),"YYYYMMdd")
},
success: function(rs) {
this.buyNumbers = rs.data.buyNumbers;
this.orderAmount = rs.data.orderAmount;
... ... @@ -143,6 +159,9 @@
type:"post",
url:"/report/getShopBrandRank",
dataType: 'json',
data: {
dateId: util.dateFormat(new Date(),"YYYYMMdd")
},
success: function(rs) {
this.rankNow = rs.data.rankNow;
this.rankChange = rs.data.rankChange;
... ...
... ... @@ -7,13 +7,19 @@ module.exports={
getShopBusinessOverview:{
title: "获取店铺的经营指标:一个自然日内有效订单商品件数、有效订单商品金额",
domain:"{bigdata}",
url: "/bigdata/getShopBusinessOverview"
url: "/bigdata/getShopBusinessOverview",
params:{
dateId:{type:"String"}
}
},
getShopBrandRank:{
title: "获取店铺的品牌排名,当前等级、排名、上升名词",
domain:"{bigdata}",
url: "/bigdata/getShopBrandRank"
url: "/bigdata/getShopBrandRank",
params:{
dateId:{type:"String"}
}
},
getOrdersGoodsAccountRptList:{
... ...
... ... @@ -25,7 +25,7 @@ $('#sidebar .nav .has-sub>a').click(function() {
child.slideUp('fast');
child.parent().removeClass('active');
}
isMenuShow = true;
//isMenuShow = true;
return false;
});
... ...
require("../js.jquery/common/index.js")
\ No newline at end of file
require("../js.jquery/common/index.js");
require("./util.js");
\ No newline at end of file
... ...
/**
* Created by yoho on 2016/6/7.
*/
var util = {
dateFormat: function(data, format) {
if (!isNaN(data)) {
var date = {
"M+": data.getMonth() + 1,
"d+": data.getDate(),
"h+": data.getHours(),
"m+": data.getMinutes(),
"s+": data.getSeconds(),
"q+": Math.floor((data.getMonth() + 3) / 3),
"S+": data.getMilliseconds()
};
if (/(y+)/i.test(format)) {
format = format.replace(RegExp.$1, (data.getFullYear() + '').substr(4 - RegExp.$1.length));
}
for (var k in date) {
if (new RegExp("(" + k + ")").test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
}
}
return format;
} else {
return "";
}
}
}
module.exports= util;
\ No newline at end of file
... ...
... ... @@ -12,7 +12,8 @@ module.exports = {
alias: {
jquery: path.resolve(baseName, './jquery.js'),
vue: path.resolve(baseName, './vue.min.js'),
echarts:path.resolve(baseName, './echarts.simple.min.js'),
echarts:path.resolve(baseName, './echarts.simple.min.js'),
util:path.resolve(baseName, './util.js')
},
extensions: ['', '.js', '.vue', '.scss']
},
... ...