Authored by 郝肖肖

Merge branch 'release/4.4' of http://git.dev.yoho.cn/web/yohobuy into release/4.4

... ... @@ -365,6 +365,7 @@ class CartData
* @param int $paymentType 支付类型ID
* @param string $remark 留言
* @param string $couponCode 优惠券码
* @param string $promotionCode 优惠码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param int $isPreContact 送货前是否联系
* @param int $isPrintPrice 是否打印价格
... ... @@ -374,7 +375,7 @@ class CartData
* @return array 接口返回的数据
*/
public static function orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId,
$paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $unionKey,$userAgent, $redEnvelopes)
$paymentId, $paymentType, $remark,$couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $unionKey,$userAgent, $redEnvelopes)
{
$param = Yohobuy::param();
$param['debug'] = 'Y';
... ... @@ -397,9 +398,13 @@ class CartData
}
$param['payment_id'] = $paymentId;
$param['payment_type'] = $paymentType;
if (!empty($couponCode)) {
$param['coupon_code'] = $couponCode;
}
if (!empty($promotionCode)) {
$param['promotion_code'] = $promotionCode;
}
if (!empty($yohoCoin)) {
$param['use_yoho_coin'] = $yohoCoin;
}
... ...
{{> layout/header}}
{{> layout/header}}
<div class="order-ensure-page yoho-page clearfix">
{{# orderEnsure}}
<div class="order-edit">
... ... @@ -200,10 +200,7 @@
<ul>
{{#each goodlist}}
<li >
<a href={{link}}>
<img src={{src}}/>
</a>
<img src={{src}}/>
{{#if goodsType}}
<p class="{{classname}}" >{{goodsType}}</p>
{{/if}}
... ...
... ... @@ -16330,7 +16330,7 @@ function getYohoBiList() {
type: 'GET',
dataType: 'json',
url: '/cart/index/getCouponList'
}).then(function(d) {
}).then(function(d) {
if (d.code === 200) {
data = d.data;
... ... @@ -16338,9 +16338,9 @@ function getYohoBiList() {
for (i = 0; i < dLen; i++) {
juanStr += '<li>' +
'<input name="juangroup" type="radio" value="' +
data[i].code + '" ' + (data[i].valid ? '' : 'disabled="disabled"') + '>' +
'<label>' + data[i].desc + '</label>' +
'<input name="juangroup" type="radio" value="' +
data[i].code + '" ' + (data[i].valid ? '' : 'disabled="disabled"') + '>' +
'<label>' + data[i].desc + '</label>' +
'</li>';
}
... ... @@ -16382,6 +16382,7 @@ $('.to-play input.submit').click(function() {
redEnvelopes = $('.use-envelopes input:checked').attr('data-use'),
$juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'),
codeVal = $juangroupInput.val(),
promotionVal = $juangroupInput.closest('li').find('#juancode').val();
juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val();
$loading.show();
... ... @@ -16407,6 +16408,7 @@ $('.to-play input.submit').click(function() {
paymentType: paymentType,
remark: remark,
couponCode: juanCode,
promotionCode: promotionVal,
yohoCoin: yohoCoin,
isPreContact: ytoTrue(isPreContact),
isPrintPrice: ytoTrue(isPrintPrice),
... ... @@ -16424,7 +16426,7 @@ $('.to-play input.submit').click(function() {
}).always(function() {
$this.removeAttr('disabled');
});
});
});
});
define("js/shopping/pay", ["jquery"], function(require, exports, module){
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

13.8 KB | W: | H:

759 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -720,7 +720,7 @@ function getYohoBiList() {
type: 'GET',
dataType: 'json',
url: '/cart/index/getCouponList'
}).then(function(d) {
}).then(function(d) {
if (d.code === 200) {
data = d.data;
... ... @@ -728,9 +728,9 @@ function getYohoBiList() {
for (i = 0; i < dLen; i++) {
juanStr += '<li>' +
'<input name="juangroup" type="radio" value="' +
data[i].code + '" ' + (data[i].valid ? '' : 'disabled="disabled"') + '>' +
'<label>' + data[i].desc + '</label>' +
'<input name="juangroup" type="radio" value="' +
data[i].code + '" ' + (data[i].valid ? '' : 'disabled="disabled"') + '>' +
'<label>' + data[i].desc + '</label>' +
'</li>';
}
... ... @@ -772,6 +772,7 @@ $('.to-play input.submit').click(function() {
redEnvelopes = $('.use-envelopes input:checked').attr('data-use'),
$juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'),
codeVal = $juangroupInput.val(),
promotionVal = $juangroupInput.closest('li').find('#juancode').val();
juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val();
$loading.show();
... ... @@ -797,6 +798,7 @@ $('.to-play input.submit').click(function() {
paymentType: paymentType,
remark: remark,
couponCode: juanCode,
promotionCode: promotionVal,
yohoCoin: yohoCoin,
isPreContact: ytoTrue(isPreContact),
isPrintPrice: ytoTrue(isPrintPrice),
... ... @@ -814,4 +816,4 @@ $('.to-play input.submit').click(function() {
}).always(function() {
$this.removeAttr('disabled');
});
});
});
... ...
... ... @@ -872,13 +872,14 @@ class CartModel
* @param int $paymentType 支付类型ID
* @param string $remark 留言
* @param string $couponCode 优惠券码
* @param string $promotionCode 优惠码
* @param mixed $yohoCoin 使用的YOHO币数量或为空
* @param int $isPreContact 送货前是否联系
* @param int $isPrintPrice 是否打印价格
* @param int $redEnvelopes 红包
* @return array 接口返回的数据
*/
public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes)
public static function orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes)
{
$result = array('code' => 400, 'message' => self::ERROR_400_MESSAGE);
... ... @@ -916,7 +917,7 @@ class CartModel
$userAgent = isset($unionInfo['client_id']) ? 'YOHO!Buy/3.8.2.259(Model/PC;Channel/' . $unionInfo['client_id'] . ';uid/' . $uid . ')' : null;
}
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes);
$orderSubRes = CartData::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice,$unionKey,$userAgent, $redEnvelopes);
if ($orderSubRes && isset($orderSubRes['code'])) {
$result = $orderSubRes;
}
... ...
... ... @@ -445,15 +445,17 @@ class IndexController extends WebAction
$paymentId = $this->post('paymentId', 15); // 支付ID
$paymentType = $this->post('paymentType', 1); // 默认在线支付
$remark = $this->post('remark', ''); // 备注信息
$couponCode = $this->post('couponCode', null); // 优惠码
$couponCode = $this->post('couponCode', null); // 优惠券码
$promotionCode = $this->post('promotionCode', null);//优惠码
$yohoCoin = $this->post('yohoCoin', 1); // YOHO币
$isPreContact = $this->post('isPreContact', false); // 送货前是否联系
$isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格
$redEnvelopes = $this->post('redEnvelopes', null);
//优先优惠码
$couponCode = $promotionCode?null:$couponCode;
// 调用下单接口
$result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId,
$paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes);
$paymentId, $paymentType, $remark, $couponCode,$promotionCode,$yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes);
// 判断是否下单成功
if (empty($result['data']['order_code'])) {
... ...