- 花型|
- 存证|
bar-moudle-product">';
v_mpbtn_histroy += "图来旺欢迎您" + '
';
v_mpbtn_histroy += '
';
v_order_serviceList = '';
if( v_order_serviceList.length > 30 ){
v_mpbtn_histroy = v_order_serviceList;
}
var v_mpbtn_wdsc = '
';
v_order_serviceList = '';
if( v_order_serviceList.length > 30 ){
v_mpbtn_wdsc = v_order_serviceList;
}
if (typeof guid_sc == "undefined") guid_sc = '0';
if (typeof actionDo == "undefined") actionDo = 'login';
var v_mpbtn_recharge = build_mpbtn_recharge();
var v_mpbtn_kfzx = build_mpbtn_kfzx();
var v_buildmedia_list = build_media_list( 'buildmedia_list' );
$(".quick_links_panel li").mouseenter(function () {
$(this).children(".mp_tooltip").animate({
left: -92,
queue: true
}).css("visibility", "visible");
//$(this).children(".ibar_login_box").css("display", "block");
});
$(".quick_links_panel li").mouseleave(function () {
$(this).children(".mp_tooltip").css("visibility", "hidden").animate({
left: -121,
queue: true
});
//$(this).children(".ibar_login_box").css("display", "none");
});
$(".quick_toggle li").mouseover(function () {
$(this).children(".mp_qrcode").show();
});
$(".quick_toggle li").mouseleave(function () {
$(this).children(".mp_qrcode").hide();
});
$(function () {
// 元素以及其他一些变量
var eleFlyElement = document.querySelector("#flyItem"),
eleShopCart = document.querySelector("#shopCart");
var numberItem = '';
// 抛物线运动
var myParabola = funParabola(eleFlyElement, eleShopCart, {
speed: 800, //抛物线速度
curvature: 0.0008, //控制抛物线弧度
complete: function () {
eleFlyElement.style.visibility = "hidden";
//eleShopCart.querySelector("span").innerHTML = ++numberItem;
var params = myParabola.getparams() ;
if (checkLogin( params.vparam )) {
$.ajax({ dataType: 'json', type: 'post', url: 'index.php?do=ajax&view=ajax_getdata',
data: { id: params.vid, uid: params.vuid, type: params.vtype,buytype:params.vbuytype},
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function (data ) {
console.log(data);
if ( data.msg == 'ok')
{
data.msg = v_cartname_array[8];
if (g_quickShell && typeof g_quickShell != 'undefined' && g_quickShell.updata_list instanceof Function) {
g_quickShell.updata_list(data.uid, 'message_list');
alert(data.msg);
}
else {
alert("找不到解析函数,请和管理员联系,15925858500!");
}
}
else if (data.html == "status") {
alert( data.error_msg );
}
else if (data.html == "if_right_num") {
alert( data.error_msg );
}
else if (data.html == "same") {
alert( data.error_msg );
}
else if (data.html == "wChnNum") {
alert("套数不对,源文件套数是:" + data.wChnNum + ";购买套数是:" + data.unite_num + ",请和管理员联系,15925858500!");
}
else {
alert("遇到未知错误,放入购物车失败,请电话15925858500咨询!");
}
}
}); //end
} //end checkLogin()
}
});
//页面静态绑定点击事件;
if (eleFlyElement && eleShopCart) {
[ ].slice.call(document.getElementsByClassName("btnCart")).forEach(function (button) {
button.addEventListener("click", function (event) {
//滚动大小
var v_param = {
vparam: $(this).attr('data-param'),
vuid: $(this).attr('data-uid'),
vtype: $(this).attr('data-type'),
vid: $(this).attr('data-id'),
vbuytype: $(this).attr('buytype')
};
var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0,
scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
eleFlyElement.style.left = event.clientX + scrollLeft + "px";
eleFlyElement.style.top = event.clientY + scrollTop + "px";
eleFlyElement.style.visibility = "visible";
// 需要重定位
myParabola.position( v_param ).move();
});
});
}
//c_time_message();
});
function c_time_message(){
if( checkLoginEx() ){
v_buildmedia_list = build_media_list('buildmedia_list');
setTimeout( 'c_time_message()', 360000);
}
}//end funtion
function build_message_list(data_List) {
if(typeof data_List === "undefined")
{
return;
}
if (Array.isArray(data_List) === false) data_List = [data_List];
var numberItem = data_List.length;
if (typeof data_List[0].html != 'undefined' && data_List[0].html !== "error") {
p_message_list = data_List[0].html;
} else {
numberItem = "";
p_message_list = "";
}
$("#shopCart").find(".cart_num").html(numberItem);
return p_message_list;
};
function build_mpbtn_wdsc(data_List, v_id) {
if (Array.isArray(data_List) === false) data_List = [data_List];
var numberItem = data_List.length;
if (typeof numberItem == "undefined") numberItem = 0;
if (typeof data_List[0].html != 'undefined' && data_List[0].html !== "error") {
v_mpbtn_info = data_List[0].html;
} else {
numberItem = 0;
v_mpbtn_info = "";
}
/*start更新页面状态和信息*/
if (typeof v_id != 'undefined' && v_id) {
var _this = $('a[id="goods_sc"]');
var strsrc = _this.find("img").attr("src");
if (typeof strsrc != 'undefined') {
goods_sc_click(_this, strsrc); //强制调用此事件
} else {
var objimage = $("a[id='favorite" + v_id + "']");
var strclass = objimage.attr("class");
if (strclass === "favorite-yes") {
objimage.replaceWith('');
} else if (strclass === "favorite-yet") {
objimage.replaceWith('
');
}
}
}
/*end更新页面状态和信息*/
return v_mpbtn_info;