Showing
1 changed file
with
6 additions
and
20 deletions
@@ -53,8 +53,6 @@ let tipDialog = { | @@ -53,8 +53,6 @@ let tipDialog = { | ||
53 | this.$content.html(info.content); | 53 | this.$content.html(info.content); |
54 | this.$sureBtns.addClass('hide'); | 54 | this.$sureBtns.addClass('hide'); |
55 | this.$shareBtns.removeClass('hide'); | 55 | this.$shareBtns.removeClass('hide'); |
56 | - | ||
57 | - this.share = this.setShareInfo(info.shareInfo); | ||
58 | } else if (typeof info === 'string') { | 56 | } else if (typeof info === 'string') { |
59 | this.$content.html('<p>' + info + '</p>'); | 57 | this.$content.html('<p>' + info + '</p>'); |
60 | this.$sureBtns.removeClass('hide'); | 58 | this.$sureBtns.removeClass('hide'); |
@@ -67,20 +65,6 @@ let tipDialog = { | @@ -67,20 +65,6 @@ let tipDialog = { | ||
67 | }, | 65 | }, |
68 | hide: function() { | 66 | hide: function() { |
69 | this.$base.addClass('hide'); | 67 | this.$base.addClass('hide'); |
70 | - }, | ||
71 | - setShareInfo: function(info) { | ||
72 | - if (!info) { | ||
73 | - return false; | ||
74 | - } | ||
75 | - | ||
76 | - return function() { | ||
77 | - yoho && yoho.invokeMethod('set.shareInfo', { | ||
78 | - title: info.title, | ||
79 | - link: '//www.yohobuy.com/3party/questionnaire/' + info.id, | ||
80 | - desc: info.desc, | ||
81 | - imgUrl: info.img | ||
82 | - }); | ||
83 | - }; | ||
84 | } | 68 | } |
85 | }; | 69 | }; |
86 | 70 | ||
@@ -101,10 +85,12 @@ $('#qs-list').on('click', 'li', function() { | @@ -101,10 +85,12 @@ $('#qs-list').on('click', 'li', function() { | ||
101 | window.location.href = DETAIL_URI + '/' + data.id; | 85 | window.location.href = DETAIL_URI + '/' + data.id; |
102 | } | 86 | } |
103 | } else if (resData.code === 206) { | 87 | } else if (resData.code === 206) { |
104 | - if (!$('#yoho-header').length) { | ||
105 | - tipDialog.show({ | ||
106 | - content: '<p>调查问卷已成功提交,<br>感谢您的帮助!</p>', | ||
107 | - shareInfo: data | 88 | + if (yoho && yoho.isApp) { |
89 | + yoho.invokeMethod('go.showShareAlert', { | ||
90 | + title: data.title, | ||
91 | + link: 'http://m.yohobuy.com/3party/questionnaire/' + data.id, | ||
92 | + desc: data.desc, | ||
93 | + imgUrl: data.img | ||
108 | }); | 94 | }); |
109 | } else { | 95 | } else { |
110 | tipDialog.show('调查问卷已成功提交,<br>感谢您的帮助!'); | 96 | tipDialog.show('调查问卷已成功提交,<br>感谢您的帮助!'); |
-
Please register or login to post a comment