|
@@ -66,15 +66,17 @@ let tipDialog = { |
|
@@ -66,15 +66,17 @@ let tipDialog = { |
66
|
that.hide();
|
66
|
that.hide();
|
67
|
});
|
67
|
});
|
68
|
this.$base.on('click', '.share-btn', function() {
|
68
|
this.$base.on('click', '.share-btn', function() {
|
69
|
- that.share();
|
|
|
70
|
- that.hide();
|
69
|
+ if (that.share && typeof that.share === 'function') {
|
|
|
70
|
+ that.share();
|
|
|
71
|
+ } else {
|
|
|
72
|
+ that.hide();
|
|
|
73
|
+ }
|
71
|
});
|
74
|
});
|
72
|
},
|
75
|
},
|
73
|
show: function(info) {
|
76
|
show: function(info) {
|
74
|
- this.shareInfo = false;
|
77
|
+ this.share = false;
|
75
|
|
78
|
|
76
|
- if (typeof info === 'object' && info.share) {
|
|
|
77
|
- this.shareInfo = info.share;
|
79
|
+ if (typeof info === 'object') {
|
78
|
this.$content.html(info.content);
|
80
|
this.$content.html(info.content);
|
79
|
this.$sureBtns.addClass('hide');
|
81
|
this.$sureBtns.addClass('hide');
|
80
|
this.$shareBtns.removeClass('hide');
|
82
|
this.$shareBtns.removeClass('hide');
|
|
@@ -90,11 +92,6 @@ let tipDialog = { |
|
@@ -90,11 +92,6 @@ let tipDialog = { |
90
|
},
|
92
|
},
|
91
|
hide: function() {
|
93
|
hide: function() {
|
92
|
this.$base.addClass('hide');
|
94
|
this.$base.addClass('hide');
|
93
|
- },
|
|
|
94
|
- share: function() {
|
|
|
95
|
- if (this.shareInfo && yoho && yoho.isApp) {
|
|
|
96
|
- yoho.invokeMethod('go.showshareaction', this.shareInfo);
|
|
|
97
|
- }
|
|
|
98
|
}
|
95
|
}
|
99
|
};
|
96
|
};
|
100
|
|
97
|
|
|
@@ -114,14 +111,11 @@ $list.on('click', 'li', function() { |
|
@@ -114,14 +111,11 @@ $list.on('click', 'li', function() { |
114
|
jumpQuestionDetail(data);
|
111
|
jumpQuestionDetail(data);
|
115
|
} else if (resData.code === 206) {
|
112
|
} else if (resData.code === 206) {
|
116
|
if (yoho && yoho.isApp) {
|
113
|
if (yoho && yoho.isApp) {
|
117
|
- tipDialog.show({
|
|
|
118
|
- content: '<p>调查问卷已成功提交,<br>感谢您的帮助!</p>',
|
|
|
119
|
- share: {
|
|
|
120
|
- title: data.title,
|
|
|
121
|
- link: 'https://m.yohobuy.com/3party/questionnaire/' + data.id,
|
|
|
122
|
- desc: data.desc,
|
|
|
123
|
- imgUrl: data.img
|
|
|
124
|
- }
|
114
|
+ yoho.invokeMethod('go.showShareAlert', {
|
|
|
115
|
+ title: data.title,
|
|
|
116
|
+ link: 'http://m.yohobuy.com/3party/questionnaire/' + data.id,
|
|
|
117
|
+ desc: data.desc,
|
|
|
118
|
+ imgUrl: data.img
|
125
|
});
|
119
|
});
|
126
|
} else {
|
120
|
} else {
|
127
|
tipDialog.show('调查问卷已成功提交,<br>感谢您的帮助!');
|
121
|
tipDialog.show('调查问卷已成功提交,<br>感谢您的帮助!');
|