Showing
1 changed file
with
33 additions
and
27 deletions
@@ -11,6 +11,12 @@ | @@ -11,6 +11,12 @@ | ||
11 | 11 | ||
12 | const tip = require('common/tip'); | 12 | const tip = require('common/tip'); |
13 | 13 | ||
14 | +/* 空方法 */ | ||
15 | +const nullFun = () =>{}; | ||
16 | + | ||
17 | +/* 提示信息 */ | ||
18 | +const tipInfo = '暂不支持,请在BLK应用中打开'; | ||
19 | + | ||
14 | const yoho = { | 20 | const yoho = { |
15 | /** | 21 | /** |
16 | * 判断是否是 APP | 22 | * 判断是否是 APP |
@@ -30,12 +36,12 @@ const yoho = { | @@ -30,12 +36,12 @@ const yoho = { | ||
30 | */ | 36 | */ |
31 | goTap(args, success, fail) { | 37 | goTap(args, success, fail) { |
32 | if (this.isApp) { | 38 | if (this.isApp) { |
33 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 39 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
34 | method: 'go.tab', | 40 | method: 'go.tab', |
35 | arguments: args | 41 | arguments: args |
36 | }); | 42 | }); |
37 | } else { | 43 | } else { |
38 | - tip('暂不支持,请在BLK应用中打开'); | 44 | + tip(tipInfo); |
39 | } | 45 | } |
40 | }, | 46 | }, |
41 | 47 | ||
@@ -47,12 +53,12 @@ const yoho = { | @@ -47,12 +53,12 @@ const yoho = { | ||
47 | */ | 53 | */ |
48 | goLogin(args, success, fail) { | 54 | goLogin(args, success, fail) { |
49 | if (this.isApp) { | 55 | if (this.isApp) { |
50 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 56 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
51 | method: 'go.login', | 57 | method: 'go.login', |
52 | arguments: args | 58 | arguments: args |
53 | }); | 59 | }); |
54 | } else { | 60 | } else { |
55 | - tip('暂不支持,请在BLK应用中打开'); | 61 | + tip(tipInfo); |
56 | } | 62 | } |
57 | }, | 63 | }, |
58 | 64 | ||
@@ -64,12 +70,12 @@ const yoho = { | @@ -64,12 +70,12 @@ const yoho = { | ||
64 | */ | 70 | */ |
65 | goLogout(args, success, fail) { | 71 | goLogout(args, success, fail) { |
66 | if (this.isApp) { | 72 | if (this.isApp) { |
67 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 73 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
68 | method: 'go.loginout', | 74 | method: 'go.loginout', |
69 | arguments: args | 75 | arguments: args |
70 | }); | 76 | }); |
71 | } else { | 77 | } else { |
72 | - tip('暂不支持,请在BLK应用中打开'); | 78 | + tip(tipInfo); |
73 | } | 79 | } |
74 | }, | 80 | }, |
75 | 81 | ||
@@ -81,12 +87,12 @@ const yoho = { | @@ -81,12 +87,12 @@ const yoho = { | ||
81 | */ | 87 | */ |
82 | goShopingKey(args, success, fail) { | 88 | goShopingKey(args, success, fail) { |
83 | if (this.isApp) { | 89 | if (this.isApp) { |
84 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 90 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
85 | method: 'go.shoppingkey', | 91 | method: 'go.shoppingkey', |
86 | arguments: args | 92 | arguments: args |
87 | }); | 93 | }); |
88 | } else { | 94 | } else { |
89 | - tip('暂不支持,请在BLK应用中打开'); | 95 | + tip(tipInfo); |
90 | } | 96 | } |
91 | }, | 97 | }, |
92 | 98 | ||
@@ -98,12 +104,12 @@ const yoho = { | @@ -98,12 +104,12 @@ const yoho = { | ||
98 | */ | 104 | */ |
99 | goShopingCart(args, success, fail) { | 105 | goShopingCart(args, success, fail) { |
100 | if (this.isApp) { | 106 | if (this.isApp) { |
101 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 107 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
102 | method: 'go.shopingCart', | 108 | method: 'go.shopingCart', |
103 | arguments: args | 109 | arguments: args |
104 | }); | 110 | }); |
105 | } else { | 111 | } else { |
106 | - tip('暂不支持,请在BLK应用中打开'); | 112 | + tip(tipInfo); |
107 | } | 113 | } |
108 | }, | 114 | }, |
109 | 115 | ||
@@ -115,12 +121,12 @@ const yoho = { | @@ -115,12 +121,12 @@ const yoho = { | ||
115 | */ | 121 | */ |
116 | goAddress(args, success, fail) { | 122 | goAddress(args, success, fail) { |
117 | if (this.isApp) { | 123 | if (this.isApp) { |
118 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 124 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
119 | method: 'go.address', | 125 | method: 'go.address', |
120 | arguments: args | 126 | arguments: args |
121 | }); | 127 | }); |
122 | } else { | 128 | } else { |
123 | - tip('暂不支持,请在BLK应用中打开'); | 129 | + tip(tipInfo); |
124 | } | 130 | } |
125 | }, | 131 | }, |
126 | 132 | ||
@@ -132,12 +138,12 @@ const yoho = { | @@ -132,12 +138,12 @@ const yoho = { | ||
132 | */ | 138 | */ |
133 | goImageBrowser(args, success, fail) { | 139 | goImageBrowser(args, success, fail) { |
134 | if (this.isApp) { | 140 | if (this.isApp) { |
135 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 141 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
136 | method: 'go.imageBrowser', | 142 | method: 'go.imageBrowser', |
137 | arguments: args | 143 | arguments: args |
138 | }); | 144 | }); |
139 | } else { | 145 | } else { |
140 | - tip('暂不支持,请在BLK应用中打开'); | 146 | + tip(tipInfo); |
141 | } | 147 | } |
142 | }, | 148 | }, |
143 | 149 | ||
@@ -149,12 +155,12 @@ const yoho = { | @@ -149,12 +155,12 @@ const yoho = { | ||
149 | */ | 155 | */ |
150 | goNewPage(args, success, fail) { | 156 | goNewPage(args, success, fail) { |
151 | if (this.isApp) { | 157 | if (this.isApp) { |
152 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 158 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
153 | method: 'go.newPage', | 159 | method: 'go.newPage', |
154 | arguments: args | 160 | arguments: args |
155 | }); | 161 | }); |
156 | } else { | 162 | } else { |
157 | - tip('暂不支持,请在BLK应用中打开'); | 163 | + tip(tipInfo); |
158 | } | 164 | } |
159 | }, | 165 | }, |
160 | 166 | ||
@@ -166,29 +172,29 @@ const yoho = { | @@ -166,29 +172,29 @@ const yoho = { | ||
166 | */ | 172 | */ |
167 | goPay(args, success, fail) { | 173 | goPay(args, success, fail) { |
168 | if (this.isApp) { | 174 | if (this.isApp) { |
169 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 175 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
170 | method: 'go.pay', | 176 | method: 'go.pay', |
171 | arguments: args | 177 | arguments: args |
172 | }); | 178 | }); |
173 | } else { | 179 | } else { |
174 | - tip('暂不支持,请在BLK应用中打开'); | 180 | + tip(tipInfo); |
175 | } | 181 | } |
176 | }, | 182 | }, |
177 | 183 | ||
178 | /** | 184 | /** |
179 | * 返回上一级页面 | 185 | * 返回上一级页面 |
180 | - * @param args {} | 186 | + * @param args {""} |
181 | * @param success | 187 | * @param success |
182 | * @param fail | 188 | * @param fail |
183 | */ | 189 | */ |
184 | goBack(args, success, fail) { | 190 | goBack(args, success, fail) { |
185 | if (this.isApp) { | 191 | if (this.isApp) { |
186 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 192 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
187 | method: 'go.back', | 193 | method: 'go.back', |
188 | arguments: args | 194 | arguments: args |
189 | }); | 195 | }); |
190 | } else { | 196 | } else { |
191 | - tip('暂不支持,请在BLK应用中打开'); | 197 | + tip(tipInfo); |
192 | } | 198 | } |
193 | }, | 199 | }, |
194 | 200 | ||
@@ -200,18 +206,18 @@ const yoho = { | @@ -200,18 +206,18 @@ const yoho = { | ||
200 | */ | 206 | */ |
201 | goShare(args, success, fail) { | 207 | goShare(args, success, fail) { |
202 | if (this.isApp) { | 208 | if (this.isApp) { |
203 | - window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | 209 | + window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
204 | method: 'go.share', | 210 | method: 'go.share', |
205 | arguments: args | 211 | arguments: args |
206 | }); | 212 | }); |
207 | } else { | 213 | } else { |
208 | - tip('暂不支持,请在BLK应用中打开'); | 214 | + tip(tipInfo); |
209 | } | 215 | } |
210 | }, | 216 | }, |
211 | 217 | ||
212 | /** | 218 | /** |
213 | * 跳转到搜索页面 | 219 | * 跳转到搜索页面 |
214 | - * @param args {} | 220 | + * @param args {""} |
215 | * @param success | 221 | * @param success |
216 | * @param fail | 222 | * @param fail |
217 | */ | 223 | */ |
@@ -222,13 +228,13 @@ const yoho = { | @@ -222,13 +228,13 @@ const yoho = { | ||
222 | arguments: args | 228 | arguments: args |
223 | }); | 229 | }); |
224 | } else { | 230 | } else { |
225 | - tip('暂不支持,请在BLK应用中打开'); | 231 | + tip(tipInfo); |
226 | } | 232 | } |
227 | }, | 233 | }, |
228 | 234 | ||
229 | /** | 235 | /** |
230 | * 跳转到设置页面 | 236 | * 跳转到设置页面 |
231 | - * @param args {} | 237 | + * @param args {""} |
232 | * @param success | 238 | * @param success |
233 | * @param fail | 239 | * @param fail |
234 | */ | 240 | */ |
@@ -239,7 +245,7 @@ const yoho = { | @@ -239,7 +245,7 @@ const yoho = { | ||
239 | arguments: args | 245 | arguments: args |
240 | }); | 246 | }); |
241 | } else { | 247 | } else { |
242 | - tip('暂不支持,请在BLK应用中打开'); | 248 | + tip(tipInfo); |
243 | } | 249 | } |
244 | }, | 250 | }, |
245 | 251 |
-
Please register or login to post a comment