Authored by weiqingting

Merge branch 'master' into yohobuy-shop-dev-4.6-20160606

# Conflicts:
#	code/apps/common/interfaces/login.js
#	server/interfaces/common.login.js
@@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
11 <li v-if="showFirst" @click="nav('1')"> 11 <li v-if="showFirst" @click="nav('1')">
12 <a href="javascript:void(0)">1</a> 12 <a href="javascript:void(0)">1</a>
13 </li> 13 </li>
14 - <li v-if="showFirst" class="disabled"><span class="ellipse">…</span></li> 14 + <li v-if="showFirst&&(+pages!=6)" class="disabled"><span class="ellipse">…</span></li>
15 15
16 <li v-for="n in draw" v-bind:class="{'active':n===currentPage}" @click="nav(n)"> 16 <li v-for="n in draw" v-bind:class="{'active':n===currentPage}" @click="nav(n)">
17 <a href="javascript:void(0)">{{n}}</a> 17 <a href="javascript:void(0)">{{n}}</a>
18 </li> 18 </li>
19 19
20 - <li v-if="showLast" class="disabled"><span class="ellipse">…</span></li> 20 + <li v-if="showLast&&(+pages!=6)" class="disabled"><span class="ellipse">…</span></li>
21 <li v-if="showLast" @click="nav(pages)"> 21 <li v-if="showLast" @click="nav(pages)">
22 <a href="javascript:void(0)">{{pages}}</a> 22 <a href="javascript:void(0)">{{pages}}</a>
23 </li> 23 </li>
@@ -47,16 +47,13 @@ @@ -47,16 +47,13 @@
47 required: true 47 required: true
48 } 48 }
49 }, 49 },
50 - computed:{  
51 - showFirst(){  
52 - return this.currentPage>3?true:false  
53 - },  
54 - showLast(){  
55 - if(this.pages-3<this.currentPage){  
56 - return false; 50 + data(){
  51 + return{
  52 + showLast:true,
  53 + showFirst:true
57 } 54 }
58 - return true;  
59 }, 55 },
  56 + computed:{
60 draw(){ 57 draw(){
61 var bll=this,arr=[]; 58 var bll=this,arr=[];
62 let beginNum = bll.currentPage - 2; 59 let beginNum = bll.currentPage - 2;
@@ -64,10 +61,19 @@ @@ -64,10 +61,19 @@
64 if (beginNum < 1) beginNum = 1; 61 if (beginNum < 1) beginNum = 1;
65 let endNum = beginNum + 4; 62 let endNum = beginNum + 4;
66 if (endNum > bll.pages) endNum = bll.pages; 63 if (endNum > bll.pages) endNum = bll.pages;
  64 + let showFirst=true,showLast=true;
67 for (let i = beginNum; i <= endNum; i++) 65 for (let i = beginNum; i <= endNum; i++)
68 { 66 {
  67 + if(i===1){
  68 + showFirst=false;
  69 + }
  70 + if(i===bll.pages){
  71 + showLast=false;
  72 + }
69 arr.push(i); 73 arr.push(i);
70 } 74 }
  75 + bll.showFirst=showFirst;
  76 + bll.showLast=showLast;
71 return arr; 77 return arr;
72 } 78 }
73 }, 79 },
1 { 1 {
2 "name": "yohobuy-shops-fe", 2 "name": "yohobuy-shops-fe",
3 - "version": "4.6.4", 3 + "version": "4.6.6",
4 "description": "Construction of the presentation layer solution is based on express, handlebars", 4 "description": "Construction of the presentation layer solution is based on express, handlebars",
5 "main": "app.js", 5 "main": "app.js",
6 "scripts": { 6 "scripts": {
@@ -120,6 +120,7 @@ module.exports = { @@ -120,6 +120,7 @@ module.exports = {
120 result = { code: 400, message: "该用户没有店铺" }; 120 result = { code: 400, message: "该用户没有店铺" };
121 } 121 }
122 return callback(null, result); 122 return callback(null, result);
  123 +<<<<<<< HEAD
123 },errcallback); 124 },errcallback);
124 }, errcallback); 125 }, errcallback);
125 }, 126 },
@@ -134,6 +135,12 @@ module.exports = { @@ -134,6 +135,12 @@ module.exports = {
134 } 135 }
135 }, 136 },
136 gray: function (req, callback,common) { 137 gray: function (req, callback,common) {
  138 +=======
  139 + }
  140 + });
  141 + },
  142 + gray: function (req, callback){
  143 +>>>>>>> master
137 var result = { code: 201, message: "没有权限" }; 144 var result = { code: 201, message: "没有权限" };
138 if (req.session && req.session.user) { 145 if (req.session && req.session.user) {
139 var user = req.session.user; 146 var user = req.session.user;
1 -{"name":"yohobuy-shops-fe","version":"4.6.4","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"code":"set NODE_ENV=coding&& gulp start","server":"set NODE_ENV=server&& gulp start"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}  
  1 +{"name":"yohobuy-shops-fe","version":"4.6.6","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"code":"set NODE_ENV=coding&& gulp start","server":"set NODE_ENV=server&& gulp start"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}