.userName = userName; $.post("/API/VshopProcess.ashx?action=AddProductConsultations", data, function (json) { if (json.success === true) { alert_h("提交成功", function () { location.reload(); }); } else { alert_h(json.msg); } }); } $('#buyFightGroupActivity').on('click', function (event) { event.preventDefault(); getDefaultFightGroupActivityPrice(); $('.att-popup').addClass('is-visible'); }); $(function () { $('.FAB_consult').on('click', function () { $('.coupons_popup').addClass('is-visible'); $("#consult").show(); $('.coupons_title span').text("商品咨询"); }); $(".tab").click(function () { if ($(this).hasClass("tab_active")) return; $(this).addClass("tab_active"); $(this).parent().siblings().children(".tab").removeClass("tab_active"); $(".pro_info").toggle(); }); if ($("#vFightGroupDetails_imgStatus").length > 0) { // 当前团失败或者成功 if ($("#hidFightGroupActivityStatus").val() == "1") { // 活动未结束 $("#more_activities").show(); $("#buyFightGroupActivity").show(); $("#buyFightGroupActivity").text("我也要开团"); $("#share_pic").hide(); $("#hidden_SKUSubmitOrderBusiness").val(1); $("#hidden_SKUSubmitOrderFightGroupId").val(0); } else { // 活动已结束只能有更多拼团 $("#buyFightGroupActivity").hide(); $("#share_pic").hide(); } } else { // 当前团在拼团中 var hiddenJoinedUserValue = $("#hiddenJoinedUser").val(); if (hiddenJoinedUserValue == "true") { $("#share_pic").show(); } else { // 当前用户已经参团,则只显示邀请好友参团 $("#buyFightGroupActivity").show(); $("#more_activities").show(); } } }) function showtime() { var strstartTime = document.getElementById("hfStartTime").value; var strTime = document.getElementById("hfEndTime").value; //2011-01-06 11:40:00 var year = strTime.split("-")[0]; var month = strTime.split("-")[1]; var day = strTime.split("-")[2].replace(strTime.substr(strTime.indexOf(" ")), ""); var hour = strTime.split(" ")[1].split(":")[0]; var minutes = strTime.split(" ")[1].split(":")[1]; var seconds = strTime.split(" ")[1].split(":")[2]; //alert(year + "年" + month + "月" + day + "日" + hour + "小时" + minutes + "分" + seconds + "秒"); var eTime = new Date(year, month - 1, day, hour, minutes, seconds); if (eTime > nowTime) { showTimeListUnitHour(strTime, "litRemainTimeHtml", "1", strstartTime, nowTime, null, ":", ":"); nowTime.setSeconds(nowTime.getSeconds() + 1); } else { showTimeListUnitHour(strTime, "litRemainTimeHtml", "1", strstartTime, nowTime, refreshFightGroup, ":", ":"); clearInterval(intervalId); } } $(document).ready(function () { nowTime = new Date($('#hfNowTime').val()); var strstartTime = document.getElementById("hfStartTime").value; var strTime = document.getElementById("hfEndTime").value; //2011-01-06 11:40:00 var eTime = new Date(strTime); if (eTime == "Invalid Date") { var year = strTime.split("-")[0]; var month = strTime.split("-")[1]; var day = strTime.split("-")[2].replace(strTime.substr(strTime.indexOf(" ")), ""); var hour = strTime.split(" ")[1].split(":")[0]; var minutes = strTime.split(" ")[1].split(":")[1]; var seconds = strTime.split(" ")[1].split(":")[2]; eTime = new Date(year, month - 1, day, hour, minutes, seconds); } if (nowTime == "Invalid Date") { var year = $('#hfNowTime').val().split("-")[0]; var month = $('#hfNowTime').val().split("-")[1]; var day = $('#hfNowTime').val().split("-")[2].replace($('#hfNowTime').val().substr($('#hfNowTime').val().indexOf(" ")), ""); var hour = $('#hfNowTime').val().split(" ")[1].split(":")[0]; var minutes = $('#hfNowTime').val().split(" ")[1].split(":")[1]; var seconds = $('#hfNowTime').val().split(" ")[1].split(":")[2]; nowTime = new Date(year, month - 1, day, hour, minutes, seconds); } if (eTime < nowTime) { showTimeList(strTime, "litRemainTimeHtml", "1", strstartTime, nowTime); } else { intervalId = setInterval(showtime, 1000); } }); function refreshFightGroup() { location.reload(); } $(window).scroll(function () { setScrollLoading(); }); function setScrollLoading() { $("img").scrollLoading(); $("iframe").each(function () { if (!$(this).attr("src")) { $(this).attr("src", $(this).attr("data-url")); } }); } $(function () { var h = $('p img'); h.css("height", "auto"); var slidesImg = $('#slides img'); var width = 650, height = 650; if (slidesImg.length > 1) { $('#slides').slidesjs({ width: width, height: height //play: { // active: true, // auto: true, // interval: 6000, // swap: true //} }); $(".slidesjs-play, .slidesjs-stop, .slidesjs-previous, .slidesjs-next").remove(); } else { $('#slides').css('display', 'block').html('
'); $('#slides div a').append(slidesImg); } $('#slides img').scrollLoading(); $('#slides').FlyZommImg({ miscellaneous: false, showBoxSpeed: 0 }); });