Merge branch 'dev-xuhongyun' into gray
Showing
5 changed files
with
32 additions
and
58 deletions
@@ -21,18 +21,44 @@ module.exports=function(app) { | @@ -21,18 +21,44 @@ module.exports=function(app) { | ||
21 | }); | 21 | }); |
22 | } | 22 | } |
23 | 23 | ||
24 | - return res.json({ | 24 | + return { |
25 | code: 200, | 25 | code: 200, |
26 | message: login.message | 26 | message: login.message |
27 | - }); | 27 | + }; |
28 | } else if(login.code == 400){ | 28 | } else if(login.code == 400){ |
29 | - return res.json({ | 29 | + return { |
30 | code: 400, | 30 | code: 400, |
31 | message: login.message, | 31 | message: login.message, |
32 | data: { | 32 | data: { |
33 | needCaptcha: login.needCaptcha | 33 | needCaptcha: login.needCaptcha |
34 | } | 34 | } |
35 | + }; | ||
36 | + } | ||
35 | }); | 37 | }); |
38 | + | ||
39 | + app.get("/loginInter", "common_login", function (login, req, res){ | ||
40 | + if (login.code == 200) { | ||
41 | + if (req.session.gray) { | ||
42 | + // 登录成功后,将phpsession保存下来 | ||
43 | + var gray_cookie = req.session.gray.replace(/[\[|\]]/g, '').split(';'); | ||
44 | + gray_cookie.forEach(function (n) { | ||
45 | + console.log(n); | ||
46 | + var item = n.split("="); | ||
47 | + if (item.length > 1 && item[0] == "PHPSESSID") { | ||
48 | + res.cookie(item[0], item[1], { maxAge: 7200000, httpOnly: true, domain: ".yohobuy.com" }); | ||
49 | + } | ||
50 | + }); | ||
51 | + } | ||
52 | + | ||
53 | + return { | ||
54 | + code: 200, | ||
55 | + message: login.message | ||
56 | + }; | ||
57 | + } else if(login.code == 400){ | ||
58 | + return { | ||
59 | + code: 400, | ||
60 | + message: login.message | ||
61 | + }; | ||
36 | } | 62 | } |
37 | }); | 63 | }); |
38 | 64 |
@@ -81,8 +81,8 @@ module.exports = { | @@ -81,8 +81,8 @@ module.exports = { | ||
81 | }, | 81 | }, |
82 | login: function (req, callback, common) { | 82 | login: function (req, callback, common) { |
83 | var userInfo = {},result = { code: 400, message: "登录失败" },isSuccess=false; | 83 | var userInfo = {},result = { code: 400, message: "登录失败" },isSuccess=false; |
84 | - var user = req.body.user; | ||
85 | - var password = req.body.password; | 84 | + var user = req.body.user ||req.query.user; |
85 | + var password = req.body.password ||req.query.password; | ||
86 | var errcallback = function (err) { | 86 | var errcallback = function (err) { |
87 | return callback(err, result); | 87 | return callback(err, result); |
88 | }; | 88 | }; |
1 | <template> | 1 | <template> |
2 | - <com-pageheader :title="'报表管理'" :sub-title="'经营总览'"></com-pageheader> | ||
3 | - | ||
4 | <div id="businessIndex"> | 2 | <div id="businessIndex"> |
5 | <div class="overViewTitle"> | 3 | <div class="overViewTitle"> |
6 | <h3>经营指标</h3> | 4 | <h3>经营指标</h3> |
@@ -20,54 +18,6 @@ | @@ -20,54 +18,6 @@ | ||
20 | </div> | 18 | </div> |
21 | </div> | 19 | </div> |
22 | 20 | ||
23 | - <div id="brandRanking"> | ||
24 | - <div class="overViewTitle"> | ||
25 | - <h3>品牌排名</h3> | ||
26 | - <span>{{rankDate}}品牌排名</span> | ||
27 | - </div> | ||
28 | - | ||
29 | - <div class="overViewContent" style="margin-left: 125px"> | ||
30 | - <div class="triangleShape"> | ||
31 | - <b>当前层级</b> | ||
32 | - <div class="shape triangle-up {{rankLevel==1?'activeShape':''}}"> | ||
33 | - <span>前5%</span><i class="triangle-right"></i> | ||
34 | - </div> | ||
35 | - <div class="shape trapezoid-1 {{rankLevel==2?'activeShape':''}}"> | ||
36 | - <span>5%~20%</span><i class="triangle-right"></i> | ||
37 | - </div> | ||
38 | - <div class="shape trapezoid-2 {{rankLevel==3?'activeShape':''}}"> | ||
39 | - <span>20%~40%</span><i class="triangle-right"></i> | ||
40 | - </div> | ||
41 | - <div class="shape trapezoid-3 {{rankLevel==4?'activeShape':''}}"> | ||
42 | - <span>40%~65%</span><i class="triangle-right"></i> | ||
43 | - </div> | ||
44 | - <div class="shape trapezoid-4 {{rankLevel==5?'activeShape':''}}"> | ||
45 | - <span>65%~100%</span><i class="triangle-right"></i> | ||
46 | - </div> | ||
47 | - </div> | ||
48 | - | ||
49 | - <div class="rankData"> | ||
50 | - <div class="dataModle2" style="margin-bottom: 20px"> | ||
51 | - <p>同品类中<br>品牌排名为</p> | ||
52 | - <h2>第<b>{{rankNow}}</b>名</h2> | ||
53 | - </div> | ||
54 | - <div class="dataModle2"> | ||
55 | - <p>较上周同期</p> | ||
56 | - <h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b> 个名次</h2> | ||
57 | - <h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b> 个名次</h2> | ||
58 | - <h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b> 个名次</h2> | ||
59 | - <h2 v-show="rankChange=='--'"><b>--</b>个名次</h2> | ||
60 | - | ||
61 | - <div class="rankTip" v-show="rankChange > 0"><b class="_red">今天业绩不错,继续加油哦!</b></div> | ||
62 | - <div class="rankTip" v-show="rankChange == 0"><b class="_blue">继续加油哦!</b></div> | ||
63 | - <div class="rankTip" v-show="rankChange < 0"><b class="_green">还需再接再厉哦!</b></div> | ||
64 | - <div class="rankTip" v-show="rankChange=='--'"><b class="_red">没数据也要加油哦!</b></div> | ||
65 | - </div> | ||
66 | - </div> | ||
67 | - <div class="clearfix"></div> | ||
68 | - </div> | ||
69 | - </div> | ||
70 | - | ||
71 | <div id="businessDetail"> | 21 | <div id="businessDetail"> |
72 | <div class="overViewTitle"> | 22 | <div class="overViewTitle"> |
73 | <h3>交易明细</h3> | 23 | <h3>交易明细</h3> |
1 | <template> | 1 | <template> |
2 | - <com-pageheader :title="'报表管理'" :sub-title="'商品销售报表'"></com-pageheader> | ||
3 | <com-tab :rows="tab.rows" :active.sync="tab.active"></com-tab> | 2 | <com-tab :rows="tab.rows" :active.sync="tab.active"></com-tab> |
4 | <div v-show="tab.active==0"> | 3 | <div v-show="tab.active==0"> |
5 | <uc-sale></uc-sale> | 4 | <uc-sale></uc-sale> |
-
Please register or login to post a comment