...
|
...
|
@@ -415,6 +415,82 @@ function _formatDay(day) { |
|
|
return moment(day).format('MM月DD日 HH:mm');
|
|
|
}
|
|
|
|
|
|
function pullPicBig(){
|
|
|
var w_height = $(window).height();
|
|
|
|
|
|
$('.big-pic').show();
|
|
|
$('.swiper-slide img').each(
|
|
|
function() {
|
|
|
var newTop = (w_height - $(this).height()) / 2;
|
|
|
|
|
|
if ($(this).height() > w_height) {
|
|
|
$(this).css('height', '90%');
|
|
|
$(this).css('width', 'auto');
|
|
|
$(this).css('margin-top', newTop + 'px');
|
|
|
} else {
|
|
|
$(this).css('margin-top', newTop + 'px');
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
$('.swiper-slide').on('click', function() {
|
|
|
$('.big-pic').hide();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function cancelOrder(){
|
|
|
diaLog.showDialog({
|
|
|
dialogText: '确认取消预约吗?',
|
|
|
hasFooter: {
|
|
|
leftBtnText: '我再想想',
|
|
|
rightBtnText: '确认取消'
|
|
|
}
|
|
|
}, function() {
|
|
|
$.ajax({
|
|
|
url: '/activity/trend/delOrder',
|
|
|
data: {
|
|
|
id: $('.order-btn a').attr('id')
|
|
|
},
|
|
|
success: function(result) {
|
|
|
if (result.code === 200) {
|
|
|
document.location.href = '//m.yohobuy.com/activity/trend/order-list?storeId=' +
|
|
|
window.queryString.storeId;
|
|
|
} else {
|
|
|
tip.show(result.message);
|
|
|
}
|
|
|
},
|
|
|
error: function() {
|
|
|
tip.show('网络断开了~~~');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
// 修改弹框样式
|
|
|
$('.dialog-left-btn').css('color', '#999');
|
|
|
$('.dialog-right-btn').css('color', '#007aff');
|
|
|
}
|
|
|
|
|
|
function chosenDefault() {
|
|
|
if ($('.class-detail').length > 0) {
|
|
|
window.setCookie('chosenClass', $('.class-detail').find('.name').text());
|
|
|
window.setCookie('packageId', $('.class-detail').find('.name').attr('id'));
|
|
|
}
|
|
|
if ($('.adviser-info').find('.name').length > 0) {
|
|
|
window.setCookie('chosenCutter', $('.adviser-info').find('.name').text());
|
|
|
window.setCookie('chosenAdviser', $('.adviser-info').find('.name').text());
|
|
|
window.setCookie('cutterId', $('.cutter-id').val());
|
|
|
}
|
|
|
if ($('.style-detail').length > 0) {
|
|
|
window.setCookie('styleId', window.queryString.id);
|
|
|
window.setCookie('chosenStyle', ' ' + decodeURI(window.queryString.styleName) + ' ');
|
|
|
}
|
|
|
if ($('.package-detail').length > 0) {
|
|
|
window.setCookie('chosenPackage', $('.package-detail').find('.name').text());
|
|
|
window.setCookie('packageLimit', $('.package-detail').find('.limit').val());
|
|
|
window.setCookie('packageStyle', $('.package-detail').find('.styleid').val());
|
|
|
window.setCookie('packageId', window.queryString.id);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
module.exports = {
|
|
|
getTimeList: getTimeList,
|
|
|
clearCookieArr: clearCookieArr,
|
...
|
...
|
@@ -427,5 +503,8 @@ module.exports = { |
|
|
removeByValue: removeByValue,
|
|
|
limitInp: limitInp,
|
|
|
pullPic: pullPic,
|
|
|
pullPicBig: pullPicBig,
|
|
|
cancelOrder: cancelOrder,
|
|
|
chosenDefault: chosenDefault,
|
|
|
_formatDay: _formatDay
|
|
|
}; |
...
|
...
|
|