Authored by xuhongyun

Merge branch 'dev-xuhongyun' into gray

... ... @@ -21,18 +21,44 @@ module.exports=function(app) {
});
}
return res.json({
return {
code: 200,
message: login.message
});
};
} else if(login.code == 400){
return res.json({
return {
code: 400,
message: login.message,
data: {
needCaptcha: login.needCaptcha
}
});
};
}
});
app.get("/loginInter", "common_login", function (login, req, res){
if (login.code == 200) {
if (req.session.gray) {
// 登录成功后,将phpsession保存下来
var gray_cookie = req.session.gray.replace(/[\[|\]]/g, '').split(';');
gray_cookie.forEach(function (n) {
console.log(n);
var item = n.split("=");
if (item.length > 1 && item[0] == "PHPSESSID") {
res.cookie(item[0], item[1], { maxAge: 7200000, httpOnly: true, domain: ".yohobuy.com" });
}
});
}
return {
code: 200,
message: login.message
};
} else if(login.code == 400){
return {
code: 400,
message: login.message
};
}
});
... ...
... ... @@ -81,8 +81,8 @@ module.exports = {
},
login: function (req, callback, common) {
var userInfo = {},result = { code: 400, message: "登录失败" },isSuccess=false;
var user = req.body.user;
var password = req.body.password;
var user = req.body.user ||req.query.user;
var password = req.body.password ||req.query.password;
var errcallback = function (err) {
return callback(err, result);
};
... ...
<%include '__ui/header'%>
<link rel="stylesheet" href="/static/index.min.css">
<app></app>
<%include '__ui/footer'%>
\ No newline at end of file
... ...
<template>
<com-pageheader :title="'报表管理'" :sub-title="'经营总览'"></com-pageheader>
<div id="businessIndex">
<div class="overViewTitle">
<h3>经营指标</h3>
... ... @@ -20,54 +18,6 @@
</div>
</div>
<div id="brandRanking">
<div class="overViewTitle">
<h3>品牌排名</h3>
<span>{{rankDate}}品牌排名</span>
</div>
<div class="overViewContent" style="margin-left: 125px">
<div class="triangleShape">
<b>当前层级</b>
<div class="shape triangle-up {{rankLevel==1?'activeShape':''}}">
<span>前5%</span><i class="triangle-right"></i>
</div>
<div class="shape trapezoid-1 {{rankLevel==2?'activeShape':''}}">
<span>5%~20%</span><i class="triangle-right"></i>
</div>
<div class="shape trapezoid-2 {{rankLevel==3?'activeShape':''}}">
<span>20%~40%</span><i class="triangle-right"></i>
</div>
<div class="shape trapezoid-3 {{rankLevel==4?'activeShape':''}}">
<span>40%~65%</span><i class="triangle-right"></i>
</div>
<div class="shape trapezoid-4 {{rankLevel==5?'activeShape':''}}">
<span>65%~100%</span><i class="triangle-right"></i>
</div>
</div>
<div class="rankData">
<div class="dataModle2" style="margin-bottom: 20px">
<p>同品类中<br>品牌排名为</p>
<h2>第<b>{{rankNow}}</b>名</h2>
</div>
<div class="dataModle2">
<p>较上周同期</p>
<h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b> 个名次</h2>
<h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b> 个名次</h2>
<h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b> 个名次</h2>
<h2 v-show="rankChange=='--'"><b>--</b>个名次</h2>
<div class="rankTip" v-show="rankChange > 0"><b class="_red">今天业绩不错,继续加油哦!</b></div>
<div class="rankTip" v-show="rankChange == 0"><b class="_blue">继续加油哦!</b></div>
<div class="rankTip" v-show="rankChange < 0"><b class="_green">还需再接再厉哦!</b></div>
<div class="rankTip" v-show="rankChange=='--'"><b class="_red">没数据也要加油哦!</b></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div id="businessDetail">
<div class="overViewTitle">
<h3>交易明细</h3>
... ...
<template>
<com-pageheader :title="'报表管理'" :sub-title="'商品销售报表'"></com-pageheader>
<com-tab :rows="tab.rows" :active.sync="tab.active"></com-tab>
<div v-show="tab.active==0">
<uc-sale></uc-sale>
... ...