Commit 44a4eca20ce7f6fbf384f07dbb4193dd901c594e
1 parent
bdf475de
判断channelName有值调用接口
Showing
1 changed file
with
17 additions
and
16 deletions
static/js/cnLive_openinstall.js
| @@ -216,19 +216,20 @@ function openInstallReady(schemeParams) { | @@ -216,19 +216,20 @@ function openInstallReady(schemeParams) { | ||
| 216 | openInstallData | 216 | openInstallData |
| 217 | ); | 217 | ); |
| 218 | } | 218 | } |
| 219 | - | ||
| 220 | -$.ajax({ | ||
| 221 | - url: "//apiwjj.cnlive.com/Daren/common/getLatestApk.action", | ||
| 222 | - type: "GET", | ||
| 223 | - dataType: "json", | ||
| 224 | - data: { | ||
| 225 | - channelId: channelName | ||
| 226 | - }, | ||
| 227 | - success: function(res) { | ||
| 228 | - channelCodeName = res.data.apkChannelName; | ||
| 229 | - openInstallReady(); | ||
| 230 | - }, | ||
| 231 | - error: function(err) { | ||
| 232 | - // alert("接口请求失败!") | ||
| 233 | - } | ||
| 234 | -}); | 219 | +if (channelName) { |
| 220 | + $.ajax({ | ||
| 221 | + url: "//apiwjj.cnlive.com/Daren/common/getLatestApk.action", | ||
| 222 | + type: "GET", | ||
| 223 | + dataType: "json", | ||
| 224 | + data: { | ||
| 225 | + channelId: channelName | ||
| 226 | + }, | ||
| 227 | + success: function(res) { | ||
| 228 | + channelCodeName = res.data.apkChannelName; | ||
| 229 | + openInstallReady(); | ||
| 230 | + }, | ||
| 231 | + error: function(err) { | ||
| 232 | + // alert("接口请求失败!") | ||
| 233 | + } | ||
| 234 | + }); | ||
| 235 | +} |