Authored by 李奇

fixed: 小程序内不能调用yoho.invokeMethod

@@ -49,7 +49,9 @@ class HaveGainApplyPage extends Page { @@ -49,7 +49,9 @@ class HaveGainApplyPage extends Page {
49 $('#jump-url').attr('href', jumpUrl); 49 $('#jump-url').attr('href', jumpUrl);
50 50
51 setTimeout(() => { 51 setTimeout(() => {
52 - yoho.invokeMethod('go.back'); 52 + if (window.yohoInterface) {
  53 + yoho.invokeMethod('go.back');
  54 + }
53 $('#jump-url')[0].click(); 55 $('#jump-url')[0].click();
54 }, 500); 56 }, 500);
55 } else { 57 } else {
@@ -125,7 +127,9 @@ class HaveGainApplyPage extends Page { @@ -125,7 +127,9 @@ class HaveGainApplyPage extends Page {
125 tapAdded() { 127 tapAdded() {
126 let that = this; 128 let that = this;
127 129
128 - yoho.invokeMethod('go.copy', {text: '有货有赚'}); 130 + if (window.yohoInterface) {
  131 + yoho.invokeMethod('go.copy', {text: '有货有赚'});
  132 + }
129 dialog.showDialog({ 133 dialog.showDialog({
130 dialogText: '“有货有赚”服务号已经复制,请去微信搜索添加', 134 dialogText: '“有货有赚”服务号已经复制,请去微信搜索添加',
131 hasClass: 'dialog-text-apply', 135 hasClass: 'dialog-text-apply',
@@ -23,7 +23,9 @@ class HaveGainVerifyPage extends Page { @@ -23,7 +23,9 @@ class HaveGainVerifyPage extends Page {
23 } 23 }
24 24
25 tapAdded() { 25 tapAdded() {
26 - yoho.invokeMethod('go.copy', {text: '有货有赚'}); 26 + if (window.yohoInterface) {
  27 + yoho.invokeMethod('go.copy', {text: '有货有赚'});
  28 + }
27 dialog.showDialog({ 29 dialog.showDialog({
28 dialogText: '“有货有赚”服务号已经复制,请去微信搜索添加', 30 dialogText: '“有货有赚”服务号已经复制,请去微信搜索添加',
29 hasClass: 'dialog-text-apply', 31 hasClass: 'dialog-text-apply',