Commit b0cac933 by 冷斌

fix bug

parent 6cab4756
...@@ -214,8 +214,7 @@ ...@@ -214,8 +214,7 @@
} }
return 0; return 0;
}, },
onPay: function (item, type) { isLogin: function () {
var uid = '{$uid}';
if(MID<=0){ if(MID<=0){
ui.confirm('请先登录', { ui.confirm('请先登录', {
yes: function () { yes: function () {
...@@ -224,6 +223,12 @@ ...@@ -224,6 +223,12 @@
}); });
return false; return false;
} }
return true;
},
onPay: function (item, type) {
if (!this.isLogin()) {
return false;
}
if(item['price'] <= 0){ if(item['price'] <= 0){
ui.error('不需要您购买'); ui.error('不需要您购买');
...@@ -254,7 +259,6 @@ ...@@ -254,7 +259,6 @@
return false; return false;
} }
$.post(U("course/PayVideo/checkPay"), formData2,function(data){ $.post(U("course/PayVideo/checkPay"), formData2,function(data){
if(data.status == 1){ if(data.status == 1){
window.location.href = url; window.location.href = url;
...@@ -267,6 +271,8 @@ ...@@ -267,6 +271,8 @@
} }
},'json'); },'json');
} }
}, },
created: function () { created: function () {
this.tab = this.getQueryVariable('status'); this.tab = this.getQueryVariable('status');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment