Authored by 毕凯

Revert "Merge branch 'hotfix/question2.0' into 'release/5.8.1'"

This reverts merge request !682
... ... @@ -196,18 +196,10 @@ let question = {
}
},
saveAnswers: function(info) {
var that = this;
if (this.saving || !info || !info.length) {
if (!info || !info.length) {
return;
}
this.saving = true;
setTimeout(function() {
that.saving = false;
}, 5000);
$.ajax({
type: 'POST',
url: '/3party/questionnaire/submit',
... ... @@ -219,8 +211,6 @@ let question = {
frontAnswers: JSON.stringify(info)
}
}).then(function(data) {
that.saving = false;
if (data.code === 200) {
tipDg.show('调查问卷已成功提交,感谢您的帮助!');
... ...
... ... @@ -66,15 +66,17 @@ let tipDialog = {
that.hide();
});
this.$base.on('click', '.share-btn', function() {
that.share();
that.hide();
if (that.share && typeof that.share === 'function') {
that.share();
} else {
that.hide();
}
});
},
show: function(info) {
this.shareInfo = false;
this.share = false;
if (typeof info === 'object' && info.share) {
this.shareInfo = info.share;
if (typeof info === 'object') {
this.$content.html(info.content);
this.$sureBtns.addClass('hide');
this.$shareBtns.removeClass('hide');
... ... @@ -90,11 +92,6 @@ let tipDialog = {
},
hide: function() {
this.$base.addClass('hide');
},
share: function() {
if (this.shareInfo && yoho && yoho.isApp) {
yoho.invokeMethod('go.showshareaction', this.shareInfo);
}
}
};
... ... @@ -114,14 +111,11 @@ $list.on('click', 'li', function() {
jumpQuestionDetail(data);
} else if (resData.code === 206) {
if (yoho && yoho.isApp) {
tipDialog.show({
content: '<p>调查问卷已成功提交,<br>感谢您的帮助!</p>',
share: {
title: data.title,
link: 'https://m.yohobuy.com/3party/questionnaire/' + data.id,
desc: data.desc,
imgUrl: data.img
}
yoho.invokeMethod('go.showShareAlert', {
title: data.title,
link: 'http://m.yohobuy.com/3party/questionnaire/' + data.id,
desc: data.desc,
imgUrl: data.img
});
} else {
tipDialog.show('调查问卷已成功提交,<br>感谢您的帮助!');
... ...