You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
3.3 KiB
126 lines
3.3 KiB
// JavaScript Document
|
|
$(function(){
|
|
//用户中心弹出框效果
|
|
$("*[data-dialog='goods_collect_dialog']").live('click',function(){
|
|
|
|
var ok_title, cl_title;
|
|
var url = $(this).data('url'); //删除连接地址
|
|
var title = $(this).data('title');
|
|
var width = $(this).data('width');
|
|
var height = $(this).data('height');
|
|
var padding = $(this).data('padding');
|
|
var divId = $(this).data('divid');
|
|
var id = $(this).data('goodsid');
|
|
var hrefCont = '';
|
|
var foot = true;
|
|
|
|
if(id > 0){
|
|
Ajax.call(url, 'id=' + id, function(data){
|
|
if(divId == 'goods_collect'){
|
|
if(data.error > 0){
|
|
if(data.error == 2){
|
|
ok_title = "登录账号";
|
|
hrefCont = "user.php";
|
|
}else if(data.error == 1){
|
|
foot = false;
|
|
}
|
|
|
|
var content = '<div id="' + divId + '">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">' + data.message + '</h3>' +
|
|
'</div>' +
|
|
'</div>' +
|
|
'</div>';
|
|
|
|
ok_title = "确定";
|
|
}else{
|
|
$(".choose-btn-coll").addClass('selected');
|
|
$("#collect_count").html(data.collect_count);
|
|
ok_title = "查看我的收藏";
|
|
var content = $("#dialog_goods_collect").html();
|
|
hrefCont = "user.php?act=collection_list";
|
|
}
|
|
}
|
|
|
|
pb({
|
|
id:divId,
|
|
title:title,
|
|
width:width,
|
|
height:height,
|
|
ok_title:ok_title, //按钮名称
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:foot,
|
|
cl_cBtn:false,
|
|
onOk:function(){
|
|
location.href = hrefCont;
|
|
}
|
|
});
|
|
|
|
$('#' + divId + ' .pb-ft .pb-ok').addClass('color_df3134');
|
|
|
|
}, 'GET', 'JSON');
|
|
}else{
|
|
if(divId == 'delete_goods_collect'){
|
|
ok_title = "确定";
|
|
cl_title = "取消";
|
|
var content = $("#delete_goods_collect").html();
|
|
}
|
|
|
|
pb({
|
|
id:divId,
|
|
title:title,
|
|
width:width,
|
|
height:height,
|
|
ok_title:ok_title, //按钮名称
|
|
cl_title:cl_title, //按钮名称
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:foot,
|
|
onOk:function(){
|
|
location.href = url;
|
|
}
|
|
});
|
|
|
|
$('#' + divId + ' .pb-ft .pb-ok').addClass('color_df3134');
|
|
}
|
|
});
|
|
|
|
//用户中心弹出框效果
|
|
$("*[data-dialog='goods_del_booking']").live('click',function(){
|
|
|
|
var url = $(this).data('url'); //删除连接地址
|
|
var confirmtitle = $(this).data('confirmtitle');
|
|
var width = $(this).data('width');
|
|
var height = $(this).data('height');
|
|
var divId = $(this).data('divid');
|
|
|
|
var content = '<div id="' + divId + '">' +
|
|
'<div class="tip-box icon-box">' +
|
|
'<span class="warn-icon m-icon"></span>' +
|
|
'<div class="item-fore">' +
|
|
'<h3 class="rem ftx-04">' + confirmtitle + '</h3>' +
|
|
'</div>' +
|
|
'</div>' +
|
|
'</div>';
|
|
|
|
pb({
|
|
id:divId,
|
|
title:'提示',
|
|
width:width,
|
|
height:height,
|
|
ok_title:'确定', //按钮名称
|
|
cl_title:'取消', //按钮名称
|
|
content:content, //调取内容
|
|
drag:false,
|
|
foot:true,
|
|
onOk:function(){
|
|
location.href = url;
|
|
}
|
|
});
|
|
|
|
$('#' + divId + ' .pb-ft .pb-ok').addClass('color_df3134');
|
|
});
|
|
});
|
|
|