Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop
Showing
8 changed files
with
24 additions
and
12 deletions
@@ -114,12 +114,11 @@ const component = { | @@ -114,12 +114,11 @@ const component = { | ||
114 | res.render('feedback', { | 114 | res.render('feedback', { |
115 | module: 'me', | 115 | module: 'me', |
116 | page: 'feedback', | 116 | page: 'feedback', |
117 | - suggestSub: true, | ||
118 | noLocalCSS: true | 117 | noLocalCSS: true |
119 | }); | 118 | }); |
120 | }, | 119 | }, |
121 | saveFeedback: (req, res, next) => { | 120 | saveFeedback: (req, res, next) => { |
122 | - let saveFeedbackPara = { | 121 | + const saveFeedbackPara = { |
123 | uid: req.user.uid, | 122 | uid: req.user.uid, |
124 | udid: req.sessionID, | 123 | udid: req.sessionID, |
125 | content: req.body.content, | 124 | content: req.body.content, |
@@ -139,7 +139,7 @@ exports.getHelpDetail = (data) => { | @@ -139,7 +139,7 @@ exports.getHelpDetail = (data) => { | ||
139 | * @param data | 139 | * @param data |
140 | */ | 140 | */ |
141 | exports.saveFeedback = (data) => { | 141 | exports.saveFeedback = (data) => { |
142 | - return serviceAPI.post('/suggest/api/v1/suggest/saveSuggest', data).then(result => { | 142 | + return serviceAPI.post('suggest/api/v1/suggest/saveSuggest', data).then(result => { |
143 | return { | 143 | return { |
144 | code: result.code, | 144 | code: result.code, |
145 | message: result.message | 145 | message: result.message |
1 | <div class="yoho-suggest-sub-page yoho-page"> | 1 | <div class="yoho-suggest-sub-page yoho-page"> |
2 | - {{# suggestSub}} | ||
3 | <div class="suggest-sub-form"> | 2 | <div class="suggest-sub-form"> |
4 | <textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea> | 3 | <textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea> |
5 | </div> | 4 | </div> |
6 | - {{/ suggestSub}} | ||
7 | </div> | 5 | </div> |
8 | <style> | 6 | <style> |
9 | html, | 7 | html, |
@@ -23,7 +23,9 @@ function tip(param) { | @@ -23,7 +23,9 @@ function tip(param) { | ||
23 | }; | 23 | }; |
24 | 24 | ||
25 | if (typeof param === 'string') { | 25 | if (typeof param === 'string') { |
26 | - $.extend(viewData, { txt: param }); | 26 | + $.extend(viewData, { |
27 | + txt: param | ||
28 | + }); | ||
27 | } else { | 29 | } else { |
28 | $.extend(viewData, param); | 30 | $.extend(viewData, param); |
29 | } | 31 | } |
@@ -19,6 +19,7 @@ $(() => { | @@ -19,6 +19,7 @@ $(() => { | ||
19 | return; | 19 | return; |
20 | } | 20 | } |
21 | 21 | ||
22 | + $('#suggest-textarea').blur(); | ||
22 | $.ajax({ | 23 | $.ajax({ |
23 | type: 'post', | 24 | type: 'post', |
24 | url: '/me/save-feedback', | 25 | url: '/me/save-feedback', |
@@ -28,6 +29,9 @@ $(() => { | @@ -28,6 +29,9 @@ $(() => { | ||
28 | }).then(function(data) { | 29 | }).then(function(data) { |
29 | if (data.code === 200) { | 30 | if (data.code === 200) { |
30 | tip('提交成功'); | 31 | tip('提交成功'); |
32 | + setTimeout(() => { | ||
33 | + yoho.goBack(); | ||
34 | + }, 2000) | ||
31 | } else { | 35 | } else { |
32 | tip('提交失败~'); | 36 | tip('提交失败~'); |
33 | } | 37 | } |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | max-height: 255px; | 19 | max-height: 255px; |
20 | min-height: 255px; | 20 | min-height: 255px; |
21 | padding: 30px; | 21 | padding: 30px; |
22 | - font-size: 26px; | 22 | + font-size: 30px; |
23 | line-height: 48px; | 23 | line-height: 48px; |
24 | color: #000; | 24 | color: #000; |
25 | display: block; | 25 | display: block; |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <div class="bottom clearfix"> | 15 | <div class="bottom clearfix"> |
16 | <span class="icon time-icon"></span> | 16 | <span class="icon time-icon"></span> |
17 | <span class="time">{{editorial.publishTime}}</span> | 17 | <span class="time">{{editorial.publishTime}}</span> |
18 | - <span class="icon icon-share share" @click="share(editorial.title, editorial.intro, editorial.src, editorial.share.url)"></span> | 18 | + <span class="icon icon-share share" @click="share(editorial.title, editorial.intro, editorial.src, editorial.id)"></span> |
19 | </div> | 19 | </div> |
20 | </div> | 20 | </div> |
21 | </div> | 21 | </div> |
@@ -119,12 +119,20 @@ | @@ -119,12 +119,20 @@ | ||
119 | }, | 119 | }, |
120 | 120 | ||
121 | /* 分享资讯 */ | 121 | /* 分享资讯 */ |
122 | - share(title, des, img, url) { | 122 | + share(title, des, img, id) { |
123 | yoho.goShare({ | 123 | yoho.goShare({ |
124 | title: title, | 124 | title: title, |
125 | des: des, | 125 | des: des, |
126 | - img: img, | ||
127 | - url: url | 126 | + img: img.replace(/(\{width}|\{height}|\{mode})/g, ($0) => { |
127 | + let dict = { | ||
128 | + '{width}': 300, | ||
129 | + '{height}': 300, | ||
130 | + '{mode}': 2 | ||
131 | + }; | ||
132 | + | ||
133 | + return dict[$0]; | ||
134 | + }), | ||
135 | + url: `//m.yohoblk.com/editorial/${id}.html` | ||
128 | }); | 136 | }); |
129 | } | 137 | } |
130 | }, | 138 | }, |
-
Please register or login to post a comment