| | |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[index]; |
| | | $('#payment').text(obj.payment); |
| | | $('#cashPayment').text(obj.cashPayment); |
| | | $('#cashPayment').text(obj.cashPayment+"元"); |
| | | |
| | | $('#memberDiscount').html(''); |
| | | $('#renewalOffer').html(''); |
| | |
| | | let htmlStr = ''; |
| | | for (let i = 0; i < CoursePackageDiscount.coursePackagePaymentConfig.length; i++) { |
| | | let obj = CoursePackageDiscount.coursePackagePaymentConfig[i]; |
| | | if(i == 0){ |
| | | htmlStr += '<button checked onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;">' + obj.classHours + '课时</button> '; |
| | | }else{ |
| | | htmlStr += '<button onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;border: none;border-radius: 5px;">' + obj.classHours + '课时</button> '; |
| | | } |
| | | console.log("看看课程类型") |
| | | console.log($('#type').val()); |
| | | if(i == 0){ |
| | | htmlStr += '<button checked onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;background-color: #0086F6;border: none;border-radius: 5px;color: white;">' + obj.classHours + '课时</button> '; |
| | | }else{ |
| | | htmlStr += '<button onclick="selectedPperiod(this)" index="' + i + '" style="width: 60px;height: 30px;border: none;border-radius: 5px;">' + obj.classHours + '课时</button> '; |
| | | } |
| | | |
| | | } |
| | | $('#classHours').html(htmlStr); |
| | | |
| | | if ($('#type').val()==2) { |
| | | var cla = document.getElementById("classHours"); |
| | | console.log("隐藏") |
| | | cla.style.display="none"; |
| | | } |
| | | $('input[name="type"]').click(function () { |
| | | let v = $(this).val(); |
| | | let index = $('#classHours').find('button[checked]').attr('index'); |