Authored by weiqingting

Merge branch 'yohobuy-shop-dev-4.6-20160606' of http://git.yoho.cn/fe/yohobuy-sh…

…op-fe2 into yohobuy-shop-dev-4.6-20160606
@@ -6,7 +6,7 @@ module.exports=function(app) { @@ -6,7 +6,7 @@ module.exports=function(app) {
6 app.get("/logout","common.Login"); 6 app.get("/logout","common.Login");
7 7
8 app.post("/login", "common_login", function (login, req, res){ 8 app.post("/login", "common_login", function (login, req, res){
9 - if (login.code = 200) { 9 + if (login.code == 200) {
10 res.myRedirect('/'); 10 res.myRedirect('/');
11 } else { 11 } else {
12 res.myRedirect('/login'); 12 res.myRedirect('/login');
@@ -146,7 +146,7 @@ @@ -146,7 +146,7 @@
146 }).then(function (response) { 146 }).then(function (response) {
147 var rs = response.data; 147 var rs = response.data;
148 self.buyNumbers = rs.data.buyNumbers?rs.data.buyNumbers:'--'; 148 self.buyNumbers = rs.data.buyNumbers?rs.data.buyNumbers:'--';
149 - self.orderAmount = rs.data.orderAmount?rs.data.buyNumbers:'--'; 149 + self.orderAmount = rs.data.orderAmount?rs.data.orderAmount:'--';
150 self.overViewUpdateTime = rs.data.hour?rs.data.hour.substring(0,5):'--'; 150 self.overViewUpdateTime = rs.data.hour?rs.data.hour.substring(0,5):'--';
151 }, function (response) { 151 }, function (response) {
152 var rs = response.data; 152 var rs = response.data;
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@
96 }, 96 },
97 { 97 {
98 name: '', display: '商品分类', render: function (item) { 98 name: '', display: '商品分类', render: function (item) {
99 - return '<p>' + item.maxSortName + '-' + item.middleSortName + '</p>'; 99 + return [item.maxSortName, item.middleSortName, item.smallSortName].join('-');
100 } 100 }
101 }, 101 },
102 {name: 'buyNumber', display: '数量'}, 102 {name: 'buyNumber', display: '数量'},
@@ -42,8 +42,8 @@ @@ -42,8 +42,8 @@
42 saleData: {type: Object, default: {}} 42 saleData: {type: Object, default: {}}
43 }, 43 },
44 data() { 44 data() {
45 - let date=new Date();  
46 - date.setDate(date.getDate()-1); 45 + let date = new Date();
  46 + date.setDate(date.getDate() - 1);
47 return { 47 return {
48 cards: [ 48 cards: [
49 {name: "有效订单的商品件数", value: "0", name1: "环比", value1: "0"}, 49 {name: "有效订单的商品件数", value: "0", name1: "环比", value1: "0"},
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 }, 95 },
96 { 96 {
97 name: '', display: '商品分类', render: function (item) { 97 name: '', display: '商品分类', render: function (item) {
98 - return '<p>' + item.maxSortName + '-' + item.middleSortName + '</p>'; 98 + return [item.maxSortName, item.middleSortName, item.smallSortName].join('-');
99 } 99 }
100 }, 100 },
101 {name: 'buyNumber', display: '数量'}, 101 {name: 'buyNumber', display: '数量'},
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
118 if (this.params.sortList.length > 0) { 118 if (this.params.sortList.length > 0) {
119 let length = this.params.sortList.length; 119 let length = this.params.sortList.length;
120 this.params.sortId = this.params.sortList[length - 1].id; 120 this.params.sortId = this.params.sortList[length - 1].id;
121 - }else{ 121 + } else {
122 this.params.sortId = ''; 122 this.params.sortId = '';
123 } 123 }
124 var data = { 124 var data = {
@@ -140,9 +140,9 @@ @@ -140,9 +140,9 @@
140 } 140 }
141 return time; 141 return time;
142 }, 142 },
143 - checkRate(rate,value){ 143 + checkRate(rate, value){
144 if (rate) { 144 if (rate) {
145 - value =rate 145 + value = rate
146 } else if (rate == 0) { 146 } else if (rate == 0) {
147 value = 0; 147 value = 0;
148 } else { 148 } else {
@@ -156,9 +156,9 @@ @@ -156,9 +156,9 @@
156 let result = data.additionInfo; 156 let result = data.additionInfo;
157 if (result) { 157 if (result) {
158 this.cards[0].value = result.allNumber ? result.allNumber : 0; 158 this.cards[0].value = result.allNumber ? result.allNumber : 0;
159 - this.cards[0].value1=this.checkRate(result.allNumberRate,this.cards[0].value1); 159 + this.cards[0].value1 = this.checkRate(result.allNumberRate, this.cards[0].value1);
160 this.cards[1].value = result.allAmount ? result.allAmount : 0; 160 this.cards[1].value = result.allAmount ? result.allAmount : 0;
161 - this.cards[1].value1=this.checkRate(result.allAmountRate,this.cards[1].value1); 161 + this.cards[1].value1 = this.checkRate(result.allAmountRate, this.cards[1].value1);
162 } 162 }
163 } 163 }
164 } 164 }
@@ -43,8 +43,8 @@ var apiCofig = { @@ -43,8 +43,8 @@ var apiCofig = {
43 //root:__dirname, 43 //root:__dirname,
44 EnvConst:{ 44 EnvConst:{
45 domain:"http://192.168.102.210:8088/platform", 45 domain:"http://192.168.102.210:8088/platform",
46 - bigdata:"http://172.16.6.189:8080/bigdata",//李建  
47 - // bigdata:"http://192.168.102.210:8091/bigdata", 46 + // bigdata:"http://172.16.6.189:8080/bigdata",//李建
  47 + bigdata:"http://192.168.102.210:8091/bigdata",
48 //bigdata:"http://172.16.6.110:8080",//钟文 48 //bigdata:"http://172.16.6.110:8080",//钟文
49 system:Iaccount 49 system:Iaccount
50 }, 50 },
@@ -4,7 +4,7 @@ module.exports=function(app) { @@ -4,7 +4,7 @@ module.exports=function(app) {
4 app.get("/login","common.Login"); 4 app.get("/login","common.Login");
5 5
6 app.post("/login", "common_login", function (login, req, res){ 6 app.post("/login", "common_login", function (login, req, res){
7 - if (login.code = 200) { 7 + if (login.code == 200) {
8 res.myRedirect('/'); 8 res.myRedirect('/');
9 } else { 9 } else {
10 res.myRedirect('/login'); 10 res.myRedirect('/login');
@@ -43,7 +43,7 @@ var apiCofig = { @@ -43,7 +43,7 @@ var apiCofig = {
43 //root:__dirname, 43 //root:__dirname,
44 EnvConst:{ 44 EnvConst:{
45 domain:"http://192.168.102.210:8088/platform", 45 domain:"http://192.168.102.210:8088/platform",
46 - //bigdata:"http://172.16.6.189:8080/bigdata",//李建 46 + // bigdata:"http://172.16.6.189:8080/bigdata",//李建
47 bigdata:"http://192.168.102.210:8091/bigdata", 47 bigdata:"http://192.168.102.210:8091/bigdata",
48 //bigdata:"http://172.16.6.110:8080",//钟文 48 //bigdata:"http://172.16.6.110:8080",//钟文
49 system:Iaccount 49 system:Iaccount