Authored by yyq

list js

... ... @@ -53,8 +53,6 @@ let tipDialog = {
this.$content.html(info.content);
this.$sureBtns.addClass('hide');
this.$shareBtns.removeClass('hide');
this.share = this.setShareInfo(info.shareInfo);
} else if (typeof info === 'string') {
this.$content.html('<p>' + info + '</p>');
this.$sureBtns.removeClass('hide');
... ... @@ -67,20 +65,6 @@ let tipDialog = {
},
hide: function() {
this.$base.addClass('hide');
},
setShareInfo: function(info) {
if (!info) {
return false;
}
return function() {
yoho && yoho.invokeMethod('set.shareInfo', {
title: info.title,
link: '//www.yohobuy.com/3party/questionnaire/' + info.id,
desc: info.desc,
imgUrl: info.img
});
};
}
};
... ... @@ -101,10 +85,12 @@ $('#qs-list').on('click', 'li', function() {
window.location.href = DETAIL_URI + '/' + data.id;
}
} else if (resData.code === 206) {
if (!$('#yoho-header').length) {
tipDialog.show({
content: '<p>调查问卷已成功提交,<br>感谢您的帮助!</p>',
shareInfo: data
if (yoho && yoho.isApp) {
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>感谢您的帮助!');
... ...