Commit 9eb1a3ac by 颜景龙

静态页面修改

parent 2d911f5d
......@@ -48,7 +48,7 @@
.page2 .main {
padding: 0;
border-bottom: 1px solid rgba(255, 255, 255, 1);
/* border-bottom: 1px solid rgba(255, 255, 255, 1); */
}
.page2 .main:last-child {
......
......@@ -188,4 +188,8 @@ body {
font-size: 1.5rem!important;
}
.label-price > span {
font-size: .6rem;
}
......@@ -165,47 +165,57 @@
// $('.class-banner').css({'background-image': `url(./banner.png)`, height: $(window).width()*200/375});
var id = getUrlParam('id');
var classId = getUrlParam('classId');
var userId = getUrlParam('userId');
var dayList = ['今天', '明天', '后天'];
if (id) {
$.get(HTTP_URL+"/wedofit/personalClass/mineClassWebDetails/"+id,
function(data){
var result = JSON.parse(data);
if (result.code == 0) {
var obj = result.data;
$('.class-banner').css({'background-image': `url(${obj.classImg})`, height: $(window).width()*200/375});
$('#className').text(obj.className + '/' + obj.trainerName);
$('#classTime').text(obj.minEnrollment + '课时');
$("<p></p>").html(obj.introduction).appendTo($(".class-block")[2]);
$("<p></p>").html(obj.trainingEffect).appendTo($(".class-block")[3]);
$("<p></p>").html(obj.classDuration).appendTo($(".class-block")[4]);
$("<p></p>").html(obj.suitableFor).appendTo($(".class-block")[5]);
$("<p></p>").html(obj.suggestion).appendTo($(".class-block")[6]);
for (var j=0; j<dayList.length; j++) {
var timeLine = $('<div></div>').addClass("clearfix mb10");
$('<div></div>').addClass('time-day').text(dayList[j]).appendTo(timeLine);
var timeUL = $("<ul></ul>").addClass("time-line clearfix");
if (obj.appointmentTime && obj.appointmentTime.length > 0 && obj.appointmentTime[j].length > 0) {
var lineList = caculateWidth(obj.appointmentTime[j]);
for (var l=0; l<lineList.length; l++) {
$("<li></li>").css({'width': lineList[l].width*0.5+'rem', left: lineList[l].start*0.5+'rem'}).appendTo(timeUL);
if (classId && userId) {
$.ajax({
type: 'POST',
url: HTTP_URL+"/wedofit/personalClass/mineClassWebDetails",
data: JSON.stringify({
classId: classId,
userId: userId
}),
contentType: 'application/json',
dataType: 'json',
success: function(result){
if (result.code == 0) {
var obj = result.data;
$('.class-banner').css({'background-image': `url(${obj.classImg})`, height: $(window).width()*200/375});
$('#className').text(obj.className + '/' + obj.trainerName);
$('#classTime').text('剩余'+obj.count + '课时');
$("<p></p>").html(obj.introduction).appendTo($(".class-block")[2]);
$("<p></p>").html(obj.trainingEffect).appendTo($(".class-block")[3]);
$("<p></p>").html(obj.classDuration).appendTo($(".class-block")[4]);
$("<p></p>").html(obj.suitableFor).appendTo($(".class-block")[5]);
$("<p></p>").html(obj.suggestion).appendTo($(".class-block")[6]);
for (var j=0; j<dayList.length; j++) {
var timeLine = $('<div></div>').addClass("clearfix mb10");
$('<div></div>').addClass('time-day').text(dayList[j]).appendTo(timeLine);
var timeUL = $("<ul></ul>").addClass("time-line clearfix");
if (obj.appointmentTime && obj.appointmentTime.length > 0 && obj.appointmentTime[j].length > 0) {
var lineList = caculateWidth(obj.appointmentTime[j]);
for (var l=0; l<lineList.length; l++) {
$("<li></li>").css({'width': lineList[l].width*0.5+'rem', left: lineList[l].start*0.5+'rem'}).appendTo(timeUL);
}
}
timeLine.append(timeUL);
$('#timeBody').append(timeLine);
}
timeLine.append(timeUL);
$('#timeBody').append(timeLine);
setTimeout(function() {
$('.loading').remove();
}, 200);
}
setTimeout(function() {
$('.loading').remove();
}, 200);
}
});
}
......
......@@ -82,6 +82,7 @@
$("#className").text(obj.className);
$("#className").append($("<span></span>").text((obj.minEnrollment ? obj.minEnrollment : '-')+'节起售').addClass("sub-text"));
$("#classPrice").text('¥ '+obj.totalPrice);
$("<span>/课时</span>").appendTo($("#classPrice"));
$("<p></p>").html(obj.introduction).appendTo($(".class-block")[1]);
$("<p></p>").html(obj.trainingEffect).appendTo($(".class-block")[2]);
......
### 私教预约课程详情(id="课程id")
> http://192.168.31.182:8080/wedo-fit/htmlpages/course/personal/personalClassAppointDetail.html
### 私教预约课程详情(classId="课程id", userId="用户Id")
> http://192.168.31.182:8080/wedo-fit/htmlpages/personal/personalClassAppointDetail.html?classId=8455817859507200&userId=8455341890544640
### 私教详情 (id="课程id")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!
注册登录 后发表评论