续费自动勾选

This commit is contained in:
wyongk
2020-12-23 00:06:24 +08:00
parent f5dc859e59
commit 20cab627c3

View File

@@ -313,7 +313,7 @@
@section Scripts{ @section Scripts{
<script type="text/javascript"> <script type="text/javascript">
var currentPkgId =@defaultPackage.Id; var currentPkgId = 0;
function selectPackage(id) { function selectPackage(id) {
currentPkgId = id; currentPkgId = id;
var el = "#pkg" + id; var el = "#pkg" + id;
@@ -333,6 +333,10 @@
selectPackage(currentPkgId) selectPackage(currentPkgId)
}) })
$(".btn-submit").click(function () { $(".btn-submit").click(function () {
if(currentPkgId == 0){
alert("未选择套餐!");
return;
}
window.location.href = "rebuy?packageId=" + currentPkgId+"&accounts=@ViewBag.accounts"; window.location.href = "rebuy?packageId=" + currentPkgId+"&accounts=@ViewBag.accounts";
}) })
selectPackage(currentPkgId) selectPackage(currentPkgId)