Authored by 郭成尧

Merge branch 'feature/questionSubmit' into 'release/5.9.1'

Feature/question submit



See merge request !724
@@ -39,6 +39,7 @@ module.exports = class extends global.yoho.BaseModel { @@ -39,6 +39,7 @@ module.exports = class extends global.yoho.BaseModel {
39 getQuestionList() { 39 getQuestionList() {
40 return this.get({ 40 return this.get({
41 url: 'activity/question/questionList', 41 url: 'activity/question/questionList',
  42 + data: {uid: _.get(this.ctx, 'req.user.uid', 0)},
42 api: global.yoho.ServiceAPI 43 api: global.yoho.ServiceAPI
43 }).then(result => { 44 }).then(result => {
44 let list = _.get(result, 'data.rows', []); 45 let list = _.get(result, 'data.rows', []);
@@ -220,8 +220,14 @@ let question = { @@ -220,8 +220,14 @@ let question = {
220 } 220 }
221 }).then(function(data) { 221 }).then(function(data) {
222 that.saving = false; 222 that.saving = false;
223 - if (data.code === 200) {  
224 - tipDg.show('调查问卷已成功提交,感谢您的帮助!'); 223 + if (data.code === 200 || data.code === 206) {
  224 + let tip = '调查问卷已成功提交,感谢您的帮助!';
  225 +
  226 + if (data.code === 206 && data.message) {
  227 + tip = data.message;
  228 + }
  229 +
  230 + tipDg.show(tip);
225 231
226 setTimeout(function() { 232 setTimeout(function() {
227 if (yoho.isApp) { 233 if (yoho.isApp) {