Authored by wangqing

修正header js错误

... ... @@ -3,15 +3,14 @@
* @author: wangqing<robin.wang@yoho.cn>
* @date: 2015/12/01
*/
var $ = require('yoho.jquery');
var handlebars = require('yoho.handlebars');
var json2 = require('json2');
var noticeSuccess = false;
var apiDomain = 'http://api.open.yohobuy.com';
var vipInfoCombine = null;
var loginInfoCombine = null;
var apiDomain = 'http://api.open.yohobuy.com';
var cartTpl = '';
/**
* 判断为1的helper
* @param {[type]} v1 [description]
... ... @@ -594,7 +593,7 @@ function loadCartData() {
shoppingData,
strK;
$.getData(window.apiDomain, {
$.getData(apiDomain, {
method: 'open.Shoppingcart.getCartData',
shopping_key: $.getShoppingKey()
}, function(jsonData) {
... ... @@ -631,7 +630,7 @@ function loadCartData() {
* @return {[type]} [description]
*/
function delCartGoods(id, isreduce) {
$.getData(window.apiDomain, {
$.getData(apiDomain, {
method: 'open.Shoppingcart.delone',
shopping_key: $.getShoppingKey(),
id: id,
... ... @@ -649,8 +648,7 @@ function delCartGoods(id, isreduce) {
actionUpdateCartNum();
});
}
window.apiDomain = 'http://api.open.yohobuy.com';
window.cartTpl = '';
/**
* 监听购物车删除
... ... @@ -881,12 +879,12 @@ function actionLoginState(_data) {
'[<a href="http://www.yohobuy.com/reg.html" onclick="" class="list-a login-out">免费注册</a>]' +
'{{/equalone}}';
var $boxObj = $('#loginBox');
var info = $.cookie('_UID');
var name = _data.data.profile_name;
var info = $.cookie('_UID')||'';
var name = _data.data.profile_name||'';
var _length = 0;
var t = 0;
var char = '';
var user = info.split('::');
var user = info.split('::')||'';
var userName = user[0] || ' ';
var _logout = '';
var islogin = '1';
... ...