Authored by hf

do modify home page code to change check user is login and fixes bugs

Showing 228 changed files with 1878 additions and 1336 deletions
... ... @@ -277,11 +277,14 @@ class AbstractAction extends Controller_Abstract
/**
* 获取当前登录的用户ID
*
* @param bool $useSession 是否使用Session会话
* @param bool $useSession (true:从服务端session中检查, false:从客户端cookie中检查)
* @return int
*/
protected function getUid($useSession = false)
{
// @todo debug 因登录没有写老的SESSION会话,此处使用COOKIE
$useSession = false;
if (!$this->_uid) {
// 从SESSION获取
if ($useSession) {
... ...
... ... @@ -5,12 +5,6 @@ namespace LibModels\Wap\Home;
use Api\Yohobuy;
use Api\Sign;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of OrderData
*
... ... @@ -24,7 +18,8 @@ class OrderData
* and open the template in the editor.
*/
static function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid) {
static function getOrderData($type, $page, $limit, $gender, $yh_channel, $uid)
{
//构建必传参数
$param = Yohobuy::param();
$param['gender'] = $gender;
... ... @@ -45,14 +40,15 @@ class OrderData
* and open the template in the editor.
*/
static function cancelOrderData($order_code, $uid, $gender, $yh_channel) {
static function cancelOrderData($order_code, $uid, $gender, $yh_channel)
{
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['yh_channel'] = $yh_channel;
$param['method'] = 'app.SpaceOrders.close';;
$param['method'] = 'app.SpaceOrders.close';
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get(Yohobuy::API_URL, $param);
... ... @@ -64,7 +60,8 @@ class OrderData
* and open the template in the editor.
*/
static function deleteOrderData($order_code, $uid, $gender, $yh_channel) {
static function deleteOrderData($order_code, $uid, $gender, $yh_channel)
{
//构建必传参数
$param = Yohobuy::param();
$param['order_code'] = $order_code;
... ... @@ -83,7 +80,8 @@ class OrderData
* and open the template in the editor.
*/
static function LogisticsData() {
static function LogisticsData()
{
//构建必传参数
$param = Yohobuy::param();
$param['method'] = 'app.express.li';
... ... @@ -91,15 +89,15 @@ class OrderData
//$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
//调用接口获得数据
return Yohobuy::get('http://api.open.yohobuy.com/', $param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/*
* 支付url
* To change this template file, choose Tools | Templates
*/
static function paymentData($gender, $yh_channel, $code) {
static function paymentData($gender, $yh_channel, $code)
{
//构建必传参数
$param = Yohobuy::param();
$param['content_code'] = $code;
... ... @@ -114,8 +112,8 @@ class OrderData
* 随便逛逛url
* To change this template file, choose Tools | Templates
*/
static function strollData($gender, $yh_channel, $code) {
static function strollData($gender, $yh_channel, $code)
{
//构建必传参数
$param = Yohobuy::param();
$param['content_code'] = $code;
... ...
... ... @@ -17,405 +17,418 @@ use Api\Yohobuy;
class UserData
{
/**
* 个人详情数据
*
* @param int $uid 用户ID
* @return array 个人详情接口返回的数据
*/
public static function userData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.profile';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 个人中心页面优惠券,收藏的商品等的数目数据
*
* @param int $uid 用户ID
* @return array 接口返回的数据
*/
public static function infoNum($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.home.getInfoNum';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 个人中心页面优选新品数据
*
* @param int $yh_channel 频道,1代表男生,2代表女生,3代表潮童,4代表创意生活
* @return array 接口返回的数据
*/
public static function preference($yh_channel)
{
$param = Yohobuy::param();
$param['method'] = 'app.home.preference';
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 订单数据
*
* @param int $uid 用户ID
* @param int $type 订单类型,1表示全部,2表示待付款,3表示待发货,4表示待收货,5表示待评价
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 订单接口返回的数据
*/
public static function orderData($uid, $type, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.SpaceOrders.get';
$param['uid'] = $uid;
$param['type'] = $type;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 收藏的商品数据
*
* @param int $uid 用户ID
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 收藏的商品接口返回的数据
*/
public static function favoriteProductData($uid, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.product';
$param['uid'] = $uid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 收藏的品牌数据
*
* @param int $uid 用户ID
* @param string $gender 性别 1,3表示男,2,3表示女,1,2,3表示全部
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 收藏的品牌接口返回的数据
*/
public static function favoriteBrandData($uid, $gender, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.brand';
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 取消收藏的商品数据
*
* @param int $uid 用户ID
* @param int $fav_id 要取消的收藏id
* @return array 接口返回的数据
*/
public static function favoriteDelete($uid, $fav_id)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.cancel';
$param['type'] = 'product';
$param['uid'] = $uid;
$param['fav_id'] = $fav_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array 接口返回的数据
*/
public static function browseRecord($uid, $udid, $page = 1, $limit = 100)
{
$param = Yohobuy::param();
$param['method'] = 'app.browse.product';
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* YOHO币数据
*
* @param int $uid 用户ID
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array YOHO币接口返回的数据
*/
public static function yohoCoinData($uid, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.yohocoin.lists';
$param['uid'] = $uid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 优惠券数据
*
* @param int $uid 用户ID
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 优惠券接口返回的数据
*/
public static function couponData($uid, $page = 1, $limit = 10)
{
$urlList = array();
$param = Yohobuy::param();
$param['method'] = 'app.coupons.li';
$param['uid'] = $uid;
$param['status'] = 0;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
$urlList['unused'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
unset($param['client_secret']);
$param['status'] = 1;
$param['client_secret'] = Sign::getSign($param);
$urlList['used'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
return Yohobuy::getMulti($urlList);
}
/**
* 地址数据
*
* @param int $uid 用户ID
* @return array 地址接口返回的数据
*/
public static function addressData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.address.get';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 获取三级地址列表数据
*
* @param int $uid 用户ID
* @return array 地址接口返回的数据
*/
public static function addressListData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.address.getlist';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 保存地址数据
*
* @param int $uid 用户ID
* @param string $address 地址信息
* @param int $area_code 城市码
* @param string $consignee 收货人
* @param string $email 邮箱地址
* @param int $id 地址唯一标识符id
* @param string $mobile 手机号码
* @param string $zip_code 邮编
* @return array 地址接口返回的数据
*/
public static function saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code)
{
$param = Yohobuy::param();
$param['address'] = $address;
$param['area_code'] = $area_code;
$param['consignee'] = $consignee;
$param['email'] = $email;
if (!empty($id)) { // 修改
$param['id'] = $id;
$param['method'] = 'app.address.update';
} else { // 添加
$param['method'] = 'app.address.add';
}
$param['mobile'] = $mobile;
$param['zip_code'] = $zip_code;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 设置默认地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array 接口返回的数据
*/
public static function setDefaultAddress($uid, $id)
{
$param = Yohobuy::param();
$param['id'] = $id;
$param['method'] = 'app.address.setdefault';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 删除地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array 接口返回的数据
*/
public static function deleteAddress($uid, $id)
{
$param = Yohobuy::param();
$param['id'] = $id;
$param['method'] = 'app.address.del';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 意见反馈数据
*
* @param string $udid 客户端唯一标识
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 意见反馈接口返回的数据
*/
public static function suggestData($udid, $page = 1, $limit = 30)
{
$param = Yohobuy::param();
$param['udid'] = $udid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/getList', $param);
}
/**
* 意见靠谱,不靠谱接口
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @return array 接口返回的数据
*/
public static function upAndDown($uid, $udid, $suggest_id)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['content'] = $suggest_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/is_reliable', $param);
}
/**
* 提交意见反馈接口
*
* @param int $uid 用户ID
* @param string $content 意见内容
* @param mixed $image 图片地址
* @param int $suggest_type 意见类型
* @return array 意见反馈接口返回的数据
*/
public static function savesuggestData($uid, $content, $image, $suggest_type)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['content'] = $content;
if($image !== null) {
$param['image'] = $image;
}
$param['suggest_type'] = $suggest_type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param);
}
/**
* 我的消息接口
*
* @param int $uid 用户ID
* @param int $page 获取第一页,默认是0
* @param int $size 获取数目,默认是10
* @return array 消息接口返回的数据
*/
public static function messageData($uid, $page = 0, $size = 10)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['size'] = $size;
$param['page'] = $page;
$param['method'] = 'app.inbox.getlist';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 在线客服接口
*
* @return array 消息接口返回的数据
*/
public static function onlineServiceData()
{
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v1/help/getCategory', $param);
}
/**
* 个人详情数据
*
* @param int $uid 用户ID
* @return array 个人详情接口返回的数据
*/
public static function userData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.passport.profile';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, 3600); // 缓存1小时
}
/**
* 个人中心页面优惠券,收藏的商品等的数目数据
*
* @param int $uid 用户ID
* @return array 接口返回的数据
*/
public static function infoNum($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.home.getInfoNum';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 个人中心页面优选新品数据
*
* @param int $yh_channel 频道,1代表男生,2代表女生,3代表潮童,4代表创意生活
* @return array 接口返回的数据
*/
public static function preference($yh_channel)
{
$param = Yohobuy::param();
$param['method'] = 'app.home.preference';
$param['yh_channel'] = $yh_channel;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 订单数据
*
* @param int $uid 用户ID
* @param int $type 订单类型,1表示全部,2表示待付款,3表示待发货,4表示待收货,5表示待评价
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 订单接口返回的数据
*/
public static function orderData($uid, $type, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.SpaceOrders.get';
$param['uid'] = $uid;
$param['type'] = $type;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 收藏的商品数据
*
* @param int $uid 用户ID
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 收藏的商品接口返回的数据
*/
public static function favoriteProductData($uid, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.product';
$param['uid'] = $uid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 收藏的品牌数据
*
* @param int $uid 用户ID
* @param string $gender 性别 1,3表示男,2,3表示女,1,2,3表示全部
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 收藏的品牌接口返回的数据
*/
public static function favoriteBrandData($uid, $gender, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.brand';
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 取消收藏的商品数据
*
* @param int $uid 用户ID
* @param int $fav_id 要取消的收藏id
* @return array 接口返回的数据
*/
public static function favoriteDelete($uid, $fav_id)
{
$param = Yohobuy::param();
$param['method'] = 'app.favorite.cancel';
$param['type'] = 'product';
$param['uid'] = $uid;
$param['fav_id'] = $fav_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array 接口返回的数据
*/
public static function browseRecord($uid, $udid, $page = 1, $limit = 100)
{
$param = Yohobuy::param();
$param['method'] = 'app.browse.product';
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 删除浏览记录
*
* @param int $uid 用户ID
* @param int $skn 商品SKN
* @return array 接口返回的数据
*/
public static function delRecord($uid, $skn)
{
$param = Yohobuy::param();
$param['method'] = 'app.browse.delete';
$param['uid'] = $uid;
$param['skn'] = $skn;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* YOHO币数据
*
* @param int $uid 用户ID
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array YOHO币接口返回的数据
*/
public static function yohoCoinData($uid, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.yohocoin.lists';
$param['uid'] = $uid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 优惠券数据
*
* @param int $uid 用户ID
* @param int $status 优惠券状态,0表示未使用,1表示已使用
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 优惠券接口返回的数据
*/
public static function couponData($uid, $status, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.coupons.li';
$param['uid'] = $uid;
$param['status'] = $status;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 地址数据
*
* @param int $uid 用户ID
* @return array 地址接口返回的数据
*/
public static function addressData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.address.get';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 获取三级地址列表数据
*
* @param int $uid 用户ID
* @return array 地址接口返回的数据
*/
public static function addressListData($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.address.getlist';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 保存地址数据
*
* @param int $uid 用户ID
* @param string $address 地址信息
* @param int $area_code 城市码
* @param string $consignee 收货人
* @param string $email 邮箱地址
* @param int $id 地址唯一标识符id
* @param string $mobile 手机号码
* @param string $zip_code 邮编
* @return array 地址接口返回的数据
*/
public static function saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code)
{
$param = Yohobuy::param();
$param['address'] = $address;
$param['area_code'] = $area_code;
$param['consignee'] = $consignee;
$param['email'] = $email;
if (!empty($id)) { // 修改
$param['id'] = $id;
$param['method'] = 'app.address.update';
} else { // 添加
$param['method'] = 'app.address.add';
}
$param['mobile'] = $mobile;
$param['zip_code'] = $zip_code;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 设置默认地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array 接口返回的数据
*/
public static function setDefaultAddress($uid, $id)
{
$param = Yohobuy::param();
$param['id'] = $id;
$param['method'] = 'app.address.setdefault';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 删除地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array 接口返回的数据
*/
public static function deleteAddress($uid, $id)
{
$param = Yohobuy::param();
$param['id'] = $id;
$param['method'] = 'app.address.del';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 意见反馈数据
*
* @param string $udid 客户端唯一标识
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array 意见反馈接口返回的数据
*/
public static function suggestData($udid, $page = 1, $limit = 30)
{
$param = Yohobuy::param();
$param['udid'] = $udid;
$param['page'] = $page;
$param['limit'] = $limit;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/getList', $param);
}
/**
* 意见靠谱,不靠谱接口
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @param int $reliable 是否靠谱,1表示靠谱,2表示不靠谱
* @return array 接口返回的数据
*/
public static function upAndDown($uid, $udid, $suggest_id, $reliable)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['udid'] = $udid;
$param['is_reliable'] = $reliable;
$param['suggest_id'] = $suggest_id;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/is_reliable', $param);
}
/**
* 提交意见反馈接口
*
* @param int $uid 用户ID
* @param string $content 意见内容
* @param mixed $image 图片地址
* @param int $suggest_type 意见类型
* @return array 意见反馈接口返回的数据
*/
public static function savesuggestData($uid, $content, $image, $suggest_type)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['content'] = $content;
if ($image !== null) {
$param['image'] = $image;
}
$param['suggest_type'] = $suggest_type;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'suggest/api/v1/suggest/saveSuggest', $param);
}
/**
* 我的消息接口
*
* @param int $uid 用户ID
* @param int $page 获取第一页,默认是1
* @param int $size 获取数目,默认是10
* @return array 消息接口返回的数据
*/
public static function messageData($uid, $page = 1, $size = 10)
{
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['size'] = $size;
$param['page'] = $page;
$param['method'] = 'app.inbox.getlist';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 在线客服接口
*
* @return array 消息接口返回的数据
*/
public static function onlineServiceData()
{
$param = Yohobuy::param();
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v1/help/getCategory', $param);
}
}
... ...
... ... @@ -50,4 +50,31 @@ server
expires 30d;
}
}
server
{
listen 80;
server_name huodong.dev.yohobuy.com;
#access_log /nginx/logs/access_test_yoho_cn.log combined;
error_log /nginx/logs/error_test_yoho_cn.log warn;
root D:/workspace/yohobuy.git.dev.yoho.cn/yohobuy/huodong.m.yohobuy.com/public;
location / {
index index-dev.php;
if (!-f $request_filename){
rewrite ^/(.+)$ /index-dev.php?$1& last;
}
}
location ~ .*\.php?$ {
fastcgi_pass 172.16.6.158:9000;
fastcgi_index index-dev.php;
#fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
define("index",["jquery","hammer","swiper","lazyload","mlellipsis","iscroll-probe","handlebars","source-map","index"],function(e,t,n){var o;e("js/common"),e("js/category/entry"),e("js/guang/entry"),e("js/home/entry"),e("js/index/entry"),e("js/passport/entry"),e("js/product/entry"),e("js/me/entry"),n.exports=o}),define("js/common",["jquery"],function(e,t,n){function o(e){var t,n,o=document.cookie;return document.cookie&&""!==document.cookie&&(n=o.indexOf(e+"="),n>-1&&(n+=e.length+1,t=decodeURIComponent(d.trim(o.substring(n,o.indexOf(";",n)))))),t}function i(e,t,n){var o,i,a,s,r="";"undefined"!=typeof t&&(n=n||{},null===t&&(t="",n.expires=-1),n.expires&&("number"==typeof n.expires||n.expires.toUTCString)&&("number"==typeof n.expires?(s=new Date,s.setTime(s.getTime()+24*n.expires*60*60*1e3)):s=n.expires,r="; expires="+s.toUTCString()),o=n.path?"; path="+n.path:"",i=n.domain?"; domain="+n.domain:"",a=n.secure?"; secure":"",document.cookie=[e,"=",encodeURIComponent(t),r,o,i,a].join(""))}function a(){var e,t=o("_UID");return"undefined"==typeof t?0:(e=t.split("::"),"undefined"==typeof e||e.length<4?0:e)}function s(){var e=a();return 0===e?0:e[1]}function r(){var e=o("_g");return"undefined"==typeof e?"":JSON.parse(e).k}function l(){0!==c.length&&(d("body").height()<=d(window).height()-parseInt(c.css("height"),0)?c.addClass("bottom"):c.removeClass("bottom"))}var d=e("jquery"),c=d("#yoho-footer"),u=d(".yoho-header");!function(){var e=c.children(".op-row"),t=a();l(),0===t?e.prepend('<a href="http://m.yohobuy.com/signin.html?refer='+location.href+'">登录</a><span class="sep-line">|</span><a href="http://m.yohobuy.com/reg.html">注册</a>'):e.prepend('Hi,<a class="user-name" href="http://m.yohobuy.com/home?tmp='+Math.random()+'">'+t[0]+'</a><a href="http://m.yohobuy.com/passport/signout/index?token='+t[3]+'">退出</a>'),e.find(".back-to-top").on("touchend",function(){return d(window).scrollTop(0),!1}),c.removeClass("hide")}(),function(){var e=s();e=0===e?"":e,window._ozuid=e,window._yas&&window._yas(1*new Date,"1.0.13.2","yohobuy_m",e,"")}(),u.on("touchstart","a",function(){u.find("a").removeClass("highlight"),d(this).addClass("highlight")}).on("touchend touchcancel","a",function(){d(this).removeClass("highlight")}),function(){var e,t,n=0,o="webkit moz ms o".split(" "),i=window.requestAnimationFrame,a=window.cancelAnimationFrame;for(t=0;t<o.length&&(!i||!a);t++)e=o[t],i=i||window[e+"RequestAnimationFrame"],a=a||window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"];i&&a||(i=function(e,t){var o=(new Date).getTime(),i=Math.max(0,16-(o-n)),a=window.setTimeout(function(){e(o+i)},i);return n=o+i,a},a=function(e){window.clearTimeout(e)}),window.requestAnimationFrame=i,window.cancelAnimationFrame=a}(),window.cookie=o,window.setCookie=i,window.getUser=a,window.getUid=s,window.getShoppingKey=r,window.rePosFooter=l}),define("js/category/entry",["jquery","hammer","swiper","lazyload","index"],function(e,t,n){e("js/category/index"),e("js/category/brand")}),define("js/category/index",["jquery"],function(e,t,n){var o=e("jquery"),i=o(".category-nav"),a=o(".category-container"),s=a.children(".content"),r=a.find(".sub-level li"),l=a.find(".primary-level li"),d=s.not(".hide");!function(){var e=o(".yoho-header"),t=o("#search-input"),n=o(window).height()-e.outerHeight()-t.outerHeight()-i.outerHeight();a.css("min-height",n),s.height(n)}(),o("#search-input").focus(function(){o(this).blur()}),i.bind("contextmenu",function(e){return!1}),o(".category-container").bind("contextmenu",function(e){return!1}),i.on("touchend touchcancel",function(e){var t=o(e.target).closest("li"),n=t.index();t.hasClass("focus")||(i.find("li.focus").removeClass("focus"),t.addClass("focus"),d.addClass("hide"),d=s.eq(n).removeClass("hide"))}),a.on("touchend",function(e){var t,n,i,a=o(e.target);if(n=a.closest(".p-level-item"),n.length>0){if(i=n.index(),t=a.closest(".content").find(".sub-level"),a.hasClass("focus"))return;a.closest(".primary-level").children(".focus").removeClass("focus"),a.addClass("focus"),t.not(".hide").addClass("hide"),t.eq(i).removeClass("hide")}}),a.find(".primary-level").on("touchstart touchend touchcancel","li",function(){l.removeClass("highlight"),o(this).addClass("highlight")}).on("touchend touchcancel","li",function(){o(this).removeClass("highlight")}),a.find(".sub-level").on("touchstart","li",function(){r.removeClass("highlight"),o(this).addClass("highlight")}).on("touchend touchcancel","li",function(){o(this).removeClass("highlight")}),i.on("touchstart","li",function(){i.find("li").removeClass("bytouch"),o(this).addClass("bytouch")}).on("touchend touchcancel","li",function(){i.find("li").removeClass("bytouch")})}),define("js/category/brand",["jquery","hammer","swiper","lazyload","index"],function(e,t,n){function o(){var e=h(window).scrollTop();g.eq(0).offset().top<l&&r.hide(),g.each(function(){var t=h(this).offset().top-b;e>=t&&r.css({display:"block"}).find("h2").html(h(this).find(".title-bar").text())})}function i(){var e=h(".brand-list").find("p");e.on("touchstart",function(){e.css("background","#fff"),h(this).css("background","#eee")}).on("touchend touchcancel",function(){h(this).css("background","#fff")})}function a(){var e=(c.val()+"").toLowerCase(),t={},n=0,o="";""!==e&&(h.each(d,function(n,o){h.isArray(o)&&h.each(o,function(o,i){i.name.toLowerCase().indexOf(e)>-1&&(t[n]=t[n]||[],t[n].push(i))})}),h.each(t,function(e,t){var i=['<div class="brand-list bar-',n,'">'];n++,i.push('<div class="title-bar"><h2>'),i.push(e),i.push("</h2></div>"),h.each(t,function(e,t){i.push('<p><a href="'+t.url+'">'+t.name),t.isNew&&i.push('<i class="icon-hot">HOT</i>'),t.isHot&&i.push('<i class="icon-new">NEW</i>'),i.push("</a></p>")}),i.push("</div>"),o+=i.join("")})),h(".search-result").html(o),i()}var s,r,l,d,c,u,h=e("jquery"),p=e("hammer"),f=e("swiper"),m=e("lazyload"),g=h(".brand-list"),v=h(".search-icon"),w=h(".newbrand-search").outerHeight(),y=h(".yoho-header").outerHeight(),b=parseInt(w)+parseInt(y)-1;s=new f(".swiper-container",{lazyLoading:!0,loop:!0,autoplay:3e3,pagination:".swiper-pagination .pagination-inner"}),m(h("img.lazy")),h(".yoho-header").css({"z-index":2,position:"fixed",top:0}),r=h('<div class="title-bar fixed-title-bar"><h2></h2></div>'),r.css({position:"fixed",top:b}).hide(),l=b+h(".hot-brand").outerHeight()+h(".banner-top").outerHeight(),g.last().append(r),h(window).scroll(function(){window.requestAnimationFrame(o)}),i(),h(".brand-search-page").length&&(d=h.parseJSON(h("#brands-data").html()),c=h("#keyword"),c.on("input",function(){c.val().length?(v.css("color","#000"),h(this).closest(".search-box").css("width","11.25rem"),h(".search-action").show()):(v.css("color","#b2b2b2"),h(this).closest(".search-box").css("width","12.5rem"),h(".search-action").hide()),a()}).focus(),u=new p(h(".clear-text")[0]),u.on("tap",function(e){e.preventDefault(),h(".search-result").html(""),h("#keyword").val("").trigger("input"),e.srcEvent.stopPropagation()}),h("form.search-box").on("submit",function(){return!1}))}),define("js/guang/entry",["jquery","lazyload","swiper","hammer","mlellipsis","iscroll-probe","index"],function(e,t,n){e("js/guang/plus-star/list"),e("js/guang/plus-star/detail"),e("js/guang/home"),e("js/guang/list"),e("js/guang/detail")}),define("js/guang/plus-star/list",["jquery","lazyload","swiper","index"],function(e,t,n){var o,i=e("jquery"),a=e("lazyload"),s=e("swiper"),r=i("#nav-tab > li"),l=i("#ps-content > .content");a(i("img.lazy")),o=new s(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination"}),i("#nav-tab").bind("contextmenu",function(e){return!1}),i("#nav-tab").on("touchend touchcancel",function(e){var t=i(e.target).closest("li");t.hasClass("focus")||(r.toggleClass("focus"),l.toggleClass("hide"),i(document).trigger("scroll"))}),i("#nav-tab").on("touchstart",function(e){var t=e.target||e.srcElement;t.className="bytouch "+t.className}).on("touchend touchcancel",function(){r.removeClass("bytouch")})}),define("js/guang/plus-star/detail",["jquery","hammer","mlellipsis","lazyload"],function(e,t,n){var o,i,a,s,r=e("jquery"),l=e("hammer"),d=e("mlellipsis"),c=e("lazyload"),u=r("#intro"),h=r("#intro-more-txt"),p=r("#related-infos-container"),f=e("js/guang/info"),m=e("js/plugin/tip"),g=r("#brand-info").data("id"),v=r("#jump-to-app").val();e("js/plugin/wx-share"),d.init(),c(r("img.lazy")),u[0].mlellipsis(3),setTimeout(function(){o=u.text(),i=u.attr("title")}),f.initInfosEvt(p),a=new l(document.getElementById("more-intro")),a.on("tap",function(e){var t=r(e.target).closest("#more-intro");t.toggleClass("spread"),t.hasClass("spread")?(u.text(i),h.text("收起")):(u.text(o),h.text("more"),r(window).scrollTop(0,400)),e.preventDefault()}),s=new l(document.getElementById("brand-like")),s.on("tap",function(e){var t="ok",n=r(e.target);"1"!==v&&(e.preventDefault(),n.hasClass("like")&&(t="cancel"),r.ajax({type:"POST",url:"/guang/opt/favoriteBrand",data:{id:g,opt:t},success:function(e){200===e.code?n.toggleClass("like"):400===e.code||412===e.code?location.href=e.data:m.show(e.message)},error:function(){m.show("网络断开连接了~")}}))})}),define("js/guang/info",["jquery","hammer","mlellipsis","lazyload"],function(e,t,n){function o(e){d(e.find("img.lazy")),e.each(function(){var e=s(this),t=e.find(".info-title"),n=e.find(".info-text");t[0].mlellipsis(2),n[0].mlellipsis(2)})}function i(e){var t;"undefined"!=typeof e&&(t=new r(e[0]),t.on("tap",function(e){var t,n,o=s(e.target),i="ok";return t=o.closest(".like-btn"),t.length>0?(e.preventDefault(),t.hasClass("like")&&(i="cancel"),n=o.closest(".guang-info"),void s.ajax({type:"POST",url:"/guang/opt/praiseArticle",data:{id:n.data("id"),opt:i},success:function(e){var n=e.code;200===n&&(t.next(".like-count").text(e.data),t.toggleClass("like"))},error:function(){c.show("网络断开连接了~")}})):(t=o.closest(".collect-btn"),void(t.length>0&&(e.preventDefault(),t.hasClass("collected")&&(i="cancel"),n=o.closest(".guang-info"),s.ajax({type:"POST",url:"/guang/opt/collectArticle",data:{id:n.data("id"),opt:i},success:function(e){e.code&&200===e.code&&t.toggleClass("collected")},error:function(){c.show("网络断开连接了~")}}))))}),o(e.find(".guang-info")))}function a(e,t,n){var i;m||t.end||(1===t.page&&u.showLoadingMask(),i=e.find(".guang-info").length,m=!0,s.ajax({type:"GET",url:n?n:"/guang/index/page",data:t,success:function(n){var a;return" "===n?(t.end=!0,m=!1,p.addClass("hide"),void f.removeClass("hide")):(e.append(n),a=i>0?e.find(".guang-info:gt("+(i-1)+")"):e.find(".guang-info"),o(a),1===t.page&&(u.hideLoadingMask(),p.removeClass("hide"),window.rePosFooter()),t.page++,void(m=!1))},error:function(){c.show("网络断开连接了~"),m=!1}}))}var s=e("jquery"),r=e("hammer"),l=e("mlellipsis"),d=e("lazyload"),c=e("js/plugin/tip"),u=e("js/plugin/loading"),h=s("#load-more-info"),p=s(""),f=s(""),m=!1;l.init(),h.length>0&&(p=h.children(".loading"),f=h.children(".no-more")),t.initInfosEvt=i,t.setLazyLoadAndMellipsis=o,t.loadMore=a}),define("js/plugin/tip",["jquery"],function(e,t,n){function o(e,t){var n,o;"undefined"!=typeof e&&(n=e.toString(),o=t&&t>0?t:2e3,i.text(n).show(),a=setTimeout(function(){"block"===i.css("display")&&i.hide()},o))}var i,a,s=e("jquery");!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';s(".yoho-page").append(e),i=s("#yoho-tip"),i.on("touchend",function(){i.hide(),clearTimeout(a)})}(),t.show=o}),define("js/plugin/loading",["jquery"],function(e,t,n){function o(e){var t='<div class="loading-mask hide"><div class="loading"></div></div>';d=!0,void 0===e&&(e=l),e.append(t),s=e.children(".loading-mask")}function i(){d||(o(),d=!0),s.removeClass("hide")}function a(){s.addClass("hide")}var s,r=e("jquery"),l=r(".yoho-page"),d=!1;t.init=o,t.showLoadingMask=i,t.hideLoadingMask=a}),define("js/plugin/wx-share",["jquery"],function(e,t,n){var o=e("jquery");n.exports=function(){var e="http://www.yohoshow.com/api/wechat/getSignPackage";o.getJSON(e+"?pageurl="+encodeURIComponent(location.href.split("#")[0])+"&callback=?",function(e){var t,n,o,i;void 0!==e&&""!==e&&(t=e.appId.toString(),n=e.timestamp,o=e.nonceStr.toString(),i=e.signature.toString(),wx.config({debug:!1,appId:t,timestamp:n,nonceStr:o,signature:i,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}))}),wx.ready(function(){var e=o("#shareTitle").val(),t=o("#shareImg").val(),n=o("#shareDesc").val(),i=o("#shareLink").val(),a={title:e,desc:n,imgUrl:t,link:i};wx.onMenuShareAppMessage(a),wx.onMenuShareTimeline(a),wx.onMenuShareQQ(a),wx.onMenuShareWeibo(a)})}}),define("js/guang/home",["jquery","swiper","hammer","mlellipsis","lazyload","index"],function(e,t,n){function o(){var e=f.not(".hide");a(window).scrollTop()+h>=a(document).height()-.25*e.height()&&l(e,w[v])}var i,a=e("jquery"),s=e("swiper"),r=e("js/guang/info"),l=r.loadMore,d=a("#load-more-info"),c=a(""),u=a(""),h=a(window).height(),p=a("#info-list"),f=p.children(".info-list"),m=a("#guang-nav"),g=m.children(".focus"),v=g.data("type"),w={};d.length>0&&(c=d.children(".loading"),u=d.children(".no-more")),i=new s(".swiper-container",{lazyLoading:!0,pagination:".swiper-pagination",autoplay:3e3}),r.initInfosEvt(p),function(){var e=a("#gender").val();m.children(".guang-nav-item").each(function(){var t=a(this).data("type"),n=a(this).hasClass("focus");w[t]={page:n?2:1,gender:e,type:t,end:!1}})}(),m.bind("contextmenu",function(e){return!1}),m.on("touchend touchcancel",function(e){var t,n,o=a(e.target).closest(".guang-nav-item");o.hasClass("focus")||(n=o.index(),o.addClass("focus"),g.removeClass("focus"),t=f.eq(n),g=o,v=o.data("type"),1===w[v].page?(c.addClass("hide"),u.addClass("hide"),l(t,w[v])):w[v].end?(c.addClass("hide"),u.removeClass("hide")):(c.removeClass("hide"),u.addClass("hide")),f.not(".hide").addClass("hide"),t.removeClass("hide"),1===w[v].page&&window.rePosFooter())}),a(document).scroll(function(){window.requestAnimationFrame(o)}),m.on("touchstart",function(e){var t=e.target||e.srcElement;t.className="bytouch "+t.className}).on("touchend touchcancel",function(){m.find("li").removeClass("bytouch")})}),define("js/guang/list",["jquery","hammer","mlellipsis","lazyload"],function(e,t,n){function o(){i(window).scrollTop()+r>=i(document).height()-.25*p.height()&&s(p,h)}var i=e("jquery"),a=e("js/guang/info"),s=a.loadMore,r=i(window).height(),l=i("#author-infos"),d=i("#tag"),c=i("#gender"),u=i("#isApp"),h={page:2,end:!1},p=i("#info-list");a.initInfosEvt(p),l.length>0&&i.extend(h,{authorId:l.data("id"),isApp:u.val()}),d.length>0&&i.extend(h,{tag:d.val(),gender:c.val(),isApp:u.val()}),i(window).scroll(function(){window.requestAnimationFrame(o)})}),define("js/guang/detail",["jquery","mlellipsis","lazyload","iscroll-probe"],function(e,t,n){function o(e){var t=e.offset().left,n=-C+t+y/2+"px";r.css({backgroundPosition:n+" bottom"}),v&&b.css({backgroundPosition:n+" bottom"})}function i(e){var t,n,i,a=h(e.currentTarget),p=a.index();a.hasClass("focus")||(l.filter(".focus").removeClass("focus"),v&&(t=a.closest(".fixed-thumb-container").length>0?r:b,n=t.find(".thumb").eq(p),b.find(".thumb.focus").removeClass("focus"),n.addClass("focus")),a.addClass("focus"),o(a),d.not(".hide").addClass("hide"),i=d.eq(p),i.removeClass("hide"),f(i.find(".lazy")),v?u&&u.scrollToElement(c,400):h("body").animate({scrollTop:s.offset().top},400),u&&u.refresh())}function a(){var e,t,n,o,i,a=h("#scroller"),l=h(".yoho-header"),d=0;return l.length>0&&(d=l.outerHeight()),u=new m("#wrapper",{probeType:3,mouseWheel:!0,click:!0}),document.addEventListener("touchmove",function(e){e.preventDefault()},!1),w?(e=h(window).height()-d,i=b[0],t=r.outerHeight(),n=s.outerHeight(),o=s.offset().top-d,void u.on("scroll",function(){var s=-this.y,r=i.className;o-e+t>=s?-1===r.indexOf("fixed-bottom")&&b.addClass("fixed-bottom").removeClass("hide"):o>=s?-1===r.indexOf("hide")&&b.addClass("hide").removeClass("fixed-bottom fixed-top"):o+n-t>=s?-1===r.indexOf("fixed-top")&&b.addClass("fixed-top").removeClass("hide absolute").css("top",""):o+n>=s?(-1===r.indexOf("absolute")&&b.addClass("absolute").removeClass("fixed-top hide"),i.style.top=o+d+n-t-s+"px"):s>o+n&&-1===r.indexOf("hide")&&b.addClass("hide").removeClass("absolute"),a.trigger("scroll")})):void u.on("scroll",function(){a.trigger("scroll")})}var s,r,l,d,c,u,h=e("jquery"),p=e("mlellipsis"),f=e("lazyload"),m=e("iscroll-probe"),g=h(".author .intro"),v=!1,w=h(".collocation-block").length>0?!0:!1,y=0,b=h(""),c=document.querySelector("#wrapper .collocation-block"),C=h(window).width();e("js/plugin/wx-share")(),window.onload=function(){u&&u.refresh()},t.i=function(e){var t=navigator.userAgent.indexOf("iPhone")>0?!0:!1;v=t&&e,p.init(),f(h(".lazy")),h(".info-list .title, .one-good .reco-name").each(function(){this.mlellipsis(2)}),g.offset()&&parseInt(g.offset().left,10)===parseInt(g.css("margin-left"),10)&&g.css("padding-top",0),v&&(h(".yoho-header").length>0?h("#wrapper").addClass("ios has-head"):h("#wrapper").addClass("ios")),w&&(s=h(".collocation-block"),r=s.children(".thumb-container"),l=r.find("li"),d=s.find(".prod"),y=l.width(),v&&(b=h("#wrapper").after(r.clone().addClass("fixed-thumb-container fixed-bottom")).next(".thumb-container"),f(b.find(".lazy"),{event:"sporty"})),o(l.filter(".focus")),r.delegate(".thumb","touchend",i),v&&b.delegate(".thumb","touchend",i)),v&&a()}}),define("js/home/entry",["jquery","hammer","swiper","lazyload","index"],function(e,t,n){e("js/home/home"),e("js/home/maybe-like")}),define("js/home/home",["jquery","hammer","swiper","lazyload","index"],function(e,t,n){function o(){b.hasClass("menu-open")&&(b.removeClass("menu-open"),g(".overlay").hide(),g(".sub-nav").removeClass("show"),j.removeClass("on"),g("body").css({height:"auto",overflow:"auto"}))}function i(){k+=10,q.css({transform:"rotateX("+k+"deg)","-webkit-transform":"rotateX("+k+"deg)","-moz-transform":"rotateX("+k+"deg)"}),k/90%2===1&&(E?(q.addClass("animate"),E=!1):(q.removeClass("animate"),E=!0)),k/90%2===0&&k%360!==0?window.setTimeout(i,3e3):k%360===0?window.setTimeout(i,6e4):c(function(){i()})}var a,s,r,l,d,c,u,h,p,f,m,g=e("jquery"),v=e("hammer"),w=e("swiper"),y=e("lazyload"),b=g(".mobile-wrap"),C=g(".overlay"),j=g(".side-nav"),x=g(".sub-nav"),k=0,q=g(".home-header .logo"),E=!0;e("js/home/maybe-like"),y(g("img.lazy")),m=new v(g(".nav-btn")[0]),m.on("tap",function(e){return e.preventDefault(),b.addClass("menu-open"),C.show().css("opacity",.3),j.addClass("on"),g("body").css({height:g(window).height(),width:g(window).width(),overflow:"hidden"}),e.srcEvent.stopPropagation(),!1}),g(".overlay").on("touchstart",function(e){return o(),!1}),j.on("touchstart","li",function(e){return g(this).find(".sub-nav").size()>0&&(g(".sub-nav").removeClass("show"),g(this).find(".sub-nav").addClass("show")),e.stopPropagation(),e.target.pathname===location.pathname?(o(),!1):void 0}),x.each(function(){g(this).find("li").eq(0).on("touchstart",function(e){return g(".sub-nav").removeClass("show"),e.stopPropagation(),!1})}).on("touchstart",function(e){e.currentTarget!==e.target&&x.find("li").removeClass("current")}),j.children("ul").children("li").on("touchstart",function(){j.children("ul").children("li").css("background","#fff"),g(this).css("background","#eee")}).on("touchend touchcancel",function(){g(this).css("background","#fff")}),g(".banner-swiper").find("li").size()>1&&(a=new w(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"})),r=new w(".brands-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"brands-list",slideElement:"li"}),s=new w(".recommend-swiper",{grabCursor:!0,slidesPerView:"auto",wrapperClass:"recommend-list",slideElement:"li"}),g(".trend-topic-swiper").find("li").size()>1&&(l=new w(".trend-topic-swiper",{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".trend-topic-content .pagination-inner"})),g(".category-swiper").each(function(e,t){p="category-swiper"+e,g(this).addClass(p),g("."+p).find(".swiper-slide").size()>1&&(d=new w("."+p,{loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:"."+p+" .pagination-inner"}))}),c=function(){var e=null,t=["webkit","moz","ms"];for(h=0;h<t.length;h++)u=t[h]+"RequestAnimationFrame",window[u]&&(f=!0,e=u);return f?function(t){window[e](t)}:function(e){window.setTimeout(e,67)}}(),setTimeout(i,3e3),g(".home-header .iconfont").on("touchstart",function(){g(this).addClass("highlight")}).on("touchend touchcancel",function(){g(this).removeClass("highlight")}),g("#yoho-footer").css({"margin-bottom":"2.5rem"}),t.set=function(e){window.setCookie("_Channel",e,{expires:365,domain:".m.yohobuy.com"})}}),define("js/home/maybe-like",["jquery","hammer","lazyload"],function(e,t,n){function o(){v||(v=!0,p.showLoadingMask(),c.ajax({type:"GET",url:r,data:{page:w+1},success:function(e){return" "===e?(v=!1,p.hideLoadingMask(),void(y&&(r="1,3"===y?"/boys/bottomBanner":"/girls/bottomBanner",c.ajax({type:"GET",url:r,success:function(e){e&&e.img&&(c("#load-more-img").show(),c("#load-more-img a").attr("href",e.url),c("#load-more-img a > img").attr("src",e.img))},error:function(){}})))):(s=g.find(".good-info").length,g.append(e),f(0===s?g.find(".good-info").find("img.lazy"):g.find(".good-info:gt("+(s-1)+")").find("img.lazy")),v=!1,p.hideLoadingMask(),void w++)},error:function(){h.show("网络断开连接了~"),v=!1,p.hideLoadingMask()}}))}function i(){c(window).scrollTop()+m>=c(document).height()-50&&o()}var a,s,r,l,d,c=e("jquery"),u=e("hammer"),h=e("js/plugin/tip"),p=e("js/plugin/loading"),f=e("lazyload"),m=c(window).height(),g=c("#goods-list"),v=!1,w=0,y=null,b=c(".mobile-wrap").hasClass("kids-wrap")?!0:!1,C=c(".mobile-wrap").hasClass("lifestyle-wrap")?!0:!1,j=c("#maybe-like-nav");b?r="/product/recom/maylikekids":C?r="/product/recom/maylikelife":(y=c(".mobile-wrap").hasClass("boys-wrap")?"1,3":"2,3",r="/product/recom/maylike?gender="+y),l=j.children(".focus"),C&&(a=new u(j[0]),a.on("tap",function(e){var t,n=c(e.target).closest("li"),o=c(".goods-list");e.preventDefault(),n.hasClass("focus")||(d=n.index(),n.addClass("focus"),l.removeClass("focus"),o.not(".hide").addClass("hide"),t=o.eq(d),t.removeClass("hide"),l=n,c(document).trigger("scroll"),e.srcEvent.stopPropagation())})),p.init(c(".maybe-like")),c(".maybe-like p").on("touchstart",function(e){o()}),c(window).scroll(function(){window.requestAnimationFrame(i)})}),define("js/index/entry",["jquery","hammer"],function(e,t,n){e("js/index/search"),e("js/index/footer"),e("js/index/channel")}),define("js/index/search",["jquery","hammer"],function(e,t,n){var o,i,a=e("jquery"),s=e("js/plugin/security"),r=e("hammer"),l=a("#search-input input"),d=a("#search-input .clear-input"),c=a(".search-icon"),u=a("#search-form"),h=a(".history"),p=a("#clear-history"),f=e("js/index/write-search"),m=f.getRanToken();o=new r(p[0]),o.on("tap",function(){localStorage.removeItem("historys"),h.html("")}),l.on("input",function(){""===l.val()?(c.css("color","#b2b2b2"),d.addClass("hide")):(c.css("color","#666"),d.removeClass("hide"))}),i=new r(d[0]),i.on("tap",function(){l.val("").trigger("input")}),a("#search").on("touchend",function(){return s.hasDangerInput()?!1:(a(this).closest("form").submit(),!1)}),function(){var e,t,n,o="";if(localStorage&&(t=localStorage.getItem("historys"),t&&t.length>0)){for(t=t.split(m),n=0;n<t.length;n++)e=t[n],""!==e&&(o+='<li><a href="/?query='+e+'">'+e+"</li>");h.html(o),p.removeClass("hide")}}(),f.bindWirteLocal(u)}),define("js/plugin/security",["jquery"],function(e,t,n){function o(e){var t,n,o,s=i("input[type!=hidden], textarea"),r=/['"<>&\|]|--/g,l=s.length,d=void 0===e||"boolean"!=typeof e?!0:e;for(n=0;l>n;n++)if(t=s.eq(n).val(),r.test(t))return d?s.eq(n).val(t.replace(r," ")):(o=t.match(r).join(" "),a.show("不可以输入 "+o+" 哦!")),!d&&!0;return!1}var i=e("jquery"),a=e("js/plugin/tip");t.hasDangerInput=o}),define("js/index/write-search",[],function(e,t,n){function o(){return a}function i(e){e.on("submit",function(){var e,t=this.query.value;if(localStorage){if(e=localStorage.getItem("historys"),e=e?e:"",e.indexOf(a+t+a)>-1)return;""===e&&(t=a+t),e+=t+a,localStorage.setItem("historys",e)}})}var a=" ??++ ";t.getRanToken=o,t.bindWirteLocal=i}),define("js/index/footer",["jquery","hammer"],function(e,t,n){function o(){var e="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445",t=new Date;setTimeout(function(){new Date-t<2e3&&(window.location=e)},500)}var i,a=e("jquery"),s=e("hammer");e("js/common"),a("#float-layer-close").on("touchend",function(e){return a("#float-layer-app").hide(),window.setCookie("_float-layer-app","id490655927",{domain:".yohobuy.com"}),window.setCookie("_float-layer-app-close",1,{domain:".yohobuy.com",expires:1}),!1}),a("#float-layer-btn")&&a("#float-layer-btn")[0]&&(i=new s(a("#float-layer-btn")[0]),i.on("tap",function(e){o("bottom"),e.srcEvent.stopPropagation()}),"function"!=typeof window.cookie||window.cookie("_float-layer-app")?a("#float-layer-app").hide():a("#float-layer-app").show())}),define("js/index/channel",["jquery"],function(e,t,n){function o(){var e=window.innerHeight,t=p.height(),n=h.scrollTop();w?i=y-e>200?n+y+x>=t?0:t-y-n-x:t-e-n:(y=e,i=t-e-n+x,w=!0),f.css({position:"relative",bottom:i+"px"})}var i,a=e("jquery"),s=e("js/plugin/security"),r=a(".search-box"),l=a(".box"),d=a(".index-search"),c=a(".index-logo"),u=a(".index-channel a"),h=a(window),p=a(document),f=a("#float-layer-app"),m=r.children('input[type="text"]'),g=l.children(".no-search"),v=r.children(".search-icon"),w=!1,y=0,b=f.height(),C=parseInt(f.css("padding-top")),j=parseInt(f.css("padding-bottom")),x=b+C+j;e("js/common"),m.on("focus",function(){l.addClass("action"),c.addClass("action")}).on("input",function(){""===m.val()?v.addClass("empty"):v.removeClass("empty")}),g.on("touchend",function(){return l.removeClass("action"),c.removeClass("action"),m.blur(),!1}),r.children(".clear-text").on("touchstart",function(){m.val("").focus().trigger("input")}),r.children(".search-icon").on("touchstart",function(){return s.hasDangerInput()?!1:void d.submit()}),a(".index-channel img").on("load error",function(){window.rePosFooter&&window.rePosFooter()}),u.on("touchstart",function(){u.css({background:"#000",color:"#fff",borderColor:"#fff"}),a(this).css({background:"rgba(255, 255, 255, 0.5)",color:"#000",borderColor:"#000"})}).on("touchend touchcancel",function(){a(this).css({background:"#000",color:"#fff",borderColor:"#fff"})}),a(window).scroll(function(){window.requestAnimationFrame(o)}),p.on("ready",o)}),define("js/passport/entry",["jquery"],function(e,t,n){e("js/passport/register/register"),e("js/passport/register/code"),e("js/passport/register/password"),e("js/passport/login/login"),e("js/passport/login/international"),e("js/passport/back/mobile"),e("js/passport/back/code"),e("js/passport/back/email"),e("js/passport/back/email-success"),e("js/passport/back/new-password")}),define("js/passport/register/register",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#phone-num"),a=o("#country-select"),s=o("#area-code"),r=o("#btn-next"),l=e("js/passport/api"),d=e("js/plugin/tip"),c=o.trim,u=d.show;l.selectCssHack(o("#country-select")),l.bindClearEvt(),i.bind("input",function(){""===c(i.val())?r.addClass("disable"):r.removeClass("disable")}),a.change(function(){s.text(a.val())}),r.on("touchstart",function(){var e=c(i.val()),t=a.val();r.hasClass("disable")||(l.phoneRegx[t].test(e)?o.ajax({url:"/passport/reg/verifymobile",type:"POST",data:{areaCode:t.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:u(e.message)}}):u("手机号格式不正确,请重新输入"))})}),define("js/passport/api",["jquery"],function(e,t,n){function o(e){var t,n=r(".has-eye");e&&"open"===e.status?n.append('<div class="eye"></div>'):n.append('<div class="eye close"></div>'),t=n.children(".eye"),t.on("touchstart",function(e){var t=r(this),n=t.siblings(".pwd");e.preventDefault(),t.toggleClass("close"),t.hasClass("close")?n.attr("type","password"):n.attr("type","text"),n.focus()})}function i(){var e,t=r(".has-clear");t.append('<div class="clear-input"></div>'),e=t.children(".clear-input"),e.on("touchstart",function(t){var n=e.siblings(".input");n.val("").trigger("input").focus(),t.preventDefault()}),t.children(".input").bind("input",function(){var e=r(this),t=e.siblings(".clear-input"),n=l(e.val());""===n?t.hide():t.show()})}function a(e){return e.length>=6&&e.length<=20?!0:!1}function s(e){function t(){var t=e.find("option:selected").text().length;switch(t){case 2:e.outerWidth(90);break;case 3:e.outerWidth(110);break;default:e.outerWidth(130)}}var n=navigator.userAgent;n.match(/uc/i)&&n.match(/android/i)?e.change(function(){t()}):e.removeClass("in-android-uc")}var r=e("jquery"),l=r.trim,d=/^([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/,c={"+86":/^1[35847]{1}[0-9]{9}$/,"+852":/^[965]{1}[0-9]{7}$/,"+853":/^[0-9]{8}$/,"+886":/^[0-9]{10}$/,"+65":/^[98]{1}[0-9]{7}$/,"+60":/^1[1234679]{1}[0-9]{8}$/,"+1":/^[0-9]{10}$/,"+82":/^01[0-9]{9}$/,"+44":/^7[789][0-9]{8}$/,"+81":/^0[9|8|7][0-9]{9}$/,"+61":/^[0-9]{11}$/};n.exports={emailRegx:d,phoneRegx:c,bindEyesEvt:o,bindClearEvt:i,pwdValidate:a,selectCssHack:s}}),define("js/passport/register/code",["jquery"],function(e,t,n){e("js/passport/code")(!0)}),define("js/passport/code",["jquery"],function(e,t,n){var o=e("jquery");n.exports=function(t){function n(){var e,t=59;e=setInterval(function(){0===t?(s.text("重发验证码").removeClass("disable"),clearInterval(e)):s.text("重发验证码 ("+t--+"秒)")},1e3)}var i=o("#captcha"),a=o("#btn-next"),s=o("#captcha-tip"),r=o("#phone-num").val(),l=o("#area-code").val().replace("+",""),d=e("js/passport/api"),c=e("js/plugin/tip"),u=o.trim,h=c.show,p=t?"reg":"back";d.bindClearEvt(),i.bind("input",function(){""!==u(i.val())?a.removeClass("disable"):a.addClass("disable")}),s.on("touchstart",function(){s.hasClass("disable")||o.ajax({type:"POST",url:"/passport/"+p+"/sendcode",data:{phoneNum:r,areaCode:l},success:function(e){200===e.code?(s.text("重发验证码 (60秒)").addClass("disable"),n()):h(e.message)}})}),a.on("touchstart",function(){a.hasClass("disable")||o.ajax({type:"POST",url:"/passport/"+p+"/verifycode",data:{phoneNum:r,areaCode:l,code:u(i.val()),token:o("#token").val()},success:function(e){200===e.code?location.href=e.data:h(e.message)}})}),n()}}),define("js/passport/register/password",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#pwd"),a=o("#btn-sure"),s=e("js/passport/api"),r=e("js/plugin/tip"),l=o.trim,d=r.show;s.bindEyesEvt({status:"open"}),i.bind("input",function(){""===l(i.val())?a.addClass("disable"):a.removeClass("disable")}),a.on("touchstart",function(){var e=l(i.val());a.hasClass("disable")||(s.pwdValidate(e)===!1?d("密码6-20位,请重新输入"):o.ajax({type:"POST",url:"/passport/reg/setpassword",data:{password:e,phoneNum:o("#phone-num").val(),areaCode:o("#area-code").val(),token:o("#token").val()},success:function(e){200===e.code?(d("注册成功"),setTimeout(function(){location.href=e.data},1e3)):d(e.message)}}))})}),define("js/passport/login/login",["jquery"],function(e,t,n){function o(){h&&p?d.removeClass("disable"):d.addClass("disable")}function i(){c.show(),u.show()}function a(){c.hide(),u.hide()}var s=e("jquery"),r=s("#account"),l=s("#pwd"),d=s("#btn-login"),c=s("#retrive-pwd-mask"),u=s("#retrive-pwd-ways"),h=!1,p=!1,f=e("js/passport/api"),m=e("js/plugin/tip"),g=s.trim,v=m.show;f.bindEyesEvt(),f.bindClearEvt(),r.bind("input",function(){h=""!==g(r.val())?!0:!1,o()}),l.bind("input",function(){p=""===g(l.val())?!1:!0,o()}),d.on("touchstart",function(){var e=g(r.val()),t=g(l.val());d.hasClass("disable")||((/^[0-9]+$/.test(e)||f.emailRegx.test(e))&&f.pwdValidate(t)?s.ajax({
type:"POST",url:"/passport/login/auth",data:{account:e,password:t},success:function(e){200===e.code?(v("登录成功"),setTimeout(function(){location.href=e.data},1e3)):v(e.message)},error:function(){v("网络断开连接啦~")}}):v("账号或密码有错误,请重新输入"))}),s("#forget-pwd").on("touchstart",function(){i()}),c.on("touchstart",function(){a()}),s("#cancel-retrive").on("touchstart",function(e){e.preventDefault(),a()}),r.trigger("input"),l.trigger("input")}),define("js/passport/login/international",["jquery"],function(e,t,n){function o(){c&&u?d.removeClass("disable"):d.addClass("disable")}var i=e("jquery"),a=i("#phone-num"),s=i("#country-select"),r=i("#area-code"),l=i("#pwd"),d=i("#btn-login"),c=!1,u=!1,h=e("js/passport/api"),p=e("js/plugin/tip"),f=i.trim,m=p.show;h.selectCssHack(s),h.bindEyesEvt(),h.bindClearEvt(),a.bind("input",function(){c=""===f(a.val())?!1:!0,o()}),l.bind("input",function(){var e=f(l.val());u=""===e?!1:!0,o()}),s.change(function(){r.text(s.val())}),d.on("touchstart",function(){var e=f(a.val()),t=s.val(),n=f(l.val());d.hasClass("disable")||(h.phoneRegx[t].test(e)&&h.pwdValidate(n)?i.ajax({type:"POST",url:"/passport/login/auth",data:{areaCode:t.replace("+",""),account:e,password:n},success:function(e){200===e.code?(m("登录成功"),setTimeout(function(){location.href=e.data},1e3)):m(e.message)},error:function(){m("网络断开连接啦~")}}):m("账号或密码有错误,请重新输入"))}),a.trigger("input"),l.trigger("input")}),define("js/passport/back/mobile",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#phone-num"),a=o("#country-select"),s=o("#area-code"),r=o("#btn-next"),l=e("js/passport/api"),d=e("js/plugin/tip"),c=o.trim,u=d.show;l.selectCssHack(o("#country-select")),l.bindClearEvt(),i.bind("input",function(){""===c(i.val())?r.addClass("disable"):r.removeClass("disable")}),a.change(function(){s.text(a.val())}),r.on("touchstart",function(){var e=c(i.val()),t=a.val();r.hasClass("disable")||(l.phoneRegx[t].test(e)?o.ajax({url:"/passport/back/sendcode",type:"POST",data:{areaCode:t.replace("+",""),phoneNum:e},success:function(e){200===e.code?location.href=e.data:u(e.message)}}):u("手机号格式不正确,请重新输入"))})}),define("js/passport/back/code",["jquery"],function(e,t,n){e("js/passport/code")(!1)}),define("js/passport/back/email",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#email"),a=o("#btn-sure"),s=e("js/passport/api"),r=e("js/plugin/tip"),l=o.trim,d=r.show;s.bindClearEvt(),i.bind("input",function(){""===l(i.val())?a.addClass("disable"):a.removeClass("disable")}),a.on("touchstart",function(){var e=l(i.val());a.hasClass("disable")||(s.emailRegx.test(e)?o.ajax({url:"/passport/back/sendemail",type:"POST",data:{email:e},success:function(e){200===e.code?location.href=e.data:d(e.message)}}):d("邮箱格式不正确,请重新输入"))})}),define("js/passport/back/email-success",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#resend"),a=e("js/plugin/tip"),s=a.show;i.on("touchstart",function(e){e.preventDefault(),o.ajax({url:i.data("url"),type:"GET",success:function(e){s(200===e.code?e.message:e.message)}})})}),define("js/passport/back/new-password",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#pwd"),a=o("#btn-ok"),s=e("js/passport/api"),r=e("js/plugin/tip"),l=o.trim,d=r.show,c=o("#phone-num");s.bindEyesEvt({status:"open"}),i.bind("input",function(){""===l(i.val())?a.addClass("disable"):a.removeClass("disable")}),a.on("touchstart",function(){var e,t,n=l(i.val()),r=!0;a.hasClass("disable")||(e={password:n},0===c.length&&(r=!1),r?(o.extend(e,{phoneNum:c.val(),areaCode:o("#areaCode").val(),token:o("#token").val()}),t="/passport/back/passwordByMobile"):(o.extend(e,{code:o("#email-code").val()}),t="/passport/back/passwordByEmail"),s.pwdValidate(n)?o.ajax({type:"POST",url:t,data:e,success:function(e){200===e.code?(d("密码修改成功"),setTimeout(function(){location.href=e.data},1e3)):d(e.message)}}):d("密码6-20位,请重新输入"))})}),define("js/product/entry",["jquery","swiper","lazyload","hammer","index"],function(e,t,n){e("js/product/newsale/newarrival"),e("js/product/newsale/discount"),e("js/product/list"),e("js/product/detail/detail"),e("js/product/detail/desc")}),define("js/product/newsale/newarrival",["jquery","swiper","lazyload","index"],function(e,t,n){function o(e){var t,n,o,i,a,u,f={};if(!d){if(e){for(n in E)E.hasOwnProperty(n)&&(E[n].reload=!0);switch(q.children(".active").removeClass("active"),T.addClass("active"),e.type){case"gender":t={gender:e.id};break;case"brand":t={brand:e.id};break;case"sort":t={sort:e.id};break;case"color":t={color:e.id};break;case"size":t={size:e.id};break;case"price":t={price:e.id};break;case"discount":t={discount:e.id};break;case"limit":t={limit:e.id};break;case"channel":t={channel:e.id};break;case"p_d":t={p_d:e.id}}c.extend(b,t)}if(T.hasClass("today")?(i="today",a=1):T.hasClass("week")?(i="week",a=2):T.hasClass("sale")&&(i="sale",a=3),o=E[i],u=o.page+1,o.reload)u=1;else if(o.end)return;c.extend(f,b,{dayLimit:a,page:u}),d=!0,m.showLoadingMask(),c.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:f,success:function(e){var t,n;switch(i){case"today":t=s;break;case"week":t=r;break;case"sale":t=l}" "===e?(o.end=!0,o.reload&&t.html(y)):o.reload?(t.html(e),h(t.find(".lazy"))):(n=t.find(".good-info").length,t.append(e),h(t.find(".good-info:gt("+(n-1)+") .lazy"))),o.reload=!1,o.page=u,d=!1,m.hideLoadingMask(),window.rePosFooter()},error:function(){p.show("网络断开连接了~"),d=!1,m.hideLoadingMask()}})}}function i(){c(window).scrollTop()+w>c(document).height()-.25*g.height()-50&&void 0!==T&&o()}var a,s,r,l,d,c=e("jquery"),u=e("swiper"),h=e("lazyload"),p=e("js/plugin/tip"),f=e("js/plugin/filter"),m=e("js/plugin/loading"),g=c("#goods-container"),v=g.children(),s=c(v.get(0)),r=c(v.get(1)).addClass("hide"),l=c(v.get(2)).addClass("hide"),w=c(window).height(),y='<p class="no-result">未找到相关搜索结果</p>',b=e("js/product/extract-url"),C=c.extend({},b),j=new Date,x=j.getMonth()+1,k=j.getDate(),q=c("#list-nav"),E={today:{reload:!0,page:0,end:!1},week:{reload:!0,page:0,end:!1},sale:{reload:!0,page:0,end:!1}},T=q.find(".active");e("js/product/suspend-cart"),c("#today a").text(x+"月"+k+"号"),c(".swiper-container .swiper-slide").length>1&&(a=new u(".swiper-container",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"})),c.ajax({type:"GET",url:"/product/newsale/filter",data:b,success:function(e){g.append(e),f.initFilter({fCbFn:o,hCbFn:function(){T.addClass("active"),T.siblings(".filter").removeClass("active")}})}}),h(c(".lazy")),q.bind("contextmenu",function(e){return!1}),q.on("touchend touchcancel",function(e){var t,n,i,a=c(e.target).closest("li");if(e.preventDefault(),a.hasClass("filter"))a.hasClass("active")?(f.hideFilter(),T.addClass("active"),a.removeClass("active")):(T=a.siblings(".active"),T.removeClass("active"),a.addClass("active"),f.showFilter());else{if(a.hasClass("today")?n="today":a.hasClass("week")?n="week":a.hasClass("sale")&&(n="sale"),t=E[n],!a.hasClass("active")){if(i=a.siblings(".active"),T=a,i.hasClass("filter"))f.hideFilter();else{switch(g.children(".container:not(.hide)").addClass("hide"),n){case"today":s.removeClass("hide");break;case"week":r.removeClass("hide");break;case"sale":l.removeClass("hide")}f.resetFilter(),b=c.extend({},C)}i.removeClass("active"),a.addClass("active")}t.reload&&o()}e.stopPropagation()}),c(window).scroll(function(){window.requestAnimationFrame(i)}),o(),q.on("touchstart","li",function(e){c(this).addClass("bytouch")}).on("touchend touchcancel",function(){q.find("li").removeClass("bytouch")})}),define("js/plugin/filter",["jquery"],function(e,t,n){function o(){h.addClass("hide")}function i(){h.removeClass("hide")}function a(){var e=g(".filter-body .classify");e.on("touchstart",".shower",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",".shower",function(){g(this).removeClass("highlight")})}function s(){var e=g(".filter-body .sub-item");e.on("touchstart",function(){e.removeClass("highlight"),g(this).addClass("highlight")}).on("touchend touchcancel",function(){g(this).removeClass("highlight")})}function r(e){e.hasClass("active")||(e.siblings(".active").removeClass("active"),e.addClass("active"))}function l(e){var t,n,o=e.closest(".sub-classify"),i=o.siblings(".shower");return e.hasClass("chosed")?o:(o.children(".chosed").removeClass("chosed"),e.addClass("chosed"),t=g.trim(e.html()),n=g.trim(i.html()),i.html(n.substring(0,n.indexOf("</span>")+7)+t.substring(0,t.indexOf("<i"))),0===e.index()?i.addClass("default"):i.removeClass("default"),o)}function d(e){var t,n=e.data("id");t=l(e),p&&p({type:t.data("type"),id:n}),o()}function c(e){p=e.fCbFn,f=e.hCbFn,m=e.missStatus,a(),s(),h=g(".filter-mask"),h.on("touchend",function(e){var t,n=g(e.target);e.preventDefault(),n.closest(".filter-body").length>0?(t=n.closest(".sub-item"),t.length>0?(t=n.closest("li"),d(t)):(t=n.closest(".classify-item"),e.stopPropagation(),r(t))):(o(),f&&f())})}function u(){"undefined"!=typeof h&&(g(".sub-classify").each(function(){l(g(this).children(":first-child"))}),r(g(".classify > :first-child")))}var h,p,f,m,g=e("jquery");t.initFilter=c,t.showFilter=i,t.hideFilter=o,t.resetFilter=u}),define("js/product/extract-url",[],function(e,t,n){var o,i,a,s={},r=window.location.search.split("?")[1],l=r.split("&");for(o=l.length;o>0;o--)switch(i=l[o-1].split("="),a=i[1],i=i[0]){case"gender":s.gender=a;break;case"brand":s.brand=a;break;case"sort":s.sort=a;break;case"msort":s.msort=a;break;case"misort":s.misort=a;break;case"color":s.color=a;break;case"size":s.size=a;break;case"price":s.price=a;break;case"discount":s.discount=a;break;case"query":s.query=a;break;case"style":s.style=a;break;case"limit":s.limit=a;break;case"channel":s.channel=a;break;case"p_d":s.p_d=a;break;case"dayLimit":s.dayLimit=a}n.exports=s}),define("js/product/suspend-cart",["jquery"],function(e,t,n){var o=e("jquery"),i=o("#suspend-cart");o.ajax({type:"GET",url:"/cart/index/count",success:function(e){200===e.code&&i.find(".cart-count").html(e.data.cart_goods_count).removeClass("hide")}})}),define("js/product/newsale/discount",["jquery","swiper","lazyload","index"],function(e,t,n){function o(e){var t,n,o,i,a,l={};if(!s){if(e){for(n in j)j.hasOwnProperty(n)&&(j[n].reload=!0);switch(C.children(".active").removeClass("active"),x.addClass("active"),e.type){case"gender":t={gender:e.id};break;case"brand":t={brand:e.id};break;case"sort":t={sort:e.id};break;case"color":t={color:e.id};break;case"size":t={size:e.id};break;case"price":t={price:e.id};break;case"discount":t={discount:e.id}}r.extend(b,t)}if(x.hasClass("new")?i="newest":x.hasClass("price")?i="price":x.hasClass("discount")&&(i="discount"),o=j[i],a=o.page+1,o.reload)a=1;else if(o.end)return;r.extend(l,b,{type:i,order:o.order,page:a}),s=!0,h.showLoadingMask(),r.ajax({type:"GET",url:"/product/newsale/selectNewSale",data:l,success:function(e){var t,n;switch(i){case"newest":t=m;break;case"price":t=g;break;case"discount":t=v}" "===e?(o.end=!0,o.reload&&t.html(y)):o.reload?(t.html(e),d(t.find(".lazy"))):(n=t.find(".good-info").length,t.append(e),d(t.find(".good-info:gt("+(n-1)+") .lazy"))),o.reload=!1,o.page=a,s=!1,h.hideLoadingMask(),window.rePosFooter()},error:function(){c.show("网络断开连接了~"),s=!1,h.hideLoadingMask()}})}}function i(){r(window).scrollTop()+w>r(document).height()-.25*p.height()-50&&void 0!==x&&o()}var a,s,r=e("jquery"),l=e("swiper"),d=e("lazyload"),c=e("js/plugin/tip"),u=e("js/plugin/filter"),h=e("js/plugin/loading"),p=r("#goods-container"),f=p.children(),m=r(f.get(0)),g=r(f.get(1)),v=r(f.get(2)),w=r(window).height(),y='<p class="no-result">未找到相关搜索结果</p>',b=e("js/product/extract-url"),C=r("#list-nav"),j={newest:{order:1,reload:!0,page:0,end:!1},price:{order:0,reload:!0,page:0,end:!1},discount:{order:0,reload:!0,page:0,end:!1}},x=C.find(".active");e("js/product/suspend-cart"),r(".swiper-container .swiper-slide").length>1&&(a=new l(".swiper-container",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner"})),r.ajax({type:"GET",url:"/product/newsale/filter",data:b,success:function(e){p.append(e),u.initFilter({fCbFn:o,hCbFn:function(){x.addClass("active"),x.siblings(".filter").removeClass("active")},missStatus:!0})}}),d(r(".lazy")),C.bind("contextmenu",function(e){return!1}),C.on("touchend touchcancel",function(e){var t,n,i,a=r(e.target).closest("li");if(e.preventDefault(),"undefined"!=typeof a&&0!==a.length){if(a.hasClass("filter"))a.hasClass("active")?(u.hideFilter(),x.addClass("active"),a.removeClass("active")):(x=a.siblings(".active"),x.removeClass("active"),a.addClass("active"),u.showFilter());else{if(a.hasClass("new")?n="newest":a.hasClass("price")?n="price":a.hasClass("discount")&&(n="discount"),t=j[n],a.hasClass("active")){if(a.hasClass("new"))return;(a.hasClass("price")||a.hasClass("discount"))&&(a.find(".icon > .iconfont").toggleClass("cur"),x=a,t.reload=!0,t.order=0===t.order?1:0)}else{if(i=a.siblings(".active"),x=a,i.hasClass("filter"))u.hideFilter();else switch(p.children(".container:not(.hide)").addClass("hide"),n){case"newest":m.removeClass("hide");break;case"price":g.removeClass("hide");break;case"discount":v.removeClass("hide")}i.removeClass("active"),a.addClass("active")}t.reload&&o()}e.stopPropagation()}}),r(window).scroll(function(){window.requestAnimationFrame(i)}),o(),C.on("touchstart","li",function(e){r(this).addClass("bytouch")}).on("touchend touchcancel",function(){C.find("li").removeClass("bytouch")})}),define("js/product/list",["jquery","hammer","lazyload"],function(e,t,n){function o(e){var t,n,o,i,s,r={};if(!a){if(e){for(n in I)I.hasOwnProperty(n)&&(I[n].reload=!0);switch(T.children(".active").removeClass("active"),z.addClass("active"),e.type){case"gender":t={gender:e.id};break;case"brand":t={brand:e.id};break;case"sort":t={sort:e.id};break;case"color":t={color:e.id};break;case"size":t={size:e.id};break;case"price":t={price:e.id};break;case"discount":t={discount:e.id}}d.extend(E,t)}if(z.hasClass("new")?i="newest":z.hasClass("price")?i="price":z.hasClass("discount")&&(i="discount"),o=I[i],s=o.page+1,o.reload)s=1;else if(o.end)return;d.extend(r,E,{type:i,order:o.order,page:s}),a=!0,v.showLoadingMask(),d.ajax({type:"GET",url:"/index/search/search",data:r,success:function(e){var t,n,r='<p class="no-result">未找到相关搜索结果</p>';switch(i){case"newest":n=y;break;case"price":n=b;break;case"discount":n=C}" "===e?(o.end=!0,o.reload&&n.html(r)):o.reload?(n.html(e),u(n.find(".lazy"))):(t=n.find(".good-info").length,n.append(e),u(n.find(".good-info:gt("+(t-1)+") .lazy"))),o.reload=!1,o.page=s,a=!1,v.hideLoadingMask(),window.rePosFooter()}})}}function i(){d(window).scrollTop()+j>d(document).height()-.25*w.height()&&o()}var a,s,r,l,d=e("jquery"),c=e("hammer"),u=e("lazyload"),h=d("#brand-header"),p=d("#intro-box"),f=e("js/plugin/filter"),m=e("js/index/write-search"),g=e("js/plugin/tip"),v=e("js/plugin/loading"),w=d("#goods-container"),y=w.children(".new-goods"),b=w.children(".price-goods"),C=w.children(".discount-goods"),j=d(window).height(),x=d("#search-input input"),k=d(".search-icon"),q=d("#search-input .clear-input"),E=e("js/product/extract-url"),T=d("#list-nav"),I={newest:{order:1,reload:!0,page:0,end:!1},price:{order:0,reload:!0,page:0,end:!1},discount:{order:0,reload:!0,page:0,end:!1}},z=T.find(".active");x.on("input",function(){""===x.val()?(k.css("color","#b2b2b2"),q.addClass("hide")):(k.css("color","#666"),q.removeClass("hide"))}),q.on("touchend",function(){x.val("").trigger("input")}),d("#search").on("touchend",function(){return d(this).closest("form").submit(),!1}),e("js/product/suspend-cart"),d.ajax({type:"GET",url:"/search/filter",data:E,success:function(e){w.append(e),f.initFilter({fCbFn:o,hCbFn:function(){z.addClass("active"),z.siblings(".filter").removeClass("active")}})}}),u(d(".lazy")),m.bindWirteLocal(d("#search-form")),T.bind("contextmenu",function(e){return!1}),T.on("touchend touchcancel",function(e){var t,n,i,a=d(e.target).closest("li");if(a.hasClass("filter"))a.hasClass("active")?(f.hideFilter(),z.addClass("active"),a.removeClass("active")):(z=a.siblings(".active"),z.removeClass("active"),a.addClass("active"),f.showFilter());else{if(a.hasClass("new")?n="newest":a.hasClass("price")?n="price":a.hasClass("discount")&&(n="discount"),t=I[n],a.hasClass("active")){if(a.hasClass("new"))return;(a.hasClass("price")||a.hasClass("discount"))&&(a.find(".icon > .iconfont").toggleClass("cur"),z=a,t.reload=!0,t.order=0===t.order?1:0)}else{if(i=a.siblings(".active"),z=a,i.hasClass("filter"))f.hideFilter();else switch(w.children(".container:not(.hide)").addClass("hide"),n){case"newest":y.removeClass("hide");break;case"price":b.removeClass("hide");break;case"discount":C.removeClass("hide")}i.removeClass("active"),a.addClass("active")}t.reload&&o()}}),d(window).scroll(function(){window.requestAnimationFrame(i)}),h.length>0&&(s=new c(h.children(".btn-intro")[0]),s.on("tap",function(){p.removeClass("hide"),d("body").addClass("overflow-hidden")}),r=new c(document.getElementById("intro-box")),r.on("tap",function(e){var t=d(e.target);e.srcEvent.preventDefault(),(0===t.closest("#brand-intro").length||t.hasClass("close-intro"))&&(p.addClass("hide"),d("body").removeClass("overflow-hidden"))}),l=new c(h.children(".btn-col")[0]),l.on("tap",function(e){var t,n=d(e.target).closest(".btn-col"),o=h.data("id");t=n.hasClass("coled")?"cancel":"ok",d.ajax({type:"POST",url:"/product/opt/favoriteBrand",data:{id:o,opt:t},success:function(e){200===e.code?n.toggleClass("coled"):400===e.code?location.href=e.data:g.show(e.message)},error:function(){g.show("网络断开连接了~")}})})),o(),T.on("touchstart","li",function(){T.find("li").removeClass("bytouch"),d(this).addClass("bytouch")}).on("touchend touchcancel","li",function(){T.find("li").removeClass("bytouch")}),window._yas&&window._yas(1*new Date,"1.0.13.2","yohobuy_m",window._ozuid,"#goods-container >div >div .good-thumb >img")}),define("js/product/detail/detail",["jquery","swiper","lazyload","hammer","index"],function(e,t,n){var o,i=e("jquery"),a=e("swiper"),s=e("lazyload"),r=i(".goodsDiscount .discount-folder"),l=i(".goodsDiscount .first-item span");e("js/product/detail/desc"),e("js/product/detail/comments-consults"),s(i("img.lazy")),o=new a(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,paginationClickable:!0,pagination:".banner-top .pagination-inner",nextButton:".my-swiper-button-next",prevButton:".my-swiper-button-prev"}),0===i(".goodsDiscount .discount-folder").children().length&&(r.css("display","none"),l.html("")),i(".goodsDiscount .dropdown").on("click",function(){r.is(":hidden")?(l.removeClass("icon-down").addClass("icon-up").html("&#xe608;"),r.slideDown()):(l.removeClass("icon-up").addClass("icon-down").html("&#xe609;"),r.slideUp())}),e("js/product/detail/like")}),define("js/product/detail/desc",["jquery","lazyload","swiper","index"],function(e,t,n){function o(e){if(e.length>0){var t=e[0].getBoundingClientRect().right,n=e.find(".swiper-slide:last-child")[0].getBoundingClientRect().right;0>n-t?e.next(".tips").css("display","none"):e.next(".tips").css("display","block")}}function i(){g||v||(g=!0,h.showLoadingMask(),d.ajax({type:"GET",url:f,success:function(e){s=d("#productDesc"),s.append(e),c(s.find("img.lazy")),r=new u("#size-swiper-container",{slidesPerView:"auto"}),l=new u("#reference-swiper-container",{slidesPerView:"auto"}),o(d("#size-swiper-container")),o(d("#reference-swiper-container")),g=!1,v=!0,h.hideLoadingMask()},error:function(){p.show("网络断开连接了~"),g=!1,h.hideLoadingMask()}}))}function a(){(!v||d(window).scrollTop()+m>=d(document).height()-50)&&i()}var s,r,l,d=e("jquery"),c=e("lazyload"),u=e("swiper"),h=e("js/plugin/loading"),p=e("js/plugin/tip"),f=d("#introUrl").val(),m=d(window).height(),g=!1,v=!1;e("js/product/recommend-for-you"),d(window).scroll(function(){window.requestAnimationFrame(a)})}),define("js/product/recommend-for-you",["swiper","jquery","index"],function(e,t,n){var o,i=e("swiper"),a=e("jquery"),s=a(".recommend-for-you");a.get("/home/preference").then(function(e){s.html(e).show(),a("#swiper-recommend").length&&(o=new i("#swiper-recommend",{slidesPerView:"auto",grabCursor:!0,slideElement:"a",lazyLoading:!0,watchSlidesVisibility:!0}))}).fail(function(){s.hide()})}),define("js/product/detail/comments-consults",["jquery"],function(e,t,n){var o,i=e("jquery"),a=e("js/plugin/tip");!function(){var e=i("#nav-tab .consults-num").html()-0;o=i("#nav-tab .comments-num").html()-0,i("#nav-tab li").each(function(){i(this).removeClass("focus")}),i("#feedback-content .content").each(function(){i(this).addClass("hide")}),0!==o?(i("#nav-tab .comment-nav").addClass("focus"),i("#feedback-content .comment-content").removeClass("hide")):0!==e&&(i("#nav-tab .consult-nav").addClass("focus"),i("#feedback-content .consult-content").removeClass("hide"))}(),i("#nav-tab li").on("touchend",function(){var e=i(this).index();i(this).hasClass("comment-nav")&&0===o?a.show("暂无商品评价"):i(this).hasClass("focus")||(i("#nav-tab li").each(function(){i(this).removeClass("focus")}),i("#feedback-content .content").each(function(){i(this).addClass("hide")}),i(this).addClass("focus"),i("#feedback-content .content:eq("+e+")").removeClass("hide"))})}),define("js/product/detail/like",["jquery","hammer"],function(e,t,n){var o=e("jquery"),i=e("hammer"),a=e("js/plugin/tip"),s=new i(document.getElementById("likeBtn")),r=new i(document.getElementById("addtoCart")),l=o("#productId").val();s.on("tap",function(e){var t,n,i=o(e.target);i.hasClass("liked")?(t="cancel",n=0):(t="ok",n=1),o.ajax({type:"POST",url:"/product/opt/favoriteProduct",data:{id:l,opt:t},success:function(e){200===e.code?(i.toggleClass("liked"),"cancel"===t?a.show("取消收藏成功"):"ok"===t&&a.show("收藏成功")):400===e.code?location.href=e.data:a.show(e.message),window._yas&&window._yas.sendCustomInfo({pd:l,fa:n})},error:function(){a.show("网络断开连接了~")}})}),r.on("tap",function(e){window._yas&&window._yas.sendCustomInfo({pd:l,by:1})})}),define("js/me/entry",["jquery","hammer","lazyload","handlebars","source-map","swiper","mlellipsis","index"],function(e,t,n){e("js/me/order"),e("js/me/order-detail"),e("js/me/fav"),e("js/me/suggest"),e("js/me/index"),e("js/me/coupons"),e("js/me/online-service"),e("js/me/address"),e("js/me/suggest"),e("js/me/browse-record"),e("js/me/address-act")}),define("js/me/order",["jquery","hammer","lazyload","handlebars","source-map"],function(e,t,n){function o(e){var t={type:p,page:f.page+1},n=e&&e.showLoadingMask;m||(m=!0,n&&g.showLoadingMask(),s.ajax({type:"GET",url:"/home/getOrders",data:t,success:function(e){var o;" "!==e?(f.page=t.page,1===t.page?(u.html(e),l(u.find(".lazy"))):(o=u.children(".order").length,u.append(e),l(u.children(".order:gt("+(o-1)+")").find(".lazy"))),window.rePosFooter()):f.end=!0,m=!1,n&&g.hideLoadingMask()}}))}function i(){f.end===!1&&s(window).scrollTop()+h>s(document).height()-.25*c.height()&&o({noLoadingMask:!0})}var a,s=e("jquery"),r=e("hammer"),l=e("lazyload"),d=s("#order-nav > li"),c=s("#order-container"),u=c.children(".orders:not(.hide)"),h=s(window).height(),p=d.filter(".active").data("type"),f={page:0,end:!1},m=!1,g=e("js/plugin/loading"),v=e("js/me/dialog");l(),function(){var e=d.length;4!==e&&d.width(100/e+"%")}(),g.init(s("body")),a=new r(document.getElementById("order-container")),a.on("tap",function(e){var t,n,o,i=s(e.target);i.closest(".locHref").length>0||(t=i.closest(".order"),n=t.data("id"),i.closest(".del").length>0?v.showDialog({dialogText:"确定删除订单吗?",hasFooter:{leftBtnText:"取消",rightBtnText:"确定"}},function(){s.ajax({type:"GET",url:"/home/delOrder",data:{id:n},success:function(e){200===e.code&&history.go(0)}})}):i.closest(".cancel").length>0?v.showDialog({dialogText:"确定取消订单吗?",hasFooter:{leftBtnText:"取消",rightBtnText:"确定"}},function(){s.ajax({type:"GET",url:"/home/cancelOrder",data:{id:n},success:function(e){200===e.code&&history.go(0)}})}):(o=t.data("href"),location.href=o))}),s(window).scroll(function(){window.requestAnimationFrame(i)}),o()}),define("js/me/dialog",["jquery","handlebars","source-map","hammer"],function(e,t,n){var o,i,a,s=e("jquery"),r=e("handlebars"),l=e("hammer");i='<div id="dialog-wrapper" class="dialog-wrapper"><div class="dialog-box">{{# hasHeader}}{{/ hasHeader}}<div class="dialog-content">{{dialogText}}</div>{{# hasFooter}}<div class="dialog-footer">{{# leftBtnText}}<span class="dialog-left-btn">{{.}}</span>{{/ leftBtnText}}{{# rightBtnText}}<span class="dialog-right-btn">{{.}}</span>{{/ rightBtnText}}</div>{{/ hasFooter}}</div></div>',a=r.compile(i),t.showDialog=function(e,t){var n,i,r=a(e);s(".dialog-wrapper").remove(),s("body").append(s(r)),n=s(".dialog-box"),o=s(".dialog-wrapper"),i=new l(document.getElementById("dialog-wrapper")),e.fast?o.css({display:"block"}):o.fadeIn(),n.css({top:"50%",marginTop:-(n.height()/2)}),e.autoHide&&setTimeout(function(){o.fadeOut()},1e3),i.on("tap",function(e){s(e.target).hasClass("dialog-left-btn")?o.fadeOut():s(e.target).hasClass("dialog-right-btn")&&t()})},t.hideDialog=function(){o.fadeOut()}}),define("js/me/order-detail",["jquery","lazyload","hammer"],function(e,t,n){var o,i=e("jquery"),a=e("lazyload"),s=e("hammer"),r=i("#order-detail").data("id");a(),o=new s(document.getElementsByClassName("opt")[0]),o.on("tap",function(e){var t=i(e.target);t.hasClass("btn-del")?confirm("确定删除订单吗?")&&i.ajax({type:"GET",url:"/home/delOrder",data:{id:r}}):t.hasClass("btn-cancel")&&confirm("确定取消订单吗?")&&i.ajax({type:"GET",url:"/home/cancelOrder",data:{id:r}})})}),define("js/me/fav",["jquery","hammer","swiper","handlebars","source-map","index"],function(e,t,n){function o(e){p.filter(".active").removeClass("active"),p.eq(e).addClass("active"),f.filter(".show").removeClass("show"),f.eq(e).addClass("show")}function i(){var e,t;for(m=d(".swiper-container"),e=0;e<m.length;e++)t=m.eq(e).attr("data-id"),g[t]&&g[t].destroy(!0,!0),g[t]=new u("#swiper-container-"+t,{slidesPerView:"auto",grabCursor:!0,slideElement:"li",wrapperClass:"swiper-wrapper-"+t,lazyLoading:!0,watchSlidesVisibility:!0})}function a(e,t,n){"favBrand"===t?E=!0:q=!0,d.ajax({method:"post",url:"/home/"+t,data:{page:n},success:function(n){if("favBrand"===t?y.addClass("hide"):w.addClass("hide")," "===n)e.closest(".fav-type").find(".fav-content-loading").addClass("hide"),e.closest(".fav-type").find(".fav-null-box").removeClass("hide");else if("end"===n)e.closest(".fav-type").find(".fav-load-background").removeClass("fav-load-background").html("没有更多了");else{if(!(n.length>10))return;e.append(n),e.closest(".fav-type").find(".fav-content-loading").remove(),"favBrand"===t?(i(),E=!1):q=!1,window.rePosFooter()}window.rePosFooter()}})}function s(){d(window).scrollTop()+b>=d(document).height()-v&&(T?(y.filter(".hide").removeClass("hide"),E||(k++,a(j,"favBrand",k))):(w.filter(".hide").removeClass("hide"),q||(x++,a(C,"favProduct",x))))}var r,l,d=e("jquery"),c=e("hammer"),u=e("swiper"),h=e("js/me/dialog"),p=d("#fav-tab > li"),f=d(".fav-content > .fav-type"),m="",g={},v=d("#yoho-footer").height(),w=d(".fav-load-more"),y=d(".fav-brand-load-more"),b=d(window).height(),C=d(".fav-product-list"),j=d(".fav-brand-swiper"),x=1,k=1,q=!0,E=!0,T=!1;d("#fav-tab").hasClass("brand-tab")?(o(1),a(j,"favBrand",1),T=!0,window.rePosFooter()):(o(0),a(C,"favProduct",1),T=!1,window.rePosFooter()),r=new c(document.getElementById("fav-tab")),r.on("tap",function(e){var t,n=d(e.target).closest("li");0===n.length||n.hasClass("active")||(t=n.index(),0===t?(T=!1,0===C.find("li").length&&C.closest(".fav-type").find(".fav-null-box").hasClass("hide")&&a(C,"favProduct",1)):(T=!0,0===j.find("div").length&&j.closest(".fav-type").find(".fav-null-box").hasClass("hide")&&a(j,"favBrand",1)),o(t),window.rePosFooter())}),l=new c(document.getElementById("fav-content")),l.on("tap",function(e){var t="";d(e.target).hasClass("del-fav")&&h.showDialog({dialogText:"您确定要取消收藏吗?",hasFooter:{leftBtnText:"取消",rightBtnText:"确定"}},function(){t=d(e.target).closest("li").attr("data-id"),d.ajax({method:"post",url:"/home/favoriteDel",data:{id:t}}).then(function(t){200===t.code?(h.showDialog({autoHide:!0,fast:!0,dialogText:"已经取消收藏"}),d(e.target).closest("li").remove()):400===t.code?h.showDialog({autoHide:!0,fast:!0,dialogText:t.message}):h.showDialog({autoHide:!0,fast:!0,dialogText:"取消收藏失败"})}).fail(function(){h.showDialog({autoHide:!0,dialogText:"网络错误~"})})})}),d(window).scroll(function(){window.requestAnimationFrame(s)})}),define("js/me/suggest",["jquery","hammer","lazyload","handlebars","source-map"],function(e,t,n){var o,i,a,s,r=e("jquery"),l=e("hammer"),d=e("lazyload"),c=e("handlebars"),u=e("js/me/dialog"),h=r(".upload-img-list"),p=r(".suggest-item .like-btn"),f=r(".suggest-item .dislike-btn"),m=r(".img-add"),g="",v=0;e("js/me/jquery.uploadifive"),a='{{# imgList}}<li>{{# imgUrl}}<img src="{{.}}" /><span class="upload-img-remove"></span>{{/ imgUrl}}</li>{{/ imgList}}',s=c.compile(a),r("#upload-img").uploadifive({auto:!0,fileType:"image*/*",uploadScript:"/home/suggestimgUpload",fileObjName:"fileData",fileSizeLimit:1024,height:"100%",width:"100%",multi:!1,onAddQueueItem:function(e){h.html(s({imgList:!0}))},onUploadComplete:function(e,t){h.html(""),g=JSON.parse(t).imgList[0].imgRelUrl,h.html(s(JSON.parse(t))),m.hide(),v++}}),d(),o=new l(document.getElementById("yoho-header")),o.on("tap",function(e){var t=r("#suggest-textarea").val();r(e.target).hasClass("nav-btn")&&r.ajax({method:"post",url:"/home/savesuggest",data:{content:t,image:g}}).then(function(e){200===e.code&&u.showDialog({autoHide:!0,dialogText:"提交成功"})}).fail(function(){})}),null!==document.getElementById("img-form")&&(i=new l(document.getElementById("img-form")),i.on("tap",function(e){r(e.target).hasClass("upload-img-remove")&&(h.html(""),g="",v--,setTimeout(function(){m.show()},50))})),p.bind("click",function(){var e=r(this).closest(".suggest-item").attr("data-id"),t=r(this);r.ajax({method:"post",url:"/home/upAndDown",data:{suggest_id:e}}).then(function(e){200===e.code&&(t.closest(".suggest-type").removeClass("show"),r(".suggest-good").addClass("show"))}).fail(function(e){u.showDialog({autoHide:!0,dialogText:"网络错误~"})})}),f.bind("click",function(){var e=r(this).closest(".suggest-item").attr("data-id"),t=r(this);r.ajax({method:"post",url:"/home/upAndDown",data:{suggest_id:e}}).then(function(e){200===e.code&&(t.closest(".suggest-type").removeClass("show"),r(".suggest-bad").addClass("show"))}).fail(function(e){u.showDialog({autoHide:!0,dialogText:"网络错误~"})})})}),define("js/me/jquery.uploadifive",["jquery"],function(e,t,n){var o=e("jquery");!function(e){var t={init:function(n){return this.each(function(){var o=e(this);o.data("uploadifive",{inputs:{},inputCount:0,fileID:0,queue:{count:0,selected:0,replaced:0,errors:0,queued:0,cancelled:0},uploads:{current:0,attempts:0,successful:0,errors:0,count:0}});var a=o.data("uploadifive"),s=a.settings=e.extend({auto:!0,buttonClass:!1,buttonText:"Select Files",checkScript:!1,dnd:!0,dropTarget:!1,fileObjName:"Filedata",fileSizeLimit:0,fileType:!1,formData:{},height:30,itemTemplate:!1,method:"post",multi:!0,overrideEvents:[],queueID:!1,queueSizeLimit:0,removeCompleted:!1,simUploadLimit:0,truncateLength:0,uploadLimit:0,uploadScript:"uploadifive.php",width:100},n);if(isNaN(s.fileSizeLimit)){var r=1.024*parseInt(s.fileSizeLimit);s.fileSizeLimit.indexOf("KB")>-1?s.fileSizeLimit=1e3*r:s.fileSizeLimit.indexOf("MB")>-1?s.fileSizeLimit=1e6*r:s.fileSizeLimit.indexOf("GB")>-1&&(s.fileSizeLimit=1e9*r)}else s.fileSizeLimit=1024*s.fileSizeLimit;if(a.inputTemplate=e('<input type="file">').css({"font-size":s.height+"px",opacity:0,position:"absolute",right:"-3px",top:"-3px","z-index":999}),a.createInput=function(){var n=a.inputTemplate.clone(),i=n.name="input"+a.inputCount++;s.multi&&n.attr("multiple",!0),s.fileType&&n.attr("accept",s.fileType),n.bind("change",function(){a.queue.selected=0,a.queue.replaced=0,a.queue.errors=0,a.queue.queued=0;var n=this.files.length;if(a.queue.selected=n,a.queue.count+n>s.queueSizeLimit&&0!==s.queueSizeLimit)e.inArray("onError",s.overrideEvents)<0&&alert("The maximum number of queue items has been reached ("+s.queueSizeLimit+"). Please select fewer files."),
"function"==typeof s.onError&&s.onError.call(o,"QUEUE_LIMIT_EXCEEDED");else{for(var r=0;n>r;r++)file=this.files[r],a.addQueueItem(file);a.inputs[i]=this,a.createInput()}s.auto&&t.upload.call(o),"function"==typeof s.onSelect&&s.onSelect.call(o,a.queue)}),a.currentInput&&a.currentInput.hide(),a.button.append(n),a.currentInput=n},a.destroyInput=function(t){e(a.inputs[t]).remove(),delete a.inputs[t],a.inputCount--},a.drop=function(n){a.queue.selected=0,a.queue.replaced=0,a.queue.errors=0,a.queue.queued=0;var i=n.dataTransfer,r=i.name="input"+a.inputCount++,l=i.files.length;if(a.queue.selected=l,a.queue.count+l>s.queueSizeLimit&&0!==s.queueSizeLimit)e.inArray("onError",s.overrideEvents)<0&&alert("The maximum number of queue items has been reached ("+s.queueSizeLimit+"). Please select fewer files."),"function"==typeof s.onError&&s.onError.call(o,"QUEUE_LIMIT_EXCEEDED");else{for(var d=0;l>d;d++)file=i.files[d],a.addQueueItem(file);a.inputs[r]=i}s.auto&&t.upload.call(o),"function"==typeof s.onDrop&&s.onDrop.call(o,i.files,i.files.length),n.preventDefault(),n.stopPropagation()},a.fileExistsInQueue=function(e){for(var t in a.inputs){input=a.inputs[t],limit=input.files.length;for(var n=0;n<limit;n++)if(existingFile=input.files[n],existingFile.name==e.name&&!existingFile.complete)return!0}return!1},a.removeExistingFile=function(e){for(var n in a.inputs){input=a.inputs[n],limit=input.files.length;for(var i=0;i<limit;i++)existingFile=input.files[i],existingFile.name!=e.name||existingFile.complete||(a.queue.replaced++,t.cancel.call(o,existingFile,!0))}},0==s.itemTemplate?a.queueItem=e('<div class="uploadifive-queue-item"> <a class="close" href="#">X</a> <div><span class="filename"></span><span class="fileinfo"></span></div> <div class="progress"> <div class="progress-bar"></div> </div> </div>'):a.queueItem=e(s.itemTemplate),a.addQueueItem=function(n){if(e.inArray("onAddQueueItem",s.overrideEvents)<0){a.removeExistingFile(n),n.queueItem=a.queueItem.clone(),n.queueItem.attr("id",s.id+"-file-"+a.fileID++),n.queueItem.find(".close").bind("click",function(){return t.cancel.call(o,n),!1});var i=n.name;i.length>s.truncateLength&&0!=s.truncateLength&&(i=i.substring(0,s.truncateLength)+"..."),n.queueItem.find(".filename").html(i),n.queueItem.data("file",n),a.queueEl.append(n.queueItem)}"function"==typeof s.onAddQueueItem&&s.onAddQueueItem.call(o,n),n.size>s.fileSizeLimit&&0!=s.fileSizeLimit?a.error("FILE_SIZE_LIMIT_EXCEEDED",n):(a.queue.queued++,a.queue.count++)},a.removeQueueItem=function(t,n,o){o||(o=0);var i=n?0:500;t.queueItem&&(" - Completed"!=t.queueItem.find(".fileinfo").html()&&t.queueItem.find(".fileinfo").html(" - Cancelled"),t.queueItem.find(".progress-bar").width(0),t.queueItem.delay(o).fadeOut(i,function(){e(this).remove()}),delete t.queueItem,a.queue.count--)},a.filesToUpload=function(){var e=0;for(var t in a.inputs){input=a.inputs[t],limit=input.files.length;for(var n=0;n<limit;n++)file=input.files[n],file.skip||file.complete||e++}return e},a.checkExists=function(n){if(e.inArray("onCheck",s.overrideEvents)<0){e.ajaxSetup({async:!1});var i=e.extend(s.formData,{filename:n.name});if(e.post(s.checkScript,i,function(e){n.exists=parseInt(e)}),n.exists&&!confirm("A file named "+n.name+" already exists in the upload folder.\nWould you like to replace it?"))return t.cancel.call(o,n),!0}return"function"==typeof s.onCheck&&s.onCheck.call(o,n,n.exists),!1},a.uploadFile=function(t,n){if(!t.skip&&!t.complete&&!t.uploading)if(t.uploading=!0,a.uploads.current++,a.uploads.attempted++,xhr=t.xhr=new XMLHttpRequest,"function"==typeof FormData||"object"==typeof FormData){var r=new FormData;r.append(s.fileObjName,t);for(i in s.formData)r.append(i,s.formData[i]);xhr.open(s.method,s.uploadScript,!0),xhr.upload.addEventListener("progress",function(e){e.lengthComputable&&a.progress(e,t)},!1),xhr.addEventListener("load",function(e){4==this.readyState&&(t.uploading=!1,200==this.status?"Invalid file type."!==t.xhr.responseText?a.uploadComplete(e,t,n):a.error(t.xhr.responseText,t,n):404==this.status?a.error("404_FILE_NOT_FOUND",t,n):403==this.status?a.error("403_FORBIDDEN",t,n):a.error("Unknown Error",t,n))}),xhr.send(r)}else{var l=new FileReader;l.onload=function(i){var r="-------------------------"+(new Date).getTime(),l="--",d="\r\n",c="";c+=l+r+d,c+='Content-Disposition: form-data; name="'+s.fileObjName+'"',t.name&&(c+='; filename="'+t.name+'"'),c+=d,c+="Content-Type: application/octet-stream"+d+d,c+=i.target.result+d;for(key in s.formData)c+=l+r+d,c+='Content-Disposition: form-data; name="'+key+'"'+d+d,c+=s.formData[key]+d;c+=l+r+l+d,xhr.upload.addEventListener("progress",function(e){a.progress(e,t)},!1),xhr.addEventListener("load",function(e){t.uploading=!1;var o=this.status;404==o?a.error("404_FILE_NOT_FOUND",t,n):"Invalid file type."!=t.xhr.responseText?a.uploadComplete(e,t,n):a.error(t.xhr.responseText,t,n)},!1);var u=s.uploadScript;if("get"==s.method){var h=e(s.formData).param();u+=h}xhr.open(s.method,s.uploadScript,!0),xhr.setRequestHeader("Content-Type","multipart/form-data; boundary="+r),"function"==typeof s.onUploadFile&&s.onUploadFile.call(o,t),xhr.sendAsBinary(c)},l.readAsBinaryString(t)}},a.progress=function(t,n){if(e.inArray("onProgress",s.overrideEvents)<0){if(t.lengthComputable)var i=Math.round(t.loaded/t.total*100);n.queueItem.find(".fileinfo").html(" - "+i+"%"),n.queueItem.find(".progress-bar").css("width",i+"%")}"function"==typeof s.onProgress&&s.onProgress.call(o,n,t)},a.error=function(n,i,r){if(e.inArray("onError",s.overrideEvents)<0){switch(n){case"404_FILE_NOT_FOUND":errorMsg="404 Error";break;case"403_FORBIDDEN":errorMsg="403 Forbidden";break;case"FORBIDDEN_FILE_TYPE":errorMsg="Forbidden File Type";break;case"FILE_SIZE_LIMIT_EXCEEDED":errorMsg="File Too Large";break;default:errorMsg="Unknown Error"}i.queueItem.addClass("error").find(".fileinfo").html(" - "+errorMsg),i.queueItem.find(".progress").remove()}"function"==typeof s.onError&&s.onError.call(o,n,i),i.skip=!0,"404_FILE_NOT_FOUND"==n?a.uploads.errors++:a.queue.errors++,r&&t.upload.call(o,null,!0)},a.uploadComplete=function(n,i,r){e.inArray("onUploadComplete",s.overrideEvents)<0&&(i.queueItem.find(".progress-bar").css("width","100%"),i.queueItem.find(".fileinfo").html(" - Completed"),i.queueItem.find(".progress").slideUp(250),i.queueItem.addClass("complete")),"function"==typeof s.onUploadComplete&&s.onUploadComplete.call(o,i,i.xhr.responseText),s.removeCompleted&&setTimeout(function(){t.cancel.call(o,i)},3e3),i.complete=!0,a.uploads.successful++,a.uploads.count++,a.uploads.current--,delete i.xhr,r&&t.upload.call(o,null,!0)},a.queueComplete=function(){"function"==typeof s.onQueueComplete&&s.onQueueComplete.call(o,a.uploads)},!(window.File&&window.FileList&&window.Blob&&(window.FileReader||window.FormData)))return"function"==typeof s.onFallback&&s.onFallback.call(o),!1;if(s.id="uploadifive-"+o.attr("id"),a.button=e('<div id="'+s.id+'" class="uploadifive-button">'+s.buttonText+"</div>"),s.buttonClass&&a.button.addClass(s.buttonClass),a.button.css({height:s.height,"line-height":s.height+"px",overflow:"hidden",position:"relative","text-align":"center",width:s.width}),o.before(a.button).appendTo(a.button).hide(),a.createInput.call(o),s.queueID?a.queueEl=e("#"+s.queueID):(s.queueID=s.id+"-queue",a.queueEl=e('<div id="'+s.queueID+'" class="uploadifive-queue" />'),a.button.after(a.queueEl)),s.dnd){var l=s.dropTarget?e(s.dropTarget):a.queueEl.get(0);l.addEventListener("dragleave",function(e){e.preventDefault(),e.stopPropagation()},!1),l.addEventListener("dragenter",function(e){e.preventDefault(),e.stopPropagation()},!1),l.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation()},!1),l.addEventListener("drop",a.drop,!1)}XMLHttpRequest.prototype.sendAsBinary||(XMLHttpRequest.prototype.sendAsBinary=function(e){function t(e){return 255&e.charCodeAt(0)}var n=Array.prototype.map.call(e,t),o=new Uint8Array(n);this.send(o.buffer)}),"function"==typeof s.onInit&&s.onInit.call(o)})},debug:function(){return this.each(function(){console.log(e(this).data("uploadifive"))})},clearQueue:function(){this.each(function(){var n=e(this),o=n.data("uploadifive"),a=o.settings;for(var s in o.inputs)for(input=o.inputs[s],limit=input.files.length,i=0;i<limit;i++)file=input.files[i],t.cancel.call(n,file);"function"==typeof a.onClearQueue&&a.onClearQueue.call(n,e("#"+o.settings.queueID))})},cancel:function(n,o){this.each(function(){var i=e(this),a=i.data("uploadifive"),s=a.settings;"string"==typeof n&&(isNaN(n)||(fileID="uploadifive-"+e(this).attr("id")+"-file-"+n),n=e("#"+fileID).data("file")),n.skip=!0,a.filesCancelled++,n.uploading&&(a.uploads.current--,n.uploading=!1,n.xhr.abort(),delete n.xhr,t.upload.call(i)),e.inArray("onCancel",s.overrideEvents)<0&&a.removeQueueItem(n,o),"function"==typeof s.onCancel&&s.onCancel.call(i,n)})},upload:function(t,n){this.each(function(){var o=e(this),i=o.data("uploadifive"),a=i.settings;if(t)i.uploadFile.call(o,t);else if(i.uploads.count+i.uploads.current<a.uploadLimit||0==a.uploadLimit){if(!n){i.uploads.attempted=0,i.uploads.successsful=0,i.uploads.errors=0;var s=i.filesToUpload();"function"==typeof a.onUpload&&a.onUpload.call(o,s)}e("#"+a.queueID).find(".uploadifive-queue-item").not(".error, .complete").each(function(){return _file=e(this).data("file"),i.uploads.current>=a.simUploadLimit&&0!==a.simUploadLimit||i.uploads.current>=a.uploadLimit&&0!==a.uploadLimit||i.uploads.count>=a.uploadLimit&&0!==a.uploadLimit?!1:void(a.checkScript?(_file.checking=!0,skipFile=i.checkExists(_file),_file.checking=!1,skipFile||i.uploadFile(_file,!0)):i.uploadFile(_file,!0))}),0==e("#"+a.queueID).find(".uploadifive-queue-item").not(".error, .complete").size()&&i.queueComplete()}else 0==i.uploads.current&&(e.inArray("onError",a.overrideEvents)<0&&i.filesToUpload()>0&&0!=a.uploadLimit&&alert("The maximum upload limit has been reached."),"function"==typeof a.onError&&a.onError.call(o,"UPLOAD_LIMIT_EXCEEDED",i.filesToUpload()))})},destroy:function(){this.each(function(){var n=e(this),o=n.data("uploadifive"),i=o.settings;t.clearQueue.call(n),i.queueID||e("#"+i.queueID).remove(),n.siblings("input").remove(),n.show().insertBefore(o.button),o.button.remove(),"function"==typeof i.onDestroy&&i.onDestroy.call(n)})}};e.fn.uploadifive=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("The method "+n+" does not exist in $.uploadify"):t.init.apply(this,arguments)}}(o)}),define("js/me/index",["jquery","swiper","index"],function(e,t,n){var o,i=e("jquery"),a=i(".user-avatar"),s=i(".list-item"),r=new Image;e("js/product/recommend-for-you"),e("js/product/suspend-cart"),o=a.data("avatar"),r.src=o,r.onload=function(){a.css("background-image","url("+o+")")},i(".yoho-page").on("touchstart",".list-item, .type-item",function(){s.removeClass("highlight"),i(this).addClass("highlight")}).on("touchend touchcancel",".list-item, .type-item",function(){i(this).removeClass("highlight")})}),define("js/me/coupons",["jquery","hammer","mlellipsis"],function(e,t,n){function o(e,t){l.showLoadingMask(),a.ajax({type:"POST",url:"/home/couponData",dataType:"html",data:{statu:e,page:t},success:function(e){a("#employ").append(e),window.rePosFooter(),l.hideLoadingMask()}})}var i,a=e("jquery"),s=e("hammer"),r=e("mlellipsis"),l=e("js/plugin/loading"),d=0,c=1;r.init(),a(".yoho-footer").css("border-top","1px solid #e0e0e0"),a(".employ span").each(function(e){i=new s(a(".employ span")[e]),i.on("tap",function(t){a(".employ span").removeClass("active").eq(e).addClass("active"),a("#employ").html(" "),d=e,c=1,o(d,c),window.rePosFooter()})}),a(window).scroll(function(){return a(window).scrollTop()+a(window).height()>a("body").height()-1?(c++,void o(d,c)):void 0}),o(d,c)}),define("js/me/online-service",["jquery"],function(e,t,n){var o=e("jquery"),i=o(".question-tab .tab-item");i.on("touchend",function(){var e=o(this).data("tab");e='[data-tab-name="'+e+'"]',i.removeClass("current"),o(this).addClass("current"),o(".question-list").removeClass("current"),o(e).addClass("current")}),o(".yoho-page").on("touchstart",".connect-item, .question-item",function(){o(this).siblings().removeClass("highlight"),o(this).addClass("highlight")}).on("touchend touchcancel",".connect-item, .question-item",function(){o(this).removeClass("highlight")})}),define("js/me/address",["jquery"],function(e,t,n){var o,i=e("jquery"),a=e("js/plugin/tip"),s=e("js/plugin/security"),r=e("js/plugin/loading"),l=i(".action"),d=i(".edit-address"),c=i(".submit"),u=i(".add-address"),h=i("#yoho-footer"),p=i(".confim-mask"),f=i(".page-wrap"),m=i(".address-item");f.first().css("min-height",function(){return i(window).height()-i("#yoho-header").height()-h.height()}),window.rePosFooter(),p.on("touchend",".cancel",function(){o=null,p.hide()}).on("touchend",".confim",function(){r.showLoadingMask(),i.ajax({method:"POST",url:"/home/delAddress",data:{id:o}}).then(function(e){"object"!==i.type(e)&&(e={}),200!==e.code?a.show(e.message||"网络出了点问题~"):window.location.reload()}).fail(function(){a.show("网络出了点问题~")}).always(function(){o=null,p.hide(),r.hideLoadingMask()})}),m.length<5&&u.attr("href",u.data("href")),u.on("touchend",function(){return m.length>=5?(a.show("您最多添加5个收货地址"),!1):void 0}),l.on("touchend",".del",function(){o=i(this).data("id"),p.show()}),c.on("touchend",function(){return s.hasDangerInput(!1)?!1:(d.submit(),!1)}).on("touchstart",function(){i(this).addClass("highlight")}).on("touchend touchcancel",function(){i(this).removeClass("highlight")})}),define("js/me/browse-record",["jquery","lazyload","handlebars","source-map","hammer"],function(e,t,n){function o(e){var t=l.children(".browse-record-good").length;f||(1===h&&d.removeClass("hide"),f=!0,i.ajax({type:"GET",url:"/home/recordContent",data:{page:h+1},success:function(n){" "===n?(p=!0,c.addClass("hide"),u.removeClass("hide")):(0===t?(l.html(n),a()):(l.append(n),a(l.find(".browse-record-good:gt("+(t-1)+") .lazy"))),h++,e&&e())},complete:function(){f=!1}}))}var i=e("jquery"),a=e("lazyload"),s=e("js/plugin/loading"),r=e("js/me/dialog"),l=i(".records"),d=i(".load-more"),c=d.children(".more"),u=d.children(".no-more"),h=0,p=!1,f=!1,m=i(window).height();s.init(),s.showLoadingMask(),o(s.hideLoadingMask),i(window).scroll(function(){p||m+i(window).scrollTop()>i(document).height()-.25*l.height()&&o()}),l.on("touchstart",".del-icon",function(){var e=i(this).closest(".browse-record-good"),t=e.data("skn");r.showDialog({dialogText:"确定删除此条浏览记录吗?",hasFooter:{leftBtnText:"取消",rightBtnText:"确定"}},function(){i.ajax({type:"GET",url:"/home/delRecord",data:{skn:t},success:function(e){200===e.code&&window.history.go(0)},complete:function(){r.hideDialog()}})})})}),define("js/me/address-act",["jquery","hammer"],function(e,t,n){var o,i=e("jquery"),a=e("hammer"),s=e("js/plugin/tip"),r=e("js/plugin/security"),l=e("js/plugin/loading"),d=i(".edit-address"),c=i(".submit"),u=i(".my-edit-address-page"),h=i(".my-address-list-page"),p=i(".area"),f=i("#yoho-footer"),m=i(".nav-back"),g=i(".nav-title"),v=g.html(),w="edit",y=[];i(u,h).css("min-height",function(){return i(window).height()-i("#yoho-header").height()}),m.attr("href","javascript:void(0);"),m.on("touchend",function(e){"list"===w?(h.hide(),u.show(),e.preventDefault(),w="edit",g.html(v),h.hide(),h.find("ul").hide(),h.children("ul").show().children("li").show(),y=[]):window.history.go(-1)}),d.on("submit",function(){return o?!1:r.hasDangerInput(!1)?!1:i(this).find('[name="consignee"]').val()?i(this).find('[name="mobile"]').val()?i(this).find('[name="area_code"]').val()&&i(this).find('[name="area"]').val()?i(this).find('[name="address"]').val()?(o=!0,l.showLoadingMask(),i.ajax({method:"POST",url:"/home/saveAddress",data:i(this).serialize()}).then(function(e){"object"!==i.type(e)&&(e={}),200!==e.code?(s.show(e.message||"网络出了点问题~"),o=!1,l.hideLoadingMask()):window.location.href="/home/address"}).fail(function(){s.show("网络出了点问题~"),o=!1}),!1):(s.show("地址不能为空"),!1):(s.show("省市区不能为空"),!1):(s.show("手机号不能为空"),!1):(s.show("收件人不能为空"),!1)}),c.on("touchend",function(){return d.submit(),!1}).on("touchstart",function(){i(this).addClass("highlight")}).on("touchend touchcancel",function(){i(this).removeClass("highlight")}),p.on("touchend",function(){u.hide(),h.show(1,function(){f.hide()}),w="list",g.html("地区选择")}),h.find(".address").each(function(e,t){var n=new a(t);n.on("tap",function(e){var t=i(e.target);y.push(t.children(".caption").text()),t.siblings().hide(),t.children("ul").show().children("li").show(),i(this).removeClass("highlight"),e.srcEvent.preventDefault(),e.srcEvent.stopPropagation()})}),h.find(".address-last").each(function(e,t){var n=new a(t);n.on("tap",function(e){var t=i(e.target);y.push(t.children(".caption").text()),i('[name="area"]').val(y.join(" ")),i('[name="area_code"]').val(t.data("id")),u.show(),w="edit",g.html(v),f.show(),h.hide(),h.find("ul").hide(),h.children("ul").show().children("li").show(),y=[],e.srcEvent.preventDefault(),e.srcEvent.stopPropagation()})}),h.on("touchstart","li",function(){i(this).addClass("highlight")}).on("touchend touchcancel","li",function(){i(this).removeClass("highlight")}),i("input, textarea").on("focus",function(){f.hide()}).on("blur",function(){f.show()})});
\ No newline at end of file
... ...
This diff could not be displayed because it is too large.
... ... @@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Wed Nov 4 11:51:58 2015
Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
By Ads
</metadata>
<defs>
... ... @@ -13,13 +13,13 @@ Created by FontForge 20120731 at Wed Nov 4 11:51:58 2015
font-stretch="normal"
units-per-em="1024"
panose-1="2 0 6 3 0 0 0 0 0 0"
ascent="812"
descent="-212"
ascent="896"
descent="-128"
x-height="792"
bbox="-0.75 -224 3943 812.871"
bbox="-0.75 -224 3943 833"
underline-thickness="50"
underline-position="-100"
unicode-range="U+0078-E62D"
unicode-range="U+0078-E63E"
/>
<missing-glyph horiz-adv-x="374"
d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
... ... @@ -171,5 +171,86 @@ q-22 0 -37.5 -15.5t-15.5 -37.5t15.5 -38t37.5 -16h54l157 -627q3 -12 9.5 -22.5t16
<glyph glyph-name="uniE62D" unicode="&#xe62d;"
d="M442 274h-84v-76h-230v76h-81q-20 0 -33.5 -12.5t-13.5 -31.5v-395q0 -20 13.5 -33.5t33.5 -13.5h395q19 0 31.5 13.5t12.5 33.5v395q0 13 -5.5 23t-15.5 15.5t-23 5.5zM977 812h-81v-77h-230v77h-84q-10 0 -18 -3.5t-14 -10t-9 -15t-3 -18.5v-395q0 -13 5.5 -23
t15.5 -15.5t23 -5.5h395q20 0 33.5 12.5t13.5 31.5v395q0 20 -13.5 33.5t-33.5 13.5zM977 274h-81v-76h-230v76h-84q-13 0 -23 -5.5t-15.5 -15.5t-5.5 -23v-395q0 -13 5.5 -23.5t15.5 -17t23 -6.5h395q20 0 33.5 13.5t13.5 33.5v395q0 19 -13.5 31.5t-33.5 12.5z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1639"
d="M1 783h1045v-625h-1045v625zM1424 783h-337v-625l61 -33q16 7 34 10.5t36 3.5q66 0 116 -42t61 -105l7 -4h205v398zM1178 411v290h164l121 -290h-285zM235 125h-235v-163h111q2 57 36.5 101.5t87.5 61.5zM452 -46q0 15 -2.5 29t-7.5 26.5t-12 24.5t-16 22.5t-19.5 19.5
t-22.5 15.5t-25 11.5t-27 7.5t-29 2.5q-66 0 -113.5 -46.5t-47.5 -112.5t47.5 -112.5t114 -46.5t113.5 46.5t47 112.5zM1067 125h-721q35 -11 63 -35t44 -57t18 -71h570q0 50 26 92v71zM1380 -44q0 43 -21.5 79.5t-58.5 58t-80.5 21.5t-80.5 -21.5t-58.5 -58t-21.5 -79.5
q0 -66 47 -112.5t113.5 -46.5t113.5 46.5t47 112.5z" />
<glyph glyph-name="uniE62F" unicode="&#xe62f;"
d="M474 28v161h-167v50h167v74h-167v49h134l-168 265h87l152 -257v386q-48 0 -96.5 4t-83.5 10.5t-63.5 12.5t-42.5 10l-14 4q-2 -43 -16.5 -74t-34 -44t-38.5 -20t-33 -7h-13q0 -110 10.5 -203.5t20.5 -131.5l10 -38q15 -61 45 -120.5t65.5 -105.5t75.5 -87.5t76 -70.5
t66.5 -50.5t47.5 -31.5t18 -10v225h-38zM550 28v161h167v50h-167v74h167v49h-134l168 265h-87l-152 -257v386q35 0 70.5 2t64 6t55.5 8.5t46.5 8.5t34 8t22.5 6l7 2q2 -43 16.5 -74t34 -44t38.5 -20t33 -7h13q0 -110 -10.5 -203.5t-20.5 -131.5l-10 -38q-15 -61 -45 -120.5
t-65.5 -105.5t-75.5 -87.5t-76 -70.5t-66.5 -50.5t-47.5 -31.5t-18 -10v225h38z" />
<glyph glyph-name="uniE630" unicode="&#xe630;"
d="M629 -71h-268v20q0 31 -21.5 53t-52.5 22t-52.5 -22t-21.5 -53v-20h-174v609h590v-609zM400 -30h188v527h-508v-527h94q7 41 39 68t74 27t74 -27t39 -68zM989 -71h-136v20q0 21 -10 38t-27 27t-37 10q-31 0 -52.5 -22t-21.5 -53v-20h-117v476h210q22 0 57 -34
q27 -26 58 -67q31 -40 52 -75q14 -25 19 -39t5 -23v-238zM892 -30h56v197q0 9 -18 40t-46 68q-7 9 -14 17.5t-13.5 16.5t-13 15t-12.5 14q-10 9 -18 16t-11 8.5t-5 1.5h-168v-394h37q7 41 39 68t74 27q28 0 52 -12.5t40.5 -34t20.5 -48.5zM989 137h-287v193h191l6 -8
q35 -43 61 -84q29 -48 29 -71v-30zM743 178h202q-6 15 -21 39q-21 34 -50 72h-131v-111zM779.5 -166q-47.5 0 -81.5 34t-34 81.5t34 81.5t81 34q24 0 45 -9.5t36.5 -25t24.5 -36.5t9 -45q0 -47 -33.5 -81t-81 -34zM779 24q-31 0 -52.5 -22t-21.5 -53q0 -15 6 -28.5t16 -23.5
t23.5 -16t28.5 -6q12 0 23.5 4t20.5 10.5t16 16t10.5 20.5t3.5 23q0 21 -10 38t-27 27t-37 10zM287 -166q-48 0 -81.5 34t-33.5 81.5t33.5 81.5t81.5 34t81.5 -34t33.5 -81.5t-33.5 -81.5t-81.5 -34zM287 24q-31 0 -52.5 -22t-21.5 -52.5t21.5 -52.5t52.5 -22t52.5 22
t21.5 52.5t-21.5 52.5t-52.5 22z" />
<glyph glyph-name="uniE631" unicode="&#xe631;"
d="M24 799zM47 799zM70 799zM94 799zM117 799zM140 799zM163 799zM187 799zM210 799zM233 799zM256 799zM280 799zM303 799zM326 799zM349 799zM373 799zM396 799zM419 799zM442 799zM466 799zM489 799zM512 799zM535 799zM558 799zM582 799zM605 799zM628 799zM651 799z
M675 799zM698 799zM721 799zM744 799zM768 799zM791 799zM814 799zM837 799zM861 799zM884 799zM907 799zM930 799zM954 799zM977 799zM1000 799zM1 776zM1 753zM1 730zM1 706zM1 683zM1 660zM1 637zM1 613zM1 590zM1 567zM1 544zM1 520zM1 497zM1 474zM1 451zM1 427zM1 404
zM1 381zM1 358zM1 334zM1 311zM1 288zM1 265zM1 242zM1 218zM1 195zM1 172zM1 149zM1 125zM1 102zM1 79zM1 56zM1 32zM1 9zM1 -14zM1 -37zM1 -61zM1 -84zM1 -107zM1 -130zM1 -154zM1 -177zM1 -200zM512 -223q-7 8 -18.5 22t-45.5 59t-64.5 91t-68 113.5t-64.5 131.5
t-45.5 139t-18.5 141q0 52 11 96.5t30 75.5t43 56.5t51 41t54 27t51.5 17t43.5 8.5t30 3h11q7 0 18.5 -0.5t45.5 -7t64.5 -17.5t68 -35.5t64.5 -57.5t45.5 -87t18.5 -120t-18 -140.5t-46.5 -140.5t-63 -130t-69.5 -114.5t-63.5 -90t-46.5 -60.5zM740 517q-16 85 -86 140
q-1 1 -4 3.5t-5 3.5q-5 4 -22 13l-4 2q-2 1 -3.5 2t-3.5 2l-4 2l-4 2q-1 0 -20 7q-2 0 -7.5 2t-9 3.5t-7.5 1.5q-24 5 -48 5v0q-24 0 -47 -5q-15 -3 -29.5 -8t-27.5 -11.5t-25 -14.5h-1q-12 -9 -27 -23q-2 -1 -5 -4l-3 -3q-2 -2 -4.5 -5t-4 -4.5t-4 -5t-3.5 -4.5
q-12 -16 -13 -17q-2 -3 -4.5 -7.5t-3.5 -5.5q0 -1 -1 -2q-2 -4 -3 -6.5t-3 -6t-3.5 -6.5t-2.5 -6q-1 -2 -2 -7q-1 -3 -2 -4q-7 -21 -9 -32q-4 -22 -4 -44q0 -183 175 -470l57 -88q9 13 25 36.5t56 92t70.5 133.5t55.5 148t25 148q0 11 -1 21.5t-3 21.5zM373 474
q0 58 40.5 98.5t98.5 40.5t98.5 -40.5t40.5 -98.5t-40.5 -99t-98.5 -41q-28 0 -54 11.5t-44.5 30t-29.5 44.5t-11 54z" />
<glyph glyph-name="uniE632" unicode="&#xe632;"
d="M313 163h397v69h-397v-69zM313 26h397v68h-397v-68zM611 747h-430q-4 0 -7 -0.5t-6 -2t-6 -3.5t-5 -4t-4 -5t-3 -6t-1.5 -6.5t-0.5 -6.5v-825q0 -5 1.5 -10.5t4.5 -9.5t7 -7.5t9 -5t11 -1.5h661q9 0 17 4.5t12.5 12.5t4.5 17v619zM644 626l131 -119h-131v119zM809 -77
h-595v755h364v-206q0 -14 9.5 -24t23.5 -10h198v-515zM313 300h397v69h-397v-69z" />
<glyph glyph-name="uniE633" unicode="&#xe633;" horiz-adv-x="1304"
d="M1303 454l-161 242h-304v-443h233q12 0 23 6.5t17 17t6 23.5q0 8 -2.5 15t-6.5 12.5t-10 10t-13 7t-14 2.5h-140v256h161l118 -177v-242h-442v577q0 14 -7 25.5t-18.5 18.5t-25.5 7h-666q-21 0 -36 -15t-15 -36v-620q0 -21 15 -35.5t36 -14.5h142q-30 -49 -30 -105
q0 -82 58 -140t140 -58t140 58t58 140q0 28 -8 54.5t-23 50.5h363q-30 -49 -30 -105q0 -82 58 -140t140 -58t140 58t58 140q0 56 -31 105h77v363zM93 719h582v-535h-582v535zM465 -14q0 -43 -30.5 -74t-74 -31t-74 31t-30.5 74t30.5 74t74 31t74 -31t30.5 -74zM1164 -14
q0 -29 -14 -53t-38.5 -38t-52.5 -14q-43 0 -74 31t-31 74t31 74t74 31t74 -31t31 -74z" />
<glyph glyph-name="uniE634" unicode="&#xe634;" horiz-adv-x="1476"
d="M1403 812h-1331q-14 0 -27.5 -5.5t-23.5 -15.5t-15.5 -23.5t-5.5 -27.5v-880q0 -30 21 -51t51 -21h1331q30 0 51.5 21t21.5 51v880q0 19 -10 36t-26.5 26.5t-36.5 9.5zM120 692h1235v-151h-1235v151zM120 330h1235v-422h-1235v422zM211 210h572v-61h-572v61zM211 89h331
v-60h-331v60z" />
<glyph glyph-name="uniE635" unicode="&#xe635;"
d="M512 797q-102 0 -194.5 -39.5t-160 -106.5t-107 -160t-39.5 -195q0 -68 18 -133t50.5 -119.5t78.5 -101t101 -79t120 -50.5t133 -18q102 0 194.5 40t160 107t107 160t39.5 194q0 82 -25.5 158.5t-71.5 138t-108 108t-138 71.5t-158 25zM512 -118q-112 0 -207.5 55.5
t-151 151t-55.5 207.5q0 84 33 161t88.5 132.5t132 88t160.5 32.5q112 0 207.5 -55.5t151 -150.5t55.5 -207.5t-55.5 -208t-151 -151t-207.5 -55.5zM512 471q25 0 43 -18t18 -44h87q0 50 -29 89t-75 53v50q0 6 -3 11t-8 8t-11 3h-44q-9 0 -15.5 -6.5t-6.5 -15.5v-50
q-22 -7 -41.5 -20.5t-33.5 -32t-21.5 -41.5t-7.5 -48q0 -104 133 -154q27 -9 44 -20t23 -22t7.5 -16.5t1.5 -13.5q0 -25 -18 -43t-43 -18q-17 0 -31 8.5t-22 22.5t-8 30h-87q0 -73 59 -118q21 -16 45 -24v-50q0 -9 6.5 -15t15.5 -6h44q6 0 11 2.5t8 7.5t3 11v50q46 15 75 54
t29 88q0 105 -133 154q-18 7 -32 14.5t-22 14.5t-13 13t-6.5 12.5t-2 10t-0.5 7.5q0 26 18 44t43 18z" />
<glyph glyph-name="uniE636" unicode="&#xe636;"
d="M947 675h-892q-23 0 -39 -16t-16 -38v-642q0 -23 16 -39t39 -16h892q22 0 38 16t16 39v642q0 15 -7 27.5t-19.5 19.5t-27.5 7zM836 584l-335 -260l-336 260h671zM91 16v511l376 -293q4 -3 8 -5t8 -3.5t8.5 -2t9.5 -0.5q18 0 33 11l376 293v-511h-819z" />
<glyph glyph-name="uniE637" unicode="&#xe637;"
d="M512 572q-31 0 -59 -12t-48.5 -32.5t-32.5 -48.5t-12 -59q0 -63 44.5 -107.5t107.5 -44.5q31 0 59 12t48.5 32.5t32.5 48.5t12 59q0 63 -44.5 107.5t-107.5 44.5zM512 796q-149 0 -257 -103q-107 -100 -117 -245q-1 -14 -1 -28q0 -56 36 -137.5t81 -151t104 -146.5
t85 -107t44 -50l25 -28l25 28q18 20 44 50t85 107t104 146.5t81 151t36 137.5q0 76 -29.5 145.5t-80 120t-120 80.5t-145.5 30zM512 -97q-46 54 -93.5 115.5t-98.5 137t-83 147t-32 117.5q0 127 90 217t217 90t217 -90t90 -217q0 -46 -32 -117.5t-83 -147t-98.5 -137
t-93.5 -115.5z" />
<glyph glyph-name="uniE638" unicode="&#xe638;" horiz-adv-x="1335"
d="M1273 -88h-1179q-26 0 -44 -18t-18 -44t18 -44t44 -18h1179q17 0 31 8.5t22.5 22.5t8.5 31t-8.5 31.5t-22.5 22.5t-31 8zM841 657h429q27 0 46 18t19 44t-19 44t-46 18h-429q-27 0 -46 -18t-19 -44q0 -10 3.5 -19.5t9.5 -17t14 -13.5t17.5 -9t20.5 -3zM841 230h429
q27 0 46 18t19 44q0 17 -8.5 31.5t-23.5 22.5t-33 8h-429q-13 0 -25 -5t-20.5 -13t-14 -19.5t-5.5 -24t5.5 -24t14 -20t20.5 -13.5t25 -5zM85 230h434q26 0 44 18t18 44v435q0 17 -8 31t-22.5 22.5t-31.5 8.5h-434q-26 0 -44 -18.5t-18 -43.5v-435q0 -25 18 -43.5t44 -18.5z
M147 665h310v-311h-310v311z" />
<glyph glyph-name="uniE639" unicode="&#xe639;"
d="M507 811q-81 0 -157.5 -25.5t-138 -72t-108 -108t-72 -138t-25.5 -157.5q0 -185 121 -326q115 -134 287 -167q47 -8 93 -9q46 0 90.5 8.5t85 23.5t78 37t70 49.5t60 60t49.5 70t37 78t23.5 85t8.5 90.5q0 101 -40 194t-107 160t-160 107t-195 40zM507 -104
q-112 0 -207.5 55.5t-150.5 150.5t-55 207.5t55 208t150.5 151t207.5 55.5q68 0 131 -21t114 -59.5t89.5 -89.5t59 -114t20.5 -130q0 -113 -55.5 -208t-150.5 -150.5t-208 -55.5zM506 605h-1h-1q-67 0 -115 -47q-48 -48 -48 -116q0 -9 3 -17t9 -14t14 -9.5t17 -3.5t17 3.5
t14 9.5t9.5 14t3.5 17q0 32 22 54q22 21 55 22q10 0 19.5 -3t17.5 -8t15 -12t12 -15t8 -17.5t3 -19.5q1 -24 -12 -43t-34 -29q-22 -9 -39 -26t-26 -39.5t-9 -47.5v-36q0 -18 13 -30.5t31 -12.5t31 12.5t13 30.5v36q0 24 20 33q46 20 73 61.5t26 91.5q-1 66 -48 113t-113 48z
M504 135q-23 0 -39 -16t-16 -38q0 -5 1 -10t3 -9.5t4 -8.5t5 -7.5t6.5 -6.5t8 -5.5t8.5 -4t9 -2.5t10 -1q23 0 38.5 16t15.5 39q0 9 -2.5 17t-7.5 15t-12 12t-15 7.5t-17 2.5z" />
<glyph glyph-name="uniE63A" unicode="&#xe63a;"
d="M964 376q14 1 25 8t17.5 18.5t6.5 25.5v147q0 14 -7 26t-19 19t-26 7h-898q-10 0 -20 -4t-17 -11t-11 -17t-4 -20v-147q0 -21 14 -36t35 -16q29 -2 49.5 -24t20.5 -52t-20.5 -52t-49.5 -24q-21 -1 -35 -16t-14 -36v-147q0 -21 15.5 -36.5t36.5 -15.5h898q21 0 36.5 15.5
t15.5 36.5v147q0 21 -14 36t-35 16q-19 2 -35.5 12.5t-25.5 27t-9 36.5q0 15 5.5 28.5t15 23.5t22.5 16.5t27 7.5zM926 143v-83h-828v83q52 15 85.5 58.5t33.5 98.5t-33.5 98.5t-85.5 58.5v83h283v-66h66v66h479v-83q-52 -15 -85.5 -58.5t-33.5 -98.5t33.5 -98.5t85.5 -58.5
zM381 278h66v-109h-66v109zM381 431h66v-109h-66v109zM381 126h66v-66h-66v66z" />
<glyph glyph-name="uniE63B" unicode="&#xe63b;" horiz-adv-x="1199"
d="M1149 812h-1099q-21 0 -35.5 -14.5t-14.5 -35.5v-350q0 -20 14.5 -35t35.5 -15h1099q13 0 24.5 7t18.5 18.5t7 24.5v350q0 21 -14.5 35.5t-35.5 14.5zM100 712h999v-250h-999v250zM1024 312q-21 0 -35.5 -14.5t-14.5 -34.5v-375h-749v375q0 20 -14.5 34.5t-35.5 14.5
t-35.5 -14.5t-14.5 -34.5v-425q0 -21 14.5 -35.5t35.5 -14.5h849q10 0 19.5 4t16 10.5t10.5 16t4 19.5v425q0 20 -14.5 34.5t-35.5 14.5zM325 312q-10 0 -19.5 -3.5t-16 -10.5t-10.5 -16t-4 -19v-200q0 -33 30 -46q10 -4 20 -4h549q21 0 35.5 14.5t14.5 35.5v200
q0 20 -14.5 34.5t-35.5 14.5t-35.5 -14.5t-14.5 -34.5v-150h-449v150q0 32 -30 45q-10 4 -20 4z" />
<glyph glyph-name="uniE63C" unicode="&#xe63c;" horiz-adv-x="1048"
d="M298 437q-21 0 -35.5 -14.5t-14.5 -35.5t14.5 -35.5t35.5 -14.5q13 0 24.5 7t18.5 18.5t7 25t-7 25t-18.5 18t-24.5 6.5zM953 -55q95 93 95 215t-94 214q0 2 0.5 7t1 9t0.5 7q0 111 -64 205t-174.5 148.5t-239.5 54.5q-97 0 -185.5 -32.5t-152.5 -87t-102 -130
t-38 -158.5q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26t10.5 -25l5 -5q2 -2 4.5 -3.5t5 -2.5t5.5 -2t6 -1.5t6 -0.5q9 0 18 4l180 80q4 2 7 4q20 -7 39 -12q48 -80 138.5 -128t199.5 -48q38 0 74.5 6t70.5 19q1 -1 2 -1l140 -62q2 -2 5 -2l6 -2h6q20 0 32 15
q10 10 11 24t-7 26zM286 160q0 -17 2 -35v1q-35 16 -64.5 38t-53 48t-40.5 55.5t-26 62.5t-9 67q0 85 51.5 157t139.5 114t192 42q142 0 249.5 -76.5t128.5 -189.5q-43 21 -91 32t-98 11q-39 0 -77 -6.5t-71.5 -19t-64.5 -30.5t-56.5 -40t-46.5 -48.5t-35.5 -55.5t-22 -61
t-7.5 -66zM381 160q0 63 38.5 116.5t104 84.5t143.5 31q118 0 202 -68t84 -164q0 -62 -38.5 -115.5t-104.5 -84.5t-143 -31q-118 0 -202 68t-84 163zM527 191q-16 0 -27.5 -11t-11.5 -27q0 -11 5.5 -20t14.5 -14t19 -5q16 0 27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM667 191
q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5q10 0 19 5t14.5 14t5.5 20q0 7 -3.5 14.5t-8.5 12.5t-12 8t-15 3zM806 191q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5q0 7 -3 14.5t-8 12.5t-12.5 8t-15.5 3z" />
<glyph glyph-name="uniE63D" unicode="&#xe63d;"
d="M512 13q-131 0 -241.5 55t-175 149.5t-64.5 205.5t64.5 205.5t175 149.5t241.5 55q98 0 187 -32.5t153.5 -87.5t102.5 -131t38 -159q0 -111 -64.5 -205.5t-175 -149.5t-241.5 -55zM512 751q-54 0 -106 -12t-95.5 -33t-80.5 -51.5t-63 -66.5t-40 -78.5t-14 -86.5
q0 -89 53.5 -164.5t145.5 -119.5t200 -44q65 0 126 16.5t110 47t86 71t57 90.5t20 103q0 89 -53.5 164.5t-145.5 119.5t-200 44zM730 75l184 -82l-102 164zM914 -44q-8 0 -15 3l-184 82q-14 6 -19.5 20.5t0.5 28.5q3 7 8.5 12t12 7.5t14 2t14.5 -3.5l74 -33l-39 62
q-4 6 -5 13.5t0.5 14.5t6 13t10.5 10q13 8 28 4.5t23 -16.5l102 -164q15 -23 -3 -43q-4 -4 -8.5 -7t-9.5 -4.5t-10 -1.5zM379 413q0 -22 -15 -37t-36.5 -15t-36.5 15t-15 37q0 7 2 13.5t5.5 12t8 10.5t10 8t12.5 5t14 2q10 0 19.5 -4t16.5 -11t11 -16.5t4 -19.5zM563 413
q0 -14 -7 -26t-18.5 -19t-25.5 -7t-25.5 7t-18.5 19t-7 26q0 21 15 36t36 15q14 0 25.5 -7t18.5 -18.5t7 -25.5zM748 413q0 -22 -15 -37t-36.5 -15t-36.5 15t-15 36.5t15 36.5t36 15q14 0 26 -7t19 -18.5t7 -25.5z" />
<glyph glyph-name="uniE63E" unicode="&#xe63e;"
d="M521 317zM768 -178h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1q-11 1 -23 2h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1
h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1
h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1h-1l-1 1q-145 72 -277 204.5t-205 277.5q-55 113 -56.5 201t52.5 140q13 13 30 13
t30 -13q8 -8 11 -19t0 -21.5t-11 -19.5q-32 -32 -26.5 -98t47.5 -149q68 -137 187.5 -256.5t256.5 -187.5q83 -42 149 -47.5t98 26.5q13 13 30 13t30 -13t13 -30t-13 -30q-54 -47 -141 -47zM333 355q-26 0 -39 26q-9 16 -4 32.5t21 23.5l99 46q15 8 26 23t8 33q0 13 -17 30
l-141 145q-10 9 -24.5 12.5t-31.5 0.5q-12 -7 -25 -13l-68 -73q-9 -8 -19.5 -11t-21.5 0t-19 11q-13 13 -13 30t13 30l68 68q28 28 60 34q80 20 141 -34l140 -140q4 -4 7 -8l6 -8q3 -4 6 -8.5t5 -8.5l4 -10q2 -4 4 -9l2 -10q2 -5 3 -10l2 -10q1 -8 1 -16.5t-1 -16.5
t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5 -10.5l-98 -47q0 2 -2.5 2t-6 -1t-4.5 -1zM875 -139q-10 0 -17 3t-13 9q-13 13 -13 30t13 30l68 68q13 13 13 26q7 35 -13 55l-141 141q-4 4 -30 17q-12 2 -23.5 -2t-19.5 -12.5t-12 -19.5
l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4
q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5
q-6 -21 -34 -21z" />
</font>
</defs></svg>
... ...
!function(){var yas_jssdk_10132_src_config,yas_jssdk_10132_src_cross,yas_jssdk_10132_src_event,yohosizzle_222_pre_sizzle,yohojson2_100_json2,yas_jssdk_10132_src_util,yas_jssdk_10132_src_cookie,yas_jssdk_10132_src_ya,yas_jssdk_10132_yas;yas_jssdk_10132_src_config=function(e){function t(){var e=document.domain.split("."),t=e.length;return t>1&&isNaN(e[t-1])?"."+e[t-2]+"."+e[t-1]:document.domain}return e={version:"1.0",yasPath:"/web/",yasDomain:t(),yasImgDomain:"http://analytics.yhurl.com/yas.gif"}}(),yas_jssdk_10132_src_cross=function(e){var t=yas_jssdk_10132_src_config,n=t.yasPath,r=t.yasImgDomain;return e.imgSend=function(e,t){var o=new Image(1,1);o.src=r+n+"?"+e,o.onload=function(){o.onload=null,t&&t()}},e}({}),yas_jssdk_10132_src_event=function(e){return e.addEventHandler=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},e.removeEventHandler=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]},e}({}),yohosizzle_222_pre_sizzle=function(e){return function(t){function n(e,t,n,r){var o,i,a,u,s,c,l,d,g=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:M)!==I&&L(t),t=t||I,q)){if(11!==h&&(c=yt.exec(e)))if(o=c[1]){if(9===h){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(g&&(a=g.getElementById(o))&&H(t,a)&&a.id===o)return n.push(a),n}else{if(c[2])return K.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&b.getElementsByClassName&&t.getElementsByClassName)return K.apply(n,t.getElementsByClassName(o)),n}if(!(!b.qsa||Y[e+" "]||B&&B.test(e))){if(1!==h)g=t,d=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(wt,"\\$&"):t.setAttribute("id",u=$),l=C(e),i=l.length,s=dt.test(u)?"#"+u:"[id='"+u+"']";i--;)l[i]=s+" "+p(l[i]);d=l.join(","),g=vt.test(e)&&f(t.parentNode)||t}if(d)try{return K.apply(n,g.querySelectorAll(d)),n}catch(m){}finally{u===$&&t.removeAttribute("id")}}}return T(e.replace(ut,"$1"),t,n,r)}function r(){function e(n,r){return t.push(n+" ")>N.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function o(e){return e[$]=!0,e}function i(e){var t=I.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=n.length;r--;)N.attrHandle[n[r]]=t}function u(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return o(function(t){return t=+t,o(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function f(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function g(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=J++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,s,c,l=[z,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(c=t[$]||(t[$]={}),s=c[t.uniqueID]||(c[t.uniqueID]={}),(u=s[r])&&u[0]===z&&u[1]===i)return l[2]=u[2];if(s[r]=l,l[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,t,r){for(var o=0,i=t.length;i>o;o++)n(e,t[o],r);return r}function y(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,c=null!=t;s>u;u++)(i=e[u])&&(!n||n(i,r,o))&&(a.push(i),c&&t.push(u));return a}function v(e,t,n,r,i,a){return r&&!r[$]&&(r=v(r)),i&&!i[$]&&(i=v(i,a)),o(function(o,a,u,s){var c,l,f,d=[],p=[],g=a.length,h=o||m(t||"*",u.nodeType?[u]:u,[]),v=!e||!o&&t?h:y(h,d,e,u,s),w=n?i||(o?e:g||r)?[]:a:v;if(n&&n(v,w,u,s),r)for(c=y(w,p),r(c,[],u,s),l=c.length;l--;)(f=c[l])&&(w[p[l]]=!(v[p[l]]=f));if(o){if(i||e){if(i){for(c=[],l=w.length;l--;)(f=w[l])&&c.push(v[l]=f);i(null,w=[],c,s)}for(l=w.length;l--;)(f=w[l])&&(c=i?et(o,f):d[l])>-1&&(o[c]=!(a[c]=f))}}else w=y(w===a?w.splice(g,w.length):w),i?i(null,a,w,s):K.apply(a,w)})}function w(e){for(var t,n,r,o=e.length,i=N.relative[e[0].type],a=i||N.relative[" "],u=i?1:0,s=g(function(e){return e===t},a,!0),c=g(function(e){return et(t,e)>-1},a,!0),l=[function(e,n,r){var o=!i&&(r||n!==j)||((t=n).nodeType?s(e,n,r):c(e,n,r));return t=null,o}];o>u;u++)if(n=N.relative[e[u].type])l=[g(h(l),n)];else{if(n=N.filter[e[u].type].apply(null,e[u].matches),n[$]){for(r=++u;o>r&&!N.relative[e[r].type];r++);return v(u>1&&h(l),u>1&&p(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ut,"$1"),n,r>u&&w(e.slice(u,r)),o>r&&w(e=e.slice(r)),o>r&&p(e))}l.push(n)}return h(l)}function _(e,t){var r=t.length>0,i=e.length>0,a=function(o,a,u,s,c){var l,f,d,p=0,g="0",h=o&&[],m=[],v=j,w=o||i&&N.find.TAG("*",c),_=z+=null==v?1:Math.random()||.1,x=w.length;for(c&&(j=a===I||a||c);g!==x&&null!=(l=w[g]);g++){if(i&&l){for(f=0,a||l.ownerDocument===I||(L(l),u=!q);d=e[f++];)if(d(l,a||I,u)){s.push(l);break}c&&(z=_)}r&&((l=!d&&l)&&p--,o&&h.push(l))}if(p+=g,r&&g!==p){for(f=0;d=t[f++];)d(h,m,a,u);if(o){if(p>0)for(;g--;)h[g]||m[g]||(m[g]=W.call(s));m=y(m)}K.apply(s,m),c&&!o&&m.length>0&&p+t.length>1&&n.uniqueSort(s)}return c&&(z=_,j=v),h};return r?o(a):a}var x,b,N,S,E,C,D,T,j,k,A,L,I,O,q,B,R,P,H,$="sizzle"+1*new Date,M=t.document,z=0,J=0,F=r(),U=r(),Y=r(),G=function(e,t){return e===t&&(A=!0),0},X={}.hasOwnProperty,V=[],W=V.pop,Z=V.push,K=V.push,Q=V.slice,et=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},tt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",it=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),ut=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),st=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),lt=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ft=new RegExp(it),dt=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,ht=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,vt=/[+~]/,wt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},bt=function(){L()};try{K.apply(V=Q.call(M.childNodes),M.childNodes),V[M.childNodes.length].nodeType}catch(Nt){K={apply:V.length?function(e,t){Z.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=n.support={},E=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=n.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:M;return r!==I&&9===r.nodeType&&r.documentElement?(I=r,O=I.documentElement,q=!E(I),M!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",bt,!1):n.attachEvent&&n.attachEvent("onunload",bt)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(I.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=mt.test(I.getElementsByClassName),b.getById=i(function(e){return O.appendChild(e).id=$,!I.getElementsByName||!I.getElementsByName($).length}),b.getById?(N.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&q){var n=t.getElementById(e);return n?[n]:[]}},N.filter.ID=function(e){var t=e.replace(_t,xt);return function(e){return e.getAttribute("id")===t}}):(delete N.find.ID,N.filter.ID=function(e){var t=e.replace(_t,xt);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),N.find.TAG=b.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},N.find.CLASS=b.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&q?t.getElementsByClassName(e):void 0},R=[],B=[],(b.qsa=mt.test(I.querySelectorAll))&&(i(function(e){O.appendChild(e).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+nt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||B.push("\\["+nt+"*(?:value|"+tt+")"),e.querySelectorAll("[id~="+$+"-]").length||B.push("~="),e.querySelectorAll(":checked").length||B.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||B.push(".#.+[+~]")}),i(function(e){var t=I.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&B.push("name"+nt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||B.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),B.push(",.*:")})),(b.matchesSelector=mt.test(P=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&i(function(e){b.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),R.push("!=",it)}),B=B.length&&new RegExp(B.join("|")),R=R.length&&new RegExp(R.join("|")),t=mt.test(O.compareDocumentPosition),H=t||mt.test(O.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===I||e.ownerDocument===M&&H(M,e)?-1:t===I||t.ownerDocument===M&&H(M,t)?1:k?et(k,e)-et(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e===I?-1:t===I?1:o?-1:i?1:k?et(k,e)-et(k,t):0;if(o===i)return u(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?u(a[r],s[r]):a[r]===M?-1:s[r]===M?1:0},I):I},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==I&&L(e),t=t.replace(lt,"='$1']"),!(!b.matchesSelector||!q||Y[t+" "]||R&&R.test(t)||B&&B.test(t)))try{var r=P.call(e,t);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return n(t,I,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==I&&L(e),H(e,t)},n.attr=function(e,t){(e.ownerDocument||e)!==I&&L(e);var n=N.attrHandle[t.toLowerCase()],r=n&&X.call(N.attrHandle,t.toLowerCase())?n(e,t,!q):void 0;return void 0!==r?r:b.attributes||!q?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},n.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],r=0,o=0;if(A=!b.detectDuplicates,k=!b.sortStable&&e.slice(0),e.sort(G),A){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return k=null,e},S=n.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=S(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=S(t);return n},N=n.selectors={cacheLength:50,createPseudo:o,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_t,xt),e[3]=(e[3]||e[4]||e[5]||"").replace(_t,xt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ft.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_t,xt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&F(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(o){var i=n.attr(o,e);return null==i?"!="===t:t?(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(at," ")+" ").indexOf(r)>-1:"|="===t?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,p,g,h=i!==a?"nextSibling":"previousSibling",m=t.parentNode,y=u&&t.nodeName.toLowerCase(),v=!s&&!u,w=!1;if(m){if(i){for(;h;){for(d=t;d=d[h];)if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;g=h="only"===e&&!g&&"nextSibling"}return!0}if(g=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===z&&c[1],w=p&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[h]||(w=p=0)||g.pop();)if(1===d.nodeType&&++w&&d===t){l[e]=[z,p,w];break}}else if(v&&(d=t,f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===z&&c[1],w=p),w===!1)for(;(d=++p&&d&&d[h]||(w=p=0)||g.pop())&&((u?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++w||(v&&(f=d[$]||(d[$]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[z,w]),d!==t)););return w-=o,w===r||w%r===0&&w/r>=0}}},PSEUDO:function(e,t){var r,i=N.pseudos[e]||N.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return i[$]?i(t):i.length>1?(r=[e,e,"",t],N.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=et(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=D(e.replace(ut,"$1"));return r[$]?o(function(e,t,n,o){for(var i,a=r(e,null,o,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:o(function(e){return function(t){return n(e,t).length>0}}),contains:o(function(e){return e=e.replace(_t,xt),function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:o(function(e){return dt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(_t,xt).toLowerCase(),function(t){var n;do if(n=q?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(e){return e===O},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return ht.test(e.nodeName)},input:function(e){return gt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},N.pseudos.nth=N.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})N.pseudos[x]=c(x);d.prototype=N.filters=N.pseudos,N.setFilters=new d,C=n.tokenize=function(e,t){var r,o,i,a,u,s,c,l=U[e+" "];if(l)return t?0:l.slice(0);for(u=e,s=[],c=N.preFilter;u;){(!r||(o=st.exec(u)))&&(o&&(u=u.slice(o[0].length)||u),s.push(i=[])),r=!1,(o=ct.exec(u))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ut," ")}),u=u.slice(r.length));for(a in N.filter)!(o=pt[a].exec(u))||c[a]&&!(o=c[a](o))||(r=o.shift(),i.push({value:r,type:a,matches:o}),u=u.slice(r.length));if(!r)break}return t?u.length:u?n.error(e):U(e,s).slice(0)},D=n.compile=function(e,t){var n,r=[],o=[],i=Y[e+" "];if(!i){for(t||(t=C(e)),n=t.length;n--;)i=w(t[n]),i[$]?r.push(i):o.push(i);i=Y(e,_(o,r)),i.selector=e}return i},T=n.select=function(e,t,n,r){var o,i,a,u,s,c="function"==typeof e&&e,l=!r&&C(e=c.selector||e);if(n=n||[],1===l.length){if(i=l[0]=l[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&b.getById&&9===t.nodeType&&q&&N.relative[i[1].type]){if(t=(N.find.ID(a.matches[0].replace(_t,xt),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=pt.needsContext.test(e)?0:i.length;o--&&(a=i[o],!N.relative[u=a.type]);)if((s=N.find[u])&&(r=s(a.matches[0].replace(_t,xt),vt.test(i[0].type)&&f(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&p(i),!e)return K.apply(n,r),n;break}}return(c||D(e,l))(r,t,!q,n,!t||vt.test(e)&&f(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!A,L(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(tt,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),"function"==typeof define&&define.amd?define(function(){return n}):e=n}(window),e}(),yohojson2_100_json2=function(){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,a,u=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(s)){for(i=s.length,n=0;i>n;n+=1)a[n]=str(n,s)||"null";return o=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+u+"]":"["+a.join(",")+"]",gap=u,o}if(rep&&"object"==typeof rep)for(i=rep.length,n=0;i>n;n+=1)"string"==typeof rep[n]&&(r=rep[n],o=str(r,s),o&&a.push(quote(r)+(gap?": ":":")+o));else for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(o=str(r,s),o&&a.push(quote(r)+(gap?": ":":")+o));return o=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+u+"}":"{"+a.join(",")+"}",gap=u,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()}(),yas_jssdk_10132_src_util=function(e){{var t=yas_jssdk_10132_src_config;t.yaPath,t.yasDomain}return e.flashChecker=function(){var e=0,t=0,n=0,r=null;return n?(r=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),r&&(e=1,t=r.GetVariable("$version"))):navigator.plugins&&navigator.plugins.length>0&&(r=navigator.plugins["Shockwave Flash"],r&&(e=1,t=r.description.replace("Shockwave Flash",""))),{f:e,v:t}},e.Hash=function(e){var t,n=1,r=0;if(e)for(n=0,t=e.length-1;t>=0;t--)r=e.charCodeAt(t),n=(n<<6&268435455)+r+(r<<14),r=266338304&n,0!==r&&(n^=r>>21);return n},e.Random=function(){return Math.round(2147483647*Math.random())},e.hashClientInfo=function(){var t=window.navigator,n=window.history.length,r=[t.appName,t.version,t.language,t.platform,t.userAgent,t.javaEnabled(),window.screen,window.screen.colorDepth,window.document.cookie?window.document.cookie:"",window.document.referrer?window.document.referrer:""];t=r.join("");for(var o=t.length;n>0;)t+=n--^o++;return e.Hash(t)},e.merge=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n},e.genParam=function(e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join("&")},e.trim=function(e){if(String.prototype.trim)return null===e?"":String.prototype.trim.call(e);var t=/^\s+/,n=/\s+$/,r="";return e?(r=e.toString().replace(t,""),r=r.replace(n,"")):void 0},e.getGeo=function(e){function t(t){var n=t.coords.longitude,r=t.coords.latitude;e(r,n)}function n(){e(!1)}if(window.navigator.geolocation){var r={enableHighAccuracy:!0};window.navigator.geolocation.getCurrentPosition(t,n,r)}else e(!1)},e}({}),yas_jssdk_10132_src_cookie=function(e){var t=yas_jssdk_10132_src_util;return e=function(e,n,r){if("undefined"==typeof n){var o=null;if(document.cookie)for(var i=document.cookie.split(";"),a=0;a<i.length;a++){var u=t.trim(i[a]);if(u.substring(0,e.length+1)==e+"="){o=decodeURIComponent(u.substring(e.length+1));break}}return o}r=r||{},null===n&&(n="",r.expires=-1);var s="";if(r.expires&&("number"==typeof r.expires||r.expires.toUTCString)){var c;"number"==typeof r.expires?(c=new Date,c.setTime(c.getTime()+24*r.expires*60*60*1e3)):c=r.expires,s="; expires="+c.toUTCString()}var l=r.path?"; path="+r.path:"",f=r.domain?"; domain="+r.domain:"",d=r.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(n),s,l,f,d].join("")}}(),yas_jssdk_10132_src_ya=function(e){function t(e){var t=a.merge(p,h);t=a.merge(t,y);var n=r();n&&(t=a.merge(t,n),u("_yasmp",null,{path:"/",domain:l.yasDomain,expires:73e3}));var o=u("_yascustjson");if(o){var i=JSON.parse(o);t=a.merge(t,i),u("_yascustjson",null,{path:"/",domain:l.yasDomain,expires:73e3})}var c=a.genParam(t);e=e?e:function(){},s.imgSend(c,e);var f=u("_yasev");f&&s.imgSend(f,function(){u("_yasev",null,{path:"/",domain:l.yasDomain,expires:73e3})})}function n(){var e=u("_yasvd");return e?{cid:e,isNew:"N"}:(e=a.Random()^2147483647&a.hashClientInfo(),u("_yasvd",e,{path:"/",domain:d,expires:73e3}),{cid:e,isNew:"Y"})}function r(){var e=u("_yasmp");if(e){var t=e.split(",");if(3===t.length)return{x:t[0],y:t[1],et:t[2]};if(4===t.length)return{x:t[0],y:t[1],et:t[2],ix:t[3]}}return null}function o(e){var t=0,n=0;return e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t-=window.screen.width/2,n=window.screen.height/2-n,{x:t,y:n}}function i(e,t,n,r,o){var i=u("_yasev");i?i+="&":i="",u("_yasev",i+"vd="+h.vd+"&t="+e+"&i="+t+"&l="+r+"&v="+o,{path:"/",domain:d,expires:73e3}),w++}var a=yas_jssdk_10132_src_util,u=yas_jssdk_10132_src_cookie,s=yas_jssdk_10132_src_cross,c=yas_jssdk_10132_src_event,l=yas_jssdk_10132_src_config,f=yohosizzle_222_pre_sizzle,d=(l.version,l.yaPath,l.yasDomain),p={h:document.domain,p:window.location.port,u:window.location.pathname,ft:0,fst:0,sv:"",ab:u("ab_1")||""},g=n(),h={ak:"",cd:g.cid,vd:(new Date).getTime()+g.cid,ud:"",rf:document.referrer,ckf:g.isNew},m=a.flashChecker(),y={sr:window.screen.width+"x"+window.screen.height,wr:window.screen.availWidth+"x"+window.screen.availHeight,sd:window.screen.colorDepth,ln:window.navigator.language?window.navigator.language:window.navigator.browserLanguage,sy:window.navigator.platform,ce:window.navigator.cookieEnabled,fv:m.f?m.v:0},v=function(e,n,r,i,s,g){if(h.ak=r,p.sv=n,h.ud=i?i:"",u("_yasgeo")){var m=u("_yasgeo").split(",");h.la=m[0],h.lo=m[1],u("_yasgeo",null,{path:"/",domain:l.yasDomain,expires:73e3})}var y=(new Date).getTime(),v=null,w=!1;p.ft=y-e,c.addEventHandler(window,"load",function(){var n=(new Date).getTime();p.fst=n-e,c.removeEventHandler(window,"load",arguments.callee),window.clearTimeout(v),w||t()}),v=window.setTimeout(function(){p.fst=0,p.fse=">3s",w=!0,t()},3e3),s&&a.getGeo(function(e,t){e&&u("_yasgeo",e+","+t,{path:"/",domain:d,expires:73e3})});var _=0;if(g&&f)for(var x=f(g),b=0,N=x.length;N>b;b++)!function(e){c.addEventHandler(x[e],"click",function(t){console.log("index: "+e),_=e+1;var n=t.pageX-window.screen.width/2,r=window.screen.height/2-t.pageY;u("_yasmp",n+","+r+","+t.type+","+_,{path:"/",domain:d,expires:73e3})})}(b);c.addEventHandler(document,"click",function(e){e=e||window.event;var t=e.target||e.srcElement;if(!_&&t&&"IMG"===t.nodeName&&"A"===t.parentNode.nodeName){var n=o(e);u("_yasmp",n.x+","+n.y+","+e.type,{path:"/",domain:d,expires:73e3})}_=0})},w=0;return v.add=function(e,t,n,r,o){w>3?s.imgSend(u("_yasev"),function(){u("_yasev",null,{path:"/",domain:l.yasDomain,expires:73e3}),w=0,i(e,t,n,r,o)}):i(e,t,n,r,o)},v.sendMouseEvent=function(e,t){e=e||window.event;var n=o(e);if(t)u("_yasmp",n.x+","+n.y+","+e.type,{path:"/",domain:d,expires:73e3});else{var r={x:n.x,y:n.y,et:e.type},i=a.merge(p,h);i=a.merge(i,y),i=a.merge(i,r);var c=a.genParam(i);s.imgSend(c,function(){})}},v.sendCustomInfo=function(e,t){if(t){var n=JSON.stringify(jsonobj);u("_yascustjson",n,{path:"/",domain:d,expires:73e3})}else{var r=a.merge(p,h);r=a.merge(r,y),r=a.merge(r,e);var o=a.genParam(r);s.imgSend(o,function(){})}},e=v}(),yas_jssdk_10132_yas=function(e){var t=yas_jssdk_10132_src_ya;if(window.YohoAcquisitionObject){var n=window.YohoAcquisitionObject;window[n].p&&(t.apply(this,window[n].p),window[n]=t)}return e=t}()}();
\ No newline at end of file
... ...
... ... @@ -99,7 +99,7 @@ function rePosFooter() {
return;
}
if ($('body').height() <= $(window).height() - 122) {
if ($('body').height() <= $(window).height() - parseInt($footer.css('height'), 0)) {
$footer.addClass('bottom');
} else {
$footer.removeClass('bottom');
... ... @@ -112,25 +112,23 @@ function rePosFooter() {
var user = getUser();
if ($('body').height() <= $(window).height()) {
$footer.addClass('bottom');
}
rePosFooter(); //计算底部位置
if (user === 0) {
//未登录
$op.prepend(
'<a href="/signin.html?refer=' + location.href + '">登录</a>' +
'<a href="http://m.yohobuy.com/signin.html?refer=' + location.href + '">登录</a>' +
'<span class="sep-line">|</span>' +
'<a href="/reg.html">注册</a>'
'<a href="http://m.yohobuy.com/reg.html">注册</a>'
);
} else {
//已登录
$op.prepend(
'Hi,' +
'<a class="user-name" href="/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
'<a href="/passport/signout/index?token=' + user[3] + '">退出</a>'
'<a class="user-name" href="http://m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
'<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>'
);
}
... ...
/**
* 浏览记录
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/11/28
*/
var $ = require('jquery');
var lazyLoad = require('yoho.lazyload');
var load = require('../plugin/loading');
var dialog = require('./dialog');
var $page = $('.records');
var $loadMore = $('.load-more'),
$more = $loadMore.children('.more'),
$noMore = $loadMore.children('.no-more');
var page = 0;
var end = false,
loading = false;
var winH = $(window).height();
load.init();
function moreRecord(cb) {
var count = $page.children('.browse-record-good').length;
if (loading) {
return;
}
if (page === 1) {
$loadMore.removeClass('hide');
}
loading = true;
$.ajax({
type: 'GET',
url: '/home/recordContent',
data: {
page: page + 1
},
success: function(data) {
if (data === ' ') {
end = true;
$more.addClass('hide');
$noMore.removeClass('hide');
} else {
if (count === 0) {
$page.html(data);
lazyLoad();
} else {
$page.append(data);
lazyLoad($page.find('.browse-record-good:gt(' + (count - 1) + ') .lazy'));
}
page++;
if (cb) {
cb();
}
}
},
complete: function() {
loading = false;
}
});
}
load.showLoadingMask();
moreRecord(load.hideLoadingMask);
$(window).scroll(function() {
if (end) {
return;
}
if (winH + $(window).scrollTop() > $(document).height() - 0.25 * $page.height()) {
moreRecord();
}
});
$page.on('touchstart', '.del-icon', function() {
var $good = $(this).closest('.browse-record-good'),
skn = $good.data('skn');
dialog.showDialog({
dialogText: '确定删除此条浏览记录吗?',
hasFooter: {
leftBtnText: '取消',
rightBtnText: '确定'
}
}, function() {
$.ajax({
type: 'GET',
url: '/home/delRecord',
data: {
skn: skn
},
success: function(data) {
if (data.code === 200) {
window.history.go(0);
}
},
complete: function() {
dialog.hideDialog(); //隐藏dialog
}
});
});
});
\ No newline at end of file
... ...
var $ = require('jquery'),
Hammer = require('yoho.hammer'),
ellipsis = require('mlellipsis');
var employ;
ellipsis = require('mlellipsis'),
loading = require('../plugin/loading');
var employ,
statu = 0,
page = 1;
ellipsis.init();
setTimeout(function() {
$('.coupon-name').each(function() {
this.mlellipsis(2);
function couponAJAX(statu, page) {
loading.showLoadingMask();
$.ajax({
type: 'POST',
url: '/home/couponData',
dataType: 'html',
data: {
status: statu,
page: page
},
success: function(data) {
$('#employ').append(data);
window.rePosFooter();
loading.hideLoadingMask();
}
});
}, 0);
}
window.rePosFooter();
$('.yoho-footer').css('border-top', '1px solid #e0e0e0');
$('.employ span').each(function(index) {
employ = new Hammer($('.employ span')[index]);
employ.on('tap', function(e) {
$('.employ-list').addClass('none').eq(index).removeClass('none');
$('.employ span').removeClass('active').eq(index).addClass('active');
$('#employ').html(' ');
statu = index;
page = 1;
couponAJAX(statu, page);
window.rePosFooter();
});
});
\ No newline at end of file
});
$(window).scroll(function() {
if ($(window).scrollTop() + $(window).height() > $('body').height() - 1) {
page++;
couponAJAX(statu, page);
return;
}
});
couponAJAX(statu, page);
\ No newline at end of file
... ...
... ... @@ -8,7 +8,8 @@ var $ = require('jquery'),
Handlebars = require('yoho.handlebars'),
Hammer = require('yoho.hammer');
var dialogTpl,
var $dialogWrapper,
dialogTpl,
dialogTemplate;
... ... @@ -36,7 +37,6 @@ exports.showDialog = function(data, callback) {
var dialogStr = dialogTemplate(data),
$dialogBox,
$dialogWrapper,
dialogWrapperHammer;
$('.dialog-wrapper').remove();
... ... @@ -77,4 +77,8 @@ exports.showDialog = function(data, callback) {
}
});
};
exports.hideDialog = function() {
$dialogWrapper.fadeOut();
};
\ No newline at end of file
... ...
... ... @@ -11,4 +11,7 @@ require('./suggest');
require('./index');
require('./coupons');
require('./online-service');
require('./address');
\ No newline at end of file
require('./address');
require('./suggest');
require('./browse-record');
require('./address-act');
... ...
... ... @@ -21,7 +21,7 @@ var $navLi = $('#fav-tab > li'),
$brandLoadMore = $('.fav-brand-load-more'),
winH = $(window).height(),
$favProductList = $('.fav-product-list'),
$favBrandList = $('.fav-brand-swiper-wrapper'),
$favBrandList = $('.fav-brand-swiper'),
pageId = 1,
brandPageId = 1, //收藏品牌的当前页数
lockId = true,
... ... @@ -163,6 +163,7 @@ favContentHammer.on('tap', function(e) {
if (!$(e.target).hasClass('del-fav')) {
return;
}
diaLog.showDialog({
dialogText: '您确定要取消收藏吗?',
hasFooter: {
... ...
... ... @@ -23,7 +23,7 @@ function hasDangerInput(needConvert) {
i,
matchChars,
// to set if the input value should be coverted, and its default value is true;
// to set if the input value should be coverted, and its default value is true;
willConvert = needConvert === undefined || typeof needConvert !== 'boolean' ? true : needConvert;
... ...
... ... @@ -8,7 +8,7 @@ var opt = {};
var paramStr = window.location.search.split('?')[1];
var keyVal = paramStr.split('&');
var keyVal = paramStr ? paramStr.split('&') : [];
var i, key, val;
... ...
.browse-record-good {
position: relative;
padding: 0.5rem 0 0.5rem 0.75rem;
.thumb {
float: left;
width: 120rem / $pxConvertRem;
height: 160rem / $pxConvertRem;
}
.deps {
margin-left: 135rem / $pxConvertRem;
padding: 0.5rem 0;
border-bottom: 1px solid #e0e0e0;
margin-bottom: -0.75rem;
}
.name {
font-size: 28rem / $pxConvertRem;
max-width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.price {
margin: 0.3rem 0;
font-size: 16px;
}
.sale-price {
color: #f00;
&.original-price {
color: #000;
}
}
.market-price {
text-decoration: line-through;
color: #b0b0b0;
}
.sold-out-tag {
font-size: 16px;
line-height: 30rem / $pxConvertRem;
text-align: center;
color: #fff;
background: #7f7f7f;
padding: 0.125rem 0.375rem;
@include border-radius(1rem);
}
.del-icon {
position: absolute;
right: 0.75rem;
bottom: 0.25rem;
color: #ccc;
}
}
.browse-record-page {
.load-more {
width: 100%;
height: 1.75rem;
line-height: 1.75rem;
text-align: center;
}
.no-record {
position: absolute;
background: #fff;
text-align: center;
top: 50%;
margin-top: -220rem / $pxConvertRem;
width: 100%;
.icon {
width: 196rem / $pxConvertRem;
height: 207rem / $pxConvertRem;
background: image-url('me/no-record.png') no-repeat;
background-size: 100%;
margin: 0 auto;
}
span {
display: block;
color: #b0b0b0;
font-size: 24rem / $pxConvertRem;
margin: 30rem / $pxConvertRem 0 110rem / $pxConvertRem;
}
.walk-way {
display: block;
height: 80rem / pxConvertRem;
line-height: 80rem / $pxConvertRem;
width: 70%;
margin: 0 auto;
text-align: center;
font-size: 30rem / $pxConvertRem;
color: #fff;
background: #444;
@include border-radius(5px);
}
}
}
\ No newline at end of file
... ...
... ... @@ -23,7 +23,7 @@
}
}
}
.employ-list{
#employ{
width:100%;
height: auto;
overflow:hidden;
... ... @@ -42,16 +42,21 @@
float: left;
text-align: center;
line-height: 180rem / $pxConvertRem;
font-size: 180em / $pxConvertRem;
font-size: 50px;
}
p{
width: 55.517241%;
height: auto;
padding: 0 5% 18em / $pxConvertRem;;
padding: 0 5% 18em / $pxConvertRem;
float: left;
&:first-of-type{
padding-top:30em / $pxConvertRem;
font-size: 60em / $pxConvertRem;
padding-top: 0.75rem;
font-size: 18px;
height: 76rem / $pxConvertRem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
}
i{
... ...
... ... @@ -88,10 +88,6 @@
height: auto;
overflow: hidden;
margin-top: pxToRem(20px);
a {
display: block;
}
}
.fav-img-box {
... ... @@ -175,28 +171,17 @@
}
&.del-fav {
width: 2rem;
height: 1.5rem;
$width: pxToRem(image_width(sprite-file($fav, fav-del)));
$height: pxToRem(image_height(sprite-file($fav, fav-del)));
@include rem-sprite($fav, fav-del);
width: $width;
height: $height;
position: absolute;
top: 50%;
margin-top: -0.75rem;
right: 0;
&:after {
content: '';
display: block;
$width: pxToRem(image_width(sprite-file($fav, fav-del)));
$height: pxToRem(image_height(sprite-file($fav, fav-del)));
@include rem-sprite($fav, fav-del);
width: $width;
height: $height;
position: absolute;
top: 50%;
right: pxToRem(30px);
margin-top: -$height / 2;
}
right: pxToRem(30px);
margin-top: -$height / 2;
}
}
}
... ...
... ... @@ -140,6 +140,7 @@
border-top: 1px solid #e0e0e0;
.type-item {
position: relative;
float: left;
color: #444;
font-size: pxToRem(28px);
... ... @@ -149,6 +150,20 @@
&.highlight {
background: #eee;
}
.num {
position: absolute;
padding: 0 pxToRem(8px);
top: 0;
right: pxToRem(40px);
min-width: pxToRem(16px);
font-size: pxToRem(24px);
line-height: pxToRem(32px);
color: #fff;
background: #F03D35;
text-align: center;
border-radius: pxToRem(20px);
}
}
.iconfont {
... ...
$vip: sprite-map("me/vip/*.png", $spacing: 10px);
$fav: sprite-map("me/fav/*.png", $spacing: 5px);
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp";
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record";
... ...
... ... @@ -171,4 +171,4 @@
@extend %qa;
}
}
}
\ No newline at end of file
}
... ...
... ... @@ -168,21 +168,19 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
max-height: pxToRem(255px);
min-height: pxToRem(255px);
padding: pxToRem(30px);
border: none;
font-size: pxToRem(26px);
line-height: pxToRem(48px);
//color: #b0b0b0;
color: #000;
display: block;
background: #fff;
border: none;
outline: none;
}
.img-form {
padding: 0 pxToRem(30px);
//float: left;
padding-top: pxToRem(30px);
overflow: hidden;
float: left;
.upload-img-list {
float: left;
... ...
{{# browseRecord}}
<div class="browse-record-good clearfix" data-skn="{{product_skn}}">
<img class="thumb lazy" data-original="{{image}}">
<div class="deps clearfix">
<p class="name row">{{product_name}}</p>
<p class="price row">
<span class="sale-price{{#unless market_price}} original-price{{/unless}}"{{sales_price}}</span>
&nbsp;&nbsp;
{{#if market_price}}
<span class="market-price"{{market_price}}</span>
{{/if}}
</p>
<p class="row">
{{#unless storage}}
<span class="sold-out-tag">已售罄</span>
{{/unless}}
</p>
<span class="iconfont del-icon">&#xe621;</span>
</div>
</div>
{{/ browseRecord}}
{{#if noRecord}}
<div class="no-record">
<div class="icon"></div>
<span>暂无浏览记录</span>
<a class="walk-way" href="{{walkwayUrl}}">随便逛逛</a>
</div>
{{/if}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="browse-record-page yoho-page">
<div class="records"></div>
<div class="load-more hide">
<span class="more">正在加载...</span>
<span class="no-more hide">没有更多了</span>
</div>
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{#coupons}}
<div class="employ-main" style="background:url('{{coupon_pic}}')">
<span>{{ money}}</span>
<p class="coupon-name">{{ coupon_name}}</p>
<p>{{ couponValidity}}</p>
{{# used}}<i></i>{{/ used}}
</div>
{{/coupons}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="employ">
<span class="active">未使用</span>
<span>已使用</span>
</div>
{{# couponsUrl}}
<div class="employ-list">
{{# used}}
<div class="employ-main">
<span>{{ money}}</span>
<p>{{ coupon_name}}</p>
<p>{{ couponValidity}}</p>
</div>
{{/ used}}
{{^ used}}
<div class="null">
<i></i>
<p>您还没有优惠券!</p>
<a href="{{topURL}}">随便逛逛</a>
</div>
{{/ used}}
<div class="yoho-page">
<div class="employ">
<span class="active">未使用</span>
<span>已使用</span>
</div>
<div class="employ-list not none">
{{# unused}}
<div class="employ-main">
<span>{{ money}}</span>
<p>{{ coupon_name}}</p>
<p>{{ couponValidity}}</p>
<i></i>
</div>
{{/ unused}}
{{^ unused}}
<div class="null">
<i></i>
<p>您还没有使用的优惠券!</p>
<a href="{{topURL}}">随便逛逛</a>
</div>
{{/ unused}}
<div id="employ"></div>
</div>
{{/ couponsUrl}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -17,7 +17,7 @@
<div class="fav-load-more fav-load-background hide"></div>
</div>
<div class="fav-type">
<div class="fav-brand-swiper-wrapper"></div>
<div class="fav-brand-swiper"></div>
<div class="fav-content-loading"></div>
<div class="fav-null-box hide">
... ...
... ... @@ -28,7 +28,7 @@
{{#isLogin}}{{brand_favorite_total}}{{/isLogin}}
<p>收藏的品牌</p>
</a>
<a class="link-item" href="/home/">
<a class="link-item" href="/home/record">
{{#isLogin}}{{product_browse}}{{/isLogin}}
<p>浏览记录</p>
</a>
... ... @@ -44,14 +44,23 @@
<a class="type-item" href="/home/order?type=2">
<span class="iconfont">&#xe634;</span>
<br>待付款
{{#if pendingPaymentCount}}
<span class="num">{{pendingPaymentCount}}</span>
{{/if}}
</a>
<a class="type-item" href="/home/order?type=3">
<span class="iconfont">&#xe63b;</span>
<br>待发货
{{#if dueOutGoodsCount}}
<span class="num">{{dueOutGoodsCount}}</span>
{{/if}}
</a>
<a class="type-item" href="/home/order?type=4">
<span class="iconfont">&#xe633;</span>
<br>待收货
{{#if dueInGoodsCount}}
<span class="num">{{dueInGoodsCount}}</span>
{{/if}}
</a>
</div>
</div>
... ... @@ -94,7 +103,7 @@
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/IHelp">
<a class="list-item" href="/help.html">
<span class="iconfont icon">&#xe639;</span>
帮助
<span class="iconfont num">&#xe604;</span>
... ... @@ -106,4 +115,4 @@
</div>
{{> layout/download_app}}
{{> layout/footer}}
\ No newline at end of file
{{> layout/footer}}
... ...
... ... @@ -17,7 +17,7 @@
</div>
<a class="fav-more" href="{{link}}"></a>
</div>
{{#if productList}}
{{#if productList}}
<div id="swiper-container-{{id}}" class="swiper-container" data-id="{{id}}">
<ul class="swiper-wrapper swiper-wrapper-{{id}}">
{{# productList}}
... ... @@ -34,6 +34,6 @@
{{/ productList}}
</ul>
</div>
{{/if}}
{{/if}}
</div>
{{/ hasFavBrand}}
\ No newline at end of file
... ...
{{#pageHeader}}
<header id="yoho-header" class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
{{#if navBack}}
<a href="javascript:history.go(-1);" class="iconfont nav-back">&#xe610;</a>
{{/if}}
{{#navBack}}
<a href="{{#if backUrl}}{{backUrl}}{{^}}javascript:history.go(-1);{{/if}}" class="iconfont nav-back">&#xe610;</a>
{{/navBack}}
{{#navHome}}
<a href="{{.}}" class="iconfont nav-home">&#xe611;</a>
{{/navHome}}
... ...
... ... @@ -270,4 +270,9 @@
<script>
seajs.use('js/me/personal-details');
</script>
{{/if}}
{{#if browseRecordPage}}
<script>
seajs.use('js/me/browse-record');
</script>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -15,24 +15,31 @@
{{!-- 对应订单状态的操作逻辑 --}}
{{!-- 完成和取消订单显示删除按钮 --}}
<div class="order-opt">
{{#unless unpaid}}
{{#unless unreceived}}
{{#unless unpaid}}
{{#unless unreceived}}
<div class="order-opt">
<span class="btn del">删除订单</span>
{{/unless}}
</div>
{{/unless}}
{{/unless}}
{{#if unpaid}}
{{#if unpaid}}
<div class="order-opt">
<span class="btn cancel">取消订单</span>
<a class="locHref" href="{{payUrl}}">
<span class="btn pay">立即付款</span>
</a>
{{/if}}
</div>
{{/if}}
{{#if unreceived}}
<a class="locHref" href="{{logisticsUrl}}">
<span class="btn check-logistics">查看物流</span>
</a>
{{!-- 包含未发货和已发货状态,未发货不传logisticsUrl --}}
{{#if unreceived}}
{{#if logisticsUrl}}
<div class="order-opt">
<a class="locHref" href="{{logisticsUrl}}">
<span class="btn check-logistics">查看物流</span>
</a>
</div>
{{/if}}
</div>
{{/if}}
</div>
\ No newline at end of file
... ...
... ... @@ -44,7 +44,7 @@
{{#if vip1}}
<p>
<span class="user-name">{{name}}</span>
<span class="vip-icon vip-2"></span>
<span class="vip-icon vip-1"></span>
</p>
<p class="grade-desc">
还差<span class="cost-gap"{{costGap}}</span>就可以升级为金卡会员!
... ... @@ -82,6 +82,6 @@
普通
</span>
<span class="beacon beacon-max">银卡会员</span>
<span class="cost-limit"500.00</span>
<span class="cost-limit"600.00</span>
</div>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -9,9 +9,9 @@ use Index\UserModel as UserModel;
/**
* 个人中心相关的控制器
*
*
* @name HomeController
* @package
* @package
* @copyright yoho.inc
* @version 1.0 (2015-10-28 16:28:32)
*/
... ... @@ -21,23 +21,17 @@ class HomeController extends AbstractAction
protected $_uid;
/**
* 初始化
* 通过当前用户审判是否跳到登录
*
* @param int $useSession (true:从服务端session中检查, false:从客户端cookie中检查)
* @return void
*/
public function init()
protected function auditJumpLogin($useSession = true)
{
// 检查用户是否登录, 未登录则跳转到登录页
// @todo 为了方便测试,支持传uid参数
$uid = $this->getUid();
/*if (!$uid) {
$uid = $this->_uid = $this->get('uid', 8826435); //$this->getUid(true);
}*/
$action = $this->getRequest()->getActionName();
if (!$uid && $action !== 'index') {
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')) ) );
$uid = $this->getUid($useSession);
if (!$uid) {
$this->go(Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))));
}
parent::init();
}
/**
... ... @@ -54,17 +48,17 @@ class HomeController extends AbstractAction
'showDownloadApp' => true,
'pageFooter' => true
);
$uid = $this->getUid();
$uid = $this->getUid(true);
if ($uid) {
$data['isLogin'] = true;
$data += UserModel::getUserProfileData($uid);
$data += UserModel::getInfoNumData($uid);
}
$this->_view->display('index', $data);
}
/**
/**
* 为您优选
*/
public function preferenceAction()
... ... @@ -89,23 +83,22 @@ class HomeController extends AbstractAction
*/
public function favoriteAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
// 设置网站标题
$this->setTitle('我的收藏');
$this->setNavHeader('我的收藏', true, SITE_MAIN);
$this->setNavHeader('我的收藏');
$tab = $this->get('tab', '');
$data = array(
'favPage' => true, //加载js
'pageFooter' => true,
'favorite' => true,
'productUrl' => '/product/new',
'brandUrl' => '/product/new',
'productUrl' => Helpers::url('/product/new'),
'brandUrl' => Helpers::url('/product/new'),
'brandTab' => $tab === 'brand' ? true : false, // 是否为品牌收藏页
);
// 判断是否为品牌收藏页
if ($tab === 'brand') {
$data['brandTab'] = true;
}
$this->_view->display('favorite', $data);
}
... ... @@ -113,13 +106,14 @@ class HomeController extends AbstractAction
/**
* 用户收藏的商品数据获取接口
*/
public function favProductAction() {
public function favProductAction()
{
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid(true);
$page = $this->post('page', 1);
$result = UserModel::getFavProductData($this->_uid, $page, 10);
$result = UserModel::getFavProductData($uid, $page, 10);
}
if (empty($result)) {
... ... @@ -134,14 +128,14 @@ class HomeController extends AbstractAction
/**
* 用户收藏的品牌数据获取接口
*/
public function favBrandAction() {
public function favBrandAction()
{
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid(true);
$page = $this->post('page', 1);
$gender = Helpers::getGenderByCookie();
$result = UserModel::getFavBrandData($this->_uid, $gender, $page, 10);
$result = UserModel::getFavBrandData($uid, 10, $page, 10);
}
if (empty($result)) {
... ... @@ -149,7 +143,7 @@ class HomeController extends AbstractAction
} else if (isset($result['end'])) {
echo 'end';
} else {
$this->_view->display('favorite_brand', $result);
$this->_view->display('favorite_brand', $result);
}
}
... ... @@ -161,10 +155,9 @@ class HomeController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$fav_id = $this->post('id', 0);
$result = UserModel::favoriteDelete($uid, $fav_id);
$uid = $this->getUid(true);
$favId = $this->post('id', 0);
$result = UserModel::favoriteDelete($uid, $favId);
}
if (empty($result)) {
... ... @@ -175,40 +168,74 @@ class HomeController extends AbstractAction
}
/**
* 浏览记录
* 浏览记录页面
*/
public function recordAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
// 设置网站标题
$this->setTitle('浏览记录');
$this->setNavHeader('浏览记录', true, SITE_MAIN);
$this->_view->display('browse-record', array(
'browseRecordPage' => true
));
}
/**
* 浏览记录
*/
public function recordContentAction()
{
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$udid = $this->getUdid();
$page = $this->get('page', 1);
$limit = $this->get('limit', 100);
$result = UserModel::browserRecord($uid, $udid, $page, $limit);
$uid = $this->getUid(true);
$udid = $this->getUdid();
$page = $this->get('page', 1);
$result = UserModel::browserRecord($uid, $udid, $page, 100);
}
if (empty($result)) {
echo ' ';
} else {
$this->echoJson($result);
$this->_view->display('browse-record-content', $result);
}
}
/**
* 删除浏览记录
*/
public function delRecordAction()
{
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid(true);
$skn = $this->get('skn', 0);
$result = UserModel::delRecord($uid, $skn);
}
$this->echoJson($result);
}
/**
* 个人信息
*/
public function mydetailsAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('个人信息');
$this->setNavHeader('个人信息');
$uid = $this->getUid();
$data = UserModel::getUserProfileData($uid);
$data = UserModel::getUserProfileData($this->_uid);
$data['personalDetailsPage'] = true;
$data['pageFooter'] = true;
$this->_view->display('personal-details', $data);
}
... ... @@ -217,13 +244,15 @@ class HomeController extends AbstractAction
*/
public function currencyAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('YOHO币');
$this->setNavHeader('YOHO币', true, false);
$uid = $this->getUid();
$currency = UserModel::getYohoCoinData($uid);
$currency = UserModel::getYohoCoinData($this->_uid);
$currency['pageFooter'] = true;
$this->_view->display('currency', $currency);
}
... ... @@ -232,42 +261,68 @@ class HomeController extends AbstractAction
*/
public function couponsAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('优惠券');
$this->setNavHeader('优惠券');
$this->setNavHeader('优惠券', true, SITE_MAIN);
$uid = $this->getUid();
$coupons = array(
'couponsUrl' => UserModel::getCouponData($uid, 1),
'couponsPage' => true
'couponsPage' => true,
'pageFooter' => true
);
$coupons['pageFooter'] = true;
$this->_view->display('coupons', $coupons);
}
/**
* 我的消息
*
* 暂时使用老的,因后面APP、PC、WAP会进行一次改版
* 异步获取指定状态的优惠券数据
*/
public function messageAction()
public function couponDataAction()
{
// $uid = $this->getUid();
// $page = $this->get('page', 0);
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid(true);
$status = $this->post('status', 0);
$page = $this->post('page', 1);
$result = UserModel::getCouponData($uid, $status, $page);
}
if (empty($result)) {
echo ' ';
} else {
$this->_view->display('coupon_list', $result);
}
}
// /**
// * 我的消息
// *
// * 暂时使用老的,因后面APP、PC、WAP会进行一次改版
// */
// public function messageAction()
// {
// $page = $this->get('page', 1);
// $size = $this->get('size', 10);
//
// $messages = UserModel::getMessageData($uid, $page, $size);
}
// $messages = UserModel::getMessageData($this->_uid, $page, $size);
//
// print_r($messages);
// }
/**
* 地址管理
*/
public function addressAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
// 设置网站标题
$this->setTitle('地址管理');
$this->setNavHeader('地址管理');
$uid = $this->getUid();
$uid = $this->_uid;
$address = UserModel::getAddressData($uid);
$addressList = UserModel::getAddressListData($uid);
... ... @@ -275,29 +330,36 @@ class HomeController extends AbstractAction
'addressPage' => true,
'pageFooter' => true,
'address' => $address,
'showAddBtn' => (count($address) <= 5),
'addressList' => $addressList
));
}
/**
* 地址编辑或添加页面
*/
public function addressActAction() {
*
* 地址编辑或添加页面
*/
public function addressActAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
$uid = $this->_uid;
$id = $this->get('id', null);
$data = array(
'addressActionPage' => true,
'pageFooter' => true,
'addressList' => UserModel::getAddressListData($this->_uid)
'addressList' => UserModel::getAddressListData($uid)
);
if ($id !== null) { // 编辑地址
// 设置网站标题
$this->setTitle('编辑地址');
$this->setNavHeader('编辑地址');
$data['id'] = $id;
$data['id'] = $id;
// 获取特定地址的数据
$data['address'] = UserModel::getAddressDataById($this->_uid, $id);
$data['address'] = UserModel::getAddressDataById($uid, $id);
} else {
// 设置网站标题
$this->setTitle('添加地址');
... ... @@ -307,7 +369,6 @@ class HomeController extends AbstractAction
$this->_view->display('address-act', $data);
}
/**
* 修改地址或者添加新地址
*/
... ... @@ -316,16 +377,16 @@ class HomeController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$uid = $this->getUid(true);
$address = $this->post('address', '');
$area_code = $this->post('area_code', '');
$areaCode = $this->post('area_code', '');
$consignee = $this->post('consignee', '');
$email = $this->post('email', '');
$id = $this->post('id', null);
$mobile = $this->post('mobile', '');
$zip_code = $this->post('zip_code', '');
$zipCode = $this->post('zip_code', '');
$result = UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
$result = UserModel::saveAddressData($uid, $address, $areaCode, $consignee, $email, $id, $mobile, $zipCode);
}
if (empty($result)) {
... ... @@ -343,7 +404,7 @@ class HomeController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$uid = $this->getUid(true);
$id = $this->post('id', '');
$result = UserModel::setDefaultAddress($uid, $id);
}
... ... @@ -363,9 +424,8 @@ class HomeController extends AbstractAction
$result = array();
if ($this->isAjax()) {
$uid = $this->getUid();
$uid = $this->getUid(true);
$id = $this->post('id', '');
$result = UserModel::deleteAddress($uid, $id);
}
... ... @@ -376,7 +436,7 @@ class HomeController extends AbstractAction
}
}
/**
/**
* 在线客服
*/
public function onlineServiceAction()
... ... @@ -389,7 +449,7 @@ class HomeController extends AbstractAction
$this->_view->display('online-service', array(
'onlineServicePage' => true,
'pageFooter' => true,
'pageFooter' => true,
'service' => $service
));
}
... ... @@ -413,14 +473,13 @@ class HomeController extends AbstractAction
/**
* 我的逛
*/
public function myguangAction()
public function myGuangAction()
{
$page = $this->get('page', 1);
$limit = $this->get('limit', 10);
$uid = $this->getUid();
$uid = $this->getUid(true);
$gender = Helpers::getGenderByCookie();
$yh_channel = Helpers::getChannelByCookie();
$guangInfo = \Home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
$channel = Helpers::getChannelByCookie();
$guangInfo = \Home\GuangModel::getMyGuang($uid, $page, $channel, $gender, 10);
$totalPage = $guangInfo['totalPage'];
if ($page == 1) {
$this->setTitle('我收藏的');
... ... @@ -440,7 +499,7 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this->setTitle('意见反馈');
$this->setNavHeader('意见反馈', true, SITE_MAIN);
$this->setNavHeader('意见反馈');
$udid = $this->getUdid();
$page = $this->get('page', 1);
... ... @@ -463,6 +522,7 @@ class HomeController extends AbstractAction
{
// 设置网站标题
$this->setTitle('反馈问题');
$this->setNavHeader('意见反馈');
$data = array(
'suggestPage' => true, //加载js
... ... @@ -483,7 +543,6 @@ class HomeController extends AbstractAction
*/
public function suggestimgUploadAction()
{
//$filename = $this->post('filename', '');
$result = UserModel::saveSuggestImg('fileData');
$this->echoJson($result);
... ... @@ -495,7 +554,7 @@ class HomeController extends AbstractAction
public function savesuggestAction()
{
if ($this->isAjax()) {
$uid = $this->getUid();
$uid = $this->getUid(true);
$content = $this->post('content', '');
$suggest_type = $this->post('suggest_type', 2);
$image = $this->post('image', null);
... ... @@ -511,10 +570,11 @@ class HomeController extends AbstractAction
public function upAndDownAction()
{
if ($this->isAjax()) {
$uid = $this->getUid();
$uid = $this->getUid(true);
$udid = $this->getUdid();
$suggest_id = $this->post('suggest_id', 0);
$result = UserModel::upAndDown($uid, $udid, $suggest_id);
$reliable = $this->post('reliable', 2);
$result = UserModel::upAndDown($uid, $udid, $suggest_id, $reliable);
$this->echoJson($result);
}
... ... @@ -525,6 +585,9 @@ class HomeController extends AbstractAction
*/
public function gradeAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
//设置网站seo信息
$this->setTitle('会员等级');
//显示网站导航头部信息
... ... @@ -532,26 +595,28 @@ class HomeController extends AbstractAction
$gender = Helpers::getGenderByCookie();
$channel = Helpers::getChannelByCookie();
$uid = $this->getUid();
$data = GradeModel::getGrade($gender, $channel, $uid);
$data = GradeModel::getGrade($gender, $channel, $this->_uid);
$data['pageFooter'] = true;
$this->_view->display('vip-grade', $data);
}
/*
* 会员特权查看页
*/
public function preferentialAction()
{
// 审判跳转登录页
$this->auditJumpLogin();
//设置网站seo信息
$this->setTitle('会员等级');
//显示网站导航头部信息
$this->setNavHeader('会员特权详情');
$channel = Helpers::getChannelByCookie();
$uid = $this->getUid();
$data = GradeModel::getPreferential($channel, $uid);
$data = GradeModel::getPreferential($channel, $this->_uid);
$data['pageFooter'] = true;
$this->_view->display('privilege', $data);
... ... @@ -559,18 +624,23 @@ class HomeController extends AbstractAction
/*
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
*
*/
public function orderAction()
{
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论。
$type = $this->get('type', 1);
// 审判跳转登录页
$this->auditJumpLogin();
$this->setTitle('我的订单');
$this->setNavHeader('我的订单');
$order = array();
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
$type = $this->get('type', 1);
$data = OrderModel::getNavs($type);
if (!empty($data)) {
$order['navs'] = $data;
} else {
$this->error();
}
//渲染模板
$this->_view->display('order', array(
... ... @@ -587,18 +657,17 @@ class HomeController extends AbstractAction
{
//判断是不是ajax请求
if (!$this->isAjax()) {
$this->error();
echo ' ';
}
//获取基本参数:type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
//获取基本参数:type 1:全部 2:待付款 3:待发货 4:待收货 5:待评论 7:失败 取消 订单
$type = $this->get('type', 1);
$page = $this->get('page', 1);
$limit = $this->get('limit', 10);
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$uid = $this->getUid();
$uid = '10267443';
//调用模型层getOrder方法获得并处理数据
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
$uid = $this->getUid(true);
$gender = Helpers::getGenderByCookie();
$channel = Helpers::getChannelByCookie();
$data = OrderModel::getOrder($type, $page, 10, $gender, $channel, $uid);
/* 如果取不到订单数据时,分两种情况:
1、page>1时,echo一个空格字符串到浏览器。
2、page=1时,就给一个随便逛逛的链接。
... ... @@ -606,13 +675,12 @@ class HomeController extends AbstractAction
$order = array();
if (!empty($data)) {
$order['orders'] = $data;
} else if ($page == 1) {
$order['walkwayUrl'] = Helpers::url('/product/new');
} else {
if ($page > 1) {
echo " ";
} elseif ($page == 1) {
$order['walkwayUrl'] = self::strollAction();
}
echo ' ';
}
//渲染模板
$this->_view->display('order-content', $order);
}
... ... @@ -620,65 +688,87 @@ class HomeController extends AbstractAction
/*
* 我的订单-取消订单
*/
public function cancelOrderAction()
{
//判断是不是ajax请求
if (!$this->isAjax()) {
$this->error();
$this->echoJson(array('code' => 200));
}
//传入order_code和uid以取消订单
$order_code = $this->get('id');
$uid = $this->getUid();
//传入orderCode取消订单
$orderCode = $this->get('id');
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$channel = Helpers::getChannelByCookie();
$uid = $this->getUid(true);
//调用取消订单接口,返回订单取消状态
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel);
$data = OrderData::cancelOrderData($orderCode, $uid, $gender, $channel);
//将取消状态返回至浏览器
$this->echoJson($data);
if (empty($data['code']) && empty($data['message'])) {
$this->echoJson(array('code' => 200));
} else {
$this->echoJson($data);
}
}
/*
* 我的订单-删除订单
*/
public function delOrderAction()
{
//判断是不是ajax请求
if (!$this->isAjax()) {
$this->error();
$this->echoJson(array('code' => 200));
}
//传入order_code和uid以删除订单
$order_code = $this->get('id');
$uid = $this->getUid();
//传入orderCode删除订单
$orderCode = $this->get('id');
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
$channel = Helpers::getChannelByCookie();
$uid = $this->getUid(true);
//调用接口删除订单,并返回订单删除状态
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel);
$data = OrderData::deleteOrderData($orderCode, $uid, $gender, $channel);
//将订单删除状态返回至浏览器
$this->echoJson($data);
if (empty($data['code']) && empty($data['message'])) {
$this->echoJson(array('code' => 200));
} else {
$this->echoJson($data);
}
}
/*
* 我的订单-支付链接获取
* 我的订单-查看物流详情
*/
private function paymentAction()
public function getLogisticsAction()
{
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
OrderModel::payment($gender, $yh_channel);
$order_code = $this->get('order_code');
$order_code = '1509143619';
$data = OrderModel::Logistics($order_code);
}
/*
* 我的订单-随便逛逛链接获取
* 我的订单-支付链接获取
*/
private function strollAction()
{
//获取性别、频道数据
$gender = Helpers::getGenderByCookie();
$yh_channel = $this->get('yh_channel', 1);
//调用接口获取随便逛逛url地址,并return数据
$data = OrderModel::stroll($gender, $yh_channel);
return $data;
}
// private function paymentAction() {
// $gender = Helpers::getGenderByCookie();
// $yh_channel = $this->get('yh_channel', 1);
// OrderModel::payment($gender, $yh_channel);
// }
/*
* 我的订单-确认收货
*/
// private function confirmAction(){
// //
// $gender = Helpers::getGenderByCookie();
// $order_code = $this->get('id');
// $order_code = '';
// $yh_channel = $this->get('yh_channel', 1);
// $data = OrderData::confirmData($gender,$order_code,$yh_channel,$this->_uid);
// $this->echoJson($data);
// }
/**
* 订单详情页
... ... @@ -724,28 +814,18 @@ class HomeController extends AbstractAction
$this->_view->display('order-detail', array('orderDetail' => $data, 'orderDetailPage' => true));
}
/**
* 帮助列表页
*/
private function IHelpAction()
{
$this->setTitle('帮助中心');
$this->setNavHeader('帮助中心');
$data = array(
'iHelp' => array(
array('name' => '新用户注册','url' => 'http://m.dev.yohobuy.com/' ),
array('name' => '交款须知' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '服务条款' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '网站订购流程' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '会员登录' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '网站订单修改' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => 'YOHO币' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '常见问题' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '支付方式' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '发票制度说明' ,'url' => 'http://m.dev.yohobuy.com/'),
array('name' => '配送时间' ,'url' => 'http://m.dev.yohobuy.com/')
)
);
$this->_view->display('i-help', $data);
}
}
// /**
// * 帮助列表页
// */
// public function helpAction()
// {
// $this->setTitle('帮助中心');
// $this->setNavHeader('帮助中心');
// $data = array(
// 'iHelp' => array(
// array('name' => '新用户注册', 'url' => 'http://m.dev.yohobuy.com/'),
// )
// );
// $this->_view->display('i-help', $data);
// }
}
... ...
... ... @@ -48,7 +48,13 @@ class GradeModel
//今年总消费
$result['vipGrade']['costOfThisYear'] = $data['grade']['current_year_cost'];
//升级下一等级会员的进度;
$result['vipGrade']['percent'] = 100 * (round($data['grade']['current_total_cost'] / $data['grade']['next_need_cost'], 2));
if($data['grade']['next_need_cost'] == 0){
//当vip等级升至顶级时,进度条满格
$result['vipGrade']['percent'] = 100;
}else{
$result['vipGrade']['percent'] = 100 * (round($data['grade']['current_total_cost'] / $data['grade']['next_need_cost'], 2));
}
//距离升级所需消费金额
if ($data['grade']['current_vip_level'] != 3) {
... ... @@ -60,7 +66,7 @@ class GradeModel
//$userProfile = GradeData::getUserProfileData($gender,$uid,$channel);
$result['vipGrade']['name'] = !empty($data['userProfile']) ? $data['userProfile']['username'] : '';
//跳转url(会员特权详情)
$result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null);
$result['vipGrade']['allUrl'] = Helpers::url('/home/preferential', null);
//当前vip等级享受的特权
$result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential'];
}
... ...
... ... @@ -10,7 +10,6 @@ use Plugin\Helpers;
*/
class OnlineModel
{
/*
* 获取在线帮助分类
* $clientType客户端类型
... ... @@ -22,13 +21,10 @@ class OnlineModel
$cateInfo = $res['data'];
$question = array();
$tab = array();
if ($cateInfo)
{
foreach ($cateInfo as $key => $value)
{
if ($cateInfo) {
foreach ($cateInfo as $key => $value) {
//强制截成3个tab
if ($key > 2)
{
if ($key > 2) {
break;
}
$tab[$key]['tabid'] = 'tab' . $value['id'];
... ... @@ -39,12 +35,10 @@ class OnlineModel
$question[$key]['current'] = (!$key) ? TRUE : FALSE;
$sub = $value['sub'];
$qTmp = array();
if ($sub)
{
foreach ($sub as $sk => $sv)
{
if ($sub) {
foreach ($sub as $sk => $sv) {
$qTmp[$sk]['title'] = $sv['category_name'];
$qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail',array('cateId'=>$sv['id'],'cateName'=>$sv['category_name']));
$qTmp[$sk]['link'] = Helpers::url('/home/onlineservicedetail', array('cateId' => $sv['id'], 'cateName' => $sv['category_name']));
}
}
$question[$key]['list'] = $qTmp;
... ... @@ -70,19 +64,15 @@ class OnlineModel
public static function getOnlineServiceDetail($cateId, $clinetType = 'iphone')
{
$result = array();
if (!$cateId)
{
if (!$cateId) {
return $result;
}
$res = OnlineData::getOnlineServiceDetail($cateId, $clinetType);
$questionInfo = $res['data'];
if ($questionInfo)
{
if ($questionInfo) {
$list = array();
if ($questionInfo)
{
foreach ($questionInfo as $qk => $qv)
{
if ($questionInfo) {
foreach ($questionInfo as $qk => $qv) {
$list[$qk]['q'] = $qv['title'];
$list[$qk]['a'] = $qv['content'];
}
... ...
... ... @@ -27,8 +27,7 @@ class OrderModel
/**
* 订单相关数据处理
*/
static function getOrder($type = 1, $page = 1, $limit, $gender, $yh_channel, $uid) {
static function getOrder($type, $page, $limit, $gender, $yh_channel, $uid) {
$result = array();
if (USE_CACHE) {
$key = CacheConfig::KEY_ACTION_HOME_ORDER_ORDER;
... ...
... ... @@ -19,145 +19,160 @@ use Plugin\Images;
class UserModel
{
/**
* 处理用户个人详情数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的个人详情数据
*/
public static function getUserProfileData($uid)
{
$result = array();
// 调用接口获取个人详情
$userData = UserData::userData($uid);
// 处理个人详情数
if (isset($userData['data']) && !empty($userData['data'])) {
$result = $userData['data'];
$result['gender'] = $result['gender'] == 1 ? '男' : '女';
$result['head_ico'] = Images::getImageUrl($result['head_ico'], 128, 128);
}
return $result;
}
/**
* 处理个人中心页面优惠券,收藏的商品等的数目数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的个人中心页面优惠券,收藏的商品等的数目数据
*/
public static function getInfoNumData($uid)
{
$result = array();
// 调用接口获取个人中心页面优惠券,收藏的商品等的数目数据
$infoNumData = UserData::infoNum($uid);
// 处理个人中心页面优惠券,收藏的商品等的数目数据
if (isset($infoNumData['data']) && !empty($infoNumData['data'])) {
// 把没有数据的条目设置为0
foreach ($infoNumData['data'] as &$val) {
empty($val) && $val = 0;
}
$result = $infoNumData['data'];
// 默认没有返回用户地址的数据,添加这块儿数据
$result['address_num'] = count(self::getAddressData($uid));
}
return $result;
}
/**
* 处理个人中心页面优选新品数据
*
* @param int $yh_channel 频道,1代表男生,2代表女生,3代表潮童,4代表创意生活
* @return array|mixed 处理之后的个人中心页面优选新品数据
*/
public static function getPreferenceData($yh_channel)
{
$result = array();
// 调用接口获取个人中心页面优选新品数据
$preferenceData = UserData::preference($yh_channel);
// 处理个人中心页面优选新品数据
if (isset($preferenceData['data']) && !empty($preferenceData['data'])) {
foreach ($preferenceData['data'] as $val) {
$result['recommendList'][] = Helpers::formatProduct($val, false, true, true, 299, 388, false, false);
}
}
return $result;
}
/**
* 处理用户订单数据
*
* @param int $uid 用户ID
* @param int $type 订单类型,1表示全部,2表示待付款,3表示待发货,4表示待收货,5表示待评价
* @return array|mixed 处理之后的个人详情数据
*/
public static function getUserOrderData($uid, $type)
{
$result = array();
// 调用接口获取用户订单数据
$orderData = UserData::orderData($uid, $type);
// 处理用户订单数据
if (isset($orderData['data']) && !empty($orderData['data'])) {
$oneOrder = array();
foreach ($orderData['data']['order_list'] as $val) {
$oneOrder = array();
$oneOrder['orderNum'] = $val['order_code'];
$oneOrder['tradingStatus'] = $val['status_str'];
$oneOrder['count'] = count($val['order_goods']);
$oneOrder['sumCost'] = $val['amount'];
$oneOrder['unpaid'] = !$val['payment'];
// 处理订单商品
$oneGoods = array();
foreach ($val['order_goods'] as $goods) {
$oneGoods = array();
$oneGoods['id'] = 1;
$oneGoods['thumb'] = Helpers::getImageUrl($goods['goods_image'], 60, 80);
$oneGoods['name'] = $goods['product_name'];
$oneGoods['color'] = $goods['color_name'];
$oneGoods['size'] = $goods['size_name'];
$oneGoods['price'] = $goods['goods_price'];
$oneGoods['count'] = $goods['buy_number'];
$oneOrder[] = $oneGoods;
}
$result['orders'][] = $oneOrder;
}
}
return $result;
}
/**
* 处理用户收藏的商品数据
*
* @param int $uid 用户ID
* @param int $page 第几页
* @param int $limit 限制读取的数目,默认10
* @return array|mixed 处理之后的收藏的商品数据
*/
public static function getFavProductData($uid, $page, $limit)
{
$result = array();
// 调用接口获取用户收藏的商品数据
$favProduct = UserData::favoriteProductData($uid, $page, $limit);
// 处理用户收藏的商品数据
if (isset($favProduct['data']) && !empty($favProduct['data']['product_list'])) {
/**
* 处理用户个人详情数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的个人详情数据
*/
public static function getUserProfileData($uid)
{
$result = array();
// 调用接口获取个人详情
$userData = UserData::userData($uid);
// 处理个人详情数
if (isset($userData['data']) && !empty($userData['data'])) {
$result = $userData['data'];
$result['gender'] = $result['gender'] == 1 ? '男' : '女';
$result['head_ico'] = Images::getImageUrl($result['head_ico'], 128, 128);
}
return $result;
}
/**
* 处理个人中心页面优惠券,收藏的商品等的数目数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的个人中心页面优惠券,收藏的商品等的数目数据
*/
public static function getInfoNumData($uid)
{
$result = array();
// 调用接口获取个人中心页面优惠券,收藏的商品等的数目数据
$infoNumData = UserData::infoNum($uid);
// 处理个人中心页面优惠券,收藏的商品等的数目数据
if (isset($infoNumData['data']) && !empty($infoNumData['data'])) {
$transArr = array(
'brand_favorite_total',
'product_favorite_total',
'product_browse',
'dueInGoodsCount',
'dueOutGoodsCount',
'pendingPaymentCount',
'refundGoodsCount'
);
foreach ($infoNumData['data'] as $key => &$val) {
if (empty($val)) {
// 把没有数据的条目设置为0
$val = 0;
} else if (in_array($key, $transArr) && intval($val) > 99) {
$val = '99+';
}
}
$result = $infoNumData['data'];
// 默认没有返回用户地址的数据,添加这块儿数据
$result['address_num'] = count(self::getAddressData($uid));
}
return $result;
}
/**
* 处理个人中心页面优选新品数据
*
* @param int $channel 频道,1代表男生,2代表女生,3代表潮童,4代表创意生活
* @return array|mixed 处理之后的个人中心页面优选新品数据
*/
public static function getPreferenceData($channel)
{
$result = array();
// 调用接口获取个人中心页面优选新品数据
$preferenceData = UserData::preference($channel);
// 处理个人中心页面优选新品数据
if (isset($preferenceData['data']) && !empty($preferenceData['data'])) {
foreach ($preferenceData['data'] as $val) {
$result['recommendList'][] = Helpers::formatProduct($val, false, true, true, 299, 388, false, false);
}
}
return $result;
}
/**
* 处理用户订单数据
*
* @param int $uid 用户ID
* @param int $type 订单类型,1表示全部,2表示待付款,3表示待发货,4表示待收货,5表示待评价
* @return array|mixed 处理之后的个人详情数据
*/
public static function getUserOrderData($uid, $type)
{
$result = array();
// 调用接口获取用户订单数据
$orderData = UserData::orderData($uid, $type);
// 处理用户订单数据
if (isset($orderData['data']) && !empty($orderData['data'])) {
$oneOrder = array();
$oneGoods = array();
foreach ($orderData['data']['order_list'] as $val) {
$oneOrder = array();
$oneOrder['orderNum'] = $val['order_code'];
$oneOrder['tradingStatus'] = $val['status_str'];
$oneOrder['count'] = count($val['order_goods']);
$oneOrder['sumCost'] = $val['amount'];
$oneOrder['unpaid'] = !$val['payment'];
// 处理订单商品
$oneGoods = array();
foreach ($val['order_goods'] as $goods) {
$oneGoods = array();
$oneGoods['id'] = 1;
$oneGoods['thumb'] = Helpers::getImageUrl($goods['goods_image'], 60, 80);
$oneGoods['name'] = $goods['product_name'];
$oneGoods['color'] = $goods['color_name'];
$oneGoods['size'] = $goods['size_name'];
$oneGoods['price'] = $goods['goods_price'];
$oneGoods['count'] = $goods['buy_number'];
$oneOrder[] = $oneGoods;
}
$result['orders'][] = $oneOrder;
}
}
return $result;
}
/**
* 处理用户收藏的商品数据
*
* @param int $uid 用户ID
* @param int $page 第几页
* @param int $limit 限制读取的数目,默认10
* @return array|mixed 处理之后的收藏的商品数据
*/
public static function getFavProductData($uid, $page, $limit)
{
$result = array();
// 调用接口获取用户收藏的商品数据
$favProduct = UserData::favoriteProductData($uid, $page, $limit);
// 处理用户收藏的商品数据
if (isset($favProduct['data']) && !empty($favProduct['data']['product_list'])) {
if ($page > $favProduct['data']['page_total']) {
$result['end'] = true;
... ... @@ -165,45 +180,44 @@ class UserModel
}
$datas = array();
$product = array();
foreach ($favProduct['data']['product_list'] as $val) {
$product = array();
$product['fav_id'] = $val['product_id'];
$product['imgUrl'] = $val['image'];
$product['title'] = $val['product_name'];
$product['price'] = !empty($val['market_price']) ? '¥'.$val['market_price'] . '.00' : 0;
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . $val['sales_price'] . '.00' : false;
$product['savePrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥'.($val['market_price'] - $val['sales_price']) . '.00' : false;
$product['sellOut'] = (bool)($val['price_down']);
$datas[] = $product;
}
$product = array();
foreach ($favProduct['data']['product_list'] as $val) {
$product = array();
$product['fav_id'] = $val['product_id'];
$product['imgUrl'] = $val['image'];
$product['title'] = $val['product_name'];
$product['price'] = !empty($val['market_price']) ? '¥' . $val['market_price'] . '.00' : 0;
$product['discountPrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . $val['sales_price'] . '.00' : false;
$product['savePrice'] = ($val['market_price'] - $val['sales_price'] > 0) ? '¥' . ($val['market_price'] - $val['sales_price']) . '.00' : false;
$product['sellOut'] = (bool) ($val['price_down']);
$datas[] = $product;
}
!empty($datas) && $result['hasFavProduct'] = $datas;
}
}
return $result;
}
return $result;
}
/**
* 处理用户收藏的品牌数据
*
* @param int $uid 用户ID
* @param string $gender 性别 1,3表示男,2,3表示女,1,2,3表示全部
/**
* 处理用户收藏的品牌数据
*
* @param int $uid 用户ID
* @param string $gender 性别 1,3表示男,2,3表示女,1,2,3表示全部
* @param int $page 第几页
* @param int $limit 限制读取的数目
* @return array|mixed 处理之后的收藏的品牌数据
*/
public static function getFavBrandData($uid, $gender, $page, $limit)
{
$result = array();
* @return array|mixed 处理之后的收藏的品牌数据
*/
public static function getFavBrandData($uid, $gender, $page, $limit)
{
$result = array();
// 调用接口获取户收藏的品牌数据
$favBrand = UserData::favoriteBrandData($uid, $gender);
// 调用接口获取户收藏的品牌数据
$favBrand = UserData::favoriteBrandData($uid, $gender);
// 处理用户收藏的品牌数据
if (isset($favBrand['data']) && !empty($favBrand['data']['brand_list'])) {
// 处理用户收藏的品牌数据
if (isset($favBrand['data']) && !empty($favBrand['data']['brand_list'])) {
if ($page > $favBrand['data']['page_total']) {
$result['end'] = true;
... ... @@ -213,440 +227,470 @@ class UserModel
$datas = array();
$brand = array();
foreach ($favBrand['data']['brand_list'] as $val) {
$brand = array();
$brand['id'] = $val['brand_id'];
$brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314);
$brand['brandName'] = $val['brand_name'];
$brand['update'] = $val['new_product_num'];
$brand['discount'] = $val['product_discount_num'];
$brand['link'] = '#';
// 处理品牌产品
$product = array();
foreach ($val['new_product'] as $one) {
$product = array();
$product['imgUrl'] = Images::getImageUrl($one['default_images'], 235, 314);
$product['price'] = '¥'.$one['market_price'];
$product['discount'] = '¥'.$one['sales_price'];
$brand['productList'][] = $product;
}
$datas[] = $brand;
}
foreach ($favBrand['data']['brand_list'] as $val) {
$brand = array();
$brand['id'] = $val['brand_id'];
$brand['brandImg'] = Images::getImageUrl($val['brand_ico'], 235, 314);
$brand['brandName'] = $val['brand_name'];
$brand['update'] = $val['new_product_num'];
$brand['discount'] = $val['product_discount_num'];
$brand['link'] = '#';
// 处理品牌产品
$product = array();
foreach ($val['new_product'] as $one) {
$product = array();
$product['imgUrl'] = Images::getImageUrl($one['default_images'], 235, 314);
$product['price'] = '¥' . $one['market_price'];
$product['discount'] = '¥' . $one['sales_price'];
$brand['productList'][] = $product;
}
$datas[] = $brand;
}
!empty($datas) && $result['hasFavBrand'] = $datas;
}
return $result;
}
public static function favoriteDelete($uid, $fav_id)
{
$result = array();
if (empty($fav_id)) {
$result['code'] = 400;
$result['message'] = '取消的商品不可用';
} else {
$result = UserData::favoriteDelete($uid, $fav_id);
}
return $result;
}
/**
* 处理浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array处理之后的数据
*/
public static function browserRecord($uid, $udid, $page, $limit)
{
$result = array();
$records = UserData::browseRecord($uid, $udid, $page, $limit);
// 处理数据
if (isset($records['data']['product_list']) && !empty($records['data']['product_list'])) {
$result = $records['data']['product_list'];
}
return $result;
}
/**
* 处理YOHO币数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的YOHO币数据
*/
public static function getYohoCoinData($uid)
{
$result = array();
// 调用接口获取YOHO币
$yohoCoin = UserData::yohoCoinData($uid);
// 处理YOHO币数据
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
$result['yohoCoin']['coinNum'] = $yohoCoin['data']['total'];
}
return $result;
}
/**
* 处理优惠券数据
*
* @param int $uid 用户ID
* @param int $page 第几页
* @return array|mixed 处理之后的优惠券数据
*/
public static function getCouponData($uid, $page)
{
$result = array();
// 调用接口获取优惠券数据
$coupons = UserData::couponData($uid, $page);
// 处理优惠券数据
if (!empty($coupons['unused'])) {
$result['unused'] = $coupons['unused']['info'];
}
if (!empty($coupons['used'])) {
$result['used'] = $coupons['used']['info'];
}
return $result;
}
/**
* 处理地址数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的地址数据
*/
public static function getAddressData($uid)
{
$result = array();
// 调用接口获取地址数据
$address = UserData::addressData($uid);
// 处理地址数据
if (isset($address['data']) && !empty($address['data'])) {
$result = $address['data'];
}
return $result;
}
/**
* 处理地址列表数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的地址列表数据
*/
public static function getAddressListData($uid)
{
$result = array();
if (USE_CACHE) {
$key = CacheConfig::KEY_ACTION_ADDRESS_LIST_DATA;
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get($key, 'master');
if (!empty($result)) {
return $result;
}
}
// 调用接口获取地址列表数据
$address = UserData::addressListData($uid);
// 处理地址数据
if (isset($address['data']) && !empty($address['data'])) {
$result = $address['data'];
}
if (USE_CACHE) {
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if (empty($result)) {
$result = Cache::get($key, 'slave');
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else {
Cache::set($key, $result, 1800); // 缓存30分钟
}
}
return $result;
}
/**
* 根据用户id和地址id获取地址数据
*
* @param int $uid 用户ID
* @param int $id 地址ID
* @return array|mixed 地址数据
*/
public static function getAddressDataById($uid, $id)
{
$result = array();
// 调用接口获取地址数据
$address = self::getAddressData($uid);
// 处理地址数据
foreach ($address as $val) {
if ($val['address_id'] === $id) {
$result = $val;
break;
}
}
return $result;
}
/**
* 保存地址数据
*
* @param int $uid 用户ID
* @param string $address 地址信息
* @param int $area_code 城市码
* @param string $consignee 收货人
* @param string $email 邮箱地址
* @param int $id 地址唯一标识符id
* @param string $mobile 手机号码
* @param string $zip_code 邮编
* @return array|mixed 处理之后的地址列表数据
*/
public static function saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code)
{
$result = array();
// 参数验证
if (empty($uid)) {
$result['code'] = 400;
$result['message'] = '用户不可用';
} else if (empty($address)) {
$result['code'] = 401;
$result['message'] = '请输入可用的地址信息';
} else if (empty($area_code)) {
$result['code'] = 402;
$result['message'] = '地区码不可用';
} else if (empty($consignee)) {
$result['code'] = 403;
$result['message'] = '请输入收件人姓名';
} else if (!empty($email) && !Helpers::verifyEmail($email)) {
$result['code'] = 404;
$result['message'] = '输入的邮箱地址格式不正确';
} else if (!empty($mobile) && !Helpers::verifyMobile($mobile)) {
$result['code'] = 404;
$result['message'] = '输入的手机号码格式不正确';
} else {
// 调用接口保存地址数据
$address = UserData::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
// 处理返回结果
if (isset($address['code']) && $address['code'] == 200) {
$result['code'] = $address['code'];
$result['message'] = $address['message'];
}
}
return $result;
}
/**
* 设置默认地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array|mixed 处理之后的返回数据
*/
public static function setDefaultAddress($uid, $id)
{
$result = array('code' => 400, 'message' => '错误');
// 调用接口设置默认地址
$address = UserData::setDefaultAddress($uid, $id);
// 处理返回结果
if ($address && isset($address['code'])) {
$result = $address;
}
return $result;
}
/**
* 删除地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array|mixed 处理之后的返回数据
*/
public static function deleteAddress($uid, $id)
{
$result = array('code' => 400, 'message' => '错误');
// 调用接口删除地址
$address = UserData::deleteAddress($uid, $id);
// 处理返回结果
if ($address && isset($address['code'])) {
$result = $address;
}
return $result;
}
/**
* 处理意见反馈数据
*
* @param string $udid 客户端唯一标识
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array|mixed 处理之后的意见反馈数据
*/
public static function getSuggestData($udid, $page, $limit)
{
$result = array();
// 调用接口获取地址数据
$suggest = UserData::suggestData($udid, $page, $limit);
// 处理意见反馈数据
if (isset($suggest['data']) && !empty($suggest['data'])) {
$one = array();
foreach ($suggest['data']['list'] as $val) {
$one = array();
$one['suggest_id'] = $val['id'];
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
$one['good'] = (bool)($val['is_reliable']);
$one['bad'] = !$one['good'];
$result[] = $one;
}
}
return $result;
}
/**
* 图片上传
*
* @return array|mixed 保存意见反馈数据之后的返回
*/
public static function saveSuggestImg($filename)
{
$result = array();
if (!isset($_FILES[$filename])) {
$result['code'] = 400;
$result['message'] = '文件上传错误';
} else {
$result = Images::saveImage($filename);
}
return $result;
}
/**
* 保存意见反馈数据
*
* @param int $uid 用户ID
* @param string $content 意见内容
* @param mixed $image 图片地址
* @param int $suggest_type 意见类型
* @return array|mixed 保存意见反馈数据之后的返回
*/
public static function saveSuggestData($uid, $content, $image, $suggest_type)
{
$result = array('code' => 400, 'message' => '保存出错');
// 调用接口保存意见反馈数据
$save = UserData::savesuggestData($uid, $content, $image, $suggest_type);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '谢谢您的反馈';
}
return $result;
}
/**
* 处理意见靠谱,不靠谱接口返回结果
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @return array|mixed 处理之后的数据
*/
public static function upAndDown($uid, $udid, $suggest_id)
{
$result = array('code' => 400, 'message' => '出错啦');
if (empty($suggest_id)) {
$result['code'] = 401;
$result['message'] = '指定意见不存在';
} else {
// 调用接口
$save = UserData::upAndDown($uid, $udid, $suggest_id);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '操作成功';
}
}
return $result;
}
/**
* 处理我的消息数据
*
* @param int $uid 用户ID
* @param int $page 获取第一页,默认是0
* @param int $size 获取数目,默认是10
* @return array|mixed 处理之后的返回
*/
public static function getMessageData($uid, $page, $size)
{
$result = array();
$messageData = UserData::messageData($uid, $page, $size);
// 处理我的消息数据
if (isset($messageData['data']) && !empty($messageData['data'])) {
$result = $messageData['data'];
}
return $result;
}
/**
* 处理在线客服数据
*
* @return array|mixed 处理之后的返回
*/
public static function getOnlineServiceData()
{
$result = array();
$serviceData = UserData::onlineServiceData();
// 处理在线客服数据
if (isset($serviceData['data']) && !empty($serviceData['data'])) {
$result = $serviceData['data'];
}
return $result;
}
}
return $result;
}
public static function favoriteDelete($uid, $fav_id)
{
$result = array();
if (empty($fav_id)) {
$result['code'] = 400;
$result['message'] = '取消的商品不可用';
} else {
$result = UserData::favoriteDelete($uid, $fav_id);
}
return $result;
}
/**
* 处理浏览记录数据
*
* @param int $uid 用户ID
* @param int $udid 客户端唯一标识
* @param int $page 第几页,默认为1
* @param int $limit 限制多少条,默认100
* @return array处理之后的数据
*/
public static function browserRecord($uid, $udid, $page, $limit)
{
$result = array();
$records = UserData::browseRecord($uid, $udid, $page, $limit);
// 处理数据
if (isset($records['data']['product_list']) && !empty($records['data']['product_list'])) {
$result = $records['data']['product_list'];
}
return $result;
}
/**
* 删除浏览记录数据
*
* @param int $uid 用户ID
* @param int $skn 商品SKN
* @return array 处理之后的数据
*/
public static function delRecord($uid, $skn)
{
$result = array('code' => 400, 'message' => '出错啦~');
$record = UserData::delRecord($uid, $skn);
// 处理数据
if ($record && isset($record['code'])) {
$result['code'] = $record['code'];
$result['message'] = $record['message'];
}
return $result;
}
/**
* 处理YOHO币数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的YOHO币数据
*/
public static function getYohoCoinData($uid)
{
$result = array();
// 调用接口获取YOHO币
$yohoCoin = UserData::yohoCoinData($uid);
// 处理YOHO币数据
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
$result['yohoCoin']['coinNum'] = $yohoCoin['data']['total'];
}
return $result;
}
/**
* 处理优惠券数据
*
* @param int $uid 用户ID
* @param int $status 优惠券状态,0表示未使用,1表示已使用
* @param int $page 第几页
* @return array|mixed 处理之后的优惠券数据
*/
public static function getCouponData($uid, $status, $page)
{
$result = array();
// 调用接口获取优惠券数据
$coupons = UserData::couponData($uid, $status, $page);
// 处理优惠券数据
if (isset($coupons['data']) && !empty($coupons['data']['total'])) {
$result['coupons'] = $coupons['data']['info'];
foreach ($result['coupons'] as &$val) {
// 处理已使用的优惠券
if ($status == 1) {
$val['used'] = true;
}
}
}
return $result;
}
/**
* 处理地址数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的地址数据
*/
public static function getAddressData($uid)
{
$result = array();
// 调用接口获取地址数据
$address = UserData::addressData($uid);
// 处理地址数据
if (isset($address['data']) && !empty($address['data'])) {
$result = $address['data'];
}
return $result;
}
/**
* 处理地址列表数据
*
* @param int $uid 用户ID
* @return array|mixed 处理之后的地址列表数据
*/
public static function getAddressListData($uid)
{
$result = array();
if (USE_CACHE) {
$key = CacheConfig::KEY_ACTION_ADDRESS_LIST_DATA;
// 先尝试获取一级缓存(master), 有数据则直接返回.
$result = Cache::get($key, 'master');
if (!empty($result)) {
return $result;
}
}
// 调用接口获取地址列表数据
$address = UserData::addressListData($uid);
// 处理地址数据
if (isset($address['data']) && !empty($address['data'])) {
$result = $address['data'];
}
if (USE_CACHE) {
// 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.
if (empty($result)) {
$result = Cache::get($key, 'slave');
}
// 接口调用正常,数据封装完成, 则设置一级(master)和二级(slave)数据缓存
else {
Cache::set($key, $result, 1800); // 缓存30分钟
}
}
return $result;
}
/**
* 根据用户id和地址id获取地址数据
*
* @param int $uid 用户ID
* @param int $id 地址ID
* @return array|mixed 地址数据
*/
public static function getAddressDataById($uid, $id)
{
$result = array();
// 调用接口获取地址数据
$address = self::getAddressData($uid);
// 处理地址数据
foreach ($address as $val) {
if ($val['address_id'] == $id) {
$result = $val;
break;
}
}
return $result;
}
/**
* 保存地址数据
*
* @param int $uid 用户ID
* @param string $address 地址信息
* @param int $area_code 城市码
* @param string $consignee 收货人
* @param string $email 邮箱地址
* @param int $id 地址唯一标识符id
* @param string $mobile 手机号码
* @param string $zip_code 邮编
* @return array|mixed 处理之后的地址列表数据
*/
public static function saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code)
{
$result = array();
// 参数验证
if (empty($uid)) {
$result['code'] = 400;
$result['message'] = '用户不可用';
} else if (empty($address)) {
$result['code'] = 401;
$result['message'] = '请输入可用的地址信息';
} else if (empty($area_code)) {
$result['code'] = 402;
$result['message'] = '地区码不可用';
} else if (empty($consignee)) {
$result['code'] = 403;
$result['message'] = '请输入收件人姓名';
} else if (!empty($email) && !Helpers::verifyEmail($email)) {
$result['code'] = 404;
$result['message'] = '输入的邮箱地址格式不正确';
} else if (!empty($mobile) && !Helpers::verifyMobile($mobile)) {
$result['code'] = 404;
$result['message'] = '输入的手机号码格式不正确';
} else {
$address = htmlspecialchars($address);
$consignee = htmlspecialchars($consignee);
// 调用接口保存地址数据
$address = UserData::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
// 处理返回结果
if (isset($address['code']) && $address['code'] == 200) {
$result['code'] = $address['code'];
$result['message'] = $address['message'];
}
}
return $result;
}
/**
* 设置默认地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array|mixed 处理之后的返回数据
*/
public static function setDefaultAddress($uid, $id)
{
$result = array('code' => 400, 'message' => '错误');
// 调用接口设置默认地址
$address = UserData::setDefaultAddress($uid, $id);
// 处理返回结果
if ($address && isset($address['code'])) {
$result = $address;
}
return $result;
}
/**
* 删除地址
*
* @param int $uid 用户ID
* @param int $id 地址唯一标识符id
* @return array|mixed 处理之后的返回数据
*/
public static function deleteAddress($uid, $id)
{
$result = array('code' => 400, 'message' => '错误');
// 调用接口删除地址
$address = UserData::deleteAddress($uid, $id);
// 处理返回结果
if ($address && isset($address['code'])) {
$result = $address;
}
return $result;
}
/**
* 处理意见反馈数据
*
* @param string $udid 客户端唯一标识
* @param int $page 第几页,默认1
* @param int $limit 限制读取的数目,默认10
* @return array|mixed 处理之后的意见反馈数据
*/
public static function getSuggestData($udid, $page, $limit)
{
$result = array();
// 调用接口获取地址数据
$suggest = UserData::suggestData($udid, $page, $limit);
// 处理意见反馈数据
if (isset($suggest['data']) && !empty($suggest['data'])) {
$one = array();
foreach ($suggest['data']['list'] as $val) {
$one = array();
$one['suggest_id'] = $val['id'];
$one['imgUrl'] = !empty($val['cover_image']) ? Images::getSourceUrl($val['cover_image'], 'suggest') . '?imageMogr2/thumbnail/320x155/extent/240x155/background/d2hpdGU=/position/center/quality/90' : '';
$one['title'] = $val['filter_content'];
$one['content'] = $val['reply_content'];
$one['good'] = ($val['is_reliable'] == 1);
$one['bad'] = ($val['is_reliable'] == 2);
$one['none'] = ($val['is_reliable'] == 0);
$result[] = $one;
}
}
return $result;
}
/**
* 图片上传
*
* @return array|mixed 保存意见反馈数据之后的返回
*/
public static function saveSuggestImg($filename)
{
$result = array();
if (!isset($_FILES[$filename])) {
$result['code'] = 400;
$result['message'] = '文件上传错误';
} else {
$result = Images::saveImage($filename);
}
return $result;
}
/**
* 保存意见反馈数据
*
* @param int $uid 用户ID
* @param string $content 意见内容
* @param mixed $image 图片地址
* @param int $suggest_type 意见类型
* @return array|mixed 保存意见反馈数据之后的返回
*/
public static function saveSuggestData($uid, $content, $image, $suggest_type)
{
$result = array('code' => 400, 'message' => '保存出错');
// 调用接口保存意见反馈数据
$save = UserData::savesuggestData($uid, $content, $image, $suggest_type);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '谢谢您的反馈';
}
return $result;
}
/**
* 处理意见靠谱,不靠谱接口返回结果
*
* @param int $uid 用户ID
* @param string $udid 客户端唯一标识
* @param int $suggest_id 意见id
* @param int $reliable 是否靠谱,1表示靠谱,2表示不靠谱
* @return array|mixed 处理之后的数据
*/
public static function upAndDown($uid, $udid, $suggest_id, $reliable)
{
$result = array('code' => 400, 'message' => '出错啦');
if (empty($suggest_id)) {
$result['code'] = 401;
$result['message'] = '指定意见不存在';
} else {
// 调用接口
$save = UserData::upAndDown($uid, $udid, $suggest_id, $reliable);
if (isset($save['code']) && $save['code'] == 200) {
$result['code'] = 200;
$result['message'] = '操作成功';
}
}
return $result;
}
/**
* 处理我的消息数据
*
* @param int $uid 用户ID
* @param int $page 获取第一页,默认是0
* @param int $size 获取数目,默认是10
* @return array|mixed 处理之后的返回
*/
public static function getMessageData($uid, $page, $size)
{
$result = array();
$messageData = UserData::messageData($uid, $page, $size);
// 处理我的消息数据
if (isset($messageData['data']) && !empty($messageData['data'])) {
$result = $messageData['data'];
}
return $result;
}
/**
* 处理在线客服数据
*
* @return array|mixed 处理之后的返回
*/
public static function getOnlineServiceData()
{
$result = array();
$serviceData = UserData::onlineServiceData();
// 处理在线客服数据
if (isset($serviceData['data']) && !empty($serviceData['data'])) {
$result = $serviceData['data'];
}
return $result;
}
}
... ...