...
|
...
|
@@ -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>感谢您的帮助!');
|
...
|
...
|
|