Authored by whb

pc的购物车代码

Showing 100 changed files with 1008 additions and 971 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

<?php
namespace LibModels\Web\Home;
use Api\Sign;
use Api\Yohobuy;
use LibModels\Web\Product\SearchData;
/**
* 购物车的数据模型
*
* @name CartData
* @package LibModels/Web/Home
* @copyright yoho.inc
* @version 1.0 (2016-02-17 14:12:32)
* @author fei.hong <fei.hong@yoho.cn>
*/
class CartData
{
/**
* 加入购物车接口
*
* @param int $productSku 商品SKU
* @param int $buyNumber 购买数量
* @param int $goodsType 商品类型,0表示普通商品,1表示加价购商品
* @param int $isEdit 是否是编辑商品SKU,0表示不是编辑
* @param null|int $promotionId 促销id,默认null(加价购有关)
* @param null|int $uid 用户UID,可以不传
* @param string $shoppingKey 未登录用户唯一识别码,可以不传
* @return array 加入购物车接口返回的数据
*/
public static function addToCart($productSku, $buyNumber, $goodsType, $isEdit = 0, $promotionId = null, $uid = null, $shoppingKey = null)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.add';
$param['product_sku'] = $productSku;
$param['buy_number'] = intval($buyNumber);
$param['goods_type'] = $goodsType;
$param['edit_product_sku'] = $isEdit;
$param['selected'] = 'Y';
$param['promotion_id'] = $promotionId;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车商品选择与取消接口
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 购物车接口返回的数据
*/
public static function selectGoods($uid, $sku, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.selected';
$param['product_sku_list'] = $sku;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车数据
*
* @param int $uid 用户ID
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 购物车接口返回的数据
*/
public static function cartData($uid, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.cart';
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 移出购物车
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
public static function removeFromCart($uid, $sku, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.remove';
$param['product_sku_list'] = $sku;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 移入收藏夹
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @return array 接口返回的数据
*/
public static function addToFav($uid, $sku)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.addfavorite';
$param['product_sku_list'] = $sku;
$param['uid'] = $uid;
$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 cartProductData($uid, $skn)
{
$param = Yohobuy::param();
$param['method'] = 'app.product.data';
$param['product_skn'] = $skn;
$param['showcomment'] = 'N';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 获取加价购商品详情数据
*
* @param int $skn 商品skn
* @param int $promotionId 加价购商品促销ID
* @return array 接口返回的数据
*/
public static function giftProductData($skn, $promotionId)
{
$param = Yohobuy::param();
$param['method'] = 'app.product.gift';
$param['product_skn'] = $skn;
$param['promotion_id'] = $promotionId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 增减购物车商品数量
*
* @param int $uid 用户ID
* @param string $sku 商品SKU
* @param int $increaseNum 增加的数目
* @param int $decreaseNum 减少的数目
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
public static function modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey)
{
$param = Yohobuy::param();
$param['product_sku'] = $sku;
// 增加
if (!empty($increaseNum)) {
$param['method'] = 'app.Shopping.increase';
$param['increase_number'] = intval($increaseNum);
}
// 减少
if (!empty($decreaseNum)) {
$param['method'] = 'app.Shopping.decrease';
$param['decrease_number'] = intval($decreaseNum);
}
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 修改购物车商品数据
*
* @param int $uid 用户ID
* @param string $swapData 商品数据
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
public static function modifyCartProduct($uid, $swapData, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.swap';
$param['swap_data'] = $swapData;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param int $isUseYohoCoin 是否使用有货币,默认0不使用, 1使用
* @return array 接口返回的数据
*/
public static function cartPay($uid, $cartType, $isUseYohoCoin = 0)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.payment';
$param['cart_type'] = $cartType;
$param['yoho_coin_mode'] = $isUseYohoCoin;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--支付方式和配送方式选择
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运
* @param int $paymentType 支付方式,1表示在线支付,2表示货到付款
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
public static function orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $yohoCoin, $redEnvelopes)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.compute';
$param['cart_type'] = $cartType;
$param['delivery_way'] = $deliveryWay;
$param['payment_type'] = $paymentType;
if (!empty($couponCode)) {
$param['coupon_code'] = $couponCode;
}
if (!empty($yohoCoin)) {
$param['use_yoho_coin'] = $yohoCoin;
}
if (!empty($redEnvelopes)) {
$param['use_red_envelopes'] = $redEnvelopes;
}
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--使用优惠券
*
* @param int $uid 用户ID
* @param string $couponCode 优惠券代码
* @return array 接口返回的数据
*/
public static function searchCoupon($uid, $couponCode)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.useCoupon';
$param['coupon_code'] = $couponCode;
$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 getCouponList($uid, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.coupons.lists';
$param['type'] = 'notuse';
$param['page'] = 1;
$param['limit'] = $limit;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--提交结算信息
*
* @param int $uid 用户ID
* @param int $addressId 地址ID
* @param string $cartType 购物车类型
* @param int $deliveryTime 寄送时间ID
* @param int $deliveryWay 寄送方式ID
* @param string $invoiceTitle 发票说明
* @param int $invoiceId 发票类型ID
* @param int $paymentId 支付方式ID
* @param int $paymentType 支付类型ID
* @param string $remark 留言
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param int $isPreContact 送货前是否联系
* @param int $isPrintPrice 是否打印价格
* @param string|null $userAgent 联盟过来用户下单时需要的User-Agent信息
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId,
$paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $userAgent, $redEnvelopes)
{
$param = Yohobuy::param();
$param['debug'] = 'Y';
$param['client_type'] = 'web'; // 需要ERP统计PC的下单量
$param['private_key'] = Yohobuy::$privateKeyList['web']; // PC默认使用Android的私钥
$param['method'] = 'app.Shopping.submit';
$param['address_id'] = $addressId;
$param['cart_type'] = $cartType;
$param['delivery_time'] = $deliveryTime;
$param['delivery_way'] = $deliveryWay;
$param['uid'] = $uid;
if (!empty($invoiceTitle)) {
$param['invoices_title'] = $invoiceTitle;
}
if (!empty($invoiceId)) {
$param['invoices_type_id'] = $invoiceId;
}
if (!empty($redEnvelopes)) {
$param['use_red_envelopes'] = $redEnvelopes;
}
$param['payment_id'] = $paymentId;
$param['payment_type'] = $paymentType;
if (!empty($couponCode)) {
$param['coupon_code'] = $couponCode;
}
if (!empty($yohoCoin)) {
$param['use_yoho_coin'] = $yohoCoin;
}
if (!empty($isPreContact)) {
$param['is_pre_contact'] = 'Y';
}
if (!empty($isPrintPrice)) {
$param['is_print_price'] = 'Y';
}
$param['remark'] = $remark;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 10, $userAgent);
}
/**
* 购物车数量
*
* @param int $uid 用户ID
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 购物车接口返回的数据
*/
public static function cartCount($uid, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.count';
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 凑单商品
*
* @param int $page 分页页码
* @return array
*/
public static function togetherProduct($page)
{
$param = Yohobuy::param();
$param['method'] = 'web.product.together';
$param['client_type'] = 'web';
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['page'] = $page;
$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 = 10)
{
$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 string $query 查询的条件
* @param int $limit 查询的限制数
* @return array
*/
public static function browseRecordFromSearch($query, $limit = 10)
{
$param = array();
$param['order'] = 'shelve_time:desc';
$param['page'] = 1;
$param['viewNum'] = $limit;
$param['query'] = $query;
return Yohobuy::get(SearchData::getUrl('search'), $param);
}
}
<?php
namespace LibModels\Web\Home;
use Api\Sign;
use Api\Yohobuy;
use LibModels\Web\Product\SearchData;
/**
* 购物车的数据模型
*
* @name CartData
* @package LibModels/Web/Home
* @copyright yoho.inc
* @version 1.0 (2016-02-17 14:12:32)
* @author fei.hong <fei.hong@yoho.cn>
*/
class CartData
{
/**
* 加入购物车接口
*
* @param int $productSku 商品SKU
* @param int $buyNumber 购买数量
* @param int $goodsType 商品类型,0表示普通商品,1表示加价购商品
* @param int $isEdit 是否是编辑商品SKU,0表示不是编辑
* @param null|int $promotionId 促销id,默认null(加价购有关)
* @param null|int $uid 用户UID,可以不传
* @param string $shoppingKey 未登录用户唯一识别码,可以不传
* @return array 加入购物车接口返回的数据
*/
public static function addToCart($productSku, $buyNumber, $goodsType, $isEdit = 0, $promotionId = null, $uid = null, $shoppingKey = null)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.add';
$param['product_sku'] = $productSku;
$param['buy_number'] = intval($buyNumber);
$param['goods_type'] = $goodsType;
$param['edit_product_sku'] = $isEdit;
$param['selected'] = 'Y';
$param['promotion_id'] = $promotionId;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车商品选择与取消接口
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @param string $shoppingKey 未登录用户唯一识别码
* @param bool $hasPromotion 是否有促销ID
* @return array 购物车接口返回的数据
*/
public static function selectGoods($uid, $sku, $shoppingKey, $hasPromotion = false)
{
$param = Yohobuy::param();
$param['method'] = $hasPromotion ? 'app.Shopping.selectedAndCart' : 'app.Shopping.selected';
$param['product_sku_list'] = $sku;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车数据
*
* @param int $uid 用户ID
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 购物车接口返回的数据
*/
public static function cartData($uid, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.cart';
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 移出购物车
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @param string $shoppingKey 未登录用户唯一识别码
* @param bool $hasPromotion 是否有促销ID
* @return array 接口返回的数据
*/
public static function removeFromCart($uid, $sku, $shoppingKey, $hasPromotion = false)
{
$param = Yohobuy::param();
$param['method'] = $hasPromotion ? 'app.Shopping.removeAndCart' : 'app.Shopping.remove';
$param['product_sku_list'] = $sku;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 移入收藏夹
*
* @param int $uid 用户ID
* @param string $sku 商品sku列表
* @param bool $hasPromotion 是否有促销ID
* @return array 接口返回的数据
*/
public static function addToFav($uid, $sku, $hasPromotion = false)
{
$param = Yohobuy::param();
$param['method'] = $hasPromotion ? 'app.Shopping.addfavoriteAndCart' : 'app.Shopping.addfavorite';
$param['product_sku_list'] = $sku;
$param['uid'] = $uid;
$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 cartProductData($uid, $skn)
{
$param = Yohobuy::param();
$param['method'] = 'app.product.data';
$param['product_skn'] = $skn;
$param['showcomment'] = 'N';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 获取加价购商品详情数据
*
* @param int $skn 商品skn
* @param int $promotionId 加价购商品促销ID
* @return array 接口返回的数据
*/
public static function giftProductData($skn, $promotionId)
{
$param = Yohobuy::param();
$param['method'] = 'app.product.gift';
$param['product_skn'] = $skn;
$param['promotion_id'] = $promotionId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 增减购物车商品数量
*
* @param int $uid 用户ID
* @param string $sku 商品SKU
* @param int $increaseNum 增加的数目
* @param int $decreaseNum 减少的数目
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
public static function modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey)
{
$param = Yohobuy::param();
$param['product_sku'] = $sku;
// 增加
if (!empty($increaseNum)) {
$param['method'] = 'app.Shopping.increase';
$param['increase_number'] = intval($increaseNum);
}
// 减少
if (!empty($decreaseNum)) {
$param['method'] = 'app.Shopping.decrease';
$param['decrease_number'] = intval($decreaseNum);
}
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 修改购物车商品数据
*
* @param int $uid 用户ID
* @param string $swapData 商品数据
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 接口返回的数据
*/
public static function modifyCartProduct($uid, $swapData, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.swap';
$param['swap_data'] = $swapData;
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param int $isUseYohoCoin 是否使用有货币,默认0不使用, 1使用
* @return array 接口返回的数据
*/
public static function cartPay($uid, $cartType, $isUseYohoCoin = 0)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.payment';
$param['cart_type'] = $cartType;
$param['yoho_coin_mode'] = $isUseYohoCoin;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--支付方式和配送方式选择
*
* @param int $uid 用户ID
* @param string $cartType 购物车类型,ordinary表示普通购物车
* @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运
* @param int $paymentType 支付方式,1表示在线支付,2表示货到付款
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
public static function orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $yohoCoin, $redEnvelopes)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.compute';
$param['cart_type'] = $cartType;
$param['delivery_way'] = $deliveryWay;
$param['payment_type'] = $paymentType;
if (!empty($couponCode)) {
$param['coupon_code'] = $couponCode;
}
if (!empty($yohoCoin)) {
$param['use_yoho_coin'] = $yohoCoin;
}
if (!empty($redEnvelopes)) {
$param['use_red_envelopes'] = $redEnvelopes;
}
// 控制是否判断YOHO币超出订单金额
$param['check_yohocoin_amount'] = 'Y';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--使用优惠券
*
* @param int $uid 用户ID
* @param string $couponCode 优惠券代码
* @return array 接口返回的数据
*/
public static function searchCoupon($uid, $couponCode)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.useCoupon';
$param['coupon_code'] = $couponCode;
$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 getCouponList($uid, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.coupons.lists';
$param['type'] = 'notuse';
$param['page'] = 1;
$param['limit'] = $limit;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 购物车结算--提交结算信息
*
* @param int $uid 用户ID
* @param int $addressId 地址ID
* @param string $cartType 购物车类型
* @param int $deliveryTime 寄送时间ID
* @param int $deliveryWay 寄送方式ID
* @param string $invoiceTitle 发票说明
* @param int $invoiceId 发票类型ID
* @param int $paymentId 支付方式ID
* @param int $paymentType 支付类型ID
* @param string $remark 留言
* @param string $couponCode 优惠券码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param int $isPreContact 送货前是否联系
* @param int $isPrintPrice 是否打印价格
* @param string|null $userAgent 联盟过来用户下单时需要的User-Agent信息
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId,
$paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $userAgent, $redEnvelopes)
{
$param = Yohobuy::param();
$param['debug'] = 'Y';
$param['client_type'] = 'web'; // 需要ERP统计PC的下单量
$param['private_key'] = Yohobuy::$privateKeyList['web']; // PC默认使用Android的私钥
$param['method'] = 'app.Shopping.submit';
$param['address_id'] = $addressId;
$param['cart_type'] = $cartType;
$param['delivery_time'] = $deliveryTime;
$param['delivery_way'] = $deliveryWay;
$param['uid'] = $uid;
if (!empty($invoiceTitle)) {
$param['invoices_title'] = $invoiceTitle;
}
if (!empty($invoiceId)) {
$param['invoices_type_id'] = $invoiceId;
}
if (!empty($redEnvelopes)) {
$param['use_red_envelopes'] = $redEnvelopes;
}
$param['payment_id'] = $paymentId;
$param['payment_type'] = $paymentType;
if (!empty($couponCode)) {
$param['coupon_code'] = $couponCode;
}
if (!empty($yohoCoin)) {
$param['use_yoho_coin'] = $yohoCoin;
}
if (!empty($isPreContact) && $isPreContact == 'true') {
$param['is_pre_contact'] = 'Y';
}
if (!empty($isPrintPrice) && $isPrintPrice == 'true') {
$param['is_print_price'] = 'Y';
}
$param['remark'] = $remark;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param, false, false, 10, $userAgent);
}
/**
* 购物车数量
*
* @param int $uid 用户ID
* @param string $shoppingKey 未登录用户唯一识别码
* @return array 购物车接口返回的数据
*/
public static function cartCount($uid, $shoppingKey)
{
$param = Yohobuy::param();
$param['method'] = 'app.Shopping.count';
if (!empty($uid)) {
$param['uid'] = $uid;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 凑单商品
*
* @param int $page 分页页码
* @return array
*/
public static function togetherProduct($page)
{
$param = Yohobuy::param();
$param['method'] = 'web.product.together';
$param['client_type'] = 'web';
$param['private_key'] = Yohobuy::$privateKeyList['web'];
$param['page'] = $page;
$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 = 10)
{
$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 string $query 查询的条件
* @param int $limit 查询的限制数
* @return array
*/
public static function browseRecordFromSearch($query, $limit = 10)
{
$param = array();
$param['order'] = 'shelve_time:desc';
$param['page'] = 1;
$param['viewNum'] = $limit;
$param['query'] = $query;
return Yohobuy::get(SearchData::getUrl('search'), $param);
}
}
... ...
... ... @@ -92,16 +92,16 @@
</td>
</tr>
{{# productItem}}
<tr class="pre-sell-box" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}}>
<tr class="pre-sell-box" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<td>
<div class="pay-pro">
<input class="cart-item-check" type="checkbox" name="" id="" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}">
<input class="cart-item-check" type="checkbox" name="" id="" data-goodstype="{{goodsType}}" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
<span class="incentive">预售</span>
</a>
<p class="pay-pro-info">
<a href="{{link}}">{{productTitle}}</a>
<a href="{{link}}" target="_blank">{{productTitle}}</a>
<span>颜色:{{productColor}} 尺码:{{productSize}}</span>
<span class="presell">上市期:{{preSellDate}}</span>
</p>
... ... @@ -110,9 +110,18 @@
<td class="productPrice">¥{{productPrice}}</td>
<td>{{yohoIcon}}</td>
<td class="adjust-cart-num">
<span class="minus"></span>
<input type="text" value="{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
{{#if isGift}}
<div>{{productNum}}</div>
{{^}}
{{#if isPriceGift}}
<div>{{productNum}}</div>
{{^}}
<span class="minus"></span>
<input type="text" value="{{productNum}}" readonly="readonly"/>
<span class="plus"></span>
<p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
{{/if}}
{{/if}}
</td>
<td class="sub-total">¥{{productSubtotal}}</td>
<td class="cart-operation">
... ... @@ -130,12 +139,10 @@
</td>
</tr>
{{# productItem}}
<tr class="common-sell-box" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}}>
<tr class="common-sell-box" {{#if pid}}data-pid="{{pid}}"{{/if}} {{#if id}}data-id="{{id}}"{{/if}} {{#if skn}}data-skn="{{skn}}"{{/if}} {{#if sku}}data-sku="{{sku}}"{{/if}} {{#if productNum}}data-productnum="{{productNum}}"{{/if}} {{#if promotionId}}data-promotionid="{{promotionId}}"{{/if}} {{#if goodsType}}data-goodstype="{{goodsType}}"{{/if}}>
<td>
<div class="pay-pro">
{{#unless isGift}}
<input class="cart-item-check" data-goodstype="{{goodsType}}" type="checkbox" name="" id="" {{#if isChecked}}checked{{/if}}/>
{{/unless}}
<input class="cart-item-check {{#if isGift}}none{{/if}}" type="checkbox" name="" id="" {{#if isChecked}}checked{{/if}}/>
<a class="pay-pro-icon {{#if isGift}}giftInfo{{/if}}" href="{{link}}" target="_blank">
<img src="{{imgCover}}">
{{#isPriceGift}}
... ... @@ -248,10 +255,13 @@
</p>
</div>
</td>
<td style="width:13%;"><del style="margin-right: 5px;">{{marketPrice}}</del><span>¥{{subjoinPrice}}</span></td>
<td style="width:13%;">
<del class="wapper-price" style="margin-right: 5px;"{{marketPrice}}</del>
<span class="subjoin-price"{{subjoinPrice}}</span>
</td>
<td style="width:7%;">{{yohoIcon}}</td>
<td style="width:10%;">1</td>
<td class="subjoin-price" style="width:10%;">¥{{subjoinPrice}}</td>
<td style="width:10%;">¥{{subjoinPrice}}</td>
<td style="width:20%; border-right: none;">
{{#isPriceGift}}
<a href="javascript:void(0);" data-id="{{id}}" class="cart-add-btn order"><span></span></a>
... ... @@ -271,7 +281,7 @@
<div class="dev-revocation {{#unless deleteShop}}none{{/unless}}">
<table>
{{#deleteShop}}
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}">
<tr data-productnum="{{productNum}}" data-productsku="{{productSku}}" data-promotionid="{{promotionId}}">
<td style="width:40%; text-align: left;">成功删除<a class="title" href="{{link}}" target="_blank">{{productTitle}}</a></td>
<td style="width:10%;"><span class="productPrice">{{productPrice}}</span></td>
<td style="width:10%;"></td>
... ...
<div class="detail-header">
<span class="colse">X关闭</span>
</div>
<div class="detail-body">
<span class="magnify"></span>
{{#colors}}
<div class="detail-bigpic {{#unless focus}}none{{/unless}}">
{{#thumbs}}
<div class="bigpic">
<img src="{{shower}}">
</div>
{{/thumbs}}
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
{{#thumbs}}
<li><img src="{{img}}"></li>
{{/thumbs}}
</ul>
</div>
<span class="next"></span>
</div>
</div>
{{/colors}}
<div class="detail-info">
<div class="title">
<h2>{{name}}</h2>
</div>
<div class="type">
<span class="type-s">新品</span>
</div>
<div class="price">
{{#if salePrice}}
<span class="oldprice">原价:<del>{{marketPrice}}</del></span>
<span class="newprice">现价:<b class="promotion-price">{{salePrice}}</b></span>
{{^}}
<span class="newprice">原价:<b class="promotion-price">{{marketPrice}}</b></span>
{{/if}}
</div>
<div class="order">
<dl>
<dd class="colorBox">选颜色:</dd>
<dt>
<div class="colorBox">
<ul>
{{#colors}}
<li class="color">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src="{{src}}"></p>
<span>{{name}}</span>
</li>
{{/colors}}
</ul>
</div>
</dt>
<dd class="">选尺码:</dd>
<dt>
{{#colors}}
<div class="showSizeBox {{#unless focus}}none{{/unless}}">
{{#size}}
<span data-sku="{{sku}}" data-num="{{num}}">{{name}}</span>
{{/size}}
</div>
{{/colors}}
</dt>
<dd>选件数:</dd>
<dt>
<div class="amount_wrapper">
<i class="amount cut"></i>
<input type="text" id="mnum" class="mnum" value="1" readonly="readonly">
<i class="amount add"></i>
</div>
</dt>
</dl>
</div>
<div class="submit">
<input class="addcart" type="button">
<input class="btn_pre_sale none" type="button">
<input class="btn_sellout none" type="button">
<input class="fav_count" type="button">
</div>
</div>
<div class="detail-size">
<h3>尺码信息<span>(单位:厘米)</span></h3>
{{# size}}
<table>
<thead>
<tr>
{{# thead}}
<td width="{{width}}">{{name}}</td>
{{/ thead}}
</tr>
</thead>
<tbody>
{{# tbody}}
<tr>
{{#each .}}
<td>{{.}}</td>
{{/each}}
</tr>
{{/ tbody}}
</tbody>
</table>
{{/ size}}
<div class="size-info">
※ 以上尺寸为实物实际测量,因测量方式不同会有略微误差,相关数据仅作参考,以收到实物为准。
</div>
</div>
</div>
\ No newline at end of file
<div class="detail-header">
<span class="colse">X关闭</span>
</div>
<div class="detail-body">
<span class="magnify"></span>
{{#colors}}
<div class="detail-bigpic {{#unless focus}}none{{/unless}}">
{{#thumbs}}
<div class="bigpic">
<img src="{{shower}}">
</div>
{{/thumbs}}
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
{{#thumbs}}
<li><img src="{{img}}"></li>
{{/thumbs}}
</ul>
</div>
<span class="next"></span>
</div>
</div>
{{/colors}}
<div class="detail-info">
<div class="title">
<h2>{{name}}</h2>
</div>
<div class="type">
<span class="type-s">新品</span>
</div>
<div class="price">
{{#if salePrice}}
<span class="oldprice">原价:<del>¥{{marketPrice}}</del></span>
<span class="newprice">现价:<b class="promotion-price">¥{{salePrice}}</b></span>
{{^}}
<span class="newprice {{#presalePrice}}none{{/presalePrice}}">原价:<b class="promotion-price">¥{{marketPrice}}</b></span>
{{/if}}
{{#if presalePrice}}
<span class="oldprice">原价:<del>¥{{marketPrice}}</del></span>
<span class="newprice">预售价:<b class="promotion-price">¥{{presalePrice}}</b></span>
{{/if}}
{{#arrivalDate}}
<span class="arrivalDate">上市期:{{arrivalDate}}</span>
{{/arrivalDate}}
</div>
<div class="order">
<dl>
<dd class="colorBox">选颜色:</dd>
<dt>
<div class="colorBox">
<ul>
{{#colors}}
<li class="color">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src="{{src}}"></p>
<span>{{name}}</span>
</li>
{{/colors}}
</ul>
</div>
</dt>
<dd class="">选尺码:</dd>
<dt>
{{#colors}}
<div class="showSizeBox {{#unless focus}}none{{/unless}}">
{{#size}}
<span data-sku="{{sku}}" data-num="{{num}}">{{name}}</span>
{{/size}}
</div>
{{/colors}}
</dt>
<dd>选件数:</dd>
<dt>
<div class="amount_wrapper">
<i class="amount cut"></i>
<input type="text" id="mnum" class="mnum" value="1" readonly="readonly">
<i class="amount add"></i>
</div>
</dt>
</dl>
</div>
<div class="submit">
<input class="addcart" type="button">
<input class="btn_pre_sale none" type="button">
<input class="btn_sellout none" type="button">
<input class="fav_count" type="button">
</div>
</div>
<div class="detail-size">
<h3>尺码信息<span>(单位:厘米)</span></h3>
{{# size}}
<table>
<thead>
<tr>
{{# thead}}
<td width="{{width}}">{{name}}</td>
{{/ thead}}
</tr>
</thead>
<tbody>
{{# tbody}}
<tr>
{{#each .}}
<td>{{.}}</td>
{{/each}}
</tr>
{{/ tbody}}
</tbody>
</table>
{{/ size}}
<div class="size-info">
※ 以上尺寸为实物实际测量,因测量方式不同会有略微误差,相关数据仅作参考,以收到实物为准。
</div>
</div>
</div>
<input value="{{addToCart}}" id="addToCart" type="hidden" />
\ No newline at end of file
... ...
{{> layout/header}}
<div class="order-ensure-page yoho-page clearfix">
{{# orderEnsure}}
<div class="order-edit">
<div class="order-title">
<ul>
<li class="first">查看购物车</li>
<li class="active">填写订单</li>
<li class="end">付款,完成购买</li>
</ul>
</div>
<div class="order-edit-main" id="order-edit-main" cartType="{{cartType}}">
<h2 class="title">请填写并核对以下信息
<a href="{{cartUrl}}" class="btn_backcart"></a>
</h2>
<div class="order-content">
<div class="order-selection address-list">
<h2>收货地址:<span>[修改]</span></h2>
<div class="address-list-inner">
<ul class="exist-address-list">
{{#each hasAddress}}
<li class="has-exist-address">
<input class="radio" type="radio" name="exist-address" id="{{id}}" {{#if checked}}checked{{/if}}/>
<label for="{{id}}">
<strong>{{user}}</strong>
<span>{{address}}</span>
<b class="default-address">设为默认地址</b>
<div class="order-modify-btn">
<span class="address-modify">[修改]</span>
<span class="address-del">[删除]</span>
</div>
</label>
</li>
{{/each}}
<li class="use-new-address hide">
<input class="radio add-address" type="radio" name="address" id=""/>
<label for="">使用新地址</label>
</li>
</ul>
<div class="address-manage hide" cart-type="{{cartType}}">
<ul>
<li>
<span class="address-legend"><i>*</i>收货人姓名:</span>
<input type="text" name="name" class="name text-input"/>
<span>请填写您的真实姓名,最多5个汉字</span>
</li>
<li>
<span class="address-legend"><i>*</i>省市:</span>
<select name="province" id="" class="text-input">
</select>
<select name="city" id="" class="text-input">
</select>
<select name="county" id="" class="text-input">
</select>
<input type="text" name="address" class="text-input"/>
<span>标'*'的为支持加急送的地区,请输入收货的详细地址</span>
</li>
<li>
<span class="address-legend"><i>*</i>手机号码:</span>
<input type="text" name="phone" class="text-input"/>
<span>填写正确手机号便于接收发货和收货通知</span>
</li>
<li>
<span class="address-legend">固定电话:</span>
<div class="address-tel-input">
<input type="text" name="tel-code" class="tel-lengend text-input"/>
<input type="text" name="tel" class="text-input"/>
</div>
<span>如:010-12345678,固话和手机号至少填一项</span>
</li>
<li>
<span class="address-legend">电子邮件:</span>
<input type="text" name="mail" class="text-input"/>
<span>用来接收订单提醒邮件,便于您及时了解订单状态</span>
</li>
<li>
<span class="address-legend">邮编:</span>
<input type="text" name="code" class="text-input"/>
<span>请填写准确的邮编,以确保商品尽快送达</span>
</li>
</ul>
</div>
<span class="save-btn hide">保存并送到这个地址</span>
</div>
</div>
<div class="order-selection pay-time">
<h2>支付及送货时间:<span class="switch-pay-modify">[修改]</span></h2>
<ul class="modity-pay-info">
<li>付款方式:<span>{{defaultPayWay}}</span></li>
{{#if isPreSell}}
<li class="prev-sell-item">发货时间:商品到货后立即发货</li>
{{/if}}
<li>送货时间:<span>{{defaultDelivery}}</span></li>
<li>送货前联系我:<span>否</span></li>
</ul>
<div class="pay-time-modify hide">
<h3 class="pay-time-title">支付方式</h3>
<ul>
<li class="pay-dashed-hr pay-recommend">
<div class="pay-type-legend">
<input value="1" {{#if onlinePay.checked}} checked{{/if}} class="radio {{#if onlinePay.checked}}checked{{/if}}" name="pay-type" type="radio" id="" data-pay="{{onlinePay.paymentId}}"/>
<label for="">在线支付(推荐)</label>
</div>
<span class="pay-type-legend">查看支持在线支付的银行和平台</span>
<div class="support-type hide">
<h4>支持以下支付平台在线支付:</h4>
<ul>
{{#each supportLine}}
<li><img src="{{src}}" alt=""/></li>
{{/each}}
</ul>
<h4>支持以下银行在线支付:</h4>
<ul>
{{#each supportBank}}
<li><img src="{{src}}" alt=""/></li>
{{/each}}
</ul>
</div>
</li>
<li>
{{#if supportDeliveryPay}}
<input value="2" {{#if deliveryPay.checked}}checked{{/if}} class="radio {{#if deliveryPay.checked}}checked{{/if}}" name="pay-type" type="radio" id="" data-pay="{{deliveryPay.paymentId}}"/>
{{/if}}
<label for="">货到付款</label>
<span class="pay-type-tips">注:订单中有限量商品、预售商品、化妆品或者订单金额超过10000元不可以选择货到付款。</span>
</li>
</ul>
<h3>送货时间</h3>
<ul>
{{#each delivery}}
<li>
<input {{#if checked}}checked{{/if}} value={{id}} class="radio" name="pay-time-radio" type="radio" id="{{id}}"/>
<label for="">{{desc}}</label>
</li>
{{/each}}
<li class="pay-dashed-hr pay-type-tips">声明:我们会努力按照您指定的时间配送,但因为天气、交通等各类因素影响,您的订单有可能会有延误现象,敬请谅解!</li>
<li>
<span>送货前是否联系:</span>
<input value="Y" class="radio" name="call-me" type="radio" id=""/>
<label for="">是</label>
<input value="N" checked class="radio" name="call-me" type="radio" id=""/>
<label for="">否</label>
</li>
</ul>
<span class="pay-btn">确定</span>
</div>
</div>
<div class="order-selection select-express">
<h2>选择快递:</h2>
{{#each carriageList}}
<div class="express-list">
<input {{# checked}}checked{{/ checked}} class="radio" type="radio" name="carriagegroup" id="common-{{id}}" value="{{id}}"/>
<label for="common-express">{{name}}:&nbsp;&nbsp;运费 {{value}} {{desc}}</label>
</div>
{{/each}}
<div class="express-list express-tips">注:配送会由于天气,交通等不可抗拒的客观因素造成您收货时间延迟,请您知悉。
</div>
<div class="express-list hide is-sup"><a class="sf" target="_blank" href="sfUrl">您所选择的区域暂不在顺风派送范围内</a>,点击查看详情</div>
<div class="express-list sf hide">如您购买的商品为航空禁运品顺丰会用陆运的方式给你派送,预计3-5天送达,请您见谅</div>
</div>
</div>
</div>
</div>
<div class="order-pay">
<div class="pay-wapper">
<table>
<thead>
<tr>
<th style="width:40%;">
商品信息
</th>
<th style="width:10%;">单价(元)</th>
<th style="width:10%;">返YOHO币</th>
<th style="width:10%;">数量</th>
<th style="width:10%;">小计(元)</th>
<th style="width:20%;">商品金额(元)</th>
</tr>
</thead>
<tbody>
{{#each orderProducts}}
<tr>
<td>
<div class="pay-pro">
<a class="pay-pro-icon" href="{{link}}"><img src="{{imgCover}}" /></a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">{{productTitle}}</a>
<span>颜色:{{productColor}} 尺码:{{productSize}}</span>
</p>
</div>
</td>
<td>
{{productPrice}}
{{#isVipPrice}}
<span class="vipPrice">(VIP)</span>
{{/isVipPrice}}
</td>
<td>{{yohoIcon}}</td>
<td>{{productNum}}</td>
<td class="cart-sub-total {{#xForOne}}xforone{{/xForOne}}">
{{#if xForOne}}
<del>{{productSubtotal}}</del>
<span class="free"></span>
{{^}}
{{productSubtotal}}
{{/if}}
</td>
<td class="cart-sub-total-all">{{productSubtotal}}</td>
</tr>
{{/each}}
</tbody>
</table>
<!--YOHO-->
<div class="play-content clearfix">
<div class="play-left">
<dl class="play-piao-pan pan">
<dt>索要发票</dt>
<dd>
<div class="play-pan">
<ul>
<li><label>发票抬头 :</label><input type="text" class="textbox" id="piaodesc" /></li>
<li><label>发票类型 :</label> <select class="dropdown" id="piaotype">
<option value="0">请选择</option>
{{#each piaoTypes}}
<option value="{{id}}">{{name}}</option>
{{/each}}
</select> </li>
</ul>
</div>
</dd>
</dl>
<dl class="play-remark-pan pan">
<dt>添加备注信息</dt>
<dd>
<div class="play-pan">
<textarea class="textbox" id="notedesc"></textarea>
<p class="note">声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效。</p>
<p>是否打印价格:
<input name="isPP" id="isPPY" type="radio" value="Y" checked="">
<label for="isPPY">是</label>
<input name="isPP" id="isPPN" type="radio" value="N">
<label for="isPPN">否</label>
(如:送朋友的商品可不打印价格哦!)
</p>
</div>
</dd>
</dl>
</div>
<div class="play-right">
<ul class="play-total">
{{#each promotionFormulaList}}
<li class="{{#if isExpress}}total-express-w{{/if}}">
<label>{{promotion}}</label><em>{{promotionAmount}}</em>
</li>
{{/each}}
</ul>
{{#if showCouponPay}}
<dl class="play-juan-pan pan">
<dt>使用优惠卷支付</dt>
<dd>
<div class="play-pan">
<p class="strong">请选择您要使用的优惠券: </p>
<p class="strong orange">(OUTLET商品除免邮券外不可使用优惠券)</p>
<p class="strong orange">(订单中使用优惠券将不赠送商品返还的YOHO币)</p>
<div class="play-juan">
<ul>
<li>
<input checked name="juangroup" type="radio" value="">
<label>直接输入优惠码: </label>
<input type="text" class="textbox" id="juancode" />
</li>
</ul>
</div>
<p class="errtip red"></p>
<div class="btn-group clearfix">
<input type="button" class="ok" value="确定" id="juansubmit"/>
<input type="button" class="cancel cancel-code" value="取消"/>
</div>
</div>
</dd>
</dl>
{{/if}}
<dl class="play-bi-pan pan">
<dt>使用YOHO币支付</dt>
<dd>
<div class="play-pan">
<div class="strong">
使用YOHO币:
<input type="text" class="textbox" id="biprice" data-bi="{{ownYohoCoin}}" value="0" />
</div>
<p >
您目前有YOHO币 <em class="strong">{{ownYohoCoin}}</em>
</p>
<p class="errbitip red"></p>
<div class="btn-group clearfix">
<input type="button" class="ok" value="确定" id="bisubmit"/>
<input type="button" class="cancel cancel-bi" value="取消"/>
</div>
</div>
</dd>
</dl>
{{# redEnvelopes}}
<div class="red-envelopes active">
<div class="use-envelopes">
<input checked value="0" data-use="{{.}}" type="checkbox" />使用现金红包支付:<span>-¥{{.}}</span>
</div>
<div class="has-envelopes">您的现金红包余额:<span>0.00</span></div>
</div>
{{/ redEnvelopes}}
</div>
</div>
</div>
<div class="to-play">
<p>您需要实际支付金额:<em>{{lastOrderAmount}}</em>元</p>
<div class="btn-group clearfix">
<input type="button" class="submit" value="去付款"/>
</div>
</div>
</div>
{{/ orderEnsure}}
<div class="loading"><span></span>请稍后...</div>
</div>
{{> layout/header}}
<div class="order-ensure-page yoho-page clearfix">
{{# orderEnsure}}
<div class="order-edit">
<div class="order-title">
<ul>
<li class="first">查看购物车</li>
<li class="active">填写订单</li>
<li class="end">付款,完成购买</li>
</ul>
</div>
<div class="order-edit-main" id="order-edit-main" {{#isNewUser}}data-new="new"{{/isNewUser}} cartType="{{cartType}}">
<h2 class="title">请填写并核对以下信息
<a href="{{cartUrl}}" class="btn_backcart"></a>
</h2>
<div class="order-content">
<div class="order-selection address-list">
<h2>收货地址:<span>[修改]</span></h2>
<div class="address-list-inner">
<ul class="exist-address-list">
{{#each hasAddress}}
<li class="has-exist-address">
<input class="radio" type="radio" name="exist-address" id="{{id}}" {{#if checked}}checked{{/if}}/>
<label for="{{id}}">
<strong>{{user}}</strong>
<span>{{address}}</span>
<b class="default-address">设为默认地址</b>
<div class="order-modify-btn">
<span class="address-modify">[修改]</span>
<span class="address-del">[删除]</span>
</div>
</label>
</li>
{{/each}}
<li class="use-new-address hide">
<input class="radio add-address" type="radio" name="address" id=""/>
<label for="">使用新地址</label>
</li>
</ul>
<div class="address-manage hide" cart-type="{{cartType}}">
<ul>
<li>
<span class="address-legend"><i>*</i>收货人姓名:</span>
<input type="text" name="name" class="name text-input"/>
<span>请填写您的真实姓名,最多5个汉字</span>
</li>
<li>
<span class="address-legend"><i>*</i>省市:</span>
<select name="province" id="" class="text-input">
</select>
<select name="city" id="" class="text-input">
</select>
<select name="county" id="" class="text-input">
</select>
<input type="text" name="address" class="text-input"/>
<span>标'*'的为支持加急送的地区,请输入收货的详细地址</span>
</li>
<li>
<span class="address-legend"><i>*</i>手机号码:</span>
<input type="text" name="phone" class="text-input"/>
<span>填写正确手机号便于接收发货和收货通知</span>
</li>
<li>
<span class="address-legend">固定电话:</span>
<div class="address-tel-input">
<input type="text" name="tel-code" class="tel-lengend text-input"/>
<input type="text" name="tel" class="text-input"/>
</div>
<span>如:010-12345678,固话和手机号至少填一项</span>
</li>
<li>
<span class="address-legend">电子邮件:</span>
<input type="text" name="mail" class="text-input"/>
<span>用来接收订单提醒邮件,便于您及时了解订单状态</span>
</li>
<li>
<span class="address-legend">邮编:</span>
<input type="text" name="code" class="text-input"/>
<span>请填写准确的邮编,以确保商品尽快送达</span>
</li>
</ul>
</div>
<span class="save-btn hide">保存并送到这个地址</span>
</div>
</div>
<div class="order-selection pay-time">
<h2>支付及送货时间:<span class="switch-pay-modify">[修改]</span></h2>
<ul class="modity-pay-info">
<li>付款方式:<span>{{defaultPayWay}}</span></li>
{{#if isPreSell}}
<li class="prev-sell-item">发货时间:商品到货后立即发货</li>
{{/if}}
<li>送货时间:<span>{{defaultDelivery}}</span></li>
<li>送货前联系我:<span>否</span></li>
</ul>
<div class="pay-time-modify hide">
<h3 class="pay-time-title">支付方式</h3>
<ul>
<li class="pay-dashed-hr pay-recommend">
<div class="pay-type-legend">
<input value="1" {{#if onlinePay.checked}} checked{{/if}} class="radio {{#if onlinePay.checked}}checked{{/if}}" name="pay-type" type="radio" id="" data-pay="{{onlinePay.paymentId}}"/>
<label for="">在线支付(推荐)</label>
</div>
<span class="pay-type-legend">查看支持在线支付的银行和平台</span>
<div class="support-type hide">
<h4>支持以下支付平台在线支付:</h4>
<ul>
{{#each supportLine}}
<li><img src="{{src}}" alt=""/></li>
{{/each}}
</ul>
<h4>支持以下银行在线支付:</h4>
<ul>
{{#each supportBank}}
<li><img src="{{src}}" alt=""/></li>
{{/each}}
</ul>
</div>
</li>
<li>
{{#if supportDeliveryPay}}
<input value="2" {{#if deliveryPay.checked}}checked{{/if}} class="radio {{#if deliveryPay.checked}}checked{{/if}}" name="pay-type" type="radio" id="" data-pay="{{deliveryPay.paymentId}}"/>
{{/if}}
<label for="">货到付款</label>
<span class="pay-type-tips">注:订单中有限量商品、预售商品、化妆品或者订单金额超过10000元不可以选择货到付款。</span>
</li>
</ul>
<h3>送货时间</h3>
<ul>
{{#each delivery}}
<li>
<input {{#if checked}}checked{{/if}} value={{id}} class="radio" name="pay-time-radio" type="radio" id="{{id}}"/>
<label for="">{{desc}}</label>
</li>
{{/each}}
<li class="pay-dashed-hr pay-type-tips">声明:我们会努力按照您指定的时间配送,但因为天气、交通等各类因素影响,您的订单有可能会有延误现象,敬请谅解!</li>
<li>
<span>送货前是否联系:</span>
<input value="Y" class="radio" name="call-me" type="radio" id=""/>
<label for="">是</label>
<input value="N" checked class="radio" name="call-me" type="radio" id=""/>
<label for="">否</label>
</li>
</ul>
<span class="pay-btn">确定</span>
</div>
</div>
<div class="order-selection select-express">
<h2>选择快递:</h2>
{{#each carriageList}}
<div class="express-list">
<input {{# checked}}checked{{/ checked}} class="radio" type="radio" name="carriagegroup" id="common-{{id}}" value="{{id}}"/>
<label for="common-express">{{name}}:&nbsp;&nbsp;运费 {{value}} {{desc}}</label>
</div>
{{/each}}
<div class="express-list express-tips">注:配送会由于天气,交通等不可抗拒的客观因素造成您收货时间延迟,请您知悉。
</div>
<div class="express-list hide is-sup"><span class="sf">您所选择的区域暂不在顺风派送范围内,</span><a style="text-decoration: none;" target="_blank" href="{{sfUrl}}">点击查看详情</a></div>
<div class="express-list sf hide">如您购买的商品为航空禁运品顺丰会用陆运的方式给你派送,预计3-5天送达,请您见谅</div>
</div>
</div>
</div>
</div>
<div class="order-pay">
<div class="pay-wapper">
<table>
<thead>
<tr>
<th style="width:40%;">
商品信息
</th>
<th style="width:10%;">单价(元)</th>
<th style="width:10%;">返YOHO币</th>
<th style="width:10%;">数量</th>
<th style="width:10%;">小计(元)</th>
<th style="width:20%;">商品金额(元)</th>
</tr>
</thead>
<tbody>
{{#each orderProducts}}
<tr>
<td>
<div class="pay-pro">
<a class="pay-pro-icon" href="{{link}}">
<img src="{{imgCover}}" />
{{#isPriceGift}}
<span class="incentive">加价购</span>
{{/isPriceGift}}
{{#isGift}}
<span class="gift">赠品</span>
{{/isGift}}
</a>
<p class="pay-pro-info">
<a href="{{link}}" target="_blank">{{productTitle}}</a>
<span>颜色:{{productColor}} 尺码:{{productSize}}</span>
</p>
</div>
</td>
<td>
{{productPrice}}
{{#isVipPrice}}
<span class="vipPrice">(VIP)</span>
{{/isVipPrice}}
</td>
<td>{{yohoIcon}}</td>
<td>{{productNum}}</td>
<td class="cart-sub-total {{#xForOne}}xforone{{/xForOne}}">
{{#if xForOne}}
<del>{{productSubtotal}}</del>
<span class="free"></span>
{{^}}
{{productSubtotal}}
{{/if}}
</td>
<td class="cart-sub-total-all">{{productSubtotal}}</td>
</tr>
{{/each}}
</tbody>
</table>
<!--YOHO-->
<div class="play-content clearfix">
<div class="play-left">
<dl class="play-piao-pan pan">
<dt>索要发票</dt>
<dd>
<div class="play-pan">
<ul>
<li><label>发票抬头 :</label><input type="text" class="textbox" id="piaodesc" /></li>
<li><label>发票类型 :</label> <select class="dropdown" id="piaotype">
<option value="0">请选择</option>
{{#each piaoTypes}}
<option value="{{id}}">{{name}}</option>
{{/each}}
</select> </li>
</ul>
</div>
</dd>
</dl>
<dl class="play-remark-pan pan">
<dt>添加备注信息</dt>
<dd>
<div class="play-pan">
<textarea class="textbox" id="notedesc"></textarea>
<p class="note">声明:备注中有关收货人信息、支付方式、配送方式、发票信息等购买要求一律以上面的选择为准,备注无效。</p>
<p>是否打印价格:
<input name="isPP" id="isPPY" type="radio" value="Y" checked="">
<label for="isPPY">是</label>
<input name="isPP" id="isPPN" type="radio" value="N">
<label for="isPPN">否</label>
(如:送朋友的商品可不打印价格哦!)
</p>
</div>
</dd>
</dl>
</div>
<div class="play-right">
<ul class="play-total">
{{#each promotionFormulaList}}
<li class="{{#if isExpress}}total-express-w{{/if}}">
<label>{{promotion}}</label><em>{{promotionAmount}}</em>
</li>
{{/each}}
</ul>
{{#if showCouponPay}}
<dl class="play-juan-pan pan">
<dt>使用优惠券支付</dt>
<dd>
<div class="play-pan">
<p class="strong">请选择您要使用的优惠券: </p>
<p class="strong orange">(OUTLET商品除免邮券外不可使用优惠券)</p>
<p class="strong orange">(订单中使用优惠券将不赠送商品返还的YOHO币)</p>
<div class="play-juan">
<ul>
<li>
<input checked name="juangroup" type="radio" value="">
<label>直接输入优惠码: </label>
<input type="text" class="textbox" id="juancode" />
</li>
</ul>
</div>
<p class="errtip red"></p>
<div class="btn-group clearfix">
<input type="button" class="ok" value="确定" id="juansubmit"/>
<input type="button" class="cancel cancel-code" value="取消"/>
</div>
</div>
</dd>
</dl>
{{/if}}
<dl class="play-bi-pan pan">
<dt>使用YOHO币支付</dt>
<dd>
<div class="play-pan">
<div class="strong">
使用YOHO币:
<input type="text" class="textbox" id="biprice" data-bi="{{ownYohoCoin}}" value="0" />
</div>
<p >
您目前有YOHO币 <em class="strong">{{ownYohoCoin}}</em>
</p>
<p class="errbitip red"></p>
<div class="btn-group clearfix">
<input type="button" class="ok" value="确定" id="bisubmit"/>
<input type="button" class="cancel cancel-bi" value="取消"/>
</div>
</div>
</dd>
</dl>
{{#if redEnvelopes}}
<div class="red-envelopes active">
<div class="use-envelopes">
<input checked value="0" data-all="{{redEnvelopes}}" data-use="{{useRedEnvelopes}}" type="checkbox" />使用现金红包支付:<span>-¥{{useRedEnvelopes}}</span>
</div>
<div class="has-envelopes">您的现金红包余额:<span></span></div>
</div>
{{/if}}
</div>
</div>
</div>
<div class="to-play">
<p>您需要实际支付金额:<em>{{lastOrderAmount}}</em>元</p>
<div class="btn-group clearfix">
<input type="button" class="submit" value="去付款"/>
</div>
</div>
</div>
{{/ orderEnsure}}
<div class="loading"><span></span>请稍后...</div>
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
_site
sea-modules
spm_modules
.cache
dist
coverage
css/
.sass-cache/
script/nginx/logs/
*.DS_Store
\ No newline at end of file
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
_site
sea-modules
spm_modules
.cache
dist
coverage
# 只忽略当前目录下的css目录,子目录的不忽略
css/*
.sass-cache/
script/nginx/logs/
*.DS_Store
... ...
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.
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.
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.
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.
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.
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.
This diff could not be displayed because it is too large.
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 Mar 2 13:38:33 2016
Created by FontForge 20120731 at Wed Mar 9 20:06:33 2016
By Ads
</metadata>
<defs>
... ... @@ -161,10 +161,9 @@ l-531 -530l-70 70zM748 686z" />
<glyph glyph-name="uniE62E" unicode="&#xe62e;" horiz-adv-x="1025"
d="M491 6q9 -10 21.5 -10t21.5 10l357 407q4 5 5.5 9.5t0 8t-6 5.5t-11.5 2h-133q-14 0 -23.5 9.5t-9.5 22.5v261q0 9 -4.5 16.5t-12.5 11.5t-17 4h-333q-14 0 -24 -9.5t-10 -22.5v-261q0 -13 -9.5 -22.5t-23.5 -9.5h-133q-14 0 -17.5 -7.5t5.5 -17.5z" />
<glyph glyph-name="uniE62F" unicode="&#xe62f;"
d="M512 832v-1v1q-51 0 -99 -11t-92.5 -33.5t-71 -38.5t-67.5 -45v-396q0 -50 17 -97t42.5 -82t60.5 -66.5t66.5 -52.5t64.5 -38t50.5 -24.5t28.5 -11.5q7 3 17 7t29 12.5t39 19.5t44.5 26t47.5 33.5t46 40t42 47.5t34 54.5t23 62t8 69.5v396q-23 16 -36.5 25t-38.5 24.5
t-43.5 24.5t-46 20.5t-51.5 18t-54 11t-60 4.5zM772 308q0 -128 -130 -223q-65 -47 -130 -72q-65 25 -130 72q-44 32 -72.5 66.5t-43 73.5t-14.5 83v371q76 46 128.5 65t131.5 20q79 -1 131.5 -20t128.5 -65v-371zM512 710q-59 0 -99 -11t-105 -43v-351q0 -28 8 -53.5
t22.5 -46t30 -37.5t36.5 -31t36 -23.5t33.5 -18t24.5 -11t13 -4.5q9 3 16.5 6t30 14t40.5 22.5t41 31t38.5 40.5t26.5 50.5t11 60.5v351q-27 13 -46 21.5t-38 15.5t-37 10.5t-38 5t-45 1.5v0zM648 573v-42h-92v-58h81v-54h-81v-67h102v-50h-292v50h37v147h57v-147h39v179
h-121v54h270v-12z" />
d="M512 809v0q-58 0 -112.5 -12t-105.5 -38t-80.5 -44t-77.5 -51v-450q0 -57 19.5 -110.5t49 -93.5t69 -76t75.5 -59.5t73.5 -43t57 -28t32.5 -12.5q13 4 32.5 12.5t57 28t73.5 43t75.5 59.5t69 76t49 93.5t19.5 110.5v450q-48 33 -77.5 51t-80.5 44t-105.5 38t-112.5 12z
M808 214q0 -76 -36.5 -138t-112.5 -117q-39 -28 -78.5 -49.5t-68.5 -32.5q-74 29 -147 82q-76 55 -112.5 117t-36.5 138v421q87 53 146.5 75t149.5 23q90 -1 149.5 -23t146.5 -75v-421zM512 671q-46 0 -81.5 -6t-67.5 -18.5t-83 -37.5v-399q0 -35 12.5 -68.5t30 -57.5
t44 -46t47 -35.5t46 -26t34 -16t18.5 -6.5q10 3 18.5 6.5t34 16t46 26t47 35.5t44 46t30 57.5t12.5 68.5v399q-74 37 -119.5 49.5t-112.5 12.5v0zM667 515v-47h-105v-67h92v-61h-92v-77h116v-57h-332v57h42v168h64v-168h46v205h-138v61h307v-14z" />
<glyph glyph-name="uniE630" unicode="&#xe630;" horiz-adv-x="1163"
d="M295 196q67 0 114 -47t47 -113.5t-47 -114t-114 -47.5t-114 47.5t-47 113.5q0 44 21.5 81t58.5 58.5t81 21.5zM917 196q67 0 114 -47t47 -114q0 -32 -12.5 -62t-34 -51.5t-51.5 -34.5t-63 -13q-66 0 -113.5 47.5t-47.5 113.5q0 79 62 127q44 34 99 34zM400 894v-99h-210
v0l-187 -294v-372h95q27 56 80 90.5t117 34.5q43 0 82 -16t68.5 -44t46.5 -65h228q27 56 80 90.5t117 34.5q22 0 43 -4.5t39.5 -12t36 -18.5t32 -25t26.5 -30.5t20 -34.5h46v765h-760zM400 452h-283l159 250l124 1v-251v0zM893 701l-131 -276l-63 31l101 206h-105v68h198
... ... @@ -178,6 +177,10 @@ d="M1020 810q0 34 -24 58t-59 24h-851q-34 0 -58.5 -24t-24.5 -58v-852q0 -34 24.5 -
q16 16 38.5 16t38.5 -16l153 -152l264 264q16 16 39 16t39 -16t16 -38.5t-16 -38.5z" />
<glyph glyph-name="uniE634" unicode="&#xe634;"
d="M637 610l-45 46l-272 -272l272 -272l45 46l-226 226z" />
<glyph glyph-name="uniE635" unicode="&#xe635;"
d="M0 896h1024v-1024h-1024v1024zM85 -43h854v854h-854v-854z" />
<glyph glyph-name="uniE636" unicode="&#xe636;"
d="M1024 -128h-1024v1024h1024v-1024zM947 674l-34 34q-13 13 -30 13t-30 -13l-486 -495l-196 205q-13 13 -30 13t-30 -13l-34 -34q-5 -5 -8.5 -11t-4 -12.5t0 -13t4 -12.5t8.5 -11l256 -256q23 -22 51 -8l6 2l3 6l546 546q18 13 20 30.5t-12 29.5z" />
<glyph glyph-name="uniE637" unicode="&#xe637;"
d="M0 812v-1024h1024v1024h-1024zM983 -171h-942v942h942v-942zM288 280h448q6 0 10.5 2.5t7.5 7t3 10.5q0 8 -6 14t-15 6h-448q-9 0 -15 -6t-6 -14t6 -14t15 -6z" />
<glyph glyph-name="uniE638" unicode="&#xe638;"
... ...