Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

@@ -23,7 +23,7 @@ const fav = { @@ -23,7 +23,7 @@ const fav = {
23 } 23 }
24 }, 24 },
25 favpaging: (req, res, next) => { 25 favpaging: (req, res, next) => {
26 - const uid = req.user.uid || 14459668; 26 + const uid = req.user.uid;
27 const tab = req.query.tab; 27 const tab = req.query.tab;
28 const page = req.query.page; 28 const page = req.query.page;
29 29
@@ -40,7 +40,7 @@ const fav = { @@ -40,7 +40,7 @@ const fav = {
40 } 40 }
41 }, 41 },
42 deletefav: (req, res, next) => { 42 deletefav: (req, res, next) => {
43 - const uid = req.user.uid || 14459668; 43 + const uid = req.user.uid;
44 const favId = req.body.favId; 44 const favId = req.body.favId;
45 const type = req.body.type; 45 const type = req.body.type;
46 46
@@ -13,7 +13,7 @@ const helpers = global.yoho.helpers; @@ -13,7 +13,7 @@ const helpers = global.yoho.helpers;
13 */ 13 */
14 const component = { 14 const component = {
15 index: (req, res, next) => { 15 index: (req, res, next) => {
16 - const uid = req.user.uid || 14459668; 16 + const uid = req.user.uid;
17 17
18 if (!uid && req.xhr) { 18 if (!uid && req.xhr) {
19 return res.json({ 19 return res.json({
@@ -38,7 +38,7 @@ const component = { @@ -38,7 +38,7 @@ const component = {
38 }).catch(next); 38 }).catch(next);
39 }, 39 },
40 mydetails: (req, res, next) => { 40 mydetails: (req, res, next) => {
41 - const uid = req.user.uid || 14459668; 41 + const uid = req.user.uid;
42 42
43 homeModel.getUserProfileData(uid).then(data => { 43 homeModel.getUserProfileData(uid).then(data => {
44 data = data || {}; 44 data = data || {};
@@ -62,7 +62,7 @@ const component = { @@ -62,7 +62,7 @@ const component = {
62 }, 62 },
63 saveMydetails: (req, res, next) => { 63 saveMydetails: (req, res, next) => {
64 var params = { 64 var params = {
65 - uid: req.user.uid || 14459668 65 + uid: req.user.uid
66 }; 66 };
67 67
68 if (req.body.nickname !== undefined) { 68 if (req.body.nickname !== undefined) {
@@ -121,7 +121,6 @@ const component = { @@ -121,7 +121,6 @@ const component = {
121 }, 121 },
122 saveFeedback: (req, res, next) => { 122 saveFeedback: (req, res, next) => {
123 let saveFeedbackPara = { 123 let saveFeedbackPara = {
124 - uid: '14459668',  
125 content: req.body.content, 124 content: req.body.content,
126 suggest_type: 2 125 suggest_type: 2
127 }; 126 };
1 <div class="select"> 1 <div class="select">
2 <ul> 2 <ul>
3 {{#each items}} 3 {{#each items}}
4 - <li class="item-li" key="{{key}}">{{val}}</li> 4 + <li class="item-li {{#if disabled}} disabled {{/if}}" key="{{key}}" status="{{disabled}}">{{val}}</li>
5 {{/each}} 5 {{/each}}
6 <li class="item-del"> 6 <li class="item-del">
7 <span>取消</span> 7 <span>取消</span>
@@ -28,40 +28,49 @@ function Select(items) { @@ -28,40 +28,49 @@ function Select(items) {
28 // 覆盖层 28 // 覆盖层
29 const overlay = new Overlay({ 29 const overlay = new Overlay({
30 onClose: function() { 30 onClose: function() {
  31 + elem.removeClass('slide-in');
31 elem.hide(); 32 elem.hide();
32 } 33 }
33 }); 34 });
34 35
35 - $(del).click(function() { 36 + const hide = function() {
  37 + elem.removeClass('slide-in');
36 overlay.hide(); 38 overlay.hide();
37 elem.hide(); 39 elem.hide();
38 - }); 40 + }
39 41
40 - return {  
41 - show: function(cb) {  
42 - if (elem.parent().length === 0) {  
43 - const lis = elem.find('.item-li'); 42 + const show = function(cb) {
  43 + if (elem.parent().length === 0) {
  44 + const lis = elem.find('.item-li');
44 45
45 - lis.each(function() { 46 + lis.each(function() {
  47 + if (!$(this).attr('status')) {
46 $(this).click(function(e) { 48 $(this).click(function(e) {
47 - overlay.hide();  
48 - elem.hide(); 49 + hide();
49 cb({ 50 cb({
50 key: $(e.target).attr('key'), 51 key: $(e.target).attr('key'),
51 val: e.target.innerHTML 52 val: e.target.innerHTML
52 }); 53 });
53 }); 54 });
54 - });  
55 - elem.appendTo('body').addClass('animation-target');  
56 - }  
57 -  
58 - overlay.show();  
59 - elem.show();  
60 - },  
61 - hide: function() {  
62 - overlay.hide();  
63 - elem.hide(); 55 + }
  56 + });
  57 + elem.appendTo('body');
64 } 58 }
  59 +
  60 + overlay.show();
  61 + elem.show();
  62 + setTimeout(() => {
  63 + elem.addClass('slide-in');
  64 + }, 200);
  65 + }
  66 +
  67 + $(del).click(function() {
  68 + hide();
  69 + });
  70 +
  71 + return {
  72 + show: show,
  73 + hide: hide
65 }; 74 };
66 } 75 }
67 76
@@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
4 width: 100%; 4 width: 100%;
5 background: #fff; 5 background: #fff;
6 z-index: 1001; 6 z-index: 1001;
  7 + transform: translate3d(0, 100%, 0);
  8 + transition: all 0.1s ease-in-out;
7 9
8 ul { 10 ul {
9 font-size: 34px; 11 font-size: 34px;
@@ -15,10 +17,18 @@ @@ -15,10 +17,18 @@
15 border-bottom: 1px solid #e0e0e0; 17 border-bottom: 1px solid #e0e0e0;
16 } 18 }
17 19
  20 + .disabled {
  21 + color: #b0b0b0;
  22 + }
  23 +
18 .item-del { 24 .item-del {
19 margin-top: 10px; 25 margin-top: 10px;
20 border-top: 1px solid #e0e0e0; 26 border-top: 1px solid #e0e0e0;
21 color: #5c99e4; 27 color: #5c99e4;
22 } 28 }
23 } 29 }
  30 +
  31 + &.slide-in {
  32 + transform: translate3d(0, 0, 0);
  33 + }
24 } 34 }
1 <template> 1 <template>
2 - <tab v-bind:page="page"></tab> 2 + <div class="cate-tab-fixed">
  3 + <tab v-bind:page="page"></tab>
  4 + </div>
3 <div class="cate-page" id='cate-page'> 5 <div class="cate-page" id='cate-page'>
4 <div class="cate-nav clearfix"> 6 <div class="cate-nav clearfix">
5 <ul> 7 <ul>
@@ -27,6 +29,12 @@ @@ -27,6 +29,12 @@
27 </div> 29 </div>
28 </template> 30 </template>
29 <style> 31 <style>
  32 +.cate-tab-fixed {
  33 + position: fixed;
  34 + top: 0;
  35 + left: 0;
  36 +}
  37 +
30 .cate-page { 38 .cate-page {
31 font-size: 36px; 39 font-size: 36px;
32 font-family: helvetica, Arial, "黑体"; 40 font-family: helvetica, Arial, "黑体";
@@ -62,7 +62,6 @@ @@ -62,7 +62,6 @@
62 let _this = this; 62 let _this = this;
63 63
64 genderSel.show(function(item) { 64 genderSel.show(function(item) {
65 - console.log(item)  
66 _this.gender = item.val.toLowerCase(); 65 _this.gender = item.val.toLowerCase();
67 _this.saveDetails({ 66 _this.saveDetails({
68 nickname: _this.nickname, 67 nickname: _this.nickname,
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 } 53 }
54 </style> 54 </style>
55 <script> 55 <script>
56 - const shareBottom = require('product/shop/share-bottom.vue'); 56 + const shareBottom = require('component/tool/share-bottom.vue');
57 const qs = require('yoho-qs'); 57 const qs = require('yoho-qs');
58 const tip = require('common/tip'); 58 const tip = require('common/tip');
59 59
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 height: 80px; 16 height: 80px;
17 padding: 10px 20px; 17 padding: 10px 20px;
18 position: fixed; 18 position: fixed;
19 - top: 60px; 19 + top: 40px;
20 left: 0; 20 left: 0;
21 z-index: 99; 21 z-index: 99;
22 color: #fff; 22 color: #fff;
@@ -43,13 +43,13 @@ @@ -43,13 +43,13 @@
43 } 43 }
44 44
45 .top-box-left { 45 .top-box-left {
46 - left: -655px; 46 + left: -665px;
47 } 47 }
48 48
49 .top-change { 49 .top-change {
50 background-color: #fff; 50 background-color: #fff;
51 color: #000; 51 color: #000;
52 - height: 140px; 52 + height: 120px;
53 top: 0; 53 top: 0;
54 padding: 70px 20px 10px; 54 padding: 70px 20px 10px;
55 } 55 }